[jboss-user] [JBoss Seam] - Re: How to integrate Ext with Seam using JSON

Fangzx do-not-reply at jboss.com
Tue Nov 20 07:25:48 EST 2007


Thanks for the reply.

I will use servlet to build json response, and 
in servlet, We can call Seam Components to get grid data like this:


  | public class SampleServlet extends HttpServlet {
  | 
  |     private UserService userService;
  | 
  |     private void createUserService() {
  |         userService = (UserService) Component.getInstance(UserService.class);
  |     }
  | 
  |     @Override
  |     public void doGet(HttpServletRequest request, HttpServletResponse response)
  |             throws ServletException, IOException {
  |         createUserService();
  | 
  |         PrintWriter out = response.getWriter();
  | 
  |         out.println("Hello World=" + userService.find("demo").getName());
  | 
  |     }
  | }
  | 




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

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



More information about the jboss-user mailing list