question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Link: Ajax Navigation

See original GitHub issue

Description One of reasons for dissemination of single-page applications is the performance it brings with navigation between screens without the cost of a full page load, specially JS/CSS. JSF 2.3 advanced a lot when the subject is GET requests with h:link, f:metadata and f:viewAction check my project JSF-PERFECT-CRUD to check how much I use it on my applications.

Would be great primefaces provide a way to navigate between pages without a full HTTP request and this way provide the feeling of single-page applications without the added complexity of a client-side JavaScript framework.

Describe the solution you would like

  • First implementation could be on p:link, when user set ajax=true primefaces changes the browser’s URL using the History API, update h:body with content of new page and merge his h:head.
  • Second would be on all components that implements action property, when a action with ?redirect=true is performed, a AJAX navigation needs to be handled.

I know it is not a simple thing to do and maybe changes a lot original JSF navigation but I was there when @cagataycivici made things like client-side validations.

Additional context Some inspiration can be found on Turbolinks and PJAX.

Example XHTML

<h:link value="List Students" outcome="/views/students/index.xhtml" ajax="true" />

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
GedMarccommented, Jun 16, 2020

But i’m not going to help doing it that way, agree with Thomas, if you can’t do it using raw JS or JQuery, don’t give it an attempt.

Wonder if I should actually … hmm

0reactions
GedMarccommented, Jun 16, 2020

+100, MPA’s is the only thing making PF unusable for post mobile-wave applications

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ajax navigation example - Web APIs | MDN
Ajax navigation example. This is an example of an AJAX website composed only of three pages (first_page.php, second_page.php and third_page.php) ...
Read more >
Page navigation and update url with ajax - Stack Overflow
I want to create a website using ajax navigation. When i click on a menu, only the content div will update. Also i...
Read more >
Linking pages - jQuery Mobile Demos
Linking pages. jQuery Mobile is designed to work with standard page link conventions and layers the Ajax navigation on top for maximum compatibility....
Read more >
Ajax navigation with ability to link directly to the url of any page ...
Hi there, I am looking into feasibility to create mobile(phone) version of high traffic site with Kendo UI Mobile.
Read more >
Links and page navigation | Mastering jQuery Mobile
Ajax page linking · Go to your project and copy (don't move or rename) index.html to a new file named about.html . ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found