On Fri, 11 Oct 2002, Wendy Smoak wrote:

> Date: Fri, 11 Oct 2002 10:09:15 -0700
> From: Wendy Smoak <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: Struts Tag Request
>
> Johnathan wrote:
> > Not what I am asking on the JSP (the HTML Form URL) I would like struts to
> > insert the URI that display this JSP page
>
> If I understand you correctly, you want this:
>
> <html:form action="????">
>
> where ???? is something that evaluates to the URI that got you to the JSP.
>
> I'd love to see this answered as well-- I'm doing a name resolution screen
> that I would like to reuse all over the place.  I need to be able to get
> back to exactly where I came from.
>

One challenge here is that the action attribute's value is used to
determine which form bean will be used, including creating it if
necessary.  Trying to change it on the fly (which you could do with
JavaScript, for exmaple) would invalidate that choice.  It really needs to
be done as the page is being created (but could be a runtime expression).

> [With thanks to Peter for an earlier email,] I'm currently planning to have
> a GoBackAction that will look at a parameter in some scope and forward based
> on that.  (Or possibly use the DispatchAction that I've just learned about
> this morning, since I think that or the LookupDispatchAction is exactly what
> I'm trying to do.)
>
> Just dreaming... could I find out what sort of ActionForm is in session
> scope?  Then I ought to be able to figure out where to go back to, since
> that's obviously the form I'm working on at the moment.

I suppose you could scan through all the session attributes (this would
work for request scope form beans too), see which one corresponds to a
form bean, and then figure out which action uses that form bean.  Of
course, this gets you in trouble if you reuse the same form bean on more
than one form.

>
> But it would be much easier to just pull that parameter out of scope and pop
> it into the form's action attribute without involving the extra Action.
>
> I *think* that the latest and greatest Struts tags that take expressions
> should make this possible, yes?
>
> --
> Wendy Smoak
> http://sourceforge.net/projects/unidbtags
>

Craig



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

Reply via email to