You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Bill Holloway <bi...@gmail.com> on 2008/03/04 18:12:53 UTC

T5: Need HTTP Forward

I need an http forward like this:

http://example.org/mypage/a/b --> http://example.org/mypage/a

The last two path elements are activation context items.  I'm chopping
off "/b" to shorten the URL to a form that is desirable for
bookmarking.  I could persist the "/b" as a persistent page property,
but I'd rather not.

Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: Need HTTP Forward

Posted by Howard Lewis Ship <hl...@gmail.com>.
You could have two onActivate() methods, maybe something like:

public class MyPage
{
  @Persist private String _b;

 @Inject private ComponentResources _resources;

 Object onActivate(String a, String b)
 {
    _b = b;

    return _resources.createPageLink(_resources.getPageName(), false, a);
 }

 void onActivate(String a) { ... }
}

Event methods with the same name are invoked in order of parameter
count, largest number to fewest.


On Tue, Mar 4, 2008 at 9:12 AM, Bill Holloway <bi...@gmail.com> wrote:
> I need an http forward like this:
>
>  http://example.org/mypage/a/b --> http://example.org/mypage/a
>
>  The last two path elements are activation context items.  I'm chopping
>  off "/b" to shorten the URL to a form that is desirable for
>  bookmarking.  I could persist the "/b" as a persistent page property,
>  but I'd rather not.
>
>  Bill
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org