Struts: how to package visual forms used in multple locations

From: davout (davZZZYYYXXXout_at_dial.pipex.com)
Date: 04/30/04


Date: Fri, 30 Apr 2004 09:35:44 +0100

I have a question about how best to organize the code for a Struts visual
form that is used in multiple locations in a web app. Think of this as a
common visual form that can be opened in a variety of calling situations

My thoughts on how best to organize this are...
* Define a bean that encapsulates the sub routine style parameters required
to prepare the form for display, like.. form title, business data
parameters, return address, form result (OK/Cancel) , and form data result
* Have the calling point create and populate the bean and save this to a
session based attribute.
* In the Struts action associated with the common visual form., find the
bean from the session based attribute, extract the sub routine parameters,
set up the form and forward to input.
* On the form being completed have the action class retrieve the sub routine
bean, update the form result and form data result properties, save the
updated bean to the session attribute, and then forward control to the
return address defined in the bean.

Is this the best way of addressing this issue?



Relevant Pages

  • Struts: how to package visual forms used in multple locations
    ... Define a bean that encapsulates the sub routine style parameters required ... parameters, return address, form result, and form data result ... In the Struts action associated with the common visual form., ... bean from the session based attribute, extract the sub routine parameters, ...
    (comp.lang.java.programmer)
  • Re: Setting the properties of a javabean in JSP
    ... It depends on the scope where the bean lives. ... containers that do any kind of load balancing or session migration. ...  For entity-like objects such as the one under ...
    (comp.lang.java.programmer)
  • Returning object created in bean onto a page
    ... intended to have a session scope. ... The user id and pwd are passed to the jsp page from login.html ... 2.The jsp page contains a reference to the object theUser, ... There is another bean on the page, log, an object of login class. ...
    (comp.lang.java.programmer)
  • Re: JBoss und MDBs
    ... Er meint die JMS Api Spezifikation. ... Nach meinem Verständnis sollte die Session ... > Bean die Message absetzen und weitermachen mit was auch immer aus ihrer ...
    (de.comp.lang.java)
  • Re: JBoss und MDBs
    ... >> Session Bean zum Erliegen. ... Am anderen Ende der Queue sitzt die MDB. ... Next by Date: ...
    (de.comp.lang.java)