With or without URL parameter

Splash Forums PrettyFaces Users With or without URL parameter

This topic contains 0 replies, has 1 voice, and was last updated by  Unleashed 4 months ago.

Viewing 1 post (of 1 total)
  • Author
  • #27382


    Hello iam new in prettyfaces.
    I must change a old project with prettyfaces.

    My question is: Can i navigate to page, where userdata is showing, with the parameters “/user/1234” and “/user”.
    The function is. When i have a id “1234” load a user, if i have no id its a new user to create.

    My code is:
    @URLMappings(mappings =
    @URLMapping(id = “users”, pattern = “/users”, viewId = “/user/user.xhtml”),
    @URLMapping(id = “user”, pattern = “/user/#{ user.id }”, viewId = “/user/user.xhtml”)

    But when i push the button widht <p:commandButton …. action=”pretty:user/123″/> its not working.
    <p:commandButton …. action=”pretty:users”/> works.

    What i realy have is. If this urls called “…/user” its for a new user and if this “../user/123” set the id in the backend Bean to “currentUserId=123” and load in the postConstrut the user from the DB.


Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Comments are closed.