Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for path parameters to generate links to multi view pages with path parameters. #471

Merged
merged 7 commits into from Apr 26, 2020

Conversation

skuntsel
Copy link
Contributor

This commit fills the gap that there is currently no component capable of generating links to multi view pages with path parameters. For this reason a new component is introduced, <o:pathParam>.

If you need to generate a link to a multi view page with path parameters you need to nest a path parameter in an outcome target component:

<h:link value="Link" outcome="multiview-supported-path">
    <o:pathParam value="first" />
    <o:pathParam value="second" />
</h:link>

Previously you had to fallback to a plain a element to achieve the same functionality that was error-prone because of custom view handlers.

This is a new simplifying look on the previous PR #412.

Another addition is a helper method to send a 301 redirect to the given URL to the Servlets.

@BalusC BalusC merged commit 64e370b into omnifaces:3.x Apr 26, 2020
@BalusC
Copy link
Member

BalusC commented Apr 26, 2020

Great work. Thanks. I've only made some improvements, because the original implementation failed in following circumstances:

  1. URL has a jsessonid appended; the original implementation placed path parameters after the jsessonid, this was incorrect.
  2. URL has already existing path parameters; the original implementation didn't remove them.

I've also updated MultiViewsIT to test these cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants