You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by jonathan gilmore <jo...@hotmail.com> on 2005/08/27 12:41:41 UTC

Navigating back to a previous page

I have a common screen that is navigated to by many other screens.  Does 
Struts have support for remembering the previous screen so that my common 
screen needs only one 'back' button to return the user to their original 
location?

I have looked through the docs and havn't found anything.

Any comments much appreciated



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


Re: mailreader logon bugs

Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: <ch...@kattare.com>

> Bugs in the struts mailreader example app.
> 
> I've found a couple of small bugs in the logon page for the struts
> mailreeader app and was wondering if anyone knew what to do about them.

What version?  There's an open bug for the nightly builds:

   http://issues.apache.org/bugzilla/show_bug.cgi?id=35988

Please feel free to add more information if you think it's the same issue.

-- 
Wendy Smoak




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


Re: mailreader logon bugs

Posted by Martin Gainty <mg...@hotmail.com>.
Chhum

 in ApplicationResources.properties 
errors.minlength={0} can not be less than {1} characters. 

did you(r validator) make sure your {0} and {1} parameters are NOT Null ???

Martin-
----- Original Message ----- 
From: <ch...@kattare.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Saturday, August 27, 2005 4:13 PM
Subject: mailreader logon bugs


> Bugs in the struts mailreader example app.
> 
> I've found a couple of small bugs in the logon page for the struts
> mailreeader app and was wondering if anyone knew what to do about them.
> 
> The first is a message problem.  If you enter a user name of, say, abc,
> and  password of say 1, the minimum length check fires and returns the
> message
> " 3 cannot be less than null characters."
> 
> The other may be a Javascript issue, but I'm not sure.  To test this
> you'd need a copy of Internet Explorer (I tested using version 6) with
> script debugging enabled.  (Tools.Internet options.Advanced and uncheck
> "Disable script debugging."
> A "Runtime error" is thrown when the login button is clicked giving an
> "Error - object expected" for return validateLogonForm(this);
> 
> I have similar issues in an app I've been working on (unsurprisingly
> since I spent quite a bit of time looking at struts mailreader when I
> started writing it).
> 
> Any ideas?
> 
> Chhim
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

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


mailreader logon bugs

Posted by ch...@kattare.com.
Bugs in the struts mailreader example app.

I've found a couple of small bugs in the logon page for the struts
mailreeader app and was wondering if anyone knew what to do about them.

The first is a message problem.  If you enter a user name of, say, abc,
and  password of say 1, the minimum length check fires and returns the
message
" 3 cannot be less than null characters."

The other may be a Javascript issue, but I'm not sure.  To test this
you'd need a copy of Internet Explorer (I tested using version 6) with
script debugging enabled.  (Tools…Internet options…Advanced and uncheck
"Disable script debugging."
A "Runtime error" is thrown when the login button is clicked giving an
"Error – object expected" for return validateLogonForm(this);

I have similar issues in an app I've been working on (unsurprisingly
since I spent quite a bit of time looking at struts mailreader when I
started writing it).

Any ideas?

Chhim



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


Re: Navigating back to a previous page

Posted by Manfred Wolff <wo...@manfred-wolff.de>.
http://www.manfred-wolff.de/struts/articles/HowTo-Back.html

jonathan gilmore schrieb:

>
> I have a common screen that is navigated to by many other screens. 
> Does Struts have support for remembering the previous screen so that
> my common screen needs only one 'back' button to return the user to
> their original location?
>
> I have looked through the docs and havn't found anything.
>
> Any comments much appreciated
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


-- 
===========================================
Dipl.-Inf. Manfred Wolff
Software Engineer
-------------------------------------------
http://www.manfred-wolff.de
http://www.struts-it.org
http://www.unartigen.de
-------------------------------------------


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


Re: Navigating back to a previous page

Posted by 梁炳場 <pc...@gmail.com>.
Can it be done if the back button of IE goes to the page (menu page)
before the input form?

I do not want a common back page.

It seems that I have to extend the back button of IE or something else?

Can it be defined in JSP or struts-config.xml?

Thanks


2005/8/28, Martin Gainty <mg...@hotmail.com>:
> Javascript:go.history(-1) will accomplish this.. but beware you will lose
> the contents of the previous form
> 
> Unless you know of a way to retain all the information by pressing/clicking
> the back button ?
> 
> M-
> ----- Original Message -----
> From: "Leon Rosenberg" <st...@anotheria.net>
> To: "'Struts Users Mailing List'" <us...@struts.apache.org>
> Sent: Saturday, August 27, 2005 9:45 AM
> Subject: Re: Navigating back to a previous page
> 
> 
> Hmm
> 
> Correct me if I wrong,
> but  I think the reset method of the form will help you only if you want to
> get back to the input page of the form.
> In the described usecase Jonathan wants to get back to ANY other page he
> could came from. So how you can ensure that he
> have a form at all?
> 
> Regards
> Leon
> 
> > -----Ursprüngliche Nachricht-----
> > Von: Martin Gainty [mailto:mgainty@hotmail.com]
> > Gesendet: Samstag, 27. August 2005 15:20
> > An: Struts Users Mailing List
> > Betreff: Re: Navigating back to a previous page
> >
> > Jonathan-
> >
> > If you want to preserve the values when back button is
> > pressed you will have to override reset method in your
> > (Dyna)ActionForm
> >
> > Take a look at
> > http://64.233.161.104/search?q=cache:dHwd5qvFAJ4J:www.javapass
> > ion.com/j2ee/StrutsAdvanced_speakernoted.pdf+Struts+and+%22ove
> > rride+reset%22+AND+%22example%22&hl=en
> >
> > Martin-
> > ----- Original Message -----
> > From: "jonathan gilmore" <jo...@hotmail.com>
> > To: <us...@struts.apache.org>
> > Sent: Saturday, August 27, 2005 6:41 AM
> > Subject: Navigating back to a previous page
> >
> >
> > >
> > > I have a common screen that is navigated to by many other
> > screens.  Does
> > > Struts have support for remembering the previous screen so
> > that my common
> > > screen needs only one 'back' button to return the user to
> > their original
> > > location?
> > >
> > > I have looked through the docs and havn't found anything.
> > >
> > > Any comments much appreciated
> > >
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

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


Re: Navigating back to a previous page

Posted by Martin Gainty <mg...@hotmail.com>.
Javascript:go.history(-1) will accomplish this.. but beware you will lose 
the contents of the previous form

Unless you know of a way to retain all the information by pressing/clicking 
the back button ?

M-
----- Original Message ----- 
From: "Leon Rosenberg" <st...@anotheria.net>
To: "'Struts Users Mailing List'" <us...@struts.apache.org>
Sent: Saturday, August 27, 2005 9:45 AM
Subject: Re: Navigating back to a previous page


Hmm

Correct me if I wrong,
but  I think the reset method of the form will help you only if you want to
get back to the input page of the form.
In the described usecase Jonathan wants to get back to ANY other page he
could came from. So how you can ensure that he
have a form at all?

Regards
Leon

> -----Ursprüngliche Nachricht-----
> Von: Martin Gainty [mailto:mgainty@hotmail.com]
> Gesendet: Samstag, 27. August 2005 15:20
> An: Struts Users Mailing List
> Betreff: Re: Navigating back to a previous page
>
> Jonathan-
>
> If you want to preserve the values when back button is
> pressed you will have to override reset method in your
> (Dyna)ActionForm
>
> Take a look at
> http://64.233.161.104/search?q=cache:dHwd5qvFAJ4J:www.javapass
> ion.com/j2ee/StrutsAdvanced_speakernoted.pdf+Struts+and+%22ove
> rride+reset%22+AND+%22example%22&hl=en
>
> Martin-
> ----- Original Message -----
> From: "jonathan gilmore" <jo...@hotmail.com>
> To: <us...@struts.apache.org>
> Sent: Saturday, August 27, 2005 6:41 AM
> Subject: Navigating back to a previous page
>
>
> >
> > I have a common screen that is navigated to by many other
> screens.  Does
> > Struts have support for remembering the previous screen so
> that my common
> > screen needs only one 'back' button to return the user to
> their original
> > location?
> >
> > I have looked through the docs and havn't found anything.
> >
> > Any comments much appreciated
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



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


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


Re: Navigating back to a previous page

Posted by Leon Rosenberg <st...@anotheria.net>.
Hmm

Correct me if I wrong,
but  I think the reset method of the form will help you only if you want to
get back to the input page of the form. 
In the described usecase Jonathan wants to get back to ANY other page he
could came from. So how you can ensure that he 
have a form at all?

Regards
Leon

> -----Ursprüngliche Nachricht-----
> Von: Martin Gainty [mailto:mgainty@hotmail.com] 
> Gesendet: Samstag, 27. August 2005 15:20
> An: Struts Users Mailing List
> Betreff: Re: Navigating back to a previous page
> 
> Jonathan-
> 
> If you want to preserve the values when back button is 
> pressed you will have to override reset method in your 
> (Dyna)ActionForm
> 
> Take a look at
> http://64.233.161.104/search?q=cache:dHwd5qvFAJ4J:www.javapass
> ion.com/j2ee/StrutsAdvanced_speakernoted.pdf+Struts+and+%22ove
> rride+reset%22+AND+%22example%22&hl=en
> 
> Martin-
> ----- Original Message -----
> From: "jonathan gilmore" <jo...@hotmail.com>
> To: <us...@struts.apache.org>
> Sent: Saturday, August 27, 2005 6:41 AM
> Subject: Navigating back to a previous page
> 
> 
> >
> > I have a common screen that is navigated to by many other 
> screens.  Does 
> > Struts have support for remembering the previous screen so 
> that my common 
> > screen needs only one 'back' button to return the user to 
> their original 
> > location?
> >
> > I have looked through the docs and havn't found anything.
> >
> > Any comments much appreciated
> >
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 



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


Re: Navigating back to a previous page

Posted by Martin Gainty <mg...@hotmail.com>.
Jonathan-

If you want to preserve the values when back button is pressed
you will have to override reset method in your (Dyna)ActionForm

Take a look at
http://64.233.161.104/search?q=cache:dHwd5qvFAJ4J:www.javapassion.com/j2ee/StrutsAdvanced_speakernoted.pdf+Struts+and+%22override+reset%22+AND+%22example%22&hl=en

Martin-
----- Original Message ----- 
From: "jonathan gilmore" <jo...@hotmail.com>
To: <us...@struts.apache.org>
Sent: Saturday, August 27, 2005 6:41 AM
Subject: Navigating back to a previous page


>
> I have a common screen that is navigated to by many other screens.  Does 
> Struts have support for remembering the previous screen so that my common 
> screen needs only one 'back' button to return the user to their original 
> location?
>
> I have looked through the docs and havn't found anything.
>
> Any comments much appreciated
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> 

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


Re: Navigating back to a previous page

Posted by Leon Rosenberg <st...@anotheria.net>.
No, struts doesn't support it (as far as I know) but it's really easy to
implement.
If you have something like a baseaction (an action all your actions extend)
or your own controller servlet just do:

req.getSession.addAttribute("lastAction",
"/<your_app_path>/<your_struts_servlet_mapping>"+req.getPathInfo()); 

In your jsp simply put: 
<a href="<bean:write name="lastAction">Back</a>

Regards
Leon

> -----Ursprüngliche Nachricht-----
> Von: jonathan gilmore [mailto:jonathangilmore@hotmail.com] 
> Gesendet: Samstag, 27. August 2005 12:42
> An: user@struts.apache.org
> Betreff: Navigating back to a previous page 
> 
> 
> I have a common screen that is navigated to by many other 
> screens.  Does Struts have support for remembering the 
> previous screen so that my common screen needs only one 
> 'back' button to return the user to their original location?
> 
> I have looked through the docs and havn't found anything.
> 
> Any comments much appreciated
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 



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