Package de.hybris.yfaces

Examples of de.hybris.yfaces.YFacesELContext


  private void setValue(YComponent cmp) {
    ValueExpression vb = getValueExpression(PARAM_YCMP_BINDING);

    if (vb != null) {
      ELContext elCtx = FacesContext.getCurrentInstance().getELContext();
      YFacesELContext yCtx = (YFacesELContext) FacesContext.getCurrentInstance()
          .getELContext().getContext(YFacesELContext.class);

      yCtx.setResolveYComponentBinding(false);
      Object value = vb.getValue(elCtx);
      if (value instanceof YComponentBinding) {
        ((YComponentBinding<YComponent>) value).setValue(cmp);
      }

      if (value == null) {
        if (YComponent.class.isAssignableFrom(vb.getType(elCtx))) {
          vb.setValue(elCtx, cmp);
        } else {
          YComponentBinding<YComponent> binding = new YComponentBinding<YComponent>(this
              .getId());
          vb.setValue(elCtx, binding);
          binding.setValue(cmp);
        }
      }

      yCtx.setResolveYComponentBinding(true);
    }
  }
View Full Code Here

TOP

Related Classes of de.hybris.yfaces.YFacesELContext

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.