Questions tagged [view-scope]

The View Scope means that you can keep the object alive as long as you are staying on the view (page).

The @ViewScoped has been introduced by JSF 2.0 specification. In a nutshell the data which is @ViewScoped will keep living as long as you don't navigate to another page to itself. The view scope is very convenient, since it allows the pattern of initializing data when you first access a page (via a non-faces request, which is typically a GET request) and then keep that data when you work on the page, doing post-backs, AJAX requests, etc.

258 questions
0
votes
1 answer

Use of ViewScoped beans Vs Flash Scope Beans Vs Conversations

This is more kind of theoretical question with pragmatic implications. I have a page in which users can search for people. As a result of the search , there will be a list of people which meet the search criteria. Alongside every record(every…
Deibys
  • 619
  • 3
  • 9
  • 18
0
votes
1 answer

How to restore a managedBean from another managedBean

I have two pages(let's say page1 and page2), and one magaedBean for each page (mb1 and mb2). in the mb1, i have an instance of the mb2, with all their attributes previously setted by a method in mb1. Something like this: public Mb1(){}//Default…
Mateus Viccari
  • 7,389
  • 14
  • 65
  • 101
0
votes
0 answers

ajax and viewscoped don't work on google app engine wit jsf2 and primefaces

I want to create one application with jsf2.1 and primefaces and google app engine but when I tested this :
simonTifo
  • 307
  • 3
  • 12
  • 29
0
votes
2 answers

Can't get view scope working for my ManagedBeans

I'm using JSF 2 with Spring 3 in my project and until now, I'm just using request and session scopes. I want to use view scope for some of my JSF beans (for multiple reasons). The problem is that the JSF ManagedBean have to implement Serializable…
faissal
  • 261
  • 5
  • 20
0
votes
1 answer

ViewScoped after redeploy server

I have strange problem on my simple form in JSF 2.0. In this form, I use two selects, if the first select is chosen, the second should be reload with new options. I use the same mechanism as on Primefaces demo page : Primefaces demo page. My bean is…
Cichy
  • 1,319
  • 3
  • 20
  • 36
0
votes
1 answer

populate Data Table from View scoped managed bean JSF

Hi I have View scoped bean that is responsible for search activity. After user enters search criteria and search value, hits the search button it does populate its one of the List type properties with search results then navigate to another page…
Odgiiv
  • 683
  • 1
  • 11
  • 32
0
votes
0 answers

Skipping BeanValidator in ViewScoped beans with f:param nested in p:commandButton

I'm using a BeanValidator (extending javax.faces.validator.BeanValidator) and in some cases I need to prevent the validation, since it's not necessary for some actions. My validator checks the request parameter map for a "validationBean" parameter…
pvcastro
  • 61
  • 3
0
votes
1 answer

JSF 2.0 @managedproperty not working from one viewScoped bean to another view scoped bean

I have a @viewScoped bean( say bean1) having an inputText as property .From the facelet, Iam setting the value of this inputtext field. However after the submit operation when the other facelet (whose managed bean say bean2 is in @viewScoped ) as…
Muthu Raman
  • 154
  • 2
  • 13
0
votes
0 answers

ViewScoped NPE with mediaOutput of Richfaces

I have some problem with a Managed Bean ViewScoped, dealing with my page which contains a + component. I get always a Null Pointer Exception when i try to upload an image, that will be displayed (= rendered) when…
0
votes
1 answer

Saving a view in JSF

Im having a question regarding retrieving the view state of a JSF page. I have an application in which the user is able to search for persons in a list and when the user press "show" button the same JSF page will be filled with a list of the various…
Erfan
  • 113
  • 1
  • 3
  • 7
0
votes
1 answer

Java EE 6 - @PreDestroy in ViewScoped & Session beans never called

As I wrote in this topic I need to invoke some action when user close or change page. I thought I could use @PreDestroy in my view scoped bean, but it is never called (even when session expires). Is this a bug? I use Glassfish 3.1.2. Any other…
karolkpl
  • 2,189
  • 10
  • 39
  • 60
0
votes
0 answers

primefaces fileUpload with @ViewScoped bean and s:viewAction

I'm using JBoss 7.1.1.Final, Seam 3.1, CDI, JSF 2, Primefaces 3.4RC1. I have a page that has following s:viewAction:
lukas
  • 545
  • 2
  • 7
  • 18
0
votes
1 answer

Execute some code after the view is displayed or changed

I have a menu with items that point to different views. Each view has a select combo box with an attached listener. In that views I use session-scoped managed beans. When I navigate to a view for the first time, a method is called when the bean…
Seitaridis
  • 4,459
  • 9
  • 53
  • 85
0
votes
1 answer

Inputext nullpointer with and @ViewScoped

i'm facing a problem and i can't solve :( By choosing an item in a selectOneRadio, i want to set a specific variable :
holegeek
  • 97
  • 2
  • 12
0
votes
2 answers

Using @Interceptor in @ManagedBean

Interception with CDI works perfectly in @Named , but doesn't in @ManagedBean: Logable.java @InterceptorBinding @Retention(RUNTIME) @Target({TYPE, METHOD}) public @interface Logable { } LoggingInterceptor.java @Logable @Interceptor public class…
iga
  • 41
  • 1
  • 5
1 2 3
17
18