How to access a property attribute of a value outside of an iterate, but within another iterate
daniel mario munoz
Joined: Apr 02, 2009
This is much easer that what it sound like... This is my code:
So, file1.jsp iterate over a collection of Objetivos. For each Objetivo we call file2.jsp wich iterates over Autores.... This is on a separte file, because the are actions involved with the list (delete, add Autores for each Objetivo)...
What I need to do is to add a <s:param name="codigo" value="codigo" /> to the iteration on list2.jsp, but that codigo must be from the Objetivo, not the Autor.
I know this must be like a very basic thing, however I havent found how to do it! sorry!
any help will be very much appriciated. By the way, Im using Struts 2.1.6.
You'd have to pass it in via an <s:param> tag when you create the Ajax URL. If what you're trying to pass is an object (as opposed to an ID) then you'd need to pass the ID and look it up in the Ajax action.
Well, that's not entirely true--you could use <s:set> to put it into the session and access an actual object that way, maybe.