Package ru.yandex.strictweb.scriptjava.base.ajax

Examples of ru.yandex.strictweb.scriptjava.base.ajax.AjaxRequestResult


      JsonRePresentation rep = new JsonRePresentation(ef).reset(input);
     
      if(rep.lexer.yylex() != Yytoken.TYPE_LEFT_SQUARE) throw new ParseException("request args should be passed as array");
     
      for(int i=0;;i++) {
          AjaxRequestResult result = new AjaxRequestResult();
                   
          try {       
                String beanName = getStringFromJsonArray("Bean name expected", rep);
                if(beanName==null) break;
               
                String methodName = getStringFromJsonArray("Method name expected", rep);
                if(methodName==null) break;
               
                rep.lexer.yylex();
                  if(rep.lexer.type != Yytoken.TYPE_COMMA) {
                      throw new ParseException("Method " + methodName + " args expected as array");
                  }
                             
                    if(!doAction(beanName, methodName, rep, request, result)) break;
           
            if(orm != null) orm.commit();
   
          }catch(Throwable e) {
            if(e.getClass().getCanonicalName().equals("org.eclipse.jetty.continuation.ContinuationThrowable")) {
              throw e;
            }
            e.printStackTrace();
            if(null!=orm) orm.rollback();
            result.setError(e);
            if(e instanceof ParseException) {
                results.add(result);
                break;
            }
          }
View Full Code Here

TOP

Related Classes of ru.yandex.strictweb.scriptjava.base.ajax.AjaxRequestResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.