  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Using checkboxes | Using checkboxes 2007-09-04 - By Pedro Herrera
Back
Marcos,
use this ::
<s:iterator id="foto" value="fotosGaleria" status="stat">
<s:checkbox name="sel" theme="simple" fieldValue="%{codFotoGaleria}"> </s:checkbox>
</s:iterator>
inte+
Herrera
Marcos Mendon??a wrote: > > Hello > > I'm trying to use checkboxes for a service/product selection. But > following the documentation I wasn't able to set the value of each > option. > > My code: > > <s:iterator value="%{services.iterator}"> > <tr> > <td> > <s:checkbox label="%{name}" name="name" value="id"/></td> > </tr> > </s:iterator> > > Resulting in > > <input type="checkbox" name="id_produto" value="true" > checked="checked" id="selecaoProduto_id_produto"/> > <input type="hidden" name="__checkbox_id_produto" value="true" /> > <label for="selecaoProduto_id_produto" > class="checkboxLabel">Service1</label> > </td> > > Shouldn't the value attribute be set to whatever the id of my service is > set to? > > Why is value="true" instead of my service id? > > How do I recover this in my action to find what wich services where > selected by the user? > > Thanks. > > -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ > To unsubscribe, e-mail: user-unsubscribe@(protected) > For additional commands, e-mail: user-help@(protected) > > >
-- View this message in context: http://www.nabble.com/Using-checkboxes-tf4374405 .html#a12476316 Sent from the Struts - User mailing list archive at Nabble.com.
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|
 |