Package com.adaptrex.core.view

Examples of com.adaptrex.core.view.ModelComponent


  public String getBody() {
    HttpServletRequest request = requestGlobals.getHTTPServletRequest();
   
    if (ns == null) ns = namespace;
   
    ModelComponent modelComponent = new ModelComponent(request, table, factory);
    if (ns != null)       modelComponent.setNamespace(ns);
    if (name != null)      modelComponent.setModelName(name);
    if (include != null)    modelComponent.setInclude(include);
    if (exclude != null)    modelComponent.setExclude(exclude);
    if (associations != null)   modelComponent.setAssociations(associations);
    if (entityid != null)    modelComponent.setEntityId(entityid);
    if (entitykey != null)    modelComponent.setEntityKey(entitykey);
    if (entityvalue != nullmodelComponent.setEntityValue(entityvalue);
   
    if (rest != null)
      modelComponent.setRest(String.valueOf(rest));
   
    return modelComponent.toString();
 
View Full Code Here


    String rest          = (String) a.get("rest");
   
    String namespace = (String) a.get("ns");
    if (namespace == null) namespace = (String) a.get("namespace");
   
    ModelComponent modelComponent = new ModelComponent(request, table, factory);
    if (namespace != null)     modelComponent.setNamespace(namespace);
    if (modelName != null)    modelComponent.setModelName(modelName);
    if (include != null)    modelComponent.setInclude(include);
    if (exclude != null)    modelComponent.setExclude(exclude);
    if (associations != null)   modelComponent.setAssociations(associations);
    if (entityId != null)    modelComponent.setEntityId(entityId);
    if (entityKey != null)    modelComponent.setEntityKey(entityKey);
    if (entityValue != nullmodelComponent.setEntityValue(entityValue);
   
    if (rest != null && !rest.equals("false"))  {
      modelComponent.setRest(rest);
    }
   
    context.getResponseWriter().write(modelComponent.toString());
  }
View Full Code Here

  public String getBody() {
    HttpServletRequest request = requestGlobals.getHTTPServletRequest();
   
    if (ns == null) ns = namespace;
   
    ModelComponent modelComponent = new ModelComponent(request, table, factory);
    if (ns != null)       modelComponent.setNamespace(ns);
    if (name != null)      modelComponent.setModelName(name);
    if (include != null)    modelComponent.setInclude(include);
    if (exclude != null)    modelComponent.setExclude(exclude);
    if (associations != null)   modelComponent.setAssociations(associations);
    if (entityid != null)    modelComponent.setEntityId(entityid);
    if (entitykey != null)    modelComponent.setEntityKey(entitykey);
    if (entityvalue != nullmodelComponent.setEntityValue(entityvalue);
   
    if (rest != null)
      modelComponent.setRest(String.valueOf(rest));
   
    return modelComponent.toString();
 
View Full Code Here

    if (namespace == null) namespace = (String) a.get("namespace");
    if (namespace == null) {
      namespace = (String) request.getAttribute("adaptrex_namespace");
    }
   
    ModelComponent modelComponent = new ModelComponent(request, table, factory);
    modelComponent.setNamespace(namespace);
   
    if (modelName != null)    modelComponent.setModelName(modelName);
    if (include != null)    modelComponent.setInclude(include);
    if (exclude != null)    modelComponent.setExclude(exclude);
    if (associations != null)   modelComponent.setAssociations(associations);
    if (entityId != null)    modelComponent.setEntityId(entityId);
    if (entityKey != null)    modelComponent.setEntityKey(entityKey);
    if (entityValue != nullmodelComponent.setEntityValue(entityValue);
   
    if (rest != null && !rest.equals("false"))  {
      modelComponent.setRest(rest);
    }
   
    context.getResponseWriter().write(modelComponent.toString());
  }
View Full Code Here

    ExternalContext external = context.getExternalContext();
    HttpServletRequest request = (HttpServletRequest) external.getRequest();
   
    Map<String,String> a = JSFUtils.normalizeAttributes(getAttributes());
    
    ModelComponent modelComponent = new ModelComponent(
        request,
        a.get("table"),
        a.get("factory"),
        a.get("namespace") != null ? a.get("namespace") : a.get("ns")
      );
    modelComponent
    .applyModelName(a.get("modelname"))
    .applyInclude(a.get("include"))
    .applyExclude(a.get("exclude"))
    .applyAssociations(a.get("associations"))
    .applyRest(a.get("rest"))
    .applyEntityId(a.get("entityid"))
    .applyEntityKey(a.get("entitykey"))
    .applyEntityValue(a.get("entityvalue"))
    ;
   
    try {
      context.getResponseWriter().write(modelComponent.getJavaScript());
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

  @Override
  public int doStartTag() {
    HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
   
    ModelComponent modelComponent = new ModelComponent(
        request,
        this.table,
        this.factory,
        this.namespace != null ? this.namespace : this.ns
      );
    modelComponent
    .applyModelName(this.modelname)
   
    .applyInclude(this.include)
    .applyExclude(this.exclude)
    .applyAssociations(this.associations)
    .applyRest(this.rest)
   
    .applyEntityId(this.entityid)
    .applyEntityKey(this.entitykey)
    .applyEntityValue(this.entityvalue)
    ;
   
    try {
      pageContext.getOut().write(modelComponent.getJavaScript());
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
    return SKIP_BODY;
  }
View Full Code Here

  @Parameter @Property private Object rest;
 
  public String getBody() throws Exception {
    HttpServletRequest request = requestGlobals.getHTTPServletRequest();
   
    ModelComponent modelComponent = new ModelComponent(
        request,
        table,
        factory,
        namespace != null ? namespace : ns
      );
    modelComponent
    .applyModelName(modelname)
    .applyInclude(include)
    .applyExclude(exclude)
    .applyAssociations(associations)
    .applyRest(rest)
    .applyEntityId(entityid)
    .applyEntityKey(entitykey)
    .applyEntityValue(entityvalue)
    ;
   
    return modelComponent.getJavaScript();
 
View Full Code Here

TOP

Related Classes of com.adaptrex.core.view.ModelComponent

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.