use of com.iplanet.jato.view.DisplayField in project OpenAM by OpenRock.
the class MAPCreateDeviceTwoViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
if (!submitCycle) {
MAPCreateDeviceModel model = (MAPCreateDeviceModel) getModel();
Map defaultValues = model.getCreateDeviceDefaultValues();
for (Iterator i = defaultValues.keySet().iterator(); i.hasNext(); ) {
String attrName = (String) i.next();
DisplayField f = (DisplayField) getChild(attrName);
f.setValues(((Set) defaultValues.get(attrName)).toArray());
}
setDisplayFieldValue(TF_PARENTID, attrParentId);
setDisplayFieldValue(TF_CLIENT_TYPE, attrClientType);
}
}
use of com.iplanet.jato.view.DisplayField in project OpenAM by OpenRock.
the class FSSAMLServiceViewBean method setInlineHelps.
private void setInlineHelps() {
FSSAMLServiceModel model = (FSSAMLServiceModel) getModel();
Map helps = model.getAttributeInlineHelps();
for (Iterator iter = helps.keySet().iterator(); iter.hasNext(); ) {
String name = (String) iter.next();
try {
View view = getChild("help" + name);
if (DisplayField.class.isInstance(view)) {
((DisplayField) view).setValue((String) helps.get(name));
}
} catch (IllegalArgumentException e) {
// do nothing.
// child is not a help.
}
}
}
use of com.iplanet.jato.view.DisplayField in project OpenAM by OpenRock.
the class FSSAMLServiceViewBean method setLabels.
private void setLabels() {
FSSAMLServiceModel model = (FSSAMLServiceModel) getModel();
Map labels = model.getAttributeLabels();
for (Iterator iter = labels.keySet().iterator(); iter.hasNext(); ) {
String name = (String) iter.next();
try {
View view = getChild("lbl" + name);
if (DisplayField.class.isInstance(view)) {
((DisplayField) view).setValue((String) labels.get(name));
}
} catch (IllegalArgumentException e) {
// do nothing.
// child is not a label.
}
}
}
Aggregations