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) {
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:
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
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
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
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
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
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
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?
--
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
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
11 matches
Mail list logo