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

Serve page under multiple links #292

Open
Zibelas opened this issue Apr 21, 2020 · 2 comments
Open

Serve page under multiple links #292

Zibelas opened this issue Apr 21, 2020 · 2 comments

Comments

@Zibelas
Copy link

Zibelas commented Apr 21, 2020

I'm facing a small problem with linking the same page under multiple links and I'm stuck on the last step.

  • I have a page physically under localhost:8080/home/index.xhtml
  • I added .addRule(Join.path("/home/en/{path}.xhtml").to("/home/{path}.xhtml")) .addRule(Join.path("/home/de/{path}.xhtml").to("/home/{path}.xhtml"))
  • The page can now be reached on all 3 links.
  • I have a command link that routes me to home/en/index?faces-redirect=true (or de, depending on current language)
  • if the current url was home/index.xhtml it gets updated to home/de/index.xhtml
  • my problem is now, that only the last rule gets executed, the url doesn't change over my command link. If I enter it directly into the browser, it works. The url stays as well if I navigate to different pages of the app but as soon as I click the button, it changes to whatever I have as last rule under the ConfigurationProvider

I only want to display the url correctly, all i18n, routing/ navigation is already working. I only have the configuration manager. What am I missing?

EDIT

It seems the culprit is h:commandLink, a normal is working

@tandraschko
Copy link

@Zibelas i currently have the same problem :D did you find a solution?

@Zibelas
Copy link
Author

Zibelas commented Apr 27, 2020

@tandraschko yes, it is working for me now. I exchanged <h:commandLink to a normal <a href. The url is updating now correctly, the page can be reached under both addresses without duplicating the source page.

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

No branches or pull requests

2 participants