my small understanding on how to use this is as
follows:

<logic:iterate name="form_name"
property="property_name" id="property_name">

<html:text property="some_property" indexed="true">

ok -- 

1. form_name is the name of the form
2. property_name is the name of the property and for
some reason the id="" also has to have the same name
3. indexed="true" indicates that property is coming
from what we are iterating over.
4. I have only got this to work with forms.

So I don't know if it works for session scoped beans
and it means that when you submit it will populate the
bean.

sandeep
--- Nadja Senoucci <[EMAIL PROTECTED]> wrote:
> Hello again,
> 
> I am currently testing around with the above named
> tags (in order to get
> around my earlier discribed problem sooner or later)
> and I don't think I
> quite understand what happens when you set
> indexed=true for text fields.
> 
> I have this little bit of code in my .jsp:
> 
> <logic:present name="cntarr">
> <bean:define name="cntarr" scope="session"
> id="cntarr"
> type="java.util.Collection"/>
> <logic:iterate id="element" name="cntarr" >
> <tr bgcolor="#FFFFFF">
> <td colspan="2"><html:text property="searchfield"
> indexed="true"/></td>
> <td colspan="2"><html:text property="searchparam"
> indexed="true"/></td>
> </tr>
> </logic:iterate>
> </logic:present>
> 
> And it seems that this results in the following bit
> of HTML:
> 
> <tr bgcolor="#FFFFFF">
> <td colspan="2"><input type="text"
>
name="org.apache.struts.taglib.html.BEAN[0].searchfield"
> value=""></td>
> <td colspan="2"><input type="text"
>
name="org.apache.struts.taglib.html.BEAN[0].searchparam"
> value=""></td>
> </tr>
> 
> Why is it saying
> "org.apache.struts.taglib.html.BEAN[0].searchfield"?
> I
> would have thought it would be
> "element[0].searchfield... And what do I need
>  to do in my form bean to create set-methods for
> this? Meaning: What does
> Struts expect to find in my form bean if I am using
> an indexed field as
> shown above?
> 
> At the moment, I keep getting an "index out of
> bounds"-exception which is
> quite natural, I think, since there is no array that
> could be set with
> something like this
> "org.apache.struts.taglib.html.BEAN[0].searchfield".
> So
> I know, I am using these tags wrong. I just can't
> find out how to use them
> correctly...
> 
> Greetings,
> Nadja
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to