Tabnine Logo
TagDecorator
Code IndexAdd Tabnine to your IDE (free)

How to use
TagDecorator
in
javax.faces.view.facelets

Best Java code snippets using javax.faces.view.facelets.TagDecorator (Showing top 16 results out of 315)

origin: org.apache.myfaces.core/myfaces-impl

  public Tag decorate(Tag tag)
  {
    Tag processedTag = defaultTagDecorator.decorate(tag);
    return processedTag != null ? processedTag : tag;
  }
}
origin: org.apache.myfaces.core/myfaces-impl

  public Tag decorate(Tag tag)
  {
    // The default tag decorator is special, because a non null return value does not
    // stop processing.
    Tag processedTag = this.defaultTagDecorator.decorate(tag);
    // If a not null value is returned, pass the processedTag, otherwise pass the default one.
    return compositeTagDecorator.decorate(processedTag != null ? processedTag : tag);
  }
}
origin: org.apache.myfaces.core/myfaces-impl

/**
 * Uses the chain of responsibility pattern to stop processing if any of the TagDecorators return a value other than
 * null.
 * 
 * @see javax.faces.view.facelets.TagDecorator#decorate(javax.faces.view.facelets.Tag)
 */
public Tag decorate(Tag tag)
{
  Tag t = null;
  for (int i = 0; i < this.decorators.length; i++)
  {
    t = this.decorators[i].decorate(tag);
    if (t != null)
    {
      return t;
    }
  }
  return tag;
}
origin: org.apache.myfaces.core/myfaces-shaded-impl

/**
 * Uses the chain of responsibility pattern to stop processing if any of the TagDecorators return a value other than
 * null.
 * 
 * @see org.apache.myfaces.view.facelets.tag.TagDecorator#decorate(org.apache.myfaces.view.facelets.tag.Tag)
 */
public Tag decorate(Tag tag)
{
  Tag t = null;
  for (int i = 0; i < this.decorators.length; i++)
  {
    t = this.decorators[i].decorate(tag);
    if (t != null)
    {
      return t;
    }
  }
  return tag;
}
origin: org.apache.myfaces.core.internal/myfaces-shaded-impl

/**
 * Uses the chain of responsibility pattern to stop processing if any of the TagDecorators return a value other than
 * null.
 * 
 * @see org.apache.myfaces.view.facelets.tag.TagDecorator#decorate(org.apache.myfaces.view.facelets.tag.Tag)
 */
public Tag decorate(Tag tag)
{
  Tag t = null;
  for (int i = 0; i < this.decorators.length; i++)
  {
    t = this.decorators[i].decorate(tag);
    if (t != null)
    {
      return t;
    }
  }
  return tag;
}
origin: org.glassfish/javax.faces

/**
 * Uses the chain of responsibility pattern to stop processing if any of
 * the TagDecorators return a value other than null.
 */
@Override
public Tag decorate(Tag tag) {
  // eliminate the jsf: attributes
  Tag noJsfAttributes = defaultTagDecorator.decorate(tag);
  if(noJsfAttributes != null) {
    // pass the converted tag to the other decorators
    tag = noJsfAttributes;
  }
  Tag t = null;
  for (int i = 0; i < this.decorators.length; i++) {
    t = this.decorators[i].decorate(tag);
    if (t != null) {
      return t;
    }
  }
  return tag;
}
origin: com.sun.faces/jsf-impl

/**
 * Uses the chain of responsibility pattern to stop processing if any of
 * the TagDecorators return a value other than null.
 */
public Tag decorate(Tag tag) {
  // eliminate the jsf: attributes
  Tag noJsfAttributes = defaultTagDecorator.decorate(tag);
  if(noJsfAttributes != null) {
    // pass the converted tag to the other decorators
    tag = noJsfAttributes;
  }
  Tag t = null;
  for (int i = 0; i < this.decorators.length; i++) {
    t = this.decorators[i].decorate(tag);
    if (t != null) {
      return t;
    }
  }
  return tag;
}
origin: eclipse-ee4j/mojarra

/**
 * Uses the chain of responsibility pattern to stop processing if any of
 * the TagDecorators return a value other than null.
 */
@Override
public Tag decorate(Tag tag) {
  // eliminate the jsf: attributes
  Tag noJsfAttributes = defaultTagDecorator.decorate(tag);
  if(noJsfAttributes != null) {
    // pass the converted tag to the other decorators
    tag = noJsfAttributes;
  }
  Tag t = null;
  for (int i = 0; i < this.decorators.length; i++) {
    t = this.decorators[i].decorate(tag);
    if (t != null) {
      return t;
    }
  }
  return tag;
}
origin: org.glassfish/jakarta.faces

/**
 * Uses the chain of responsibility pattern to stop processing if any of
 * the TagDecorators return a value other than null.
 */
@Override
public Tag decorate(Tag tag) {
  // eliminate the jsf: attributes
  Tag noJsfAttributes = defaultTagDecorator.decorate(tag);
  if(noJsfAttributes != null) {
    // pass the converted tag to the other decorators
    tag = noJsfAttributes;
  }
  Tag t = null;
  for (int i = 0; i < this.decorators.length; i++) {
    t = this.decorators[i].decorate(tag);
    if (t != null) {
      return t;
    }
  }
  return tag;
}
origin: com.sun.faces/jsf-impl

Tag t = this.tagDecorator.decorate(orig);
String[] qname = this.determineQName(t);
t = this.trimAttributes(t);
origin: org.glassfish/javax.faces

Tag t = this.tagDecorator.decorate(orig);
String[] qname = this.determineQName(t);
t = this.trimAttributes(t);
origin: eclipse-ee4j/mojarra

Tag t = this.tagDecorator.decorate(orig);
String[] qname = this.determineQName(t);
t = this.trimAttributes(t);
origin: org.glassfish/jakarta.faces

Tag t = this.tagDecorator.decorate(orig);
String[] qname = this.determineQName(t);
t = this.trimAttributes(t);
origin: org.apache.myfaces.core/myfaces-shaded-impl

Tag t = this.tagDecorator.decorate(orig);
String[] qname = this.determineQName(t);
t = this.trimAttributes(t);
origin: org.apache.myfaces.core.internal/myfaces-shaded-impl

Tag t = this.tagDecorator.decorate(orig);
String[] qname = this.determineQName(t);
t = this.trimAttributes(t);
origin: org.apache.myfaces.core/myfaces-impl

Tag t = this.tagDecorator.decorate(orig);
String[] qname = this.determineQName(t);
t = this.trimAttributes(t);
javax.faces.view.faceletsTagDecorator

Javadoc

Provides the ability to completely change the Tag before it's processed for compiling with the associated TagHandler.

The runtime must provide a default implementation of this interface that performs the following actions in its #decorate method.

  • Inspect the attributes of the tag argument. If none of the attributes are declared to be in the http://xmlns.jcp.org/jsf namespace, iterate through the list of TagDecorator instances created from the values in the javax.faces.application.ViewHandler#FACELETS_DECORATORS_PARAM_NAME context-param, if any. For each entry, call its #decorate method, passing the argument tag. The first such entry that returns non- null from its #decorate method must cause the iteration to stop.

  • If one or more of the attributes of the tag argument are in the http://xmlns.jcp.org/jsf namespace, obtain a reference to decoratedTag as described in the following steps and iterate through the list of TagDecoratorinstances as described in the preceding step, but pass decoratedTag to each call to #decorate.

    • If the namespace of the tag is any namespace other than the empty string or http://www.w3.org/1999/xhtml, throw a FaceletException.

    • Let localName be the return from Tag#getLocalName. Use localName to identify an entry in a data structure based on the following table. Once an entry has been identified, let targetTag be the value of the "target tag" column for that entry.

      localName and selector attribute to tag mapping
      localName selector attribute target tag
      a jsf:action h:commandLink
      a jsf:actionListener h:commandLink
      a jsf:value h:outputLink
      a jsf:outcome h:link
      body h:body
      button h:commandButton
      button jsf:outcome h:button
      form h:form
      head h:head
      img h:graphicImage
      input type="button" h:commandButton
      input type="checkbox" h:selectBooleanCheckbox
      input type="color" h:inputText
      input type="date"
      input type="datetime"
      input type="datetime-local"
      input type="email"
      input type="month"
      input type="number"
      input type="range"
      input type="search"
      input type="time"
      input type="url"
      input type="week"
      input type="file" h:inputFile
      input type="hidden" h:inputHidden
      input type="password" h:inputSecret
      input type="reset" h:commandButton
      input type="submit" h:commandButton
      input type="*" h:inputText
      label h:outputLabel
      link h:outputStylesheet
      script h:outputScript
      select multiple="*" h:selectManyListbox
      select h:selectOneListbox
      textarea h:inputTextArea

      In the case where there are multiple rows with the same localName, find a matching entry by using the argument tag's attributes and the value from the "selector attribute" column in the table in the given order. A selector attribute value of * indicates any value. In the table, a selector attribute name prefixed with jsf: means the tag is treated as if it were in the http://xmlns.jcp.org/jsf namespace. In actual Facelet pages, the namespace is what matters, not the prefix.

      If no matching entry is found, let jsf:element be the value of targetTag

    • Convert all the attributes of the argument tag as follows. First, create a new instance of TagAttribute with the following characteristics: location: from the argument tag's location, namespace: http://xmlns.jcp.org/jsf/passthrough, local name: value of javax.faces.render.Renderer#PASSTHROUGH_RENDERER_LOCALNAME_KEY, qualified name: same as local name with the "p:" prefix, value: from the argument tag's local name. Let this TagAttributebe elementNameTagAttribute.

      For each of argument tag's attributes obtain a reference to a TagAttribute with the following characteristics. For discussion let such an attribute be convertedTagAttribute.

      • convertedTagAttribute's location: from the argument tag's location.

      • If the current attribute's namespace is http://xmlns.jcp.org/jsf, convertedTagAttribute's qualified name must be the current attribute's local name and convertedTagAttribute's namespace must be the empty string. This will have the effect of setting the current attribute as a proper property on the UIComponent instance represented by this markup.

      • If the current attribute's namespace is non-empty and different from the argument tag's namespace, let the current attribute be convertedTagAttribute.

      • Otherwise, assume the current attribute's namespace is http://xmlns.jcp.org/jsf/passthrough. ConvertedTagAttribute's qualified name is the current attribute's local name prefixed by "p:". convertedTagAttribute's namespace must be http://xmlns.jcp.org/jsf/passthrough.

      Create a TagAttributes instance containing elementNameTagAttribute and all the convertedTagAttributes.

    • Create a new Tag instance with the following characteristics.

      location: from the argument tag's location.

      namespace: if targetTag's prefix is "h", http://xmlns.jcp.org/jsf/html; if targetTag's prefix is "jsf", http://xmlns.jcp.org/jsf.

      local name: the local name from the target tag column.

      attributes: the TagAttributes from the preceding step.

      Let this new Tag instance be convertedTag.

The Tag instance returned from this decoration process must ultimately be passed to a FaceletHandler instance as described in the spec prose document section titled, "Specification of the ViewDeclarationLanguage Implementation for Facelets for JSF 2.0".

Most used methods

  • decorate
    If handled, return a new Tag instance, otherwise return null

Popular in Java

  • Running tasks concurrently on multiple threads
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setRequestProperty (URLConnection)
  • requestLocationUpdates (LocationManager)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now