I am creating dynamic links and here is something useful I used for programmatic creatin of the links.
uiCompnent.setValueExpression(
  "disabled",
  JSFUtils.getValueExpression(
    "#{bindings.MyVOIterator.estimatedRowCount == 0}",
      Boolean.class));
public static ValueExpression getValueExpression(
  String expression, Class clazz){
  FacesContext ctx = FacesContext.getCurrentInstance();
  ELContext elCtx = ctx.getELContext();
  Application app = ctx.getApplication();
  return app.getExpressionFactory().createValueExpression(
    elCtx, expression, clazz);
}
Comments
Post a Comment