Ok, thanks.  Good point about including a hash for security; thanks.  I'll put 
that on my todo list.


On 2011-04-16 21:05, Will Hartung wrote:

On Apr 15, 2011, at 12:50 PM, Rusty Wright wrote:

If it's correct then I want to save the clubs List to the database.  The only 
way I could think of to send it back to the next action bean is with a POST, by 
building a new clubs List:

<stripes:form 
beanclass="com.objecteffects.clublist.web.action.SaveUploadActionBean">
<c:forEach items="${actionBean.clubs}" var="club" varStatus="loop">
<stripes:hidden name="clubs[${loop.index}].name" value="${club.name 
<http://club.name/>}" />
<stripes:hidden name="clubs[${loop.index}].addressLine1" 
value="${club.addressLine1}" />
<stripes:hidden name="clubs[${loop.index}].city" value="${club.city}" />
<stripes:hidden name="clubs[${loop.index}].zipcode" value="${club.zipcode}" />
<stripes:hidden name="clubs[${loop.index}].url" value="${club.url}" />
<stripes:hidden name="clubs[${loop.index}].email" value="${club.email}" />
<stripes:hidden name="clubs[${loop.index}].note" value="${club.note}" />
</c:forEach>

<br />

<stripes:submit
     name="submit"
     value="save"
   />
</stripes:form>


Is there a simpler way to do this?

That's the fundamentals. The real beauty of this is that Stripes makes this 
kind of thing trivial to do.

If you care about the integrity of the data, you may want to include a hash of 
sorts that you can compare to ensure that the data has not changed.

The other technique, of course, is to store the data in the session and use it 
directly. I'm not a big fan of that on general principle, but if you have a lot 
of data, it sure beats roundtripping it back the browser.

Of course, you can leave the CSV file on the disk and when it's approved, 
simply reload it.

All sorts of different options here.

Regards,

Will Hartung



------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev


_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

--
0x2B | ~0x2b  --  Hamlet

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to