File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calendar value not populating

 
yuva rani
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have struts form 'genericForm', where in the text boxes and values are generated dynamically as shown in below code snippet. I wanted to display calendar icon against the DATE text boxes. So calling the calendar component. However the calendar value is not getting populated in text box
i think this is happening becos Textboxes are generated dynamically within the loop/iteration and unable to recognize textbox name.

Could you please suggest how to solve this issue.

==================
<% int i=0; %>
<bean:define id="valChamps" name="genericForm" property="champs" />
<logic:iterate id="item" name="genericForm" property="metaAttributes">
<tr>
<td class="Cnt1" ><bean:write name="item" property="name"/> </td>
<td><logic:notEqual value="DATE" name="item" property="typeComplet">
<input type="text" name="champs" value="<%=((String[])valChamps)[i]%>">
</logic:notEqual>
<logic:equal value="DATE" name="item" property="typeComplet">
<input type="text" readonly size="12" maxlength="10" name="champs" value="<%=((String[])valChamps)[i]%>">


</logic:equal>
</td>
</tr>
<% i++; %>
</logic:iterate>
==================

please assist
 
yuva rani
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Including extra attribute "id" which generates unique name for each textbox solves the issue.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic