4 Replies Latest reply on Sep 14, 2007 11:29 AM by sergeysmirnov

    Button pressed -> Javascript -> EJB3 -> Facelets (reRender)

    rcherchi

      Hi guys,

      I'm trying to do the following thing with Seam, AJAX and Google Maps :

      1. The user press a button
      2. A Javascript function is called and gets data from a third party API (Google Maps)
      3. A Session bean's method is called (using seam remoting and query the database.

      myEJBMethod(param1, param2, param3, param4)


      4. In Java, a result List is initialized and outjected


      << So far everything is fine (I get a callback in Javascript). >>

      But what I would like to do next is :

      5. dynamically refresh the result list (I use facelets as a view)
      <ui:repeat value="#{myResults}" var="res">
      #{res.name}
      </ui:repeat>


      6. Display markers on the map (Javascript) - that should be ok because I get the JS callback.


      I guess Ajax4jsf would be the solution but I don't know exactly how I should use it to do the job.

      Thanks a lot for your help.