Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8791859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:54:02+00:00 2026-06-13T22:54:02+00:00

Is bookmarkability achievable though using the includeViewParams=true query parameter with JSF implicit navigation ?

  • 0

Is bookmarkability achievable though using the includeViewParams=true query parameter with JSF implicit navigation ? If yes, then how ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:54:02+00:00Added an answer on June 13, 2026 at 10:54 pm

    First we need to understand what exactly “bookmarkability” is and what exactly includeViewParams does. This way the effect of the combination of both can be better understood.

    Bookmarkability concerns the HTTP request URL in its exact form as you see in the browser’s address bar. It’s exactly the URL as the enduser would store in its bookmarks and/or would copypaste as a link elsewhere, such as a forum, a chatbox, some social medium, or just a new browser window/tab, etc. When a link is followed or an URL is copypasted into browser’s address bar, then by default a HTTP GET request will be fired. If the result is exactly the same everytime (leaving authorization/authentication and the time-sensitive nature of the page —search results, last news, etc— outside consideration), then we can talk about a bookmarkable URL. The technical term is “an idempotent HTTP request”.

    If the enduser has however submitted a POST form on that URL beforehand, which hasn’t performed a redirect, then the URL is not necessarily bookmarkable. The submitted form data is not reflected in the URL. Copypasting the URL into a new browser window/tab may not necessarily yield exactly the same result as after the form submit. Such an URL is then not bookmarkable. POST is not idempotent. That’s why page-to-page navigation by commandlinks is bad.

    Bookmarkability is usually achieved by a specific construct of the URL path and/or query parameters. If you look at Google, the search results are bookmarkable thanks to the q query string parameter.

    http://google.com/search?q=bookmarkability

    In JSF terms, those request parameters can be set (and converted and validated) via <f:viewParam>:

    <f:metadata>
        <f:viewParam name="q" value="#{bean.query}" />
        <f:viewAction action="#{bean.search}" />
    </f:metadata>
    

    If you need to perform for example pagination, and you’d like to keep the URL bookmarkable, then you could add another request parameter:

    http://google.com/search?q=bookmarkability&start=10

    with

    <f:metadata>
        <f:viewParam name="q" value="#{bean.query}" />
        <f:viewParam name="start" value="#{bean.start}" />
        <f:viewAction action="#{bean.search}" />
    </f:metadata>
    

    The includeViewParams="true" basically includes all of those view parameters in the generated GET link. With help of this, the pagination links can then look like this without the need to repeat the q parameter:

    <h:link value="1" outcome="search" includeViewParams="true">
        <f:param name="start" value="#{null}" />
    </h:link>
    <h:link value="2" outcome="search" includeViewParams="true">
        <f:param name="start" value="10" />
    </h:link>
    <h:link value="3" outcome="search" includeViewParams="true">
        <f:param name="start" value="20" />
    </h:link>
    ...
    

    (of course generated by some <ui:repeat> or so)

    When entering the page with q=bookmarkability, this will produce the following links

    /search.xhtml?q=bookmarkability
    /search.xhtml?start=10&q=bookmarkability
    /search.xhtml?start=20&q=bookmarkability
    

    Those are bookmarkable URLs and the includeViewParams made creating them more convenient.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is this well-known problem that browsers don't put Ajax request in the request
When should I use an <h:outputLink> instead of an <h:commandLink> ? I understand that
HTML5 allows us to update the current URL without refreshing the browser. I've created
For the successful use case, the Post/Redirect/Get (PRG) work flow is pretty simple: simply

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.