You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chen Jerry <te...@gmail.com> on 2005/11/15 05:19:40 UTC
How can I keep multiple selection of html:options when I am back
Well, I make multiple selection and submit the page, which will be
forwarded to if validation is not passed. I want to keep selected the
multiple <option>s of <select> when I am back. What can I do?
This is the fragment of source code:
<html:select property="contacts" multiple="true"
ondblclick="javascript:DelContact();" styleClass="selectBox"
style="width:100%;height=60px;" >
<html:options collection="contactList" property="value" labelProperty="label"/>
</html:select>
Thanks in advance.
Jerry
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: How can I keep multiple selection of html:options when I am back
Posted by Danny Lee <ha...@yahoo.de>.
I don't know if I understand you right, but if you wan't to get the
option selected before validation, just save it in some form Attribute
of your Struts Form and then use:
<html:select property="contacts" multiple="true"
value="${myForm.lastSelectedThing}>
Cheerz
Danny
Chen Jerry schrieb:
> Well, I make multiple selection and submit the page, which will be
> forwarded to if validation is not passed. I want to keep selected the
> multiple <option>s of <select> when I am back. What can I do?
>
> This is the fragment of source code:
>
> <html:select property="contacts" multiple="true"
> ondblclick="javascript:DelContact();" styleClass="selectBox"
> style="width:100%;height=60px;" >
> <html:options collection="contactList" property="value" labelProperty="label"/>
> </html:select>
>
> Thanks in advance.
>
> Jerry
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org