question: public void handleButton1Request ( RequestInvocationEvent event ) throws ModelControlException { submitCycle = true ; EntitiesModel model = ( EntitiesModel ) getModel ( ) ; AMPropertySheet prop = ( AMPropertySheet ) getChild ( PROPERTY_ATTRIBUTE ) ; String entityType = ( String ) getPageSessionAttribute ( ENTITY_TYPE ) ; String entityName = ( String ) propertySheetModel . getValue ( ENTITY_NAME ) ; entityName = entityName . trim ( ) ; try { Map defaultValues = model . getDefaultAttributeValues ( entityType , null , true ) ; Map values = prop . getAttributeValues ( defaultValues . keySet ( ) ) ; String realmName = ( String ) getPageSessionAttribute ( AMAdminConstants . CURRENT_REALM ) ; model . createEntity ( realmName , entityName , entityType , values ) ; forwardToEntitiesViewBean ( ) ; } catch ( AMConsoleException e ) { setInlineAlertMessage ( CCAlert . TYPE_ERROR , "message.error" , e . getMessage ( ) ) ; forwardTo ( ) ; } }
target:  Handles create realm request.