File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Set method not being called in subview Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Set method not being called in subview" Watch "Set method not being called in subview" New topic

Set method not being called in subview

Frederic Filiatrault
Ranch Hand

Joined: Jul 12, 2004
Posts: 69

I'm sure it is a very easy problem but can't find the solution. Any help would be appreciated.

I have a JSF file, using a subview that contains a inputText field:

inside the subview, there's an inputText field :

My managed bean is :

My faces-config.xml file is :
I do see the "test" value appearing on my web page but if I set a breakpoint on "setValue" and change it, I never step into the method (and value is never change).

The ONLY way I found was to set the managed-bean to a scope of Session but I want to keep it as a request session. What the hell I'm missing here?!?

F.<br />SCJP, SCJD, SCWCD, SCBCD<br /> <br />Failure is not an option... It comes with the software bundle.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17257

Request-scope objects are (re)created and destroyed each time you send a page request, even if it's still on the same page.

If you're using JSF2, View scope will allow you to keep the same object between requests, but for JSF1, you're stuck with session scope.

An IDE is no substitute for an Intelligent Developer.
avase kose

Joined: May 04, 2011
Posts: 2
Please check whether you have set immediate=true for the component
I agree. Here's the link:
subject: Set method not being called in subview
It's not a secret anymore!