I suspect that Shale doesn't provide anything over-and-above the standard JSF navigation management in this area, in which case this may be more of a general JSF question:

I use wildcard action mapping paths extensively, which of course continues to work unchanged with struts-faces, but I'm wondering how I'd achieve the same goals with Shale.

Here's what I have using Struts:

- I have action mappings like

    <action path="/Projects/*/Releases/*" ...
      parameter="project={1};release={2}">

- My actions parse the expanded 'parameter' value into a map:

    {'project' -> 'foo', 'release' -> 'bar'}

  which is used to determine the data to load for the view

- My 'forward' declarations use the matches (e.g. {1}) to
  specify the view to forward to,

    <forward name="edit" path="/Projects/{1}/Releases/{2}/Edit/>

- The result is that I can use a URL like

    .../Projects/foo/Releases/bar

  instead of

    ...?project=foo&release=bar

  and can declaratively specify the 'outcome' view w/out having
  my actions mess with request parameters on the mapping forward
  they return.

By having the actions parse the parameter value, I'm able to avoid duplicating the URL path parsing semantics in two places; there's exactly one place I specify a path matching expression, and exactly one place where I specify how the results of that match are processed.

Using Shale (or JSF in general), I'm not sure how to achieve the same thing. Ideally, I'd be able to do something like this:

    <navigation-rule>
        <from-view-id>/Projects/*/Releases/*</from-view-id>
        <navigation-case>
            <from-outcome>edit</from-outcome>

<to-view-id>/Projects/ReleaseEdit.jsp?project={1}&amp;release={2}</to-view-id>
            <redirect/>
        </navigation-case>
    </navigation-rule>


or better yet, have the to-view-id refernce a logical path the way the Struts 'forward' does -- that's the bit where I thought maybe Shale might be able to help.

I'm still not sure how I get a backing bean setup with data supplied as request parameters, but I think I should be able to figure that out easily enough. The bit I have no idea how to solve is the use of path- extra-info--based URLs...

L.


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

Reply via email to