use of com.ibm.xsp.binding.ValueBindingEx in project org.openntf.domino by OpenNTF.
the class FormulaContextXsp method getValueBinding.
/**
* Create a value binding for {@link #getField(String)} and {@link #setField(String, ValueHolder)}
*
* @param variable
* the variableName, like <code>"document2.Form"</code>
* @return a {@link ValueBinding}
*/
protected ValueBinding getValueBinding(final String variable) {
ValueBinding ret = valueBindings.get(variable);
if (ret == null) {
ApplicationEx app = (ApplicationEx) context.getApplication();
// $NON-NLS-1$ //$NON-NLS-2$
ret = app.createValueBinding("#{" + variable + "}");
if ((ret instanceof ValueBindingEx)) {
ValueBindingEx valueEx = (ValueBindingEx) ret;
valueEx.setComponent(component);
// TODO RPr: What to set here
valueEx.setSourceReferenceId(null);
valueEx.setExpectedType(Object.class);
} else if ((ret instanceof ComponentBindingObject)) {
((ComponentBindingObject) ret).setComponent(component);
}
valueBindings.put(variable, ret);
}
return ret;
}
Aggregations