-
1. Re: Easy way to render a different view?
dhinojosa Jan 12, 2009 7:16 AM (in response to stephen)Use urlrewrite that comes with seam
-
2. Re: Easy way to render a different view?
stephen Jan 12, 2009 2:17 PM (in response to stephen)Thanks for the answer. That won't really be less work. I was hoping that I have overlooked something in the pages.xml syntax.
Don't you think that's a common request - just render or redirect somewhere else?More importantly I am not sure if the urlrewrite approach will work: How can I rewrite outbound occurences of
/baustelle.xhtml
to different view-ids (if I use my temporary/baustelle.xhtml
at several pages)?I can live with the slightly strange construct of calling a dummy page action just to get a navigation hook, it's just something that doesn't feel right.
-
3. Re: Easy way to render a different view?
norman Jan 12, 2009 4:52 PM (in response to stephen)Your nullAction could return to the new view-id if you preferred. That reduces the XML Or, if you just always want to trigger the new view, just make the view-id the action:
<page view-id="/home.xhtml" action="/baustelle.xhtml" />
-
4. Re: Easy way to render a different view?
dhinojosa Jan 12, 2009 5:13 PM (in response to stephen)Well, rendering and redirecting is a common request, but for pages that don't exist yet? Maybe not, whatever floats your boat. I would just use my handy 404 page, but it looks like Norman's solution is probably what you are looking for.
-
5. Re: Easy way to render a different view?
stephen Jan 12, 2009 8:36 PM (in response to stephen)But that will navigate to the new view, right?
I'd like the URL to stay like it is, so that for example the selenium test that checks if a user is redirected to the home page after successful login can already be written and runs fine.IMHO such
virtual
views really are quite common. They could also be old pages where I'd like the URL to stay valid.Another example is an action
invalidate-session.xhtml
that I use for testing proper handling of session time-outs: I invoke the URL in one browser tab to kill the session, then in another browser tab try to use the session. (Else I would need to change my web.xml for testing to have a session timeout of 1 minute, then wait at least that long until the container really removes the session. Also my Selenium tests need this hook.)