Search in sources :

Example 1 with DisplayField

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);
    }
}
Also used : DisplayField(com.iplanet.jato.view.DisplayField) MAPCreateDeviceModel(com.sun.identity.console.service.model.MAPCreateDeviceModel) Iterator(java.util.Iterator) Map(java.util.Map)

Example 2 with DisplayField

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.
        }
    }
}
Also used : DisplayField(com.iplanet.jato.view.DisplayField) Iterator(java.util.Iterator) FSSAMLServiceModel(com.sun.identity.console.federation.model.FSSAMLServiceModel) HashMap(java.util.HashMap) Map(java.util.Map) View(com.iplanet.jato.view.View)

Example 3 with DisplayField

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.
        }
    }
}
Also used : DisplayField(com.iplanet.jato.view.DisplayField) Iterator(java.util.Iterator) FSSAMLServiceModel(com.sun.identity.console.federation.model.FSSAMLServiceModel) HashMap(java.util.HashMap) Map(java.util.Map) View(com.iplanet.jato.view.View)

Aggregations

DisplayField (com.iplanet.jato.view.DisplayField)3 Iterator (java.util.Iterator)3 Map (java.util.Map)3 View (com.iplanet.jato.view.View)2 FSSAMLServiceModel (com.sun.identity.console.federation.model.FSSAMLServiceModel)2 HashMap (java.util.HashMap)2 MAPCreateDeviceModel (com.sun.identity.console.service.model.MAPCreateDeviceModel)1