Old approach:
XspInputText field = (XspInputText) StandardUtil.findComponent(facesContext .getViewRoot(), “countryName”);
The annoying thing about this approach: You never know exactly which class the component has, ie. a “read only” field is not XspInputText etc., and thus you cannot just use this approach really transparently.
New approach:
DominoDocument dominoDoc = StandardUtil.getDominoDocument();
dominoDoc.replaceItemValue(“editableField”, new Date().toString());
It works for editable/hidden/disabled/readOnly fields!!!
And the best thing is: you do not even need to know the fields xPage name anymore!
You only care about set in the binding property. This in effect speeds up development a lot, cause I do not need to check/modify field names in 2 places anymore.
addendum:
the getDominoDocument works like this:
DominoDocument dominoDoc = (DominoDocument) JSFConnector
.getVariableValue(“currentDocument”);
return dominoDoc;
and the JSFConnector you will find here (kudos to Karsten Lehmann)