Thanks for your reply Sandeep,

We are already using struts templates to render the pages. So we have 
something like the following:

template.jsp
 - Contains all navigation
 - Gets the content page

content.jsp
 - Inserts into template.jsp
 - Puts several items (title, image, etc...) into template.jsp

So, as you pointed out, we display the page with the following URL:
  http://localhost/dynamic/content.jsp

The problem is when the content contains a struts form element and the form 
is successfully submited. We need the "success" page to render at the same 
navigation level. So when an ActionFroward object is returned from the 
process() method, we want the url to look like this, again:

  http://localhost/dynamic/content.jsp

BUT, instead of seeing the form, we want to only see a "success" message. 
This is required due to the way our dynamic navigation works.

Does it make sense to have another taglib added to the struts html taglib? It 
would be very similar to the <html:error /> tag but it would show a 
successfull message instead -- <html:success />. So this would add another 
couple of classes to struts: ActionSuccess and ActionSuccesses to be 
consistent with the ActionError classes. Perhapes there can be some logic 
tags used as well to remove the form elements so that we only display the 
successfully submited message without the form.

Or this all may be possible with the existing classes and taglibs. 
Any other thoughts or suggestions?

Thanks again for your help,
  - John



On Friday 02 November 2001 07:04 am, you wrote:
> If you are not using framesets - I would suggest
> looking at using tiles or templates.  These allow you
> to include header,footer,menu,body type layouts within
> the jsp -- here you would just reference the jsp file.
>
> sandeep
>
> --- John Nikolai <[EMAIL PROTECTED]> wrote:
> > Hello all!
> >
> > I have an action-mapping with one action element.
> > This action element defines
> > an input attribute used for when an error occurs in
> > the form. I was
> > wondering if it is possible for the action elements
> > forward element can do
> > the same thing as the input attribute?
> >
> > Let me explain:
> >
> > We have a navigation system in place and the
> > navigation is dependent on where
> > the user is located in the web directory hierarchy.
> >
> > http://localhost/dynamic/form.htm
> >  - Contains <HTML:form> and form elements
> >  - The navigation is properly created, highlighting
> > "form" in the left hand
> > navigation
> >
> > When a user submits the form and an error occurs the
> > URL changes to the
> > following:
> >
> > http://localhost/dynamic/formHandler.do <params>
> >
> > The errors are reported and the form.HTML file is
> > redisplayed. The important
> > thing here is that the navigation remains the same.
> > That is to say that
> > "form" is still highlighted in the left hand
> > navigation...
> >
> > Now when the form is successfully filled out I want
> > to display a "success"
> > page BUT keep the left hand navigation intact with
> > "form" highlighted. I do
> > not want to redisplay the form again, rather just
> > show some simple text
> > saying the form was successfully submitted. I have
> > tried messing around with
> > the forward element, setting the redirect attribute
> > to true/false, as
> > well as changing the path too.
> >
> > - I set the path to /dynamic/form.htm but then the
> > form is redisplayed.
> >
> > - I set the path to /dynamic/success.htm but then
> > the navigation will not
> > display properly.
> >
> > - I set the redirect to "false" but that did not
> > work either...
> >
> > Is it possible to have the success page be rendered
> > like the error page,
> > minus the form fields?
> >
> > Thanks for your help,
> >  - John
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
>
> __________________________________________________
> Do You Yahoo!?
> Find a job, post your resume.
> http://careers.yahoo.com


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

Reply via email to