Package javax.servlet.jsp.tagext

Examples of javax.servlet.jsp.tagext.JspFragment


    public void doTag() throws JspException, IOException
    {
        JspContext ctx = getJspContext();
        JspWriter w = ctx.getOut();
        w.println("enter TestSimpleTag " + name);
        JspFragment f = getJspBody();
        for(int i = 0; i < bodyLoopCount; ++i)
        {
            w.println("invoking body i=" + i);
            f.invoke(w);
        }
        w.println("exit TestSimpleTag " + name);
    }
View Full Code Here


        allElements = sortByNaturalOrder(allElements, domainTypeConfiguration);

        PersistentProperty idAttribute = domainTypeConfiguration.getPersistentEntity().getIdProperty();
        EntityNameExtractor<Object> nameExtractor = domainTypeConfiguration.getEntityConfiguration().getNameExtractor();
        JspContext jspContext = getJspContext();
        JspFragment tagBody = getJspBody();
        for (Object element : allElements) {
            BeanWrapper beanWrapper = new DirectFieldAccessFallbackBeanWrapper(element);

            jspContext.setAttribute(idVar, beanWrapper.getPropertyValue(idAttribute.getName()));
            jspContext.setAttribute(stringRepresentationVar, exceptionAwareNameExtractor(nameExtractor, domainTypeConfiguration).apply(element));
            tagBody.invoke(null);
        }
    }
View Full Code Here

        }
    }

    private void doWithStandardControl() throws JspException, IOException {
        JspContext context = getJspContext();
        JspFragment worker;
        switch (PersistentPropertyType.forPersistentProperty(persistentProperty)) {
            case ASSOC_MULTI:
                worker = n2manyEditControl;
                break;
            case ASSOC:
                worker = n2oneEditControl;
                break;
            case EMBEDDED:
                worker = simpleEditControl;
                break;
            case MAP:
                worker = mapEditControl;
                break;
            case BOOL:
                worker = booleanEditControl;
                break;
            case DATE:
                worker = dateEditControl;
                break;
            case TIME:
                worker = timeEditControl;
                break;
            case DATE_TIME:
                worker = dateTimeEditControl;
                break;
            case NUMBER_INTEGER:
                worker = numberEditControl;
                break;
            case NUMBER_FLOAT:
                worker = numberEditControl;
                break;
            case STRING:
                worker = simpleEditControl;
                break;
            case FILE:
                worker = fileEditControl;
                break;
            default:
                worker = simpleEditControl;
                break;
        }
        try {
            worker.invoke(null);
        } finally {
            context.removeAttribute(DISABLED);
        }
    }
View Full Code Here

  /**
   * Loops body.
   */
  protected void loopBody() throws JspException {
    JspFragment body = getJspBody();
    if (body == null) {
      return;
    }

    LoopIterator loopIterator = new LoopIterator(start, end, step, modulus);
View Full Code Here

  @Override
  public void doTag() throws JspException {
    if (items == null) {
      return;
    }
    JspFragment body = getJspBody();
    if (body == null) {
      return;
    }
    PageContext pageContext = (PageContext) getJspContext();
View Full Code Here

  /**
   * Iterates collection.
   */
  protected void iterateCollection(Collection collection, int from, int count, PageContext pageContext) throws JspException {
    JspFragment body = getJspBody();
    Iterator iter = collection.iterator();
    int i = 0;
    int to = calculateTo(from, count, collection.size());
    while (i < to) {
      Object item = iter.next();
View Full Code Here

  /**
   * Iterates arrays.
   */
  protected void iterateArray(Object[] array, int from, int count, PageContext pageContext) throws JspException {
    JspFragment body = getJspBody();
    int len = array.length;
    int to = calculateTo(from, count, len);
    int last = to - 1;
    for (int i = from; i < to; i++) {
      Object item = array[i];
View Full Code Here

TOP

Related Classes of javax.servlet.jsp.tagext.JspFragment

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.