get parameter value from URL

Splash Forums PrettyFaces Users get parameter value from URL

Tagged: 

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

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #27851

    hairi11
    Participant

    Hi.

    I got prob to get the parameter value from URL.
    The paramCode suppose get the XXX10 value.
    Hope anybody can help.
    Thanks.

    http://localhost:8080/web/event/details/XXX10

    <url-mapping id=”event-details”>
    <pattern value=”/event/details/#{ paramCode : eventBean.entity.code }” />
    <view-id value=”/pages/public/event/details.xhtml” />
    </url-mapping>

    <f:metadata>
    <f:viewParam name=”code” value=”#{eventBean.paramCode}” />
    <f:viewAction action=’#{eventBean.onLoad()}’/>
    </f:metadata>

    public void onLoad() {
    if (StringUtils.isNotEmpty(paramCode))
    selectEntity(((EventService) getService()).fetchByCode(getEntity().getCode()));
    }

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Comments are closed.