Re: PrettyFaces, CDI and the case of the missing ?cid=xxx…

Splash Forums PrettyFaces Users PrettyFaces, CDI and the case of the missing ?cid=xxx… Re: PrettyFaces, CDI and the case of the missing ?cid=xxx…

#22099

Tony Herstell
Participant

Workaround:

Force (brutually) PrettyFaces to include the cid:

<url-mapping id="manageUsers">
<pattern value="/users/manage"></pattern>
<view-id>/pages/users/manageUsers.xhtml</view-id>
<query-param name="cid">#{userManagementController.cid}</query-param>
</url-mapping>

<url-mapping id="createUser">
<pattern value="/users/create"></pattern>
<view-id>/pages/users/createUser.xhtml</view-id>
<query-param name="cid">#{userCreationController.cid}</query-param>
</url-mapping>

In the controller:

/*
* Hack to pass cid to prettyfaces so it can add it to URL
* DONT remove.
*/
public String getCid() {
return this.conversation.getId();
}
public void setCid(String cid) {
}

Not pretty but it works.

>> http://localhost:8080/entermyevents/users/manage?cid=2

oddly; myeclipse validator does not like the line

<query-param name="cid">#{userManagementController.cid}</query-param>