Package javax.faces.webapp

Examples of javax.faces.webapp.UIComponentClassicTagBase


  }

  @Override
  public int doStartTag() throws JspException
  {
    UIComponentClassicTagBase tag =
      UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
    if (tag == null)
    {
      throw new JspException(_LOG.getMessage(
        "RETURNACTIONLISTENER_MUST_INSIDE_UICOMPONENT_TAG"));
    }

    // Only run on the first time the tag executes
    if (!tag.getCreated())
      return SKIP_BODY;

    UIComponent component = tag.getComponentInstance();
    if (!(component instanceof ActionSource))
    {
      throw new JspException(_LOG.getMessage(
        "RETURNACTIONLISTENER_MUST_INSIDE_UICOMPONENT_TAG"));
    }
View Full Code Here


        if (_property == null) throw new JspException("property attribute not set");
        if (_value == null) throw new JspException("value attribute not set");
        if (_property.isLiteralText()) throw new JspException("property attribute is no valid value reference: " + _property);

        //Find parent UIComponentTag
        UIComponentClassicTagBase componentELTag = UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
        if (componentELTag == null){       
            UIComponentTag componentTag = UIComponentTag.getParentUIComponentTag(pageContext);
            if (componentTag == null)
            {
                throw new JspException("UpdateActionListenerTag has no UIComponentTag ancestor");
            }
        }

        if (componentELTag.getCreated())
        {
            //Component was just created, so we add the Listener
            UIComponent component = componentELTag.getComponentInstance();
            if (component instanceof ActionSource)
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
                Application application = facesContext.getApplication();
                UpdateActionListener al = new UpdateActionListener();
View Full Code Here

     * @throws JspException if a JSP error occurs
     */
    public int doStartTag() throws JspException {

        // Locate our parent UIComponentTag
        UIComponentClassicTagBase tag =
             UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
        if (tag == null) {
            Object params[] = {this.getClass().getName()};
            throw new JspException(
                 MessageUtils.getExceptionMessageString(
                      MessageUtils.NOT_NESTED_IN_FACES_TAG_ERROR_MESSAGE_ID, params));
        }

        // Nothing to do unless this tag created a component
        if (!tag.getCreated()) {
            return (SKIP_BODY);
        }

        UIComponent component = tag.getComponentInstance();
        if (component == null) {
            throw new JspException(
                 MessageUtils.getExceptionMessageString(MessageUtils.NULL_COMPONENT_ERROR_MESSAGE_ID));
        }
        if (!(component instanceof ActionSource)) {          
View Full Code Here

     * @throws JspException if a JSP error occurs
     */
    public int doStartTag() throws JspException {

        // Locate our parent UIComponentTag
        UIComponentClassicTagBase tag =
             UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
        if (tag == null) {
            //  Object[] params = {this.getClass().getName()};
            // PENDING(rogerk): do something with params
            throw new JspException(
                 MessageUtils.getExceptionMessageString(
                      MessageUtils.NOT_NESTED_IN_FACES_TAG_ERROR_MESSAGE_ID));
        }

        // Nothing to do unless this tag created a component
        if (!tag.getCreated()) {
            return (SKIP_BODY);
        }

        UIComponent component = tag.getComponentInstance();
        if (component == null) {
            throw new JspException(
                 MessageUtils.getExceptionMessageString(MessageUtils.NULL_COMPONENT_ERROR_MESSAGE_ID));
        }
        if (!(component instanceof EditableValueHolder)) {
View Full Code Here

              .isOptionEnabled
                    (BooleanWebContextInitParameter.EnableLoadBundle11Compatibility)) {
            // the UIComponent that wraps the Map
            UIComponent bundleComponent =
                  createNewLoadBundleComponent(var, toStore);
            UIComponentClassicTagBase parentTag = getParentUIComponentTag();

            // Is this loadBundle tag instance outside of <f:view>?
            if (null == parentTag) {
                // Yes.  Store the bundleComponent in a list so the <f:view> tag
                // can add the list contents as the first children.
View Full Code Here

        Tag parent = this.getParent();
        while (null != parent &&
                (!(parent instanceof UIComponentClassicTagBase))) {
            parent = this.getParent();
        }
        UIComponentClassicTagBase result = (UIComponentClassicTagBase) parent;
       
        // Check for case where the <f:loadBundle> is inside of an included page,
        // but outside of the <f:subview> for that page.  This can happen
        // either when the <f:subview> is in the includING page *OR* when
        // the <f:subview> is in the includED page, yet the <f:loadBundle> is
View Full Code Here

              .isOptionEnabled
                    (BooleanWebContextInitParameter.EnableLoadBundle11Compatibility)) {
            // the UIComponent that wraps the Map
            UIComponent bundleComponent =
                  createNewLoadBundleComponent(var, toStore);
            UIComponentClassicTagBase parentTag = getParentUIComponentTag();

            // Is this loadBundle tag instance outside of <f:view>?
            if (null == parentTag) {
                // Yes.  Store the bundleComponent in a list so the <f:view> tag
                // can add the list contents as the first children.
View Full Code Here

        Tag parent = this.getParent();
        while (null != parent &&
                (!(parent instanceof UIComponentClassicTagBase))) {
            parent = this.getParent();
        }
        UIComponentClassicTagBase result = (UIComponentClassicTagBase) parent;
       
        // Check for case where the <f:loadBundle> is inside of an included page,
        // but outside of the <f:subview> for that page.  This can happen
        // either when the <f:subview> is in the includING page *OR* when
        // the <f:subview> is in the includED page, yet the <f:loadBundle> is
View Full Code Here

  private MethodExpression postProcessor;

  public int doStartTag() throws JspException {
    ActionListener actionListener = new DataExporter(target, type, fileName, pageOnly, excludeColumns, encoding, 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

  private ValueExpression contentDisposition;

  public int doStartTag() throws JspException {
    ActionListener actionListener = new FileDownloadActionListener(value, contentDisposition);

    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

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.