Getting path parameters into request param map

Splash Forums PrettyFaces Users Getting path parameters into request param map

This topic contains 7 replies, has 3 voices, and was last updated by  jfb_1973 6 years, 2 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #17889

    jfb_1973
    Participant

    Looking at the docs I thought it was possible to take a path parameter and turn it into a request param. So if I have

    <url-mapping id=”test”>

    <pattern>/stuff/#{id}</pattern>

    <view-id>/stuff.jsf</view-id>

    </url-mapping>

    I would like to then be able to access the param ‘id’ from the request param map. If I try this without referencing an actual managed bean I get an UnsupportedOperationException thrown by FaceELUtils.

    Am I missing something obvious here?

    Thanks

    #20780

    Could you please post the complete stacktrace of the UnsupportedOperationException you are seeing?

    #20781

    jfb_1973
    Participant

    It’s actually occurring in ParameterInjector.injectQueryParams. The exception is thrown by FacesElUtils.setValue(). Here’s the relevant code –

    ValueBinding valueBinding = context.getApplication().createValueBinding(expression);

    Class<?> type = valueBinding.getType(context);

    Converter converter = ConvertUtils.lookup(type);

    if (converter == null)

    {

    throw new UnsupportedOperationException(“Cant deal with ” + type);

    }

    #20782

    @jfb_1973

    It looks like you are using a really old version of prettyfaces. Could you tell us what that is? And what version of JSF you are using?

    #20783

    jfb_1973
    Participant

    It should be prettyfaces 3.2. I just downloaded it last night. I am on a very old version of jsf – 1.1_02.

    #20784

    Ahh. That would be why. The 1.1 branch is no longer under active development (because it is really quite nasty to work with JSF 1.1), and has its own (old) version of the docs (if you look carefully at the docs links on the prettyfaces homepage.) We should make this clearer, sorry for the inconvenience:

    PrettyFaces v1.1.x, v1.2.x, v2.0.x Docs (legacy)

    However, as you have found out, the 1.1 branch builds with the 1.2 and 2.0 branches, so if you would like to implement this feature, we would be more than happy to review and merge in your patch for the next release.

    Even better, if you’d like to try to upgrade the 1.1 branch to use the new ‘core’ module architecture that the 1.2 and 2.0 branches use, that would help solve this problem in the future. (Warning, I think that would be VERY difficult… 1.1 has many many differences.)

    Sorry again,

    Lincoln

    #20785

    I forgot to explicitly say it, also. the 1.1 branch does not currently support path->request parameter conversion.

    #20786

    jfb_1973
    Participant

    Ok I’ll see what I can do to. Thanks for the quick response guys. This is a great product.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

Comments are closed.