public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
  submitCycle=true;
  DelegationModel model=(DelegationModel)getModel();
  String uid=(String)getPageSessionAttribute(CURRENT_IDENTITY);
  AMPropertySheet ps=(AMPropertySheet)getChild(DELEGATION_PROPERTIES);
  String realm=(String)getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
  try {
    PrivilegeXMLBuilder builder=PrivilegeXMLBuilder.getInstance();
    Set privileges=builder.getAllPrivileges(realm,model);
    Map values=ps.getAttributeValues(privileges);
    model.setPrivileges(realm,uid,values);
    setInlineAlertMessage(CCAlert.TYPE_INFO,"message.information","delegation.privilege.updated");
  }
 catch (  AMConsoleException e) {
    setInlineAlertMessage(CCAlert.TYPE_ERROR,"message.error",e.getMessage());
  }
  forwardTo();
}

public void handleButton1Request ( RequestInvocationEvent event ) throws ModelControlException { submitCycle = true ; DelegationModel model = ( DelegationModel ) getModel ( ) ; String uid = ( String ) getPageSessionAttribute ( CURRENT_IDENTITY ) ; AMPropertySheet ps = ( AMPropertySheet ) getChild ( DELEGATION_PROPERTIES ) ; String realm = ( String ) getPageSessionAttribute ( AMAdminConstants . CURRENT_REALM ) ; try { PrivilegeXMLBuilder builder = PrivilegeXMLBuilder . getInstance ( ) ; Set privileges = builder . getAllPrivileges ( realm , model ) ; Map values = ps . getAttributeValues ( privileges ) ; model . setPrivileges ( realm , uid , values ) ; setInlineAlertMessage ( CCAlert . TYPE_INFO , "message.information" , "delegation.privilege.updated" ) ; } catch ( AMConsoleException e ) { setInlineAlertMessage ( CCAlert . TYPE_ERROR , "message.error" , e . getMessage ( ) ) ; } forwardTo ( ) ; }
handles save button request .
