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
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: 17417

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
It's not a secret anymore!