• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem about checkbox for script generator

 
Ranch Hand
Posts: 462
IntelliJ IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends,
I wish successes to everybody!

My question is such:

When i change the value of the following code (value="0") that is shown in the situation to checked
But when i click the submit button nothing is generated :?: so how to get my page on checked state?

Program side:

List<ClassProperty> mainList = new ArrayList<ClassProperty>();
for (int i = 0; i < classPropertyList.size(); i++) {
ClassProperty classProperty = (ClassProperty) classPropertyList.get(i);
if (classProperty.getSelected() == 1) {
mainList.add(classProperty);
}
}

JSP side:

<logic-el:iterate id="classProperty"
name="<%=AdminConstantKeys.CLASS_PROPERTY_LIST_SESSION_KEY%>"
type="az.fhn.admin.model.ClassProperty" indexId="ctr">

<html-el:hidden property="classPropertyList[${ctr}].propertyName"
styleId="classPropertyList[${ctr}].propertyName"/>
<tr>
<td width="50" align="center">
<html-el:checkbox name="scriptGeneratorForm"
property="classPropertyList[${ctr}].selected"
styleId="classPropertyList[${ctr}].selected" value="0"
tabindex="1"/>

</td>

also generated HTML source code:
................................................................
<td width="50" align="center">
<input type="checkbox" name="classPropertyList[0].selected" tabindex="1" value="0" checked="checked" id="classPropertyList[0].selected">
</td>
.................................................................
<td width="50" align="center">
<input type="checkbox" name="classPropertyList[1].selected" tabindex="1" value="0" checked="checked" id="classPropertyList[1].selected">
</td>
.................................................................
Thanks beforehand!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic