public void handleButton2Request(RequestInvocationEvent event) throws ModelControlException {
  submitCycle=true;
  String serviceName=(String)getDisplayFieldValue(ATTR_SERVICE_LIST);
  String universalId=(String)getPageSessionAttribute(EntityEditViewBean.UNIVERSAL_ID);
  EntitiesModel model=(EntitiesModel)getModel();
  if (model.hasUserAttributeSchema(serviceName)) {
    unlockPageTrailForSwapping();
    fowardToAddServiceViewBean(model,universalId,serviceName);
  }
 else {
    try {
      model.assignService(universalId,serviceName,Collections.EMPTY_MAP);
      forwardToEntityServiceViewBean();
    }
 catch (    AMConsoleException e) {
      setInlineAlertMessage(CCAlert.TYPE_ERROR,"message.error",e.getMessage());
      forwardTo();
    }
  }
}

public void handleButton2Request ( RequestInvocationEvent event ) throws ModelControlException { submitCycle = true ; String serviceName = ( String ) getDisplayFieldValue ( ATTR_SERVICE_LIST ) ; String universalId = ( String ) getPageSessionAttribute ( EntityEditViewBean . UNIVERSAL_ID ) ; EntitiesModel model = ( EntitiesModel ) getModel ( ) ; if ( model . hasUserAttributeSchema ( serviceName ) ) { unlockPageTrailForSwapping ( ) ; fowardToAddServiceViewBean ( model , universalId , serviceName ) ; } else { try { model . assignService ( universalId , serviceName , Collections . EMPTY_MAP ) ; forwardToEntityServiceViewBean ( ) ; } catch ( AMConsoleException e ) { setInlineAlertMessage ( CCAlert . TYPE_ERROR , "message.error" , e . getMessage ( ) ) ; forwardTo ( ) ; } } }
handles assigned button request .
