Tobias Eriksson wrote:
> Hi
>  I'm trying to call a method in a BEAN that returns an array of objects
> that I need to enumerate on my page. But I don't want to access a
> property with EL, like this e.g. ${mybean.names} ) as I need to provide
> an argument to the method. I need to say how many names I would like, so
> the only thing I could come up with was this;
> 
> <c:set var="names" value="<%= mybean.getNames( Integer.parseInt(
> request.getParameter("total") )  ) %>" />

<%= mybean.somemethod() %>

won't give you an array anyway. <%= %> returns only strings.

IMHO you *have* to do something like this:

<%
    String [] rectypesincurrentquery = currentQuery.getRectype();
    out.println("<p><b>currentQuery.getRectype() returns</b><br />");
    for (int i = 0; i < rectypesincurrentquery.length; i++) {
%>
      <%= i + ": " + rectypesincurrentquery[i] + "<br />" %>
<%
    }
%>


greetings
Christian


-- 
Gr��e aus Europas gr��tem       Greetings from Europe's largest
Urban Sprawl (DUDOMA -- Duisburg Dortmund Metropolitan Axis ;-)
Christian Fritze   <[EMAIL PROTECTED]>   http://www.sprawl.de/


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

Reply via email to