This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JSF and the fly likes a4j and javascript interaction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "a4j and javascript interaction" Watch "a4j and javascript interaction" New topic
Author

a4j and javascript interaction

Michael Power
Greenhorn

Joined: May 13, 2008
Posts: 2
I have a jsf page which uses a4j to dynamically repopulate(or add to) a selectlist. The list rerenders fine but calling a javascript function (via button) which looks up the select list doesn't work (maybe because the view is updated but not the page source?). Can anyone tell me how i can get javascript to find rerendered components or get ajax to call javascript?

Tried using <a4j:jsFunction> and <a4j:commandButton> but can't get them to work. Thanks
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16160
    
  21

Welcome to the Javaranch!

I'm not sure I understand. A4J is part of RichFaces now, and RichFaces can dynamically update a table without the need for any developer-supplied Javascript - it creates all the necessary code invisibly.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: a4j and javascript interaction