chkal/pf-issue-test — Issue #38: Simplify PrettyURLBuilder interface for usage outside from Prerry Faces
Author: chkal
Created: 2012-03-06 07:21:31+00:00
State: open

Originally filed by **t.rub...@gmail.com** on 2010-04-17T17:31:55

Google Code issue: http://code.google.com/p/prettyfaces/issues/detail?id=37

There is a need to generate pretty URLs in the Application java code. This
is needed, for example, when this URL is generated by a servlet, i.e. not
within JSF page. PrettyURLBuilder may be used for this, but its interface
is tightly coupled with Pretty Faces core:

PrettyURLBuilder.buildMappedUrl(final UrlMapping urlMapping, final
List parameters)

It needs an UrlMapping instance which is available via PrettyContext only,
and a list of UIParameter instances, which is not as convenient as a Map of
string parameters.

Thus, the proposal is to add the following method:

PrettyURLBuilder.getPrettyUrl(String mappingId, Map
parameters)

Note: ticket is raised based on mailing list discussion:
http://groups.google.com/group/prettyfaces-users/browse_thread/thread/2dc0a8ff26f0b6c8#