Package com.sun.facelets.el

Examples of com.sun.facelets.el.LegacyValueBinding


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


    if(ComponentSupport.isNew(parent))
    {
      ValueExpression valueExp = _value.getValueExpression(faceletContext, Object.class);
      ActionSource actionSource = (ActionSource)parent;
      ReturnActionListener listener = new ReturnActionListener();
      listener.setValueBinding(ReturnActionListener.VALUE_KEY, new LegacyValueBinding(valueExp));
      actionSource.addActionListener(listener);
    }
  }
View Full Code Here

            this.type = type;
        }

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

                if (c != null) {
                    // Make sure the component supports 1.2
                    if (FacesAPI.getComponentVersion(c) >= 12) {
                        c.setValueExpression("binding", ve);
                    } else {
                        ValueBinding vb = new LegacyValueBinding(ve);
                        c.setValueBinding("binding", vb);
                    }

                }
            } else {
                ValueBinding vb = new LegacyValueBinding(ve);
                c = app.createComponent(vb, faces, this.componentType);
                if (c != null) {
                    c.setValueBinding("binding", vb);
                }
            }
View Full Code Here

                if (FacesAPI.getVersion() >= 12 && src instanceof ActionSource2) {
                    listener = new SetPropertyListener(valueExpr, targetExpr);
                } else {
                    listener = new LegacySetPropertyListener(
                            new LegacyValueBinding(valueExpr),
                            new LegacyValueBinding(targetExpr));
                }

                src.addActionListener(listener);
            }
        } else {
View Full Code Here

            this.attr = attr;
        }

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

            this.attr = attr;
        }

        public void applyMetadata(FaceletContext ctx, Object instance) {
            ((UIComponent) instance).setValueBinding("value",
                    new LegacyValueBinding(attr.getValueExpression(ctx,
                            Object.class)));
        }
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

        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 = 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

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.