aspose file tools*
The moose likes Struts and the fly likes how to add checkbox html tag?- urgent! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to add checkbox html tag?- urgent!" Watch "how to add checkbox html tag?- urgent!" New topic
Author

how to add checkbox html tag?- urgent!

Liz Brown
Ranch Hand

Joined: Oct 22, 2002
Posts: 112
How to add a checkbpx in front of every row of this table? Please help!
---------------------------------
<table border="0" cellspacing="0" cellpadding="1" align="center">
<tr class="tblcaption">
<INPUT TYPE=CHECKBOX NAME="maillist">
<logic:iterate indexId="colCtr" id="col" name="myInfo" property="sortedList" type=" com.api.ColumnInfo">
<logic:equal value="true" name="col" property="visible">
<TD>
<bean:message key="<%=col.getMyLabelKey()%>" bundle="MyResources"/>
</TD>
</logic:equal>
</logic:iterate>
</tr>
<tr class="tblcellseparator">

</tr>
</table>
Mark Vedder
Ranch Hand

Joined: Dec 17, 2003
Posts: 624

I assume you want to put a checkbox where you have the
<INPUT TYPE=CHECKBOX NAME="maillist">
tag? You need to place that inside of a set of table data tags:

In your code sample, the input tag is between table row tags, but not inside a table data tag. I'm not sure what the (X)HTML specifications say to do (if anything since it is technically incorrect markup), but most browsers will render anything placed between <table> tags, but not inside of <td> (table data) or <th> (table header) tags before the table. Some browser may even ignore such erroneous entities.
Liz Brown
Ranch Hand

Joined: Oct 22, 2002
Posts: 112
how to state that with html tag in struts?
Mark Vedder
Ranch Hand

Joined: Dec 17, 2003
Posts: 624


That would render an input tag of:

<input type=�checkbox� name=�foo� value=�on�>

The property attribute is the only required attribute for the <html:checkbox> tag. You can look at the what the various other attributes are and what they are used for in the documentation available at: http://struts.apache.org/userGuide/struts-html.html#checkbox
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to add checkbox html tag?- urgent!
 
Similar Threads
BeanUtils.populate IndexOutofBound
jsp exception while using logic:iterate
Iterate Hashmap through struts
how to make editable page non editable when i press save?????
initilaze checkbox