Questions tagged [viewparams]

JSF tag to declare a GET parameter.

"View parameters" is a JSF specific term for GET request parameters which can be set on the model by the <f:viewParam> JSF UI component on the view. They follow the same lifecycle as regular UIInput components, complete with support for declarative conversion and validation and message handling.

Frequently asked questions

108 questions
4
votes
0 answers

How do I pass a list of values in string form to viewparams in geoserver?

I have a SQL view which takes two parameters. One of these parameters is a list of numbers in string form. I can't for the life of me figure out if Geoserver can take this list and parse it. The basic SQL query i've set up works as below SELECT *…
4
votes
1 answer

Navigate to other view passing a parameter

My current environment is JRE 1.7, JSF 2.2, Eclipse Luna. In a certain page (entity_index.xhtml) of my application I have the following (PrimeFaces) button:
AlexSC
  • 1,823
  • 3
  • 28
  • 54
4
votes
2 answers

Redirect if a f:viewParam is empty

Сan I do a redirect (or error) if a f:viewParam is empty? When I add required="true", nothing happens. What are the options?
zerg
  • 255
  • 1
  • 3
  • 17
4
votes
1 answer

f:viewParam doesn't pass required parameter when new xmlns.jcp.org namespace is used

I am trying to use Glassfish 4.0 with Java EE 7 XML namespaces to test the sample below.
oxax
  • 63
  • 1
  • 4
4
votes
1 answer

Is there a way to make f:viewparam handle lists of values?

Let's say I already have a converter between a custom class Car and String. Is there a way to elegantly make this work when mybean.cars is a Set or List instead…
Antares42
  • 1,406
  • 1
  • 15
  • 45
4
votes
2 answers

ui:include dependent on viewParam

I have a page where I want to include a part of the page (footer in this instance) dependant on values given from a view parameter. I have my ViewScoped backing bean initializing on preRenderView
blo0p3r
  • 6,790
  • 8
  • 49
  • 68
4
votes
1 answer

How to retain f:viewParam values after postback with validation failed

I have xhtml page with simple form. This page is using for several data tables. To specify data table (and so on), I use GET request parameters. xhtml page receive it through
gooamoko
  • 658
  • 12
  • 32
3
votes
1 answer

not working when using

I'd like to create a master-detail screen with request params and requestScoped beans but the view param doesn't get filled. The link that invokes the redirect:
GregD
  • 1,884
  • 2
  • 28
  • 55
3
votes
1 answer

called again on first AJAX request

I'm using JBoss Wildfly 8.2.0 and noticed that is called twice on my page: The first time is when I access my page with the given param in the URL The second time is upon the first AJAX request I make from that…
Xavier Dury
  • 1,530
  • 1
  • 16
  • 23
3
votes
1 answer

Process f:viewParam only on page load

I'm using an to pass a parameter as follows. Is it possible to process this…
Tiny
  • 27,221
  • 105
  • 339
  • 599
3
votes
2 answers

How to share an entity between JSF backing beans?

I would like to modularize my JSF 2.1 / Java EE application. I have a page that consists of several modules. Each module should use a separate JSF backing bean. Some of these modules need to show and change some data from/on the same entity. I've…
3
votes
1 answer

not being set during submit

I would like to create a form to simply modify the fields of some project entity. To do so I created a request scoped bean and a view that uses together with a converter to tell the bean which entity is being…
Arno Fiva
  • 1,459
  • 1
  • 13
  • 17
3
votes
0 answers

Rails - Dynamically add form fields and converting params in "array"

I would like to add dynamically new input (select) field, this is ok and done by JQuery, but when passing to the controller create it keeps only the first entry. This is my new.html.erb view <%= simple_form_for @comp, :url => url_for(:controller =>…
damoiser
  • 6,058
  • 3
  • 40
  • 66
3
votes
1 answer

does not include URL parameters

I have a JSF page which is opened by an URL like test.xhtml?a=15&b=20. I have a link which should pass all URL parameters to the next page. I was expecting that…
user373201
  • 10,945
  • 34
  • 112
  • 168
3
votes
2 answers

f:param and f:viewparam setter not called

I have a xhtml page where i have an outputlink with f:param Start
niamat
  • 31
  • 3