This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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 REST with Spring (video course) this week in the Spring 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: 17278

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.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Passing arguments to facelet functions
jQuery in Action, 3rd edition