... among other things. The only way I've managed to make AJAX work with JSF is with lots of <f:verbatim/> html, hidden fields and JavaScript. All JSF values that will interact with AJAX go into hidden inputs. On load the values are set in the components. AJAX then works with the html components in the page. On submit the values are stored in the hidden fields and posted.
In my case I need to change some text inputs into selects and back depending on the values of other fields. This is impossible (or at least I didn't manage to do it) with <h:input... whatevers. And if you have an <h:selectOneMenu/> and you change its list values with AJAX it doesn't work with the new values.
Any comments why this is so complicated?
Fintan Conway
Ranch Hand
Joined: Apr 03, 2002
Posts: 141
posted
0
Originally posted by Gerardo Tasistro: ... among other things. The only way I've managed to make AJAX work with JSF is with lots of <f:verbatim/> html, hidden fields and JavaScript. All JSF values that will interact with AJAX go into hidden inputs. On load the values are set in the components. AJAX then works with the html components in the page. On submit the values are stored in the hidden fields and posted.
In my case I need to change some text inputs into selects and back depending on the values of other fields. This is impossible (or at least I didn't manage to do it) with <h:input... whatevers. And if you have an <h:selectOneMenu/> and you change its list values with AJAX it doesn't work with the new values.
Any comments why this is so complicated?
Hi Gerardo,
Have you tried any of the Ajax frameworks such as Dojo, or AjaxAnywhere? I have heard of others using these extensively in JSF applications without resorting to <f:verbatim> tags.
Regards,
Fintan
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.