typo in PrettyURLBuilder?

Splash Forums PrettyFaces Users typo in PrettyURLBuilder?

This topic contains 3 replies, has 2 voices, and was last updated by  Christian Kaltepoth 6 years, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17777

    0swald
    Participant

    method

    public String build(final UrlMapping urlMapping, final List<UIParameter> parameters)

    List<String> pathParams is used only if parameter names in map are null but their values are not. As a result when using non-null parameter map keys PrettyException is raised Invalid number of parameters supplied.... got <0>

    #20150

    Thank you very much for reporting this. I’ll have a look at it… :-)

    #20151

    0swald
    Participant

    After having a closer look at the code I can say it’s not a bug or typo, and exceptions I had resulted from fully rewritten url-building code. In my case web-users have to switch often between ssl and non-ssl pages so I have to swap <preetyLink id="..."/> and <a href="pretty builded url"/> when showing cross-protocol links. PF 2.x builder engine inteface accepted Object[] as url path params, PF 3.x – Map<String, String[]>, so I’ve adopted my code accordingly, providing arbitrary non-null map keys for path params. As I can see now, in 3.x I must use null map keys for path params and non-null keys for query params. Otherwise 'Invalid number of parameters ...' is raised.

    #20152

    Ah, OK! Thank you for the clarification…

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Comments are closed.