There are also limitless ways in struts of instantiating the lists of beans or values for dropdowns.

In my experience the only factors involved in making a list available to a JSP taglib are: (1) which list is needed (2) what parameters are required to constrain the list and (3) how long it should be cached for.

I think this is widely known as 'view logic' - and there's a whole heap of functionality coming up in future versions of struts to help on the view logic front, I believe. Since I am currently in retro-mode working with 1.1 at my current job, I'm not sure what version brings view logic - anyone?

I envisage at some point a view logic component that integrates with the taglibs and some config xml to allow struts developers to set up dropdown lists without mixing it in their actions, with declared cache levels (application / session / request scope), automatic i18n with substitution of resource strings, and stuff like that. Does this match anyone else's plans?




Keith Sader on 12/12/05 18:35, wrote:
Mine are, because I do submits off of those pages.  If you use a form,
then the scriptlet logic you have can go into the action and you don't
have that messy java code in your jsp.

On 12/12/05, Leung Ping Cheung <[EMAIL PROTECTED]> wrote:

Should the jsp be tied to a form for this case?

I do not make up a form.
I do this in the jsp.
<%
 List availableSystemList =
UserSystemService.getInstance().getAvailableSystemList(request.getRemoteUser());
 request.setAttribute("availableSystem", availableSystemList);
%>

<html:select property="availableSystem">
      <html:optionsCollection property="system_href"/>
</html:select>

where system_href is one of the attributes of availableSystem.


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

Reply via email to