Package com.sun.facelets.el

Examples of com.sun.facelets.el.LegacyValueBinding


            valueExpression.setValue(faceletContext, changeListener);
          }
        }
        if (valueExpression != null) {
          changeSource.addTabChangeListener(new TabChangeListenerValueBindingDelegate(type.getValue(),
              new LegacyValueBinding(valueExpression)));
        } else {
          changeSource.addTabChangeListener(changeListener);
        }
        if (listener != null && !listener.isLiteral()) {
          changeSource.setTabChangeListener(new LegacyMethodBinding(
View Full Code Here


      this.attr = attr;
      this.type = type;
    }

    public void applyMetadata(FaceletContext ctx, Object instance) {
      ((UIComponent) instance).setValueBinding(name, new LegacyValueBinding(attr.getValueExpression(ctx, type)));
    }
View Full Code Here

          ValueExpression forValueExpression = execute.getValueExpression(faceletContext, String.class);
          if (FacesVersion.supports12()) {
            FacesUtils.addBindingOrExpressionResetActionListener(actionSource, forValueExpression);
          } else {
            FacesUtils.addBindingOrExpressionResetActionListener(actionSource,
                new LegacyValueBinding(forValueExpression));
          }
        }
      }
    } else {
      throw new TagException(tag, "Parent is not of type ActionSource, type is: " + parent);
View Full Code Here

        if (valueExpression != null) {
          if (FacesVersion.supports12()) {
            FacesUtils.addBindingOrExpressionTabChangeListener(changeSource, type.getValue(), valueExpression);
          } else {
            FacesUtils.addBindingOrExpressionTabChangeListener(changeSource, type.getValue(),
                new LegacyValueBinding(valueExpression));
          }
        } else {
          changeSource.addTabChangeListener(listener);
        }
      }
View Full Code Here

          ValueExpression forValueExpression = forComponent.getValueExpression(faceletContext, String.class);
          if (FacesVersion.supports12()) {
            FacesUtils.addBindingOrExpressionPopupActionListener(actionSource, forValueExpression);
          } else {
            FacesUtils.addBindingOrExpressionPopupActionListener(actionSource,
                new LegacyValueBinding(forValueExpression));
          }
        }
      }
    } else {
      throw new TagException(tag, "Parent is not of type ActionSource, type is: " + parent);
View Full Code Here

      ValueExpression toExpression=  _to.getValueExpression(faceletContext,
                                                            Object.class);
      ActionSource actionSource= (ActionSource) parent;
      SetActionListener listener = new SetActionListener();
      listener.setValueBinding("from",
                               new LegacyValueBinding(fromExpression));
      listener.setValueBinding("to",
                               new LegacyValueBinding(toExpression));
      actionSource.addActionListener(listener);
    }
  }
View Full Code Here

      ActionSource actionSource = (ActionSource)parent;
      ReturnActionListener listener = new ReturnActionListener();
      if (_value != null)
      {
        ValueExpression valueExp = _value.getValueExpression(faceletContext, Object.class);
        listener.setValueBinding(ReturnActionListener.VALUE_KEY, new LegacyValueBinding(valueExp));
      }


      actionSource.addActionListener(listener);
    }
View Full Code Here

        else
        {
          ValueExpression valueExp = _filename.getValueExpression(faceletContext,
                                                                  Object.class);
          listener.setValueBinding(FileDownloadActionListener.FILENAME_KEY,
                                   new LegacyValueBinding(valueExp));
        }
      }

      if (_contentType != null)
      {
        if (_contentType.isLiteral())
          listener.setContentType(_contentType.getValue());
        else
        {
          ValueExpression valueExp = _contentType.getValueExpression(faceletContext,
                                                                  Object.class);
          listener.setValueBinding(FileDownloadActionListener.CONTENT_TYPE_KEY,
                                   new LegacyValueBinding(valueExp));
        }
      }
     
      MethodExpression me = _method.getMethodExpression(faceletContext,
                                                        Object.class,
View Full Code Here

    @Override
    @SuppressWarnings("deprecation")
    public void applyMetadata(FaceletContext ctx, Object instance)
    {
      ValueExpression expr = _attribute.getValueExpression(ctx, String.class);
      ValueBinding vb = new LegacyValueBinding(expr);
      UIXComponent uixcomp = (UIXComponent) instance;
      FacesBean bean = uixcomp.getFacesBean();
      PropertyKey mainKey = bean.getType().findKey(_mainMethodName);
      if (mainKey == null)
        throw new TagAttributeException(_attribute,
View Full Code Here

                ValueExpression ve = null;
                if (this.binding != null) {
                    ve = this.binding.getValueExpression(ctx,
                            AjaxListener.class);
                    // TODO - handle both JSF 1.2/1.1 cases.
                    listener = new AjaxListenerHelper(new LegacyValueBinding(ve));
                }
                if (listener == null) {
                    try {
                        listener = (AjaxListener) listenerType.newInstance();
                    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of com.sun.facelets.el.LegacyValueBinding

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.