1 Reply Latest reply on Dec 1, 2006 10:12 AM by Shane Bryzak

    Remoting

    Konstantin Kauz Novice


      First, sorry for my bad english!

      I have followed peaces of code:

      ----------------------------------------------------------------------

      @Stateless
      @Name("remoteaction")
      public class RemoteAction implements RemoteLocal {
       @PersistenceContext
       private EntityManager em;
      
       /*
       * @see kh.laola.remoteactions.RemoteLocal#getBets(int)
       */
       public List getBets(int Flag){
       List bets = em.createQuery("from Wette").getResultList();
       return bets;
       }

      ----------------------------------------------------------------------

      <script type="text/javascript" src="seam/remoting/interface.js?remoteaction&wette;"></script>

      ----------------------------------------------------------------------


      Client Site (JavaScript)

      function betsCallback(result) {
       for (var i = 0; i < reuslt.length; i++){
       var xy = cast "List" to instance of XY }
      }


      ----------------------------------------------------------------------

      I receive a result of type List and how can i cast to right type ?

      THX


      KoniKoni