Re: how to use DispatchAction?

2004-08-25 Thread PC Leung
Yes. UserMaint.jsp does not have an entry in strus-config.xml
because UserMaint.jsp does not contain a form for user to input data.
struts-config.xml does contain entry of AddUserProfile.

Should I transform the UserMaint.jsp to a form?

UserMaint.jsp (contains links only) calls
AddUserProfile.jsp which links with
AddUserProfileAction.java (it contains DispatchAction)
and AddUserProfileForm.java




On Thu, 26 Aug 2004 00:09:16 -0400, Rick Reumann <[EMAIL PROTECTED]> wrote:
> PC Leung wrote:
> 
> > Do you mean my approach is wrong?
> > Originally UserMaint.jsp contains links only.
> > Do I need to transform it as a form?
> 
> As Bill asked earlier, what does you struts-config file look like. My
> guess is you are not getting to your action class because you haven't
> set up a mapping for it.  Look at the sample apps and examples that show
> how to set up your mappings in your struts-config.
> 
> For example you might want something like...
> 
>  type="package.path.UserProfileAction"
> name="userProfileForm"
> scope="request"
> validate="false"
> parameter="method"
> >
> 
> 
> 
> 
> Your link then would be...
> 
> 
> 
> 
> 
> 
> --
> Rick
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to use DispatchAction?

2004-08-25 Thread Rick Reumann




Sorry forgot to add the .do or whatever you have setup to foward to 
Struts ActionServlet. If using the common .do it would be ..


--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to use DispatchAction?

2004-08-25 Thread Rick Reumann
PC Leung wrote:
Do you mean my approach is wrong?
Originally UserMaint.jsp contains links only.
Do I need to transform it as a form?
As Bill asked earlier, what does you struts-config file look like. My 
guess is you are not getting to your action class because you haven't 
set up a mapping for it.  Look at the sample apps and examples that show 
how to set up your mappings in your struts-config.

For example you might want something like...




Your link then would be...



--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: how to use DispatchAction?

2004-08-25 Thread PC Leung
Do you mean my approach is wrong?
Originally UserMaint.jsp contains links only.
Do I need to transform it as a form?


On Wed, 25 Aug 2004 23:08:24 -0400, Bill Siggelkow
<[EMAIL PROTECTED]> wrote:
> Well, passing a dispatch parameter to a JSP is not going to do anything
> unless on the JSP you explicitly pull that request parameter and stick
> it somewhere on the form. (This sounds like what you are trying to do --
> it sounds like you are trying to pass the method to dispatch to through
> the AddUserProfile.jsp).
> 
> Typically, the dispatch parameter is set on the form that submits to the
> DispatchAction subclass using the help of JavaScript.
> 
> 
> 
> PC Leung wrote:
> 
> > UserMaint.jsp (contains links only) calls
> > AddUserProfile.jsp which links with
> > AddUserProfileAction.java (it contains DispatchAction)
> > and AddUserProfileForm.java
> >
> > UserMaint.jsp constructs originally like this:
> >  
> >
> >  
> >
> > Do you suggest me to change the coding to the following?
> >  
> >
> >  
> >
> >
> >
> > On Wed, 25 Aug 2004 22:09:55 -0400, Bill Siggelkow
> > <[EMAIL PROTECTED]> wrote:
> >
> >>PC -- I am not sure what you mean by "AddUserProfileAction.java
> >>(AddUserProfile.jsp)"? Do you mean that the Action forwards to the JSP?
> >>Or do you mean that the JSP submits to the Action?
> >>
> >>Anyway, if you want the link to be to the Action it would be like this:
> >>
> >>
> >>  
> >>
> >>
> >>Notice the ".do" on the page attribute.
> >>
> >>
> >>
> >>PC Leung wrote:
> >>
> >>>My first web page is page contains links only. No Form nor Action.
> >>>
> >>>UserMaint.jsp ---> AddUserProfileAction.java (AddUserProfile.jsp)
> >>>
> >>>UserMaint.jsp constructs:
> >>>   
> >>>   
> >>>   
> >>>
> >>>The link becomes http://.../AddUserProfile.jsp.do?method=setup
> >>>
> >>>Does it mean that it cannot invoke the setup DispatchAction?
> >>>
> >>>public final class AddUserProfileAction extends DispatchAction {
> >>>
> >>>   public ActionForward setup (ActionMapping mapping,
> >>>ActionForm form,
> >>>HttpServletRequest request,
> >>>HttpServletResponse response)
> >>> throws Exception {
> >>> HttpSession session = request.getSession();
> >>> saveToken(request);
> >>> return (mapping.getInputForward());
> >>>   }
> >>>
> >>>On Wed, 25 Aug 2004 14:49:32 -0400, Bill Siggelkow
> >>><[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> I am not quite sure I am following this (it would help to see the
> relevant action mappings from your struts-config.xml but it sounds like
> you may not be saving the token *in the action preceding the JSP that
> contains the form*.
> 
> 
> 
> PC Leung wrote:
> 
> 
> 
> >Error message is solved.
> >but the form does not display with token when it displays
> >at the first time.
> >I think the following line does not work properly.
> >
> >UserMaint.jsp constructs:
> >  
> >
> >In the setup DispatchAction, I try to saveToken().
> >
> >On Wed, 25 Aug 2004 10:19:04 -0500, Joe Germuska <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >>At 10:54 PM +0800 8/25/04, PC Leung wrote:
> >>
> >>
> >>
> >>>my setup DispatchAction does not show a token when the form first displays.
> >>>When I click submit button to create record, it shows error messages
> >>>of handler. What does needs to be done?
> >>
> >>What are the error messages?
> >>
> >>
> >>
> >>
> >>>AddUserProfile.jsp constructs:
> >>>
> >>>
> >>>
> >>> >>>key="addUserProfileForm.submit"/>
> >>
> >>here you should probably pass "method=create" as a hidden form field;
> >>I don't think the html form tag will handle an action specified like
> >>that correctly.
> >>
> >>Joe
> >>
> >>--
> >>Joe Germuska
> >>[EMAIL PROTECTED]
> >>http://blog.germuska.com
> >>"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn
> >>back; I'll know I'm in the wrong place."
> >> - Carlos Santana
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to use DispatchAction?

2004-08-25 Thread Bill Siggelkow
Well, passing a dispatch parameter to a JSP is not going to do anything 
unless on the JSP you explicitly pull that request parameter and stick 
it somewhere on the form. (This sounds like what you are trying to do -- 
it sounds like you are trying to pass the method to dispatch to through 
the AddUserProfile.jsp).

Typically, the dispatch parameter is set on the form that submits to the 
DispatchAction subclass using the help of JavaScript.

PC Leung wrote:
UserMaint.jsp (contains links only) calls 
AddUserProfile.jsp which links with
AddUserProfileAction.java (it contains DispatchAction)
and AddUserProfileForm.java

UserMaint.jsp constructs originally like this:
 
   
 
Do you suggest me to change the coding to the following?
 
   
 

On Wed, 25 Aug 2004 22:09:55 -0400, Bill Siggelkow
<[EMAIL PROTECTED]> wrote:
PC -- I am not sure what you mean by "AddUserProfileAction.java
(AddUserProfile.jsp)"? Do you mean that the Action forwards to the JSP?
Or do you mean that the JSP submits to the Action?
Anyway, if you want the link to be to the Action it would be like this:

 

Notice the ".do" on the page attribute.

PC Leung wrote:
My first web page is page contains links only. No Form nor Action.
UserMaint.jsp ---> AddUserProfileAction.java (AddUserProfile.jsp)
UserMaint.jsp constructs:
  
  
  
The link becomes http://.../AddUserProfile.jsp.do?method=setup
Does it mean that it cannot invoke the setup DispatchAction?
public final class AddUserProfileAction extends DispatchAction {
  public ActionForward setup (ActionMapping mapping,
   ActionForm form,
   HttpServletRequest request,
   HttpServletResponse response)
throws Exception {
HttpSession session = request.getSession();
saveToken(request);
return (mapping.getInputForward());
  }
On Wed, 25 Aug 2004 14:49:32 -0400, Bill Siggelkow
<[EMAIL PROTECTED]> wrote:

I am not quite sure I am following this (it would help to see the
relevant action mappings from your struts-config.xml but it sounds like
you may not be saving the token *in the action preceding the JSP that
contains the form*.

PC Leung wrote:

Error message is solved.
but the form does not display with token when it displays
at the first time.
I think the following line does not work properly.
UserMaint.jsp constructs:
 
In the setup DispatchAction, I try to saveToken().
On Wed, 25 Aug 2004 10:19:04 -0500, Joe Germuska <[EMAIL PROTECTED]> wrote:

At 10:54 PM +0800 8/25/04, PC Leung wrote:

my setup DispatchAction does not show a token when the form first displays.
When I click submit button to create record, it shows error messages
of handler. What does needs to be done?
What are the error messages?


AddUserProfile.jsp constructs:



here you should probably pass "method=create" as a hidden form field;
I don't think the html form tag will handle an action specified like
that correctly.
Joe
--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn
back; I'll know I'm in the wrong place."
- Carlos Santana

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: how to use DispatchAction?

2004-08-25 Thread PC Leung
UserMaint.jsp (contains links only) calls 
AddUserProfile.jsp which links with
AddUserProfileAction.java (it contains DispatchAction)
and AddUserProfileForm.java

UserMaint.jsp constructs originally like this:
 
   
 

Do you suggest me to change the coding to the following?
 
   
 



On Wed, 25 Aug 2004 22:09:55 -0400, Bill Siggelkow
<[EMAIL PROTECTED]> wrote:
> PC -- I am not sure what you mean by "AddUserProfileAction.java
> (AddUserProfile.jsp)"? Do you mean that the Action forwards to the JSP?
> Or do you mean that the JSP submits to the Action?
> 
> Anyway, if you want the link to be to the Action it would be like this:
> 
> 
>   
> 
> 
> Notice the ".do" on the page attribute.
> 
> 
> 
> PC Leung wrote:
> > My first web page is page contains links only. No Form nor Action.
> >
> > UserMaint.jsp ---> AddUserProfileAction.java (AddUserProfile.jsp)
> >
> > UserMaint.jsp constructs:
> >
> >
> >
> >
> > The link becomes http://.../AddUserProfile.jsp.do?method=setup
> >
> > Does it mean that it cannot invoke the setup DispatchAction?
> >
> > public final class AddUserProfileAction extends DispatchAction {
> >
> >public ActionForward setup (ActionMapping mapping,
> > ActionForm form,
> > HttpServletRequest request,
> > HttpServletResponse response)
> >  throws Exception {
> >  HttpSession session = request.getSession();
> >  saveToken(request);
> >  return (mapping.getInputForward());
> >}
> >
> > On Wed, 25 Aug 2004 14:49:32 -0400, Bill Siggelkow
> > <[EMAIL PROTECTED]> wrote:
> >
> >>I am not quite sure I am following this (it would help to see the
> >>relevant action mappings from your struts-config.xml but it sounds like
> >>you may not be saving the token *in the action preceding the JSP that
> >>contains the form*.
> >>
> >>
> >>
> >>PC Leung wrote:
> >>
> >>
> >>>Error message is solved.
> >>>but the form does not display with token when it displays
> >>>at the first time.
> >>>I think the following line does not work properly.
> >>>
> >>>UserMaint.jsp constructs:
> >>>   
> >>>
> >>>In the setup DispatchAction, I try to saveToken().
> >>>
> >>>On Wed, 25 Aug 2004 10:19:04 -0500, Joe Germuska <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> At 10:54 PM +0800 8/25/04, PC Leung wrote:
> 
> 
> >my setup DispatchAction does not show a token when the form first displays.
> >When I click submit button to create record, it shows error messages
> >of handler. What does needs to be done?
> 
> What are the error messages?
> 
> 
> 
> >AddUserProfile.jsp constructs:
> >
> > 
> > 
> >  >key="addUserProfileForm.submit"/>
> 
> here you should probably pass "method=create" as a hidden form field;
> I don't think the html form tag will handle an action specified like
> that correctly.
> 
> Joe
> 
> --
> Joe Germuska
> [EMAIL PROTECTED]
> http://blog.germuska.com
> "In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn
> back; I'll know I'm in the wrong place."
>   - Carlos Santana
> >>
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to use DispatchAction?

2004-08-25 Thread Bill Siggelkow
PC -- I am not sure what you mean by "AddUserProfileAction.java 
(AddUserProfile.jsp)"? Do you mean that the Action forwards to the JSP? 
Or do you mean that the JSP submits to the Action?

Anyway, if you want the link to be to the Action it would be like this:

  

Notice the ".do" on the page attribute.
PC Leung wrote:
My first web page is page contains links only. No Form nor Action.
UserMaint.jsp ---> AddUserProfileAction.java (AddUserProfile.jsp)
UserMaint.jsp constructs:
   
   
   
The link becomes http://.../AddUserProfile.jsp.do?method=setup
Does it mean that it cannot invoke the setup DispatchAction?
public final class AddUserProfileAction extends DispatchAction {
   public ActionForward setup (ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
 throws Exception {
 HttpSession session = request.getSession();
 saveToken(request);
 return (mapping.getInputForward());
   }
On Wed, 25 Aug 2004 14:49:32 -0400, Bill Siggelkow
<[EMAIL PROTECTED]> wrote:
I am not quite sure I am following this (it would help to see the
relevant action mappings from your struts-config.xml but it sounds like
you may not be saving the token *in the action preceding the JSP that
contains the form*.

PC Leung wrote:

Error message is solved.
but the form does not display with token when it displays
at the first time.
I think the following line does not work properly.
UserMaint.jsp constructs:
  
In the setup DispatchAction, I try to saveToken().
On Wed, 25 Aug 2004 10:19:04 -0500, Joe Germuska <[EMAIL PROTECTED]> wrote:

At 10:54 PM +0800 8/25/04, PC Leung wrote:

my setup DispatchAction does not show a token when the form first displays.
When I click submit button to create record, it shows error messages
of handler. What does needs to be done?
What are the error messages?

AddUserProfile.jsp constructs:



here you should probably pass "method=create" as a hidden form field;
I don't think the html form tag will handle an action specified like
that correctly.
Joe
--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn
back; I'll know I'm in the wrong place."
 - Carlos Santana

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: how to use DispatchAction?

2004-08-25 Thread PC Leung
My first web page is page contains links only. No Form nor Action.

UserMaint.jsp ---> AddUserProfileAction.java (AddUserProfile.jsp)

UserMaint.jsp constructs:
   
   
   

The link becomes http://.../AddUserProfile.jsp.do?method=setup

Does it mean that it cannot invoke the setup DispatchAction?

public final class AddUserProfileAction extends DispatchAction {

   public ActionForward setup (ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
 throws Exception {
 HttpSession session = request.getSession();
 saveToken(request);
 return (mapping.getInputForward());
   }

On Wed, 25 Aug 2004 14:49:32 -0400, Bill Siggelkow
<[EMAIL PROTECTED]> wrote:
> I am not quite sure I am following this (it would help to see the
> relevant action mappings from your struts-config.xml but it sounds like
> you may not be saving the token *in the action preceding the JSP that
> contains the form*.
> 
> 
> 
> PC Leung wrote:
> 
> > Error message is solved.
> > but the form does not display with token when it displays
> > at the first time.
> > I think the following line does not work properly.
> >
> > UserMaint.jsp constructs:
> >
> >
> > In the setup DispatchAction, I try to saveToken().
> >
> > On Wed, 25 Aug 2004 10:19:04 -0500, Joe Germuska <[EMAIL PROTECTED]> wrote:
> >
> >>At 10:54 PM +0800 8/25/04, PC Leung wrote:
> >>
> >>>my setup DispatchAction does not show a token when the form first displays.
> >>>When I click submit button to create record, it shows error messages
> >>>of handler. What does needs to be done?
> >>
> >>What are the error messages?
> >>
> >>
> >>>AddUserProfile.jsp constructs:
> >>>
> >>>  
> >>>  
> >>>   >>>key="addUserProfileForm.submit"/>
> >>
> >>here you should probably pass "method=create" as a hidden form field;
> >>I don't think the html form tag will handle an action specified like
> >>that correctly.
> >>
> >>Joe
> >>
> >>--
> >>Joe Germuska
> >>[EMAIL PROTECTED]
> >>http://blog.germuska.com
> >>"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn
> >>back; I'll know I'm in the wrong place."
> >>   - Carlos Santana
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to use DispatchAction?

2004-08-25 Thread Bill Siggelkow
I am not quite sure I am following this (it would help to see the 
relevant action mappings from your struts-config.xml but it sounds like 
you may not be saving the token *in the action preceding the JSP that 
contains the form*.

PC Leung wrote:
Error message is solved.
but the form does not display with token when it displays
at the first time.
I think the following line does not work properly.
UserMaint.jsp constructs:
   
In the setup DispatchAction, I try to saveToken().
On Wed, 25 Aug 2004 10:19:04 -0500, Joe Germuska <[EMAIL PROTECTED]> wrote:
At 10:54 PM +0800 8/25/04, PC Leung wrote:
my setup DispatchAction does not show a token when the form first displays.
When I click submit button to create record, it shows error messages
of handler. What does needs to be done?
What are the error messages?

AddUserProfile.jsp constructs:
 
 
 
here you should probably pass "method=create" as a hidden form field;
I don't think the html form tag will handle an action specified like
that correctly.
Joe
--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn
back; I'll know I'm in the wrong place."
  - Carlos Santana

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: how to use DispatchAction?

2004-08-25 Thread PC Leung
Error message is solved.
but the form does not display with token when it displays
at the first time.
I think the following line does not work properly.

UserMaint.jsp constructs:
   

In the setup DispatchAction, I try to saveToken().

On Wed, 25 Aug 2004 10:19:04 -0500, Joe Germuska <[EMAIL PROTECTED]> wrote:
> At 10:54 PM +0800 8/25/04, PC Leung wrote:
> >my setup DispatchAction does not show a token when the form first displays.
> >When I click submit button to create record, it shows error messages
> >of handler. What does needs to be done?
> 
> What are the error messages?
> 
> >AddUserProfile.jsp constructs:
> >
> >   
> >   
> >>key="addUserProfileForm.submit"/>
> 
> here you should probably pass "method=create" as a hidden form field;
> I don't think the html form tag will handle an action specified like
> that correctly.
> 
> Joe
> 
> --
> Joe Germuska
> [EMAIL PROTECTED]
> http://blog.germuska.com
> "In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn
> back; I'll know I'm in the wrong place."
>- Carlos Santana

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to use DispatchAction?

2004-08-25 Thread Joe Germuska
At 10:54 PM +0800 8/25/04, PC Leung wrote:
my setup DispatchAction does not show a token when the form first displays.
When I click submit button to create record, it shows error messages
of handler. What does needs to be done?
What are the error messages?
AddUserProfile.jsp constructs:
  
  
  
here you should probably pass "method=create" as a hidden form field; 
I don't think the html form tag will handle an action specified like 
that correctly.

Joe
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn 
back; I'll know I'm in the wrong place."
   - Carlos Santana

Re: how to use DispatchAction?

2004-08-25 Thread PC Leung
After adding the following to struts-config.xml, error message disappears.
parameter="methodToCall"

However I still cannot avoid duplicated submission.
It seems that

does not create a token when the form displays at the first time.



On Wed, 25 Aug 2004 22:54:33 +0800, PC Leung <[EMAIL PROTECTED]> wrote:
> my setup DispatchAction does not show a token when the form first displays.
> When I click submit button to create record, it shows error messages
> of handler. What does needs to be done?
> 
> my flow likes this
> UserMaint.jsp ---> AddUserProfileAction.java (AddUserProfile.jsp)
> 
> UserMaint.jsp constructs:
>
>
>
> 
> AddUserProfile.jsp constructs:
> 
>  
>  
>   key="addUserProfileForm.submit"/>
> 
> AddUserProfileAction.java constructs:
> 
> public final class AddUserProfileAction extends DispatchAction {
> 
>public ActionForward setup (ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response)
>  throws Exception {
>  HttpSession session = request.getSession();
>  saveToken(request);
>  return (mapping.getInputForward());
>}
> 
>public ActionForward create (ActionMapping mapping,
>ActionForm form,
>HttpServletRequest request,
>HttpServletResponse response)
>   throws Exception {
>  HttpSession session = request.getSession();
>  ActionErrors errors = new ActionErrors();
> if (!isTokenValid(request, true)) {
> errors.add(ActionErrors.GLOBAL_ERROR,
> new ActionError("Duplicated Submission"));
> }
>MessageResources messages = getResources(request);
>if (checking_is_ok) {
>  ActionMessages actionMessages = new ActionMessages();
>  ActionMessage actionMessage = new ActionMessage("recordAdded");
>  actionMessages.add(Constants.statusLine, actionMessage);
> saveMessages (request, actionMessages);
>  saveToken(request);
>  return mapping.findForward("success");
>}
>if (!errors.isEmpty()) {
>  saveErrors(request, errors);
>  saveToken(request);
>  return (mapping.getInputForward());
>}
>   return mapping.findForward("failure");
>}
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to use DispatchAction for a List header?

2004-04-05 Thread Niall Pemberton
You do this using tiles. Take a look at Section 5 in the following pdf:

   http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf


Niall

- Original Message - 
From: "Sanoj, Antony (IE10)" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, April 05, 2004 8:58 AM
Subject: How to use DispatchAction for a List header?


>
> I have some 10-15 views which display the list of items based on a key.
> for eg: if the key is ProblemReport, the view that will be called will be
a
> problem report list.
> if the key is Notification, it will be notification list..etc
>
> Now each list view has a header frame and a content frame.
> Header page drives the content page based on multiple drop downs.
> Header frame page can have multiple dropdowns which are different across
> headers.
> Based on the user selections in the header page, a generic query string
> attribute is set in a Context state bean,
> which can be used to call the backend to get data in xml.
> This makes Content generation generic and enables a single action to
handle
> data generation of all content pages.
>
> I think that is enough context, now coming to my problem,
> I want to have an action execute before calling a header page to set data
> required for the rendering of the
> header page. This data is different across headers. So I need some custom
> business calls to set data for each.
> I don't want to use an independent action class for each header page.
>
> Now my question is, how can I use a DispatchAction for these header pages
> so that my request contains a parameter, method with value
> generateInfo. (Usage of Key is mentioned above)
> This has to come as parameter to my DispatchAction.
>
>  scrolling="auto" noresize="true">
> noresize="true" frameborder="0" />
> noresize="true" frameborder="0" />
> 
> Header in fmeListHeader is the path to the DispatchAction.
>
> What is the best way to do this? How can I pass the parameter as I can't
use
> a hidden field here?
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]