DNewfield wrote:
> 
> On 5/3/10 2:54 AM, RogerV wrote:
>> <s:form>
>> <s:checkboxlist name="selectedroles" list="%{availableroles}"
>> value="%{preselectedroles}"/>
>> <s:submit type="button" label="Add"/>
>> </s:form>
> 
> So what html does this generate for the client to render/submit?
> 

The rendering is a bit odd, which makes me feel I'm still missing something.

<tr>
    <td class="tdLabel"></td>
    <td>
<input type="checkbox" name="{}" value="ROLE_ADMIN" id="{}-1"/>
<label for="{}-1" class="checkboxLabel">Adminstrator</label>
<input type="checkbox" name="{}" value="ROLE_USER" id="{}-2"
checked="checked"/>
<label for="{}-2" class="checkboxLabel">Diagnostics</label>
<input type="checkbox" name="{}" value="ROLE_UBER" id="{}-3"/>
<label for="{}-3" class="checkboxLabel">Unrestricted</label>
<input type="hidden" id="__multiselect_cbox" name="__multiselect_{}"
value="" />     </td>
</tr>





> If you set the form action to be GET it's even easier to see what it is 
> submitting.  Once you know it's submitting the right set of values, then 
> you can focus on where those values go.
> 
> This appears in your "prepare"
>>              selectedroles = new HashMap<String,String>();
> So if you have params then prepare in your interceptor stack you'll drop 
> the values collected in params on the floor.  (If you have params 
> prepare params, it should come back.)
> 

I'm using the params,prepare,params stack.



> I'm not sure how the named values get submitted or how those would get 
> converted into a map, so I wonder if this is ever called:  (but I admit 
> I'm a bit weak on the conversion process)
> 
>>      public void setSelectedroles(Map<String, String>  selectedroles) {
>>              this.selectedroles = selectedroles;
>>      }
> 
> -Dale
> 

-- 
View this message in context: 
http://old.nabble.com/Where-is-the-documentation-for-Struts-tags-....-tp28413026p28447736.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to