File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Passing arguments to facelet functions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Passing arguments to facelet functions" Watch "Passing arguments to facelet functions" New topic

Passing arguments to facelet functions

Raymund Nickel

Joined: Aug 17, 2009
Posts: 8
i want to pass a dynamic value to a facelet function. This all should happen on the clientside.
I guess i have to use javascript for that, but is there maybe a way JSF/Facelets can handle this?

For example:

Let´s say the facelet function 'getCalculatedValue(...)' has one parameter. When i change the slider value, the actual value should be passed as an argument to the function without calling the server.

Thank you,
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960

I think the way it works is that you set up something like this in you inputNumberSlider:

That will suppress the submit functionality. But I'm pretty sure that the RichFaces Live Demo should have an actual working example of this kind of functionality.

Customer surveys are for companies who didn't pay proper attention to begin with.
jQuery in Action, 2nd edition
subject: Passing arguments to facelet functions
Similar Threads
slider problem
Reset range slider values
Facelets: enable and disable attributes of a component inside a facelets component
Jquery Slider - Form to be submitted with value of the slider when sliding is stopped
J4J Tag Library rendering problems