struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Allen <...@mojavelinux.com>
Subject Re: [ANN] Struttin' With Struts beta (newbies esp. welcome)
Date Wed, 12 Mar 2003 00:51:10 GMT
Two more comments:

In the second tutorial, you are preparing the employeeForm using the
SetUpEmployeeAction.  In doing so, you run

employeeForm.setDepartment("2");

Shouldn't you instead set the default department selection in the
form reset() method?  Naturally the reset() method is the incorrect
place to populate the options, but it is a good place to define
which one will be selected by default.

In regards to the discussion on using Tokens for the forward mapping
keys (such as "success" and "continue") you may also want to note
that doing so allows you to have two tokens point to the same
definition.  In short

Tokens.SUCCESS_KEY = "success";

Tokens.CONTINUE_KEY = "success";

So you can really play with the means of your Action class without
having to bother the Action class.  In short the action class
shouldn't really care what view is choosen or its meaning, it just
deals with the general workflow, such as

success
failure
continue
redo

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <dan@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
"If you still don't like it, that's ok: that's why I'm boss. I 
simply know better than you do." 
 -- Linus Torvalds
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message