On 12/19/05, Srini Pillai <[EMAIL PROTECTED]> wrote: > > Thanks Rick, for responding quickly. > > >>I'm not sure what you are attempting to do with: > value="${request['FAEditorForm'].id_${counter}}" > > I am trying to access the value from the ActionForm for property > 'id_0', 'id_1' etc... depending on the value of the ${counter}. The > example you had suggested using the 'url' tag will not work for me since > the 'id' parameter will pass the value of the counter but I require the > value in the form for the 'id_?' (where '?' is any number from 0...n) as > mentioned above. Hope I am clear. Really appreciate your help.
As you have noticed, the EL syntax is not up to the task you're after (of course, <bean:write> is not going to be, either). But, I suggest you consider a completely different approach. When you execute an EL expression like this: ${foo.bar} what's really happening is that a bean named "foo" is found, and then it's getBar() method is called. So, why not write a getBar() function on some bean class that returns the entire set of argument names and values for you? In other words, do the looping in Java code rather than JSP. If this method were on the same class that contains the list or array being iterated over, it should have everything it needs to calculate the appropriate parameter values. As a general principle, I believe that manufacturing URLs in the JSP code (as you are attempting here) is working too hard ... and it is really mixing elements of the controller into the view in undesireable ways. Much better to write code in the controller that can calculate all that stuff for you, and then let the view code pull it out with a simple EL reference. Thanks, > Srini Craig