You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by mi...@ps.ge.com on 2003/04/04 21:00:15 UTC
need examples of using indexes ... Pls.
hi,
I have list of beans
a bean has a list and other fields
on JSP I need to show list of rows
where each row has a checkbox and select and other info
then I need to introspect all user selection
would be nice get such example how to do it in JSP, Action and Form
tnx
p.s. looks like everybody does it in diff. ways
p.p.s. I read how to for indexed.
Best Regards.
Michael.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: need examples of using indexes ... Pls.
Posted by Vinay <vi...@mdp.net>.
I think the below code should work or similar one,if this is not what you
are looking , let know
This used struts-el's forEach loop.No scriplets and only tag libraries
<%@ page import="net.mdp.hold.*" %>
<%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic-el.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<!-- JSTL plus struts-el taglibs eliminates ugly scriptlets! -->
<%@ taglib prefix="c" uri="/WEB-INF/c.tld" %>
<%@ taglib prefix="c_rt" uri="/WEB-INF/c-rt.tld" %>
<jsp:useBean id="trans" class="net.mdp.hold.HoldTrans" scope="request"/>
<html:form action="holdupdate.do">
<table border=0 width=100% cellspacing=1 cellpadding=1>
<tr>
<td align="right">
<html:submit value="submit"/>
</td>
</tr>
</table>
<table border=0 width=100% cellspacing=1 cellpadding=1>
<c:forEach var="transid" items="${trans.transactions}">
<tr>
<td align=center>
<html:checkbox property="transSelect"/>
<td align=center>
<c:out value="${transid.acctno}"/>
</td>
<td align=center>
<c:out value="${transid.dateofservice}"/>
</td>
<td align=center>
<c:out value="${transid.testcode}"/>
</td>
</table>
</html:form>
----- Original Message -----
From: <mi...@ps.ge.com>
To: <st...@jakarta.apache.org>
Sent: Friday, April 04, 2003 2:00 PM
Subject: need examples of using indexes ... Pls.
> hi,
>
> I have list of beans
> a bean has a list and other fields
> on JSP I need to show list of rows
> where each row has a checkbox and select and other info
>
> then I need to introspect all user selection
>
> would be nice get such example how to do it in JSP, Action and Form
>
> tnx
>
> p.s. looks like everybody does it in diff. ways
> p.p.s. I read how to for indexed.
>
> Best Regards.
> Michael.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: need examples of using indexes ... Pls.
Posted by James Turner <tu...@blackbear.com>.
I have a powerpoint presentation on using beans with indexed properties
here:
http://www.strutskickstart.com/IndexedPropertiesandValidation.ppt
James
> -----Original Message-----
> From: michael.korolyov@ps.ge.com [mailto:michael.korolyov@ps.ge.com]
> Sent: Friday, April 04, 2003 2:00 PM
> To: struts-user@jakarta.apache.org
> Subject: need examples of using indexes ... Pls.
>
>
> hi,
>
> I have list of beans
> a bean has a list and other fields
> on JSP I need to show list of rows
> where each row has a checkbox and select and other info
>
> then I need to introspect all user selection
>
> would be nice get such example how to do it in JSP, Action and Form
>
> tnx
>
> p.s. looks like everybody does it in diff. ways
> p.p.s. I read how to for indexed.
>
> Best Regards.
> Michael.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org