t5: forwarding page but no change in the url?

2008-08-15 Thread Angelo Chen
Hi, I'm trying to some url rewriting in the Index.java: I have this: http://mydomain.com/item/123 which displays item 123, now if user type url:http://mydomain.com/123, I'll forward it in onActivate to /item/123 as follows: Object onActivate(Object[] obj) { if (obj.length 0) {

Re: t5: forwarding page but no change in the url?

2008-08-15 Thread Filip S. Adamsen
That is, as far as I know, not possible. But if you really need to have URLs that look like that, why not use the Index page for it? That should do exactly what you want... -Filip On 2008-08-15 10:12, Angelo Chen wrote: Hi, I'm trying to some url rewriting in the Index.java: I have this:

Re: t5: forwarding page but no change in the url?

2008-08-15 Thread Angelo Chen
Hi Filip, yes, I'm using Index page, the only issue is, when you return the correct page in the onActivate, the URL in the browser got changed. how to do this in index page? something like a servlet forward? Filip S. Adamsen-2 wrote: That is, as far as I know, not possible. But if you

Re: t5: forwarding page but no change in the url?

2008-08-15 Thread Filip S. Adamsen
But instead of redirecting in onActivate, why don't you get the item id and do what your ItemIndex page does on the Index page? -Filip On 2008-08-15 17:09, Angelo Chen wrote: Hi Filip, yes, I'm using Index page, the only issue is, when you return the correct page in the onActivate, the URL

Re: t5: forwarding page but no change in the url?

2008-08-15 Thread Angelo Chen
hi, the Item page is quite complicated, one idea might be: render the page in the Index page and return it as StreamResponse, then the question is, is it possible to render a page in code and return that as Stream? Angelo But instead of redirecting in onActivate, why don't you get the item

Re: t5: forwarding page but no change in the url?

2008-08-15 Thread Filip S. Adamsen
But it's still a page that you could use instead of your current Index page... -Filip On 2008-08-16 01:42, Angelo Chen wrote: hi, the Item page is quite complicated, one idea might be: render the page in the Index page and return it as StreamResponse, then the question is, is it possible to

Re: t5: forwarding page but no change in the url?

2008-08-15 Thread Angelo Chen
you meant the Item page should be merged into the Index page? Filip S. Adamsen-2 wrote: But it's still a page that you could use instead of your current Index page... -Filip On 2008-08-16 01:42, Angelo Chen wrote: hi, the Item page is quite complicated, one idea might be: render

Re: t5: forwarding page but no change in the url?

2008-08-15 Thread Filip S. Adamsen
Pretty much. Of course that might not work for you, it was merely a suggestion. -Filip On 2008-08-16 02:28, Angelo Chen wrote: you meant the Item page should be merged into the Index page? Filip S. Adamsen-2 wrote: But it's still a page that you could use instead of your current Index

Re: t5: forwarding page but no change in the url?

2008-08-15 Thread Angelo Chen
well, a good direction, will give this a try, thanks. Filip S. Adamsen-2 wrote: Pretty much. Of course that might not work for you, it was merely a suggestion. -Filip On 2008-08-16 02:28, Angelo Chen wrote: you meant the Item page should be merged into the Index page? --

RE: t5: forwarding page but no change in the url?

2008-08-15 Thread Angelo Chen
no until you told me:) that's good idea too, so either a component or part of index page are the options that i can try, instead of forwarding which seems not working in filter type like t5 apps. Thanks, Angelo Jonathan Barker wrote: Have you considered making your Item page an Item

Re: t5: forwarding page but no change in the url?

2008-08-15 Thread Andy Huhn
Hi Angelo, You can accomplish this by using Delegates. Put a Delegate on your index page, and in your Index.java, put a getter for that delegate. The delegate may return a block from one of any number of other pages. See http://wiki.apache.org/tapestry/Tapestry5HowToCreateATabPanel . Andy On