Suggestions:
1- Use c:forEach instead of logic:iterate
2- Use a seperate property in your form to store the viewable/changeable stuff,
for example if you have a collection of strings, you can have an array
of strings be
your viewable/editable property. This will cut down on network traffic
and make
debugging much easier.
Otherwise you can do it as you mentioned with hidden fields:
<c:forEach items="formName.collectionProperty" var="item" varStatus="s">
<c:if test="${s.index >= offset and s.index < offset + length}"
var="displayable">
<html:input property="collectionProperty" value="${item}" />
</c:if>
<c:if test="${not displayable}"><html:hidden
property="collectionProperty" value="${item}" /></c:if>
</c:forEach>
Regards,
Abdullah
-----Original Message-----
From: Oscar [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 20, 2005 5:23 AM
To: [email protected]
Subject: logic:iterate, with offset and length parameters, lose data
Hi, I am using a logic:iterate tag throw a Collection. This collection is a
property of my ActionForm.
I set also an offset and length.
So, shown elements work fine, but not shown elements are just null. I would not
like to lose data of the "not shown elements" of the collection.
I dont know how to use html:hidden for my purposes, because I think this only
can be used for a property.
Any help?
Thanks in advance
Oscar Cristobal
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]