Package ch.ralscha.extdirectspring.bean

Examples of ch.ralscha.extdirectspring.bean.ModelAndJsonView


            synchronized (mutex) {
              Object result = ExtDirectSpringUtil.invoke(configurationService.getApplicationContext(),
                  beanName, methodInfo, parameters);

              if (result instanceof ModelAndJsonView) {
                ModelAndJsonView modelAndJsonView = (ModelAndJsonView) result;
                directPollResponse.setData(modelAndJsonView.getModel());
                jsonView = getJsonView(modelAndJsonView, methodInfo.getJsonView());
              } else {
                directPollResponse.setData(result);
                jsonView = getJsonView(result, methodInfo.getJsonView());
              }
            }
          } else {
            Object result = ExtDirectSpringUtil.invoke(configurationService.getApplicationContext(),
                beanName, methodInfo, parameters);
            if (result instanceof ModelAndJsonView) {
              ModelAndJsonView modelAndJsonView = (ModelAndJsonView) result;
              directPollResponse.setData(modelAndJsonView.getModel());
              jsonView = getJsonView(modelAndJsonView, methodInfo.getJsonView());
            } else {
              directPollResponse.setData(result);
              jsonView = getJsonView(result, methodInfo.getJsonView());
            }
          }
        } else {
          Object result = ExtDirectSpringUtil.invoke(configurationService.getApplicationContext(), beanName,
              methodInfo, parameters);
          if (result instanceof ModelAndJsonView) {
            ModelAndJsonView modelAndJsonView = (ModelAndJsonView) result;
            directPollResponse.setData(modelAndJsonView.getModel());
            jsonView = getJsonView(modelAndJsonView, methodInfo.getJsonView());
          } else {
            directPollResponse.setData(result);
            jsonView = getJsonView(result, methodInfo.getJsonView());
          }
View Full Code Here


        directResponse.setStreamResponse(methodInfo.isStreamResponse());
        Object result = processRemotingRequest(request, response, locale, directRequest, methodInfo);

        if (result != null) {

          ModelAndJsonView modelAndJsonView = null;
          if (result instanceof ModelAndJsonView) {
            modelAndJsonView = (ModelAndJsonView) result;
            result = modelAndJsonView.getModel();
          }

          if (methodInfo.isType(ExtDirectMethodType.FORM_LOAD)
              && !ExtDirectFormLoadResult.class.isAssignableFrom(result.getClass())) {
            ExtDirectFormLoadResult formLoadResult = new ExtDirectFormLoadResult(result);
View Full Code Here

    return createEmployee();
  }

  @ExtDirectMethod(value = ExtDirectMethodType.FORM_LOAD)
  public ModelAndJsonView majSummaryView() {
    return new ModelAndJsonView(createEmployee(), Views.Summary.class);
  }
View Full Code Here

    return new ModelAndJsonView(createEmployee(), Views.Summary.class);
  }

  @ExtDirectMethod(value = ExtDirectMethodType.FORM_LOAD)
  public ModelAndJsonView majDetailView() {
    return new ModelAndJsonView(createEmployee(), Views.Detail.class);
  }
View Full Code Here

  }

  @ExtDirectMethod(value = ExtDirectMethodType.FORM_LOAD,
      jsonView = Views.Summary.class)
  public ModelAndJsonView overrideMajDetailView() {
    return new ModelAndJsonView(createEmployee(), Views.Detail.class);
  }
View Full Code Here

  }

  @ExtDirectMethod(value = ExtDirectMethodType.FORM_LOAD,
      jsonView = Views.Summary.class)
  public ModelAndJsonView overrideMajNoView() {
    return new ModelAndJsonView(createEmployee(), ExtDirectMethod.NoJsonView.class);
  }
View Full Code Here

    return createEmployees(2);
  }

  @ExtDirectMethod(value = ExtDirectMethodType.STORE_READ)
  public ModelAndJsonView majSummaryView() {
    return new ModelAndJsonView(createEmployees(2), Views.Summary.class);
  }
View Full Code Here

    return new ModelAndJsonView(createEmployees(2), Views.Summary.class);
  }

  @ExtDirectMethod(value = ExtDirectMethodType.STORE_READ)
  public ModelAndJsonView majDetailView() {
    return new ModelAndJsonView(createEmployees(2), Views.Detail.class);
  }
View Full Code Here

  }

  @ExtDirectMethod(value = ExtDirectMethodType.STORE_READ,
      jsonView = Views.Summary.class)
  public ModelAndJsonView overrideMajDetailView() {
    return new ModelAndJsonView(createEmployees(2), Views.Detail.class);
  }
View Full Code Here

  }

  @ExtDirectMethod(value = ExtDirectMethodType.STORE_READ,
      jsonView = Views.Summary.class)
  public ModelAndJsonView overrideMajNoView() {
    return new ModelAndJsonView(createEmployees(2), ExtDirectMethod.NoJsonView.class);
  }
View Full Code Here

TOP

Related Classes of ch.ralscha.extdirectspring.bean.ModelAndJsonView

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.