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
3
votes
1 answer

f:viewParam with Converter and ViewScoped exception out when invoke the second ajax request

I have this f:viewParam that I try to bind validate and convert a userId into Player, and I got an unexpected results.
Thang Pham
  • 38,125
  • 75
  • 201
  • 285
2
votes
1 answer

How to navigate with request parameters?

I want to navigate from one page to another page, say from page1 with bean1 to page2 with bean2. I need to pass some parameters from bean1 to bean2. I would like to understand how to use @ManagedProperty for parameters and in…
Peter
  • 131
  • 1
  • 14
2
votes
1 answer

Passing UTF-8 string to f:viewParam in JSF

I tried to pass UTF-8 String as f:viewParam value but value shown as garbage string, i added EncodingFilter in web.xml for setting UTF-8 to request and response as below HttpServletResponse response = (HttpServletResponse)…
Ashkan
  • 320
  • 2
  • 17
2
votes
1 answer

JSF 2.0 view parameters to pass objects

I am trying to pass an object from one page to another page where each page is in a different view. On the first page I have an input text, where myBean is a ViewScoped Bean and name is an object. The…
user679526
  • 845
  • 4
  • 16
  • 39
2
votes
1 answer

WNDPROC return value cannot be converted to LRESULT TypeError: WPARAM is simple, so must be an int object (got NoneType)

I was trying to make a simple notification reminder by using a list and a simple input and output error and for the purpose I used the following code expecting notifications following the respective time given but, instead of doing this the code…
codiander
  • 41
  • 6
2
votes
2 answers

How to use params in GET request via EIA API v2 in Python?

I am trying to read Crude Oil Production data from https://www.eia.gov/ using GET request. It is quite straightforward to read it in a single-line URL address. However, I can not use params within requests.get(api_url, params=params)…
Farid
  • 21
  • 2
2
votes
2 answers

View parameters in different beans

I've got a page called trip.xhtml where I take parameters out of the URL using the following code:
StefK
  • 604
  • 6
  • 18
2
votes
1 answer

Can't Pass String as parameter JSF 2.3

I'm using Primefaces 6.0 and JSF 2.3, i passed String as parameter but it become empty! java: FacesContext context = FacesContext.getCurrentInstance(); ExternalContext extContext = context.getExternalContext(); String redirected =…
Sidaoui Majdi
  • 399
  • 7
  • 26
2
votes
1 answer

ExternalContext#redirect() with includeViewParams=true

Using a list of currencies in the form of strings as follows.
Tiny
  • 27,221
  • 105
  • 339
  • 599
2
votes
1 answer

Binding f:viewParam on component binding

I want to create which sets active tab of . In my page I define a : and with binding:
2
votes
2 answers

javax.persistence.NoResultException: No entity found for query

I have a grid where the user can see his records, when he clicks on a record it links to another page so he can edit or delete it. The record in that page shows correctly, and it has a button to update the record if any changes where made and…
Alexev
  • 157
  • 2
  • 19
2
votes
1 answer

Validate f:viewParam value to be one of a select set of allowable values

I am learning JSF 2.2 and I am having a little trouble finding a good answer that i can understand as to how to have more for validation on a GET parameter. I have a source.xhtml file that has a link it like this:
user1807807
2
votes
1 answer

Using multiple on a JSF page along with custom converters and ignoring only invalid parameters whose conversion fails

I have two tags enclosed within an tag on a JSF page as shown below. The index.xhtml file:
Tiny
  • 27,221
  • 105
  • 339
  • 599
2
votes
0 answers

Update view parameter without redirecting the page

Is it possible to update view parameter without redirecting the page? For instance I have a managed bean which checks if an ID exist public void signIn(){ Client c = clientFacade.loginDetail(client.getID()); if (c != null) { …
oxax
  • 63
  • 1
  • 4
2
votes
0 answers

Doesn't viewParam work with @RequestScoped bean and ajax events?

After reading some question and answers in stackoverflow (like this ViewParam vs @ManagedProperty(value = "#{param.id}")) I'm not sure about the possibility of using viewParam with @RequestScoped bean and ajax events. As you can see in the @BalusC's…