From: Yaman Kumar [EMAIL PROTECTED]
I have a AformBean in A.jsp and the page action is actionA, actionA
processed
all AfromBean values and got some dynamic data from Database,Now i
would like to keep this data in BFormBean and the actionA forwards the
output to B.jsp how to keep the data
On Sat, 13 Apr 2002, Wellie W. Chao wrote:
Date: Sat, 13 Apr 2002 10:57:29 -0400
From: Wellie W. Chao [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Struts design question re: form action
I'm just curious
The standard DispatchAction can be a handy way to keep various tasks
together in the same Action, where they can share code, but without
getting into kludgy performs. Dispatch lets you have a separate perform
for each task, but all in the same Action, where they can be easier to
maintain.
You dont need two actions. You can use an 'action' parameter to decide which
action you are performing.
On your html:link add a parameter action=view
and on the submit action=add or action=edit depending on what you are
doing.
In your action, you can have if statements that perform different
In reference to having two actions (create and update) instead of one combined action,
this is exactly what I have done. While the struts-example uses a parameter, I
personally prefer not to take that route.
I have simplified my code/JSPs by having each do only one thing (good OO) at the
:
Subject: RE: Struts design question
about maintenance screens
02/21/02 09:38 AM
Please respond
There are a number of ways to achieve this, and again (!) it's about choice, although
I must say this can be confusing for newbie (and experienced!) struts users.
1. 2 Actions, 1 for 'pre' and 1 for 'post' processing
2. An 'action' parameter, with switch behaviour in the action class
3.
Ghoot@PETROTECHNTo: Struts Users Mailing List
[EMAIL PROTECTED]
ICS.co.uk cc:
Subject: RE: Struts design question
about
Cc: [EMAIL PROTECTED]
Subject: RE: Struts design question about maintenance screens
Wow!
Great reply. I am saving this one.
thanks,
Theron
Emaho, Ghoot
Ghoot@PETROTECHNTo: Struts Users Mailing
List [EMAIL PROTECTED
But my beans already contain the validation! Besides, performing the
validation in the ActionForm is effectively tying business logic (data
validation) to the web framework dontya think?
Well, I put data type and required field validation only in the bean.
Validation that is more advanced
i believe that you could subclass ActionServlet and implement the
processPreprocess method. this is called before processActionForm and
processPopulate.
On Fri, 7 Dec 2001 13:08:10 -0800 (PST), Jon Wall wrote:
.
.
.
having a problem with the Save action. The issue is
that I need to retrieve
Hi Ted -
Thanks for the input. A light went on when I read
this...I'd initially wanted to just include my
existing components in a thin composition ActionForm
class - in other words, if I had a Widget component,
I'd create a WidgetForm class with getWidget() and
setWidget(), then my form would
Jon Wall wrote:
1. The String/boolean requirement. Everything I'd
tested happened to be String or boolean, but Ted
pointed out this wouldn't work for nested tags. I'm
assuming, then, that the ActionForm performs another
function that I hadn't thought about - converting the
String and
Ted Husted wrote:
If you find something that works better for you, be sure to report back.
We aren't jealous ;-) Adopt and adapt.
Or, if you find one I haven't listed here, be sure to let me know.
http://husted.com/struts/links.htm#mvc/frameworks
-- Ted Husted, Husted dot Com, Fairport NY
If I could jump in and ask a question,
I have searched this list for a best practice regarding the relationship between
formbeans, value objects, and formatting/cleaning data.
I found the discussion between Jon and Ted interesting.
I am gearing up to try and use struts in my current
Let me try to venture a few responses...
But my beans already contain the validation! Besides, performing the
validation in the ActionForm is effectively tying business logic (data
validation) to the web framework dontya think?
Well, I put data type and required field validation only in the
Hi Brian -
Thanks for the responses. Some more information and
clarification...
Well, I put data type and required field validation
only in the bean.
I'm doing this type of validation on the client-side
in JavaScript already. I prefer to keep it here as
it's not too much work and it's
Jon Wall wrote:
I've been lurking on this list for a while, and I
finally have time to look hard at Struts for a web
application that I'm working on. I have a coupla
questions.. 1. This first question I found reference
to in the archives
On Fri, 2001-12-07 at 22:37, Jon Wall wrote:
Hi Brian -
Thanks for the responses. Some more information and
clarification...
Well, I put data type and required field validation
only in the bean.
I'm doing this type of validation on the client-side
in JavaScript already. I prefer
Yes you can do the add/edit all on the same form. If have a database
generated code or key you can put that in a hidden field. When in the
action examine the form or request obj to see if that key is there, if it is
you have a modify, if not add the record.
Have you page that lists the songs
Why do Action, ActionForm and ActionMappings classes keep references
to the ActionServlet?
So that they can access the many features available through the
servlet, like logging and (lately) a JBDC DataSource.
The ActionServlet is like a switchboard, and the references a way they
can dial "0"
21 matches
Mail list logo