Re: question about PrettyNavigationHandler, how can I configure and use it properly.

Splash Forums PrettyFaces Users question about PrettyNavigationHandler, how can I configure and use it properly. Re: question about PrettyNavigationHandler, how can I configure and use it properly.

#22774

I’m not 100% sure that my suggestion works, because I never tried it in such a scenario, but you could try this. Change you pattern to this:

pattern = "/userRequestDetail/#{ id : userRequestDetailBean.id }"

and then redirect like this:

externalContext.redirect( "/pages/userRequestDetailPage.xhtml?id=" + id );

Another option would be to inject the UserRequestDetailBean into the userRequestResultBean and then set the ID before doing the redirect:

public class UserRequestResultBean {

@Autowire
private UserRequestDetailBean detailBean;

public void onRowSelect(SelectEvent event) throws IOException {

// ...
detailBean.setId( id );
externalContext.redirect( "/pages/userRequestDetailPage.xhtml" );

}

}

I hope this helps :)