So I'm pretty much sold on migrating from Struts/JSPs to JSF at this point, with one remaining caveat I've yet to figure out. I've brought this up before, but haven't found a good solution yet. I think the easiest way to get what I want is to use struts-faces, but then I can't get the benefits of Shale... So, I'd like to revisit the base requirements to see if anyone can see a way to do what I want w/out Struts Action / struts-faces in the mix...

My base requirement is that everything be directly addressable by a bookmark-able URL. So, for example, I'd like to have a URL like http://.../users to be rendered by /users.jsp as a list of users and, when you click on an entry in the list, you'd get taken to http://.../users/bob which would be rendered by /userInfo.jsp. For any X, the URL http://.../users/X would be rendered by /userInfo.jsp, with X being made available to the JSP (or backing bean) as a request parameter, request attribute or whatever.

Using struts-faces, I can get what I want by using wild-card action mappings to map logical URLs to physical JSPs, passing wild-card matched parts of the request URL on to the view in the action; something like, roughly:

  <action path="/users/*" type="myaction" forward="/user.jsp">
    <set-property name="user" value="{1}"/>

I need a way to get the same mapping from logical URLs to actual JSPs with vanilla JSF / Shale. Sean suggested I could try writing a custom navigation handler, but that doesn't seem to work since a navigation handler only gets to influence how from-view-id/from-outcome pairs get mapped to views.

I tried setting up a front controller servlet that encapsulates the URL-to-view mapping logic, but that doesn't work because to-view-id in a navigation-rule is not a context relative path, so my navigation rules can't route through my controller servlet...

I'm really hoping I can find a way to do this that doesn't involve deploying Struts + struts-faces as a front controller to Shale ;-) My requirements can't be *that* weird can they?

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to