Package javax.faces.webapp

Examples of javax.faces.webapp.UIComponentClassicTagBase


        if(log.isDebugEnabled())
            log.debug("JSF 1.2 Spec : Create a new instance of the ActionListener");

        ActionListener actionListener = new SetPropertyActionListener(target, value);
       
        UIComponentClassicTagBase tag = UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
       
        if(tag == null)
            throw new JspException("Could not find a " +
                    "parent UIComponentClassicTagBase ... is this " +
                    "tag in a child of a UIComponentClassicTagBase?");
       
        if(tag.getCreated())
        {
           
            UIComponent component = tag.getComponentInstance();
           
            if(component == null)
                throw new JspException(" Could not locate a UIComponent " +
                        "for a UIComponentClassicTagBase w/ a " +
                        "JSP id of " + tag.getJspId());
           
            if( ! ( component instanceof ActionSource ) )
                throw new JspException("Component w/ id of " + component.getId()
                        + " is associated w/ a tag w/ JSP id of " + tag.getJspId()
                        + ". This component is of type " + component.getClass()
                        + ", which is not an " + ActionSource.class );
           
            if(log.isDebugEnabled())
                log.debug(" ... register it with the UIComponent " +
View Full Code Here


    protected abstract _Listener createDelegateListener(ValueExpression type, ValueExpression binding);
   
    public int doStartTag() throws JspException
    {
        UIComponentClassicTagBase componentTag = UIComponentELTag.getParentUIComponentClassicTagBase(pageContext);
        if (componentTag == null)
        {
            throw new JspException("no parent UIComponentTag found");
        }

        if (_type == null)
        {
            throw new JspException("type attribute not set");
        }

        if (!componentTag.getCreated())
        {
            return Tag.SKIP_BODY;
        }

        if (_type == null)
        {
            throw new JspException("type attribute not set");
        }

        _Holder holder = null;
        UIComponent component = componentTag.getComponentInstance();
        try
        {
            holder = (_Holder) component;
        } catch (ClassCastException e)
        {
View Full Code Here

    public int doStartTag() throws JspException {
        if (type == null) {
            throw new JspException("type attribute not set");
        }

        UIComponentClassicTagBase componentTag = UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
        if (componentTag == null)
            throw new JspException("SelectionChangeListener has no UIComponentTag parent.");

        if (componentTag.getCreated()) {
            UIComponent component = componentTag.getComponentInstance();
            if (!(component instanceof TabSelectionHolder))
                throw new JspException("Component " + component.getClass().toString() + " does not support" +
                        " SelectionChange event.");
            FacesContext context = FacesContext.getCurrentInstance();
            String className = (String) type.getValue(context.getELContext());
View Full Code Here

        this.type = type;
    }

    public int doStartTag() throws JspException {
        if (type == null) throw new JspException("Type attribute not set");
        UIComponentClassicTagBase componentTag = UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
        if (componentTag == null) throw new JspException("StateChangeListener has no UIComponentTag parent.");
        if (componentTag.getCreated()) {
            UIComponent component = componentTag.getComponentInstance();
            if (!(component instanceof FoldingPanel) && !(component instanceof ToggleCaptionButton))
                throw new JspException("Component " + component.getClass().getName() + " does not support" +
                        " StateChange event.");

            FacesContext context = FacesContext.getCurrentInstance();
View Full Code Here

 
  public int doStartTag() throws JspException {

    ActionListener actionListener = new FileDownloadActionListener(value);

    UIComponentClassicTagBase tag = UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);

    if(tag == null)
      throw new JspException("FileDownload component needs to be enclosed in a UICommand component");

    if(tag.getCreated()) {
      UIComponent component = tag.getComponentInstance();
      ((ActionSource) component).addActionListener(actionListener);
    }

    return SKIP_BODY;
  }
View Full Code Here

  private MethodExpression postProcessor;

  public int doStartTag() throws JspException {
    ActionListener actionListener = new DataExporter(target, type, fileName, excludeColumns, preProcessor, postProcessor);

    UIComponentClassicTagBase tag = UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);

    if (tag == null)
      throw new JspException("DataExporter component needs to be enclosed in a UICommand component");

    if (tag.getCreated()) {

      UIComponent component = tag.getComponentInstance();

      ((ActionSource) component).addActionListener(actionListener);
    }

    return SKIP_BODY;
View Full Code Here

  public int doStartTag() throws JspException {

    ActionListener actionListener = new Collector(addTo, removeFrom, value);

    UIComponentClassicTagBase tag = UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);

    if (tag == null)
      throw new JspException("Could not find a "
          + "parent UIComponentClassicTagBase ... is this "
          + "tag in a child of a UIComponentClassicTagBase?");

    if (tag.getCreated()) {

      UIComponent component = tag.getComponentInstance();

      ((ActionSource) component).addActionListener(actionListener);
    }

    return SKIP_BODY;
View Full Code Here

    protected abstract _Listener createDelegateListener(ValueExpression type, ValueExpression binding);
   
    public int doStartTag() throws JspException
    {
        UIComponentClassicTagBase componentTag = UIComponentELTag.getParentUIComponentClassicTagBase(pageContext);
        if (componentTag == null)
        {
            throw new JspException("no parent UIComponentTag found");
        }

        if (_type == null && _binding == null)
        {
            throw new JspException("\"actionListener\" must have binding and/or type attribute.");
        }

        if (!componentTag.getCreated())
        {
            return Tag.SKIP_BODY;
        }

        _Holder holder = null;
        UIComponent component = componentTag.getComponentInstance();
        try
        {
            holder = (_Holder) component;
        } catch (ClassCastException e)
        {
View Full Code Here

    }


    public int doStartTag() throws JspException
    {
        UIComponentClassicTagBase componentTag = UIComponentELTag.getParentUIComponentClassicTagBase(pageContext);
        if (componentTag == null)
        {
            throw new JspException("no parent UIComponentTag found");
        }
        UIComponent component = componentTag.getComponentInstance();
        if (component == null)
        {
            throw new JspException("parent UIComponentTag has no UIComponent");
        }
View Full Code Here

        if(log.isDebugEnabled())
            log.debug("JSF 1.2 Spec : Create a new instance of the ActionListener");

        ActionListener actionListener = new SetPropertyActionListener(target, value);
       
        UIComponentClassicTagBase tag = UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
       
        if(tag == null)
            throw new JspException("Could not find a " +
                    "parent UIComponentClassicTagBase ... is this " +
                    "tag in a child of a UIComponentClassicTagBase?");
       
        if(tag.getCreated())
        {
           
            UIComponent component = tag.getComponentInstance();
           
            if(component == null)
                throw new JspException(" Could not locate a UIComponent " +
                        "for a UIComponentClassicTagBase w/ a " +
                        "JSP id of " + tag.getJspId());
           
            if( ! ( component instanceof ActionSource ) )
                throw new JspException("Component w/ id of " + component.getId()
                        + " is associated w/ a tag w/ JSP id of " + tag.getJspId()
                        + ". This component is of type " + component.getClass()
                        + ", which is not an " + ActionSource.class );
           
            if(log.isDebugEnabled())
                log.debug(" ... register it with the UIComponent " +
View Full Code Here

TOP

Related Classes of javax.faces.webapp.UIComponentClassicTagBase

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.