webtier@glassfish.java.net

Re: [webtier] Allow for pulling view params from the path instead of the query string?

From: Lincoln Baxter, III <lincolnbaxter_at_gmail.com>
Date: Fri, 6 Aug 2010 10:54:41 -0400

Hi Joel,

You should take a look at the open-source project called PrettyFaces:
http://ocpsoft.com/prettyfaces/ , which does exactly what you are looking
for.

Feel free to ask any questions on our support forums:
http://ocpsoft.com/support/

Yours,
--Lincoln

On Thu, Aug 5, 2010 at 7:28 PM, <webtier_at_javadesktop.org> wrote:

> I know that using f:metadata and f:viewParam I can get parameters from the
> request's query string and bind them to some bean property. What if I would
> like to pull it from the URL itself?
>
> For instance, I could do it with a URL like this:
>
> http://my.server.com/my/page.xhtml?action=delete&id=12345
>
> Is there any way to do it like this instead?
>
> http://my.server.com/12345/delete/results.xhtml
>
> Where 12345 and 'delete' would be pulled? Basically matching a URL pattern
> like
> http://my.server.com/{id}/{action}/results.xhtml<http://my.server.com/%7Bid%7D/%7Baction%7D/results.xhtml>
>
> Would I have to implement a custom ResourceResolver to do that?
>
> Thanks,
> Joel
> [Message sent by forum member 'jweight']
>
> http://forums.java.net/jive/thread.jspa?messageID=479461
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>


-- 
Lincoln Baxter, III
http://ocpsoft.com
http://scrumshark.com
"Keep it Simple"