Note that there are some explanatory texts on larger screens.

plurals
  1. POStruts 2 checkbox : What's the use of the value attribute when the fieldValue can only be true or false?
    primarykey
    data
    text
    <ul> <li><p>Why do we need a <strong>value</strong> attribute as well as a <strong>fieldValue</strong> attribute in <code>s:checkbox</code> tag, unlike <code>s:textfield</code>, which has only the <strong>value</strong> attribute ?</p></li> <li><p>Does the <code>s:checkbox</code> tag's <code>fieldValue</code> attribute allow strings other than "<strong>true</strong>" or "<strong>false</strong>" ? In Struts2 in Action (Manning) , it says about the <code>fieldValue</code> attribute </p></li> </ul> <blockquote> <p>The actual value that’ll be submitted by the checkbox. Maybe true or false</p> </blockquote> <p>That is, if I use </p> <p><code>&lt;s:checkbox name="wantMoreChocolates" fieldValue="true"/&gt;</code></p> <p>then <strong>wantMoreChocolate</strong> can only be Boolean type in the java class. In that case, <strong>why do the docs specify the type of fieldValue to be a String and not Boolean</strong> ?</p> <ul> <li>Moreover, about the value property, it says </li> </ul> <blockquote> <p>the value attribute, as with the other UI components, points to the actual Java-side property to which the component is bound, a Boolean in this case.</p> </blockquote> <p>If through "<strong>value</strong>" we specify the actual property to which the component is bound, <strong>then what's the role of the name attribute</strong>. Since, the name attribute has to point to a Boolean value, why does it have to use the value attribute to bind it to another boolean ?</p> <ul> <li>Why can't prepopulation occur solely on the basis of the property corresponding to the name attribute</li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload