tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <David.K...@wamu.net>
Subject RE: JSTL or html:options issue
Date Mon, 11 Aug 2003 22:27:07 GMT
Do you have more than one "getPo" function?  Do you have a "setPo"
function?

And a long shot, you might try changing "po" to something more than two
letters (making sure you change all your accessors in the same way).
 
> -----Original Message-----
> From: Shah, Shrihas (OFT) [mailto:Shrihas.Shah@oft.state.ny.us]
> 
> Hi All:
> 
> I am unable to use html:options tag or unable to use JSTL in following
> scenario. But I can use scriptlets.
> 
> Here is the scenario.
> 
> I have search.jsp and actionform is SearchForm.java (It's name in
> struts-config.xml is 'searchForm')
> 
> In search.jsp the code is
> 
> <html:select property="po">
>       <html:options property="po" />
> </html:select>
> 
> -------
> 
> if I have following code in search.jsp it does not work either
> 
> <c:forEach var="x" items="${searchForm.po}" />
>     <c:out value="${x}" />
> </c:forEach>
> 
> In SearchForm.java the getPo function is as follows.
> 
> public HashSet getPo() {
>     po = new HashSet();
> // And this does return results. If I return array list it does not
work
> either
>     ArrayList al = lu.getAttributes("nyappPODAdminOU");
>     po.addAll((Collection)al);
>     return po;
> }
> 
> When I run the search.jsp it gives following error.
> 
> Error 500: An error occurred while evaluating custom action attribute
> "value" with value "${searchForm.po}": Unable to find a value for "po"
> in object of class "us.ny.state.oft.da.forms.SearchForm" using
operator
> "."
> 
> Any clue??
> 
> If I use scriptlet as below it works fine. (after I use jsp:useBean
tag)
> 
> <% HashSet hs = searchForm.getPo();
>    for ( Iterator i=hs.Iterator(); i.hasNext();)
>    {%>
>       <html:option value="<%(String)i.Next()%>"/>
> <%   } %>

Mime
View raw message