Re: Action BEFORE a page is constructed?

2001-07-10 Thread Adam Hardy

One way to populate a form before it is used (say you
want to load user information for editing) is to
create an action called preloadUserAction.  In the
config file create an action mapping such as 





The userForm is passed into the preload action.  This
populates the form and then forwards onto the page
that will use that form.  The example application uses
the same technique but is a bit more complex because
the action is dual use: see EditSubscriptionAction.

Adam.
--- peter <[EMAIL PROTECTED]> wrote:
> Action BEFORE a page is constructed?
> 
> As far as I understood the working of struts, you
> inherit the FORM and
> the ACTION classes. The forms are constructed BEFORE
> a page is shown -
> if values
> are already available, they will be shown. AFTER the
> page is submitted,
> the
> ACTION is called with the FORM element filled with
> the appropriate
> values.
> 
> But what do I do to make any data available to the
> next page?
> 
> I can do so in the preceeding ACTION. But this
> means, I have to do so in
> all
> preceding actions of this page. This would be a copy
> of code.
> So I am simply looking for a way to be called, just
> BEFORE the page is
> created.
> The only mehtod I know, is the Construction of the
> FORM. But there I do
> not have any link to the SessionContext which is my
> main anker element.
> 
> If anyone has an idea what I am talking about,
> please help.
> 
> Thanks
> Peter
> 
> [EMAIL PROTECTED]
> 
> 
> 


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



RE RE: Action BEFORE a page is constructed?

2001-07-10 Thread Peter Spießbach

Hello,
I did not get it.

Rather than directly forwarding to /order I now forward to /prepareorder. Is
this right?
However, it looks that I still have an error, because the forwarding from
one action
to another does not work - and even give any helping error message:

After the jsp in action tag 1 is submitting its control to the action
defined in 
action tag one it should call the action in action tag 2. But nothing
happens.
Can you help me?

1   



2   
 


3





previous message for history





If you want to do some preparations before you create the form  you can make
a new actionclass without a form class.





Now when you want to call you new screen you first call this action wich is
not linked to a form, when this action succeeds, you can call you jsp page,
wich has a form in it.  To fill this form you make an instance of this forms
form class and fill it using the set methods.  After this you put this form
into the session scope.  Like this
request.getSession().setAttribute("orderForm",orderForm);

Now you form will be filled in when it is shown on the screen.

> -Original Message-
> From: peter [SMTP:[EMAIL PROTECTED]]
> Sent: dinsdag 10 juli 2001 8:50
> To:   [EMAIL PROTECTED]
> Subject:  Action BEFORE a page is constructed?
> 
> Action BEFORE a page is constructed?
> 
> As far as I understood the working of struts, you inherit the FORM and
> the ACTION classes. The forms are constructed BEFORE a page is shown -
> if values
> are already available, they will be shown. AFTER the page is submitted,
> the
> ACTION is called with the FORM element filled with the appropriate
> values.
> 
> But what do I do to make any data available to the next page?
> 
> I can do so in the preceeding ACTION. But this means, I have to do so in
> all
> preceding actions of this page. This would be a copy of code.
> So I am simply looking for a way to be called, just BEFORE the page is
> created.
> The only mehtod I know, is the Construction of the FORM. But there I do
> not have any link to the SessionContext which is my main anker element.
> 
> If anyone has an idea what I am talking about, please help.
> 
> Thanks
> Peter
> 
> [EMAIL PROTECTED]
> 
> 



-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

GMX Tipp:

Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a




RE: Action BEFORE a page is constructed?

2001-07-09 Thread Moons Manuel





If you want to do some preparations before you create the form  you can make
a new actionclass without a form class.





Now when you want to call you new screen you first call this action wich is
not linked to a form, when this action succeeds, you can call you jsp page,
wich has a form in it.  To fill this form you make an instance of this forms
form class and fill it using the set methods.  After this you put this form
into the session scope.  Like this
request.getSession().setAttribute("orderForm",orderForm);

Now you form will be filled in when it is shown on the screen.

> -Original Message-
> From: peter [SMTP:[EMAIL PROTECTED]]
> Sent: dinsdag 10 juli 2001 8:50
> To:   [EMAIL PROTECTED]
> Subject:  Action BEFORE a page is constructed?
> 
> Action BEFORE a page is constructed?
> 
> As far as I understood the working of struts, you inherit the FORM and
> the ACTION classes. The forms are constructed BEFORE a page is shown -
> if values
> are already available, they will be shown. AFTER the page is submitted,
> the
> ACTION is called with the FORM element filled with the appropriate
> values.
> 
> But what do I do to make any data available to the next page?
> 
> I can do so in the preceeding ACTION. But this means, I have to do so in
> all
> preceding actions of this page. This would be a copy of code.
> So I am simply looking for a way to be called, just BEFORE the page is
> created.
> The only mehtod I know, is the Construction of the FORM. But there I do
> not have any link to the SessionContext which is my main anker element.
> 
> If anyone has an idea what I am talking about, please help.
> 
> Thanks
> Peter
> 
> [EMAIL PROTECTED]
> 
>