public void beginDisplay(DisplayEvent event) throws ModelControlException {
  IdentitySubjectModel subjectModel=getSubjectModel();
  PolicyModel model=(PolicyModel)getModel();
  super.beginDisplay(event);
  if (!canModify) {
    Map mapValues=getDefaultValues();
    if ((mapValues != null) && !mapValues.isEmpty()) {
      Set values=(Set)mapValues.get(AMIdentityMembershipCondition.AM_IDENTITY_NAME);
      Set identityNames=helper.getAMIdentityNames(model.getUserSSOToken(),values);
      propertySheetModel.setValue(VALUES_MULTIPLE_CHOICE_VALUE,AMAdminUtils.getString(identityNames,",",false));
    }
  }
 else {
    CCDropDownMenu menu=(CCDropDownMenu)getChild(FILTER_TYPE);
    Map supportedEntityTypes=model.getSupportedEntityTypes(realmName);
    OptionList entityTypes=createOptionList(supportedEntityTypes);
    entityTypes.add(0,"policy.subject.select.identity.type","");
    menu.setOptions(entityTypes);
    menu.setValue("");
    CCAddRemove child=(CCAddRemove)getChild(VALUES_MULTIPLE_CHOICE_VALUE);
    child.restoreStateData();
    if (!submitCycle) {
      helper.setSelectedIdentities(child,model.getUserSSOToken(),model.getUserLocale(),this,getDefaultValues());
    }
 else {
      OptionList possible=helper.createOptionList(model.getUserSSOToken(),model.getUserLocale(),this,getPossibleValues(subjectModel,realmName));
      OptionList selected=addRemoveModel.getSelectedOptionList();
      List selectedIds=AMAdminUtils.toList(selected);
      child.resetStateData();
      addRemoveModel.setAvailableOptionList(possible);
      addRemoveModel.setSelectedOptionList(helper.createOptionList(model.getUserSSOToken(),model.getUserLocale(),this,selectedIds));
    }
  }
}

public void beginDisplay ( DisplayEvent event ) throws ModelControlException { IdentitySubjectModel subjectModel = getSubjectModel ( ) ; PolicyModel model = ( PolicyModel ) getModel ( ) ; super . beginDisplay ( event ) ; if ( ! canModify ) { Map mapValues = getDefaultValues ( ) ; if ( ( mapValues != null ) && ! mapValues . isEmpty ( ) ) { Set values = ( Set ) mapValues . get ( AMIdentityMembershipCondition . AM_IDENTITY_NAME ) ; Set identityNames = helper . getAMIdentityNames ( model . getUserSSOToken ( ) , values ) ; propertySheetModel . setValue ( VALUES_MULTIPLE_CHOICE_VALUE , AMAdminUtils . getString ( identityNames , "," , false ) ) ; } } else { CCDropDownMenu menu = ( CCDropDownMenu ) getChild ( FILTER_TYPE ) ; Map supportedEntityTypes = model . getSupportedEntityTypes ( realmName ) ; OptionList entityTypes = createOptionList ( supportedEntityTypes ) ; entityTypes . add ( 0 , "policy.subject.select.identity.type" , "" ) ; menu . setOptions ( entityTypes ) ; menu . setValue ( "" ) ; CCAddRemove child = ( CCAddRemove ) getChild ( VALUES_MULTIPLE_CHOICE_VALUE ) ; child . restoreStateData ( ) ; if ( ! submitCycle ) { helper . setSelectedIdentities ( child , model . getUserSSOToken ( ) , model . getUserLocale ( ) , this , getDefaultValues ( ) ) ; } else { OptionList possible = helper . createOptionList ( model . getUserSSOToken ( ) , model . getUserLocale ( ) , this , getPossibleValues ( subjectModel , realmName ) ) ; OptionList selected = addRemoveModel . getSelectedOptionList ( ) ; List selectedIds = AMAdminUtils . toList ( selected ) ; child . resetStateData ( ) ; addRemoveModel . setAvailableOptionList ( possible ) ; addRemoveModel . setSelectedOptionList ( helper . createOptionList ( model . getUserSSOToken ( ) , model . getUserLocale ( ) , this , selectedIds ) ) ; } } }
sets the values to ui model .
