Re: URLMapping pattern vs query parameters

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

#21206

mbenson
Participant

You’re right… sorry about that. It’s simple enough to build those URLs using pretty:link. h:commandButton is more of a PITA. I would say that typically this isn’t the kind of action you’d expect to see taken from a commandButton. It is entirely possible that I am simply missing something, but I would think you’d be better off using pretty:link for these, and styling accordingly if they just. have. to. look like buttons.

The other thing you could do is implement an actionListener to handle f:param on commandButton. It is feasible to look for the ‘iis’ parameter on a UICommand that fires an ActionEvent, look for a pretty UrlMapping matching the UICommand’s actionExpression, find the corresponding PathParameter on the mapping, apply your UIParameter value to the PathParameter’s expression… such that when prettyFaces gets around to creating the pretty URL, it injects the value you’ve just sent via your commandButton. That said, I can’t think why the nested parameter shouldn’t work, so again, maybe we’re *both* missing something. Make sure you are using the latest version available, and for good measure I’d give the current snapshot a whirl.

HTH,

Matt