Package javax.faces.webapp

Examples of javax.faces.webapp.UIComponentClassicTagBase


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

        // Locate our parent UIComponentTagBase
        UIComponentClassicTagBase tag =
            UIComponentELTag.getParentUIComponentClassicTagBase(pageContext);
        if (tag == null) {
          String message = MessageUtils.getExceptionMessageString
          (MessageUtils.NOT_NESTED_IN_UICOMPONENT_TAG_ERROR_MESSAGE_ID);
          throw new JspException(message);
        }
       
        // Add this attribute if it is not already defined
        UIComponent component = tag.getComponentInstance();
        if (component == null) {
          String message = MessageUtils.getExceptionMessageString
          (MessageUtils.NO_COMPONENT_ASSOCIATED_WITH_UICOMPONENT_TAG_MESSAGE_ID);
          throw new JspException(message);
        }
View Full Code Here


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

        // Locate our parent UIComponentTag
        UIComponentClassicTagBase tag =
            UIComponentELTag.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

     * @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

              .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

  }

  @Override
  public int doStartTag() throws JspException {
    // Locate our parent UIComponentTag
    UIComponentClassicTagBase tag = UIComponentClassicTagBase
        .getParentUIComponentClassicTagBase(pageContext);
    if (tag == null) {
      // PENDING i18n
      throw new JspException(
          "Not nested in a UIComponentTag Error for tag with handler class:"
              + this.getClass().getName());
    }
    UIComponent component = tag.getComponentInstance();
    if (!(component instanceof EditableValueHolder)) {
      // PENDING i18n
      throw new JspException(
          "Not nested in a UIInput  component. Error for tag with handler class:"
              + this.getClass().getName());

    }
    // Nothing to do unless this tag created a component
    if (tag.getCreated()) {
      // New created component, add validator.
      FacesContext facesContext = FacesContext.getCurrentInstance();
      FacesBeanValidator validator = (FacesBeanValidator) facesContext
          .getApplication().createValidator(
              FacesBeanValidator.BEAN_VALIDATOR_TYPE);
View Full Code Here

    }

    protected void setParentProperties(UIAjaxSupport uiComponent)  {

        //Find parent UIComponentTag
        UIComponentClassicTagBase componentTag = null;
    try {
      componentTag = UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
          if (componentTag == null) {
              throw new IllegalArgumentException(
                  Messages.getMessage(Messages.NO_UI_COMPONENT_TAG_ANCESTOR_ERROR, "AjaxSupportTag"));
          }

          if (componentTag.getCreated()) {
              //Component was just created, so we add the Listener
              UIComponent component = componentTag.getComponentInstance();
              uiComponent.setParentProperties(component);
          }
    } catch (ClassCastException e) {
      // JSF 1.2 - tags have other parent.
    }
View Full Code Here

        if (type == null) {
            throw new JspException(Messages.getMessage(Messages.NULL_TYPE_ATTRIBUTE_ERROR));
        }

        //Find parent UIComponentTag
        UIComponentClassicTagBase componentTag =
          UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
        if (componentTag == null) {
            throw new JspException(
                Messages.getMessage(Messages.NO_UI_COMPONENT_TAG_ANCESTOR_ERROR, "AjaxListenerTag"));
        }

        if (componentTag.getCreated()) {
            //Component was just created, so we add the Listener
            UIComponent component = componentTag.getComponentInstance();
            if (component instanceof AjaxSource) {
                AjaxListener listener;
                if(null != binding){
                   listener = new AjaxListenerHelper(new ValueBindingValueExpressionAdaptor(binding));
                } else {
View Full Code Here

        if (_actionListener != null) {
          ((UIActionParameter) component).setActionListener(_actionListener);
        }
       
        //Find parent UIComponentTag
        UIComponentClassicTagBase componentTag =
          UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
        if (componentTag == null)
        {
            throw new IllegalArgumentException(Messages.getMessage(Messages.NO_UI_COMPONENT_TAG_ANCESTOR_ERROR, "ActionParameterTag"));
        }

        if (componentTag.getCreated())
        {
            //Component was just created, so we add the Listener
            UIComponent parentComponent = componentTag.getComponentInstance();
            if (parentComponent instanceof ActionSource)
            {

              if (_assignTo != null) {
                    if (_assignTo.isLiteralText()) throw new IllegalArgumentException(Messages.getMessage(Messages.NO_VALUE_REFERENCE_ERROR_2, _assignTo));
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.