What container are you using?  If you're using Tomcat 5, or any
container that supports JSP 2.0, and you're using the Servlet 2.4 schema
in your web.xml, then EL expressions in your JSP will be natively
supported, without any additional jar files.

Also, if you're using a JSP 2.0 container, you should NOT use Struts-EL,
as it won't work properly.  You wouldn't need to anyway, as the normal
Struts tags would work fine with EL expressions in that container.

Concerning dependency on the JSTL, there is no other tag library that
should be higher on your "no-brainer" list of dependencies.  Without it,
your code will be messier and harder to maintain. 

> -----Original Message-----
> From: Francesco Pretto [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, March 25, 2007 7:53 AM
> To: user@struts.apache.org
> Subject: Iterate and write indexed properties in place using 
> logic:iterate
> 
> Hi! What i'm trying to obtain is somewhat described in the 
> faqs here, 
> http://struts.apache.org/1.2.9/faqs/indexedprops.html , using 
> the struts EL extension.
> 
> This is the problem: i have an ArrayList of objects, called 
> "list", all of type "Type". I want to individually write on 
> the field "field1"
> of each objects in the ArrayList.
> 
> Using EL extensions, code would probably like this (i haven't tryed):
> 
> <logic.el:iterate id="idIterate" name="MyForm" property="list"
> type="Type" index="index">
>     <html-el:text name="MyForm" 
> property="list[${index}].field1" /> </logic-el:iterate>
> 
> The problem i absolutely don't want to add another dependency 
> to my project, if not strictly necessary, and i have the 
> sensation i can obtain the same using only logic:iterate. 
> Unfortunately, this:
> 
> <logic:iterate id="idIterate" name="MyForm" property="list" 
> type="Type" >
>     <html:text name="IdIterate" property="field1" /> </logic:iterate>
> 
> doesn't work, as the iteration is not "in-place", in the same 
> property of the bean MyForm, but probably is copied somewhere 
> and remain in the page context, so user written fields are 
> lost when go on with other pages of the form. What i want to 
> obtain is to write directly on the form bean properties.
> I saw that from struts 1.1 exist "indexed" tags, but i'm 
> unable to use them, if they can give me the functionality i need.
> 
> I tryed something like:
> 
> <logic:iterate id="idIterate" name="MyForm" property="list" 
> type="Type" >
>     <html:text name="MyForm" property="list[].field1" 
> indexed="true" /> </logic:iterate>
> 
> or similars, but it doesn't work as i expected, and in the 
> reference there aren't examples of use :-( . Please, can you 
> tell me how to obtain this using only logic:iterate (if 
> possible)? Please note i must use struts 1.2.9 only for my 
> project, unfortunately.
> 
> Thanks for the help!
> 
> Francesco
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to