• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

AJAX and select nightmares...

 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
... 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?
 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
reply
    Bookmark Topic Watch Topic
  • New Topic