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
1
vote
0 answers

Passing Arabic Parameters through f:param in PrimeFaces

We have a screen in our JSF PrimeFaces application that uses link tag to move to another page. There are 2 parameters that are passed to the second screen. When you hover the mouse over the link, you can see that the parameters are in Arabic. But…
MNH
  • 13
  • 5
1
vote
1 answer

Geoserver, string parameter sending by using viewparams values

Is it possible to send a string value to SqlView based layer in the viewparameter sequence? My parameter is similar to date (contains dashes) and if I put it in request like…
Artik
  • 803
  • 14
  • 36
1
vote
0 answers

JSF: f:viewParam doesn't call setter, f:viewAction doesn't call business-method

I'm totally stuck with using and . I've read several similiar Questions like this, but couldn't get it working, yet. Simple example as follows: test.xhtml Test
Archie92
  • 39
  • 6
1
vote
0 answers

JSF How to submit a form and pass the values as GET params to another page?

Hi I see this anwer by BalusC Creating master-detail pages for entities, how to link them and which bean scope to choose What i am looking for is a way to pass an input value as a request GET param. Suppose I have a page1 with search form like…
SaGiTaRiO
  • 63
  • 1
  • 6
1
vote
0 answers

Why is getter of a property caller before a setter is called when f:viewParam is the caller?

Sorry for bad title, feel free to edit please. So I have this piece of code: Go to goodbye! so when clicked, I will end up in goodbye.xhtml and the…
Koray Tugay
  • 22,894
  • 45
  • 188
  • 319
1
vote
0 answers

Retrieve converter attribute expression from UIViewParameter

I need to create a dependent converter for a view-param which JSF has no built in solution for. In this example bar is dependent on foo.
djmj
  • 5,579
  • 5
  • 54
  • 92
1
vote
0 answers

Spurious PreDestroyViewMapEvent with includeViewParams="true" on h:link

I have 2 views (a.xhtml and b.xhtml) one of which contains a link to the other. The first view: uses the current view map by setting some value to it; points to b.xhtml with h:link using includeViewParams="true" in order to automatically include…
Pavel S.
  • 1,202
  • 1
  • 13
  • 29
1
vote
1 answer

@ViewScoped @ManagedBean destroyed when using

I'm using Mojarra 2.2.12. I have a case where a @ViewScoped @ManagedBean is immediately destroyed on page load, although the view is not ended. The problem is reproducible with solely the below in :
jpl
  • 347
  • 3
  • 11
1
vote
0 answers

Passing parameter between pages

I'm unable to pass a simple parameter from one Facelet to another, and set a bean property...here's my code: The calling page, main.xhtml (only relevant code):
Alex
  • 327
  • 1
  • 3
  • 12
1
vote
2 answers

PrimeFaces Ajax listener in SelectOneMenu tag is not working with viewParam

I trying to use a selectOneMenu ajax listener but its not working when my page receives parameters. In my tests I used the same example shown in PrimeFaces ShowCase page, but my page also receives parameters by viewParam and viewAction. The first…
Robinson RK
  • 25
  • 2
  • 8
1
vote
2 answers

@NotNull Bean Validation ignored for viewParam

Problem I'm trying to validate a mandatory GET request parameter. In the view I've added a corresponding viewParam tag. And my CDI bean looks…
Thomas
  • 759
  • 8
  • 15
1
vote
1 answer

Passing multiple view parameters to a converter for an entity with a compound primary key

How do you write a converter for an entity with a compound primary key? I want to edit the entity with a URl such as `\edit_representative.xhtml?emp_id=12345&project_id=45 I'm using Omnifaces so I have something like this for single primary…
jeff
  • 3,618
  • 9
  • 48
  • 101
1
vote
1 answer

f:param does not pass parameter or the parameter does not get set

I use h:link with includeViewParams=true to navigate between my list and view pages and make the view page URLs bookmarkable but it doesn't work. Below is related portion of my code: in layout.xhtml (my template):
user2911374
  • 159
  • 1
  • 7
  • 16
1
vote
2 answers

Required flag on f:viewParam doesn't prevent preRenderView to be called

some of my viewParams are mandatory and a FacesMessage is shown when they are missing. However the system event preRenderView is excecuted with empty search parameters and thus there is a default data result returned. Is there anyway to prevent…
jonnie119
  • 421
  • 1
  • 6
  • 16
1
vote
1 answer

f:viewParam is not working

I am using JSF 2.2.4 on GlassFish 3.1.2.2. I have this backing bean: import javax.faces.bean.ManagedBean; import javax.faces.bean.RequestScoped; import java.io.Serializable; @ManagedBean(name="testMB") @RequestScoped public class TestMB implements…
z3r9
  • 167
  • 1
  • 4
  • 15