aspose file tools*
The moose likes JSF and the fly likes problem accessing the current value of rich:inputnumberslider and rich:inputnumberspinner Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "problem accessing the current value of rich:inputnumberslider and rich:inputnumberspinner" Watch "problem accessing the current value of rich:inputnumberslider and rich:inputnumberspinner" New topic
Author

problem accessing the current value of rich:inputnumberslider and rich:inputnumberspinner

Raymund Nickel
Greenhorn

Joined: Aug 17, 2009
Posts: 8
Hi,
i have a problem accessing the current value of a <rich:inputnumberslider> and a <rich:inputnumberspinner>.

I tried it in many different ways without success:
- valuebinding
- binding the component and try to access the current value
- valueChangeListener

I read in some forums thats some guys have also problem and some dont.
My question is, is there any known issue about accessing the current value of a rich:inputnumberslider or a rich:inputnumberspinner.
Maybe in combination with facelets, tomcat, myfaces and so on...

Thank you,
Ray
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

I suppose it depends on what you mean by "current value". On the web, normally changes made on the client aren't sent to the server until you hit the submit button. So the server's "current value" will be out of date until that happens. Also, if you have invalid data on the form being submitted, that will keep the server from being updated, since JSF only updates when all the data on the form is valid.

With RichFaces, you can make things more immediate by adding AJAX updating to a control and configuring it to update only its corresponding server object and not all objects on the form.


Customer surveys are for companies who didn't pay proper attention to begin with.
Raymund Nickel
Greenhorn

Joined: Aug 17, 2009
Posts: 8
Hi Tim,

thank you for your reply. After a while i figured out that the problem occurs, when <rich:inputnumberslider> or <rich:inputnumberspinner> are inside
a modalpanel. When they arent placed in a modalpanel everything works fine. I submit the form and the current value of the slider and the spinner are provided to the server. But if they are inside a modalpanel they valuebinding doesnt work.
Is that a bug? Any ideas?

Thank you,
Ray
Raymund Nickel
Greenhorn

Joined: Aug 17, 2009
Posts: 8
Finally i found the solution. I just placed the <h:form> wrong. It was outside the modalpanel.
I placed it inside and everything works fine... I dont know why, but it works

Thank you,
Ray
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem accessing the current value of rich:inputnumberslider and rich:inputnumberspinner