Oops, there's a typo in the second example:
It correctly reads "key" instead of "<key>", but nevertheless the error
occurs.
(Thanks to juraj for this hint.)

     <html:radio property="searchType" idName="radioID" value="key">


----- Original Message -----
From: "Ulrich Winter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 16, 2002 4:59 PM
Subject: idName seems to affect current form bean


> Hi,
>
> I'm iterating to create some <html:radio> inputs.
> The form bean has one property searchType which is to receive the
> radio selection.
> In addition to that it contains a property searchTypes which is a Map
which
> holds the allowed values and the corresponding labels.
>
> Now, the following works fine:
>
> <html:form action="/searchUsers" >
>   <logic:iterate id="radioID"
>     name="searchUsersForm" property="searchTypes"
type="java.util.Map.Entry"
> >
>
>     <html:radio property="searchType"
value="<%=(String)radioID.getKey()%>">
>       <bean:write name="radioID" property="value"/>
>     </html:radio>
> ...
>
> But I want to avoid the scriptlet and therefore used the idName attribute
of
> <html:radio>:
> <html:form action="/searchUsers" >
>   <logic:iterate id="radioID"
>     name="searchUsersForm" property="searchTypes"
type="java.util.Map.Entry"
> >
>
>     <html:radio property="searchType" idName="radioID" value="<key>">
>       <bean:write name="radioID" property="value"/>
>     </html:radio>
> ...
>
> But that results in the following error:
> [ServletException in:/UserAdmin/SearchUsers.jsp] No getter method
available
> for property searchType for bean under name
> org.apache.struts.taglib.html.BEAN'
>
> As I understand the documentation, the idName attribute should only affect
> the handling of the
> "value" attribute. Correct?
> But in this case, the form bean seems to be hidden by the current
iteration
> element.
>
> Is this behavior as intended?
> If yes, what am I doing wrong?
>
> BTW: I'm using struts 1.1-b2
>
> Thanks,
> Uli
>
> --
> [EMAIL PROTECTED]
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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

Reply via email to