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

View parameter and @ViewScoped bean: recover after server restart

Supposing following scenario: In a web application I have a simple form on a page where the user can update a value in a database; the backing bean Controller is @ViewScoped. The object which holds the value is read from database in a custom…
MichaelRS
  • 51
  • 3
0
votes
0 answers

Include view parameters in h:link

I have a problem when adding view parameters to a - they are not added to the rendered link. I am using Mojarra 2.3.9. Template /WEB-INF/templates/main.xhtml
MichaelRS
  • 51
  • 3
0
votes
3 answers

the best practice for performance bettween using parameter in url ?p=2 and Managed bean

I am using JSF 2.0 and Icefaces and Glassfish for my project and I want to optimise this application the best I can, and I want to know what is the most optimized method to send parameter. first 1: using /BackOffice/test.xhtml?id=7 in url and …
NABS
  • 3
  • 1
0
votes
1 answer

How to set string conditions for param to viewparams

SQL function like this "SELECT * FROM myFunction('%FILTER%')", where FILTER: and any_param >= 100 and any_param < 1000. When I run geoserver/cite/wms?....&viewparams=FILTER:and any_param >= 100 and any_param < 1000; I get message error…
Cold Pol
  • 13
  • 2
0
votes
1 answer

viewParam with parametername fromName doesn't work

I have the following in my code: And this parameter doesn't work. I'm absolutely convinced that the getters and setters behind bean.fromName are correct. Yet this parameter doesn't work,…
Lavandysh
  • 531
  • 1
  • 7
  • 15
0
votes
1 answer

JSF - Passing an f:param when the paginator is used in a ViewScoped bean

When this page loads it takes a viewparam and uses a converter to get an object. Im getting the following error when the paginator is used because the viewParam is not being passed to the converter at java.lang.Long.parseLong(Unknown Source) …
blitzeus
  • 485
  • 2
  • 10
  • 28
0
votes
1 answer

Inject request parameters into view scoped bean (different portlets)

I'm attempting to communicate two views, the first view within portlet-A, and the second view within portlet-B (both portlets within same .war). To do so, I've decided to use the JSF 'f:viewParam' and 'f:param' features in order to inject a property…
txapeldot
  • 71
  • 2
  • 10
0
votes
1 answer

Send HTTP 400 error when has failed on @NotNull property

I'm creating a JSF 2.2 page that requires a GET parameter to display data but I'm having difficult to enforce that parameter. I also tried to use Omnifaces's viewParam without success, I don't know what to try anymore. I also found a similar issue…
Polyana Fontes
  • 3,156
  • 1
  • 27
  • 41
0
votes
1 answer

f:viewParam bean property recreated on submit via Converter

I have following JSF page. I pass id as a param to it and converter creates object in backing bean using that id. This is page is basically to edit existing record in database. When save is pressed my roleInformation object is recreated using…
Asiat
  • 401
  • 1
  • 5
  • 14
0
votes
0 answers

Bean property loads only after page refreshed

officeProductionBean.officeName loads only after I manually refresh the page. I am using @Managedbean and @SessionScoped annotations with Primefaces 5.3. xhtml page Value passed from another page
0
votes
0 answers

myfaces 2.1.17 - f:viewParam setter being called on commandlink

In JSF2.0, when commandlink is pressed (posted), should the f:viewParam setter be called again? In myfaces 2.0, it does not call the viewParam setter again, but in myfaces 2.1, it is. Is this correct? Is there a way to globally disable it?
HockChai Lim
  • 1,675
  • 2
  • 20
  • 30
0
votes
0 answers

Preserving query-string parameters using request scoped beans

I have some readonly beans which do not require maintaining their state on postbacks. These beans can thus be request scoped such as, @Named @RequestScoped public class Bean extends LazyDataModel { @Inject private Service service; …
Tiny
  • 27,221
  • 105
  • 339
  • 599
0
votes
0 answers

How to invoke custom Converter in

I am working on a web application that needs to be converted to follow a POST-redirect-GET pattern. In this, a view scoped managed bean needed to be passed on in the redirect so the page will still work the same. So to do this I added a navigation…
cfreih
  • 100
  • 4
  • 9
0
votes
0 answers

Pass get parameter to all pages in JSF

I've got an application with two user interfaces, one for mobile and one for desktop. Users can switch between them no matter in which device they are using, for example, they can watch desktop interface from a mobile device. To accomplish this, the…