[jboss-user] [JBoss Seam] - Remoting

KoniKoni do-not-reply at jboss.com
Fri Dec 1 09:35:28 EST 2006


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990452#3990452

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990452



More information about the jboss-user mailing list