Examples of Foreach


Examples of org.eclipse.bpel.model.ForEach

    Element activityElement = createBPELElement("opaqueActivity");
    return activityElement;
  }

  protected Element forEach2XML(Activity activity) {
    ForEach forEach = (ForEach)activity;
    Element activityElement = createBPELElement("forEach");
   
    if (forEach.getParallel() != null)
      activityElement.setAttribute("parallel", BPELUtils.boolean2XML(forEach.getParallel()));
   
    if (forEach.getCounterName() != null) {
      activityElement.setAttribute("counterName", forEach.getCounterName().getName());
    }
   
    if (forEach.getStartCounterValue() != null) {
      activityElement.appendChild(expression2XML(forEach.getStartCounterValue(), "startCounterValue"));
    }
   
    if (forEach.getFinalCounterValue() != null) {
      activityElement.appendChild(expression2XML(forEach.getFinalCounterValue(), "finalCounterValue"));
    }
   
    CompletionCondition completionCondition = forEach.getCompletionCondition();
    if (completionCondition != null) {
      Element completionConditionElement = completionCondition2XML(completionCondition);
      activityElement.appendChild(completionConditionElement);
    }

    if (forEach.getActivity() != null ){
      activityElement.appendChild(activity2XML(forEach.getActivity()));
    }
    return activityElement;
  }
View Full Code Here

Examples of org.openfaces.component.util.ForEach

    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        if (!component.isRendered()) return;
        super.encodeBegin(context, component);
        ForEach forEach = (ForEach) component;
        forEach.cleanData();
        forEach.setObjectId(null);
        String wrapperTagName = forEach.getWrapperTagName();
        if (wrapperTagName == null || wrapperTagName.length() == 0)
            return;
        ResponseWriter writer = context.getResponseWriter();
        String clientId = forEach.getClientId(context);
        writer.startElement(wrapperTagName, forEach);
        writer.writeAttribute("id", clientId, null);
        String classStr = Styles.getCSSClass(context, forEach, forEach.getStyle(), forEach.getStyleClass());
        if (classStr != null) {
            writer.writeAttribute("class", classStr, null);
        }
        Styles.renderStyleClasses(context, forEach);
View Full Code Here

Examples of org.openfaces.component.util.ForEach

    @Override
    public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
        if (!component.isRendered())
            return;
        ForEach forEach = (ForEach) component;
        forEach.setObjectId(null);
        while (forEach.hasNext()) {
            forEach.next();
            super.encodeChildren(context, component);
        }
        forEach.setObjectId(null);
    }
View Full Code Here

Examples of org.openfaces.component.util.ForEach

    @Override
    public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
        if (!component.isRendered()) return;
        super.encodeEnd(context, component);
        ForEach forEach = (ForEach) component;
        String wrapperTagName = forEach.getWrapperTagName();
        if (wrapperTagName == null || wrapperTagName.length() == 0)
            return;
        ResponseWriter writer = context.getResponseWriter();
        writer.endElement(wrapperTagName);
View Full Code Here

Examples of org.pdf4j.saxon.instruct.ForEach

        if (block == null) {
            // body of for-each is empty: it's a no-op.
            return Literal.makeEmptySequence();
        }
        try {
            return new ForEach(sortedSequence, makeExpressionVisitor().simplify(block), containsTailCall);
        } catch (XPathException err) {
            compileError(err);
            return null;
        }
    }
View Full Code Here

Examples of org.platformlayer.ops.tree.ForEach

    addChild(injected(NginxFrontendDns.class));
  }

  @Override
  public void doRecurseOperation() throws OpsException {
    ForEach recursor = Injection.getInstance(ForEach.class);

    recursor.doRecursion(this, service.getSshKey(), NginxService.class, NginxFrontend.class);
  }
View Full Code Here

Examples of org.platformlayer.ops.tree.ForEach

    addChild(injected(NginxBackendFirewall.class));
  }

  @Override
  public void doRecurseOperation() throws OpsException {
    ForEach recursor = Injection.getInstance(ForEach.class);

    recursor.doRecursion(this, service.getSshKey(), NginxService.class, NginxBackend.class);
  }
View Full Code Here

Examples of org.uengine.ui.taglibs.input.ForEach

    }
   
    if(multiValue == null)
      multiValue = new Object[]{null};

    ForEach forEach = (ForEach) (pageContext.getAttribute("_forEach"));
    //find array values
    if (multiValue.length == 1 /*&& multiValue[0]!=null*/ && mappedResult != null) {
      int i=1;
      Vector valueList = new Vector();
     
      if(UEngineUtil.isNotEmpty(""+multiValue[0]))
        valueList.add(multiValue[0]);
      else
        i=0;

      //bug fix by yookjy (checkbox addrow)
      if (forEach != null) {
        String variableName = forEach.getVariablename().toLowerCase();
        String postFix = null;
        if (mappedResult.get(variableName) != null && !UEngineUtil.isNotEmpty(""+multiValue[0])) {
          valueList.add(multiValue[0]);
        }
        for(int j=0; j<mappedResult.size(); j++) {
          postFix = "[" + (j + 1) + "]";;
          if (mappedResult.containsKey(variableName + postFix)) {
            valueList.add(mappedResult.get(name + postFix));
          }
        }
      } else {
        String valueKey = name + "[]";
        if (mappedResult.containsKey(valueKey)) {
          for (int k=i ; k < 200 ; k++) {
            valueKey = name + "["+k+"]";
            if(mappedResult.containsKey(valueKey)){
              valueList.add(mappedResult.get(valueKey));
            }
          } 
        }
      }
     
      if(valueList.size() > 0){
        multiValue = new Object[valueList.size()];
        valueList.toArray(multiValue);
      }
    }
   
    //narrowing for 'ForEach' scope
    if (forEach != null) {
      int index = forEach.getCurrentIndex();

      //case of indexed by rolemapping
      if (multiValue[0] instanceof RoleMapping) {
        RoleMapping roleMapping = (RoleMapping)multiValue[0];
        if(roleMapping.size() <= index)
View Full Code Here

Examples of railo.transformer.bytecode.statement.ForEach

        if(!(left instanceof Variable))
          throw new TemplateException(data.cfml,"invalid syntax in for statement, left value is invalid");
       
        if(!(value instanceof Variable))
          throw new TemplateException(data.cfml,"invalid syntax in for statement, right value is invalid");
        return new ForEach((Variable)left,(Variable)value,body,line,data.cfml.getPosition(),id)
      }
      else
        throw new TemplateException(data.cfml,"invalid syntax in for statement");
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.