wood burning stoves 2.0*
The moose likes JSF and the fly likes How to add Ajax4jsf support to custom JSF component? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "How to add Ajax4jsf support to custom JSF component?" Watch "How to add Ajax4jsf support to custom JSF component?" New topic
Author

How to add Ajax4jsf support to custom JSF component?

Daniel Lechner
Greenhorn

Joined: Dec 22, 2009
Posts: 1
Hi!

I just created a new JSF component, which consists of two input fields. One for the date input and one for the time.
The Renerer-Class is quite nice:


Everything works fine so far and I can use the component in my xhtml-file:

When I send the form, the converters convert the input and the backing bean is updated. It works like expected.

But now, I want to add support for a4j to enable something like this:


When the user changes the input of one of the input fields, the backing-bean has to be updated and the calendarDisplay, displaying the selected date, should be updated as well.

But how can I do that? First of all: how can I fire an event like "onchange", so that the a4j-Tag is working and the reRender is done? Do I have to do something else to update the backing bean (before), when the input changes?

Many thanks in advance for your answers!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to add Ajax4jsf support to custom JSF component?
 
Similar Threads
My own JSF component renders span after div when only div should be rendered. What's wrong?
[JSF + Rich Faces + Facelets] - problem with including code fragment
custom component and character encoding
rendering in a PhaseListener
Custom UIInput