Re: URLMapping pattern vs query parameters

Splash Forums PrettyFaces Users URLMapping pattern vs query parameters Re: URLMapping pattern vs query parameters

#21205

tmanning
Participant

Thanks for the reply… I tried that next….

Backing Bean:

@URLMapping(id = “manageAccount”, pattern=”/account/manageAccount/#{iid : manageAccount.id}”, viewId = “/account/manageAccount.jsf”)

Link:

<h:commandButton value=”EDIT3″ action=”pretty:manageAccount”>

<f:param name=”iid” value=”#{findAccount.selectedItem.id}” />

</h:commandButton>

and was rewarded with this:

com.ocpsoft.pretty.PrettyException: PrettyFaces: Exception occurred while building URL for MappingId < manageAccount >, Required value < #{manageAccount.id} > was null

So I guess that’s the bit where you have to bind to a property that’s not null. I thought about binding it to the findAccount page like so:

@URLMapping(id = “manageAccount”, pattern=”/account/manageAccount/#{iid : findAccount.selectedItem.id}”, viewId = “/account/manageAccount.jsf”)

But that wouldn’t work either, because then I couldn’t hit this page without going through findAccount first to se the selected item’s id (and that page would have to be session scoped?)