> From: Dragos Madalin Popa [mailto:[EMAIL PROTECTED] 
> Thank you for your answer.I would like to change the code shown below,
> to pass a request parameter to the modelList function;something like
> this:
> public Collection getModelList(String requestString){}, where
> requestString is a parameter of the http request..
> <logic:iterate id="model" name="models" property="modelList">
>   <tr>
>     <td><bean:write name="model" property="name" /></td>
>     <td><bean:write name="model" property="description" /></td>
>   </tr>
> </logic:iterate>

I don't think you can pass parameters in JSTL, at least not yet.  But
you could, in your action, call getModelList passing the String you got
from the request, and then when you forward to the JSP, iterate over
that Collection.

If getModelList returned a Map, or you made a getAllModelLists method
that returns a Map, you might have this:

<c:forEach items="${myBean.allModelLists[theRequestParam]}"
item="${model}>
   <c:out value="${model.name}"/>
</c:forEach>

That depends on how big they are, and whether they change for each user.
If you models are fixed and change infrequently, you might be able to
put a big Map in Application scope and use it across the entire webapp.

Out of curiosity, what class is getModelList from?

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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

Reply via email to