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]

Reply via email to