You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Gabriel Falkenberg <ga...@gmail.com> on 2004/06/09 18:58:49 UTC
Forms on IExternalPage
Is there a (simple) way to have forms on bookmarkable pages
implementing the IExternalPage interface so that when the form is
submitted the user is taken back to the same page again? I am aware of
the callback functionality but I want the user to be able to submit
certain forms such as the login-form from any page even if it is a
external page.
Thanks,
Gabriel Falkenberg
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Forms on IExternalPage
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jun 9, 2004, at 1:57 PM, Gabriel Falkenberg wrote:
> Well, actually I have wrapped the login form into my border component
> but it is not taking me back to the page where I submit the form if I
> do the submit on an IExternalPage.
Ah, I see. Sorry I missed grasping that in your first message.
We experience something very similar that is quite frustrating. We use
J2EE security. My first effort was to have a /login (and
login.application) and a /app as two separate .application files. /app
is secured, /login is not. Now suppose the flow is this:
User clicks on /app?service=page/SomePage -> redirected to /login ->
FAILURE!
Why? login application doesn't have SomePage and is not happy. The
idea was not for /login to care about SomePage but to simply present
the login page using a shared Border and then let the container
redirect back to SomePage.
Anyone have suggestions on how to handle this? What I'm going to do is
make a login.jsp and punt on the whole login.application idea until
something better comes along. On that note, any suggestions on how to
share a Border situation with a login.jsp to avoid UI duplication?
Short answer is: I don't have a solution to your situation. Callbacks
would do the trick, but you'd have to push them in for every
IExternalPage - perhaps there is a hook point where you could do that
globally. Actually, I'd love a hook to add "interceptors" (like
WebWork2) into the invocation so that before a listener is called I can
do stuff. Or before an external page is activated. Or .... and so on!
Thoughts on this?
> The login form works perfect for normal pages that doesn't expect any
> query parameters.
>
> Is this the way things should be or am I missing something?
As far as I know, you aren't missing anything. For now, I'd recommend
pushing a callback to your login page for every external page you have
and let the login activate the callback if it is non-null. This is a
pretty slick way to go, but still a bit manual.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Forms on IExternalPage
Posted by Gabriel Falkenberg <ga...@gmail.com>.
Well, actually I have wrapped the login form into my border component
but it is not taking me back to the page where I submit the form if I
do the submit on an IExternalPage.
For example I have a page for viewing articles called ArticlePage.
This page implements the IExternalPage interface and it expects the
article id to be the sole parameter. If I'm currently viewing an
article and submit the login form I'm taken back to the ArticlePage
but the parameter (article id) is not in the URL so no article is
loaded.
The login form works perfect for normal pages that doesn't expect any
query parameters.
Is this the way things should be or am I missing something?
/Gabriel Falkenberg
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Forms on IExternalPage
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jun 9, 2004, at 12:58 PM, Gabriel Falkenberg wrote:
> Is there a (simple) way to have forms on bookmarkable pages
> implementing the IExternalPage interface so that when the form is
> submitted the user is taken back to the same page again? I am aware of
> the callback functionality but I want the user to be able to submit
> certain forms such as the login-form from any page even if it is a
> external page.
Are you using J2EE security? If so, you're gonna really fight with
this.
If you are using your own login mechanism, you could wrap the login
form into a custom component such that the submit listener doesn't
specify what page to go back to, and it would go back to the current
page. Perhaps this is what you're after?
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org