Package javax.servlet.jsp.tagext

Examples of javax.servlet.jsp.tagext.Tag


   */
  public int doStartTag()
    throws JspException
  {
    try {
      Tag parent = getParent();

      if (! (parent instanceof ChooseTag))
        throw new JspException(L.l("c:when tag must be contained in a c:choose tag."));

      ChooseTag chooseTag = (ChooseTag) parent;
View Full Code Here


   */
  public int doStartTag()
    throws JspException
  {
    try {
      Tag parent = getParent();

      if (! (parent instanceof ChooseTag))
        throw new JspException(L.l("x:when tag must be contained in a c:choose tag."));

      ChooseTag chooseTag = (ChooseTag) parent;
View Full Code Here

    PageContextImpl pageContext = (PageContextImpl) this.pageContext;
   
    Object value = _valueExpr.evalObject(pageContext.getELContext());

    Tag parent = getParent();
    for (;
         parent != null && ! (parent instanceof SQLExecutionTag);
         parent = parent.getParent()) {
    }

    if (parent == null)
      throw new JspException(L.l("sql:param requires sql:query parent."));
View Full Code Here

      if (name == null)
        return SKIP_BODY;
     
      String value = _valueExpr.evalString(env);
   
      Tag parent = getParent();
      for (; parent != null; parent = parent.getParent()) {
        if (parent instanceof NameValueTag) {
          NameValueTag tag = (NameValueTag) parent;

          if (value == null)
            tag.addParam(name, "");
View Full Code Here

   * Process the tag.
   */
  public int doStartTag()
    throws JspException
  {
    Tag parent = getParent();

    if (! (parent instanceof ChooseTag))
      throw new JspException(L.l("c:otherwise tag must be contained in a c:choose tag."));

    ChooseTag chooseTag = (ChooseTag) parent;
View Full Code Here

     * @return Reused or newly instantiated tag handler
     *
     * @throws JspException if a tag handler cannot be instantiated
     */
    public Tag get(Class handlerClass) throws JspException {
  Tag handler = null;
        synchronized( this ) {
            if (current >= 0) {
                handler = handlers[current--];
                return handler;
            }
        }

        // Out of sync block - there is no need for other threads to
        // wait for us to construct a tag for this thread.
        try {
            Tag instance = (Tag) handlerClass.newInstance();
            AnnotationHelper.postConstruct(annotationProcessor, instance);
            return instance;
        } catch (Exception e) {
            throw new JspException(e.getMessage(), e);
        }
View Full Code Here

              Locale[] avail) {

  LocalizationContext locCtxt = null;
 
  // Get formatting locale from enclosing <fmt:bundle>
  Tag parent = findAncestorWithClass(fromTag, BundleSupport.class);
  if (parent != null) {
      /*
       * use locale from localization context established by parent
       * <fmt:bundle> action, unless that locale is null
       */
 
View Full Code Here

     * @return Reused or newly instantiated tag handler
     *
     * @throws JspException if a tag handler cannot be instantiated
     */
    public Tag get(Class handlerClass) throws JspException {
  Tag handler = null;
        synchronized( this ) {
            if (current >= 0) {
                handler = handlers[current--];
                return handler;
            }
        }

        // Out of sync block - there is no need for other threads to
        // wait for us to construct a tag for this thread.
        try {
            Tag instance = (Tag) handlerClass.newInstance();
            AnnotationHelper.postConstruct(annotationProcessor, instance);
            return instance;
        } catch (Exception e) {
            throw new JspException(e.getMessage(), e);
        }
View Full Code Here

     * @exception JspException if a processing error occurs
     */
    public int doEndTag() throws JspException {
       
        // Find our parent TableTag instance
        Tag parent = getParent();
        while ((parent != null) && !(parent instanceof TableTag)) {
            parent = parent.getParent();
        }
        if (parent == null) {
            throw new JspException("Must be nested in a TableTag instance");
        }
        TableTag table = (TableTag) parent;
View Full Code Here

   * If so, it returns the facet name on the <f:facet> tag.
   * Otherwise, it returns null.
   */
  private String _getParentFacetName()
  {
    Tag parent = getParent();
    if (parent instanceof FacetTag)
    {
        return (((FacetTag) parent).getName());
    }
    return null;
View Full Code Here

TOP

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

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.