You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vipul Sagare <vi...@yahoo.com> on 2002/09/17 17:44:33 UTC

Newbie Questions


Do I have to have a separate ActionForm bean for every HTML form? 
Can I use other beans or hashmaps with ActionForms? 


__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


UML representation of Struts Action

Posted by alex hun <ji...@singnet.com.sg>.
hi all,

    Currently, my project team is working on the software architecture document
and design document for our project.  However, we are uncertain of the way the
how the various actions are to be represented in UML for the sequence diagram in
other not to clutter the diagram too much.  Our peer project team uses struts
config to symbolically represents the various actions.  This seems to be a good
approach as certain action like the CRUD functions are more or less similar, and
it makes no sense to have them represented as a seperate flow.  Moreover, a good
overall view can be easily shown. Nonetheless, my team would still like to know
if there are  any current standards or reference for representing the various
actions in UML sequence diagram.  thanks.

regards
alex



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Newbie Questions

Posted by James Mitchell <jm...@telocity.com>.
> -----Original Message-----
> From: Vipul Sagare [mailto:vipul_sagare@yahoo.com]
> Sent: Tuesday, September 17, 2002 11:45 AM
> To: Struts Users Mailing List
> Subject: Newbie Questions
>
>
> Do I have to have a separate ActionForm bean for every HTML form?

No, the ActionForms are specified as:
<form-bean name="whatever"...

and you use them with:
<action    path="/someUrl"
               type="my.action.class.SomethingAction"
               name="whatever"
              scope="request"
              input="logon">
      <forward name="success"  path="/somepage.jsp"/>
</action>

You can create another action and use the "whatever" form again.



> Can I use other beans or hashmaps with ActionForms?
>

You can use any object you want, as long as the accessors follow standard
JavaBeans pattern.
Keep in mind what Craig says about needing to redisplay incorrectly entered
data from the users end.  If a user types in 22 for their age, struts can
set 22 in a nested object that requires an int, long, or wrapper of either.
But if the user enters 'twenty two', then it will not be added and if you
are validating it, when the page gets redisplayed, it won't say 'twenty
two', it will just be blank, or you might have a nice stack trace for them
to look at.

Search the archives, this is a pretty regular topic.

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>