Examples of Taglib


Examples of org.apache.myfaces.tobago.apt.annotation.Taglib

    }
  }

  public void process() throws Exception {
    for (PackageDeclaration packageDeclaration : getCollectedPackageDeclarations()) {
      Taglib taglibAnnotation = packageDeclaration.getAnnotation(Taglib.class);
      Document document = createTaglib(taglibAnnotation, packageDeclaration);
      writeTaglib(packageDeclaration, taglibAnnotation, document);
    }
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.apt.annotation.Taglib

    }
  }

  public void process() throws Exception {
    for (PackageDeclaration packageDeclaration : getCollectedPackageDeclarations()) {
      Taglib taglibAnnotation = packageDeclaration.getAnnotation(Taglib.class);
      Document document = createTaglib(taglibAnnotation, packageDeclaration);
      writeTaglib(packageDeclaration, taglibAnnotation, document);
    }
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.apt.annotation.Taglib

  }

  public void process() throws Exception {

    for (PackageDeclaration packageDeclaration : getCollectedPackageDeclarations()) {
      Taglib taglibAnnotation = packageDeclaration.getAnnotation(Taglib.class);

      Set<String> tagSet = new HashSet<String>();
      String packageName = "org.apache.myfaces.tobago.facelets";

      JClass libraryClass = new JClass("TobagoTagLibrary");
      libraryClass.setPackageName(packageName);

      JCompUnit unit = new JCompUnit(libraryClass);
      libraryClass.setSuperClass("AbstractTobagoTagLibrary");

      JField nameSpace = new JField(new JClass("String"), "NAMESPACE");
      nameSpace.getModifiers().setFinal(true);
      nameSpace.getModifiers().setStatic(true);
      nameSpace.getModifiers().makePublic();
      nameSpace.setInitString("\""+taglibAnnotation.uri()+"\"");
      libraryClass.addField(nameSpace);

      JField instance = new JField(libraryClass, "INSTANCE");
      instance.getModifiers().setFinal(true);
      instance.getModifiers().setStatic(true);
View Full Code Here

Examples of org.eclipse.jetty.servlet.ServletContextHandler.TagLib

        {
            config = new JspConfig();
            context.getServletContext().setJspConfigDescriptor(config);
        }

        TagLib tl = new TagLib();
        tl.setTaglibLocation(location);
        tl.setTaglibURI(uri);
        config.addTaglibDescriptor(tl);
    }
View Full Code Here

Examples of org.eclipse.jetty.servlet.ServletContextHandler.TagLib

        {
            config = new JspConfig();
            context.getServletContext().setJspConfigDescriptor(config);
        }

        TagLib tl = new TagLib();
        tl.setTaglibLocation(location);
        tl.setTaglibURI(uri);
        config.addTaglibDescriptor(tl);
    }
View Full Code Here

Examples of org.objectstyle.wolips.jdt.ui.tags.TagLib

      }
      resourcesList.add(resource);
    }
    for (Iterator iterator = projectFilesMap.keySet().iterator(); iterator.hasNext();) {
      IProject project = (IProject) iterator.next();
      TagLib tagLib = new TagLib(project);
      TagDialog tagDialog = new TagDialog(this.part.getSite().getShell(), tagLib);
      int status = tagDialog.open();
      if (status != Window.OK) {
        return;
      }
      String tagName = tagDialog.tag;
      if (tagName == null || tagName.length() == 0) {
        return;
      }
      List<IResource> resourcesList = projectFilesMap.get(project);
      String[] componentNames = this.find(new NullProgressMonitor(), resourcesList);
      tagLib.tagComponents(componentNames, tagName);
    }
  }
View Full Code Here

Examples of org.richfaces.cdk.model.Taglib

            }
        }
    }

    protected void verifyTaglib(ComponentLibrary library) {
        Taglib taglib = library.getTaglib();
        if (null == taglib) {
            // Oops, create taglib model
            taglib = new Taglib();
            library.setTaglib(taglib);
        }
        // Verify URI
        String uri = taglib.getUri();
        if (null == uri) {
            // infer default value.
            uri = namingConventions.inferTaglibUri(library);
            taglib.setUri(uri);
            // log.error("No uri defined for taglib");
        }
        String shortName = taglib.getShortName();
        if (null == shortName) {
            shortName = namingConventions.inferTaglibName(uri);
            taglib.setShortName(shortName);
            // log.error("No short defined for taglib");
        }
        // Verify tags. If we have renderer-specific component, it should have a tag ?
        for (ComponentModel component : library.getComponents()) {
            if (null != component.getRendererType() && component.getTags().isEmpty()) {
View Full Code Here

Examples of org.zkoss.xel.taglib.Taglib

        if (!params.isEmpty())
          log.warning("Ignored unknown attribute: "+params+", "+pi.getLocator());
        if (uri == null || prefix == null)
          throw new UiException("Both uri and prefix attribute are required, "+pi.getLocator());
        if (log.debugable()) log.debug("taglib: prefix="+prefix+" uri="+uri);
        langdef.addTaglib(new Taglib(prefix, uri));
      } else {
        log.warning("Unknown processing instruction: "+target);
      }
    }
  }
View Full Code Here

Examples of org.zkoss.xel.taglib.Taglib

      if (uri == null || prefix == null)
        throw new UiException("Both uri and prefix attribute are required, "+pi.getLocator());
      //if (D.ON && log.debugable()) log.debug("taglib: prefix="+prefix+" uri="+uri);
      noEL("prefix", prefix, pi);
      noEL("uri", uri, pi); //not support EL (kind of chicken-egg issue)
      pgdef.addTaglib(new Taglib(prefix, toAbsoluteURI(uri, false)));
    } else if ("evaluator".equals(target)) {
      parseEvaluatorDirective(pgdef, pi, params);
    } else if ("xel-method".equals(target)) {
      parseXelMethod(pgdef, pi, params);
    } else if ("link".equals(target) || "meta".equals(target)
View Full Code Here

Examples of org.zkoss.xel.taglib.Taglib

    Object x = root.evaluate(getXelContext());
    assertEquals(15.0, ((Number)x).doubleValue(), 0);
  }
 
  private XelContext getXelContext() {
    Taglib taglib = new Taglib("", "/web/WEB-INF/tld/zss/function.tld");
    List taglibs = new ArrayList(1);
    taglibs.add(taglib);
    FunctionMapper mapper = Taglibs.getFunctionMapper(taglibs, new ClassLocator());
    return new SimpleXelContext(null, mapper);
  }
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.