You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by bs...@psl.nmsu.edu on 2005/11/11 23:17:58 UTC

Ignorant multibox question.

Lets say I have the following multibox:

<table>
<c:forEach items="${myForm.groups}" var="groups" >
<tr><td>

<html-el:multibox property="groups" value="${groups.groupName}"/> 
<c:out value="${groups.groupName}"/> <br/>

</td></tr>
</c:forEach>
</table>


I have a List of POJOs with a name and a boolean value for each POJO.  I want to change the boolean value to true if a user check marks a specific item in the List.  

If I wasn't in struts I could easily do this if I were using a Servlet. But how and where do I read through each POJO in the List changing the POJO instance variable to true if someone check marks it?  

 

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


RE: Ignorant multibox question.

Posted by bs...@psl.nmsu.edu.
Actually I got it to work elegantly with the following code:

<c:forEach items="${myForm.groups}" var="groups" >

	<tr><td>

	<html-el:multibox property="chosenGroups" value="${groups}"/> 

		<c:out value="${groups}"/> <br/>

	</td></tr>

	</c:forEach>

But thanks for the link anyways....I will use it in the future.

Have you stumbled on this link:  http://husted.com/struts/tips/007.html

I think it's almost verbatim out of the Struts in Action Book

hth,

On 11/11/05, bsimonin@psl.nmsu.edu <bs...@psl.nmsu.edu> wrote:
>
> Lets say I have the following multibox:
>
> <table>
> <c:forEach items="${myForm.groups}" var="groups" >
> <tr><td>
>
> <html-el:multibox property="groups" value="${groups.groupName}"/>
> <c:out value="${groups.groupName}"/> <br/>
>
> </td></tr>
> </c:forEach>
> </table>
>
>
> I have a List of POJOs with a name and a boolean value for each POJO.  I want to change the boolean value to true if a user check marks a specific item in the List.
>
> If I wasn't in struts I could easily do this if I were using a Servlet. But how and where do I read through each POJO in the List changing the POJO instance variable to true if someone check marks it?


--
Keith Sader
ksader@gmail.com
http://www.saderfamily.org/roller/page/ksader
http://www.jroller.com/page/certifieddanger

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



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


Re: Ignorant multibox question.

Posted by Keith Sader <ks...@gmail.com>.
Have you stumbled on this link:  http://husted.com/struts/tips/007.html

I think it's almost verbatim out of the Struts in Action Book

hth,

On 11/11/05, bsimonin@psl.nmsu.edu <bs...@psl.nmsu.edu> wrote:
>
> Lets say I have the following multibox:
>
> <table>
> <c:forEach items="${myForm.groups}" var="groups" >
> <tr><td>
>
> <html-el:multibox property="groups" value="${groups.groupName}"/>
> <c:out value="${groups.groupName}"/> <br/>
>
> </td></tr>
> </c:forEach>
> </table>
>
>
> I have a List of POJOs with a name and a boolean value for each POJO.  I want to change the boolean value to true if a user check marks a specific item in the List.
>
> If I wasn't in struts I could easily do this if I were using a Servlet. But how and where do I read through each POJO in the List changing the POJO instance variable to true if someone check marks it?


--
Keith Sader
ksader@gmail.com
http://www.saderfamily.org/roller/page/ksader
http://www.jroller.com/page/certifieddanger

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