public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
  ServerSiteModel model=(ServerSiteModel)getModel();
  AMPropertySheet ps=(AMPropertySheet)getChild(PROPERTY_ATTRIBUTE);
  String name=(String)getDisplayFieldValue(TF_NAME);
  name=name.trim();
  String url=(String)getDisplayFieldValue(TF_URL);
  url=url.trim();
  if ((name.length() > 0) && (url.length() > 0)) {
    try {
      model.createSite(name,url);
      backTrail();
      ServerSiteViewBean vb=(ServerSiteViewBean)getViewBean(ServerSiteViewBean.class);
      passPgSessionMap(vb);
      vb.forwardTo(getRequestContext());
    }
 catch (    AMConsoleException e) {
      setInlineAlertMessage(CCAlert.TYPE_ERROR,"message.error",e.getMessage());
      forwardTo();
    }
  }
 else {
    setInlineAlertMessage(CCAlert.TYPE_ERROR,"message.error",model.getLocalizedString("serverconfig.create.site.missing.attributes"));
    forwardTo();
  }
}

public void handleButton1Request ( RequestInvocationEvent event ) throws ModelControlException { ServerSiteModel model = ( ServerSiteModel ) getModel ( ) ; AMPropertySheet ps = ( AMPropertySheet ) getChild ( PROPERTY_ATTRIBUTE ) ; String name = ( String ) getDisplayFieldValue ( TF_NAME ) ; name = name . trim ( ) ; String url = ( String ) getDisplayFieldValue ( TF_URL ) ; url = url . trim ( ) ; if ( ( name . length ( ) > 0 ) && ( url . length ( ) > 0 ) ) { try { model . createSite ( name , url ) ; backTrail ( ) ; ServerSiteViewBean vb = ( ServerSiteViewBean ) getViewBean ( ServerSiteViewBean . class ) ; passPgSessionMap ( vb ) ; vb . forwardTo ( getRequestContext ( ) ) ; } catch ( AMConsoleException e ) { setInlineAlertMessage ( CCAlert . TYPE_ERROR , "message.error" , e . getMessage ( ) ) ; forwardTo ( ) ; } } else { setInlineAlertMessage ( CCAlert . TYPE_ERROR , "message.error" , model . getLocalizedString ( "serverconfig.create.site.missing.attributes" ) ) ; forwardTo ( ) ; } }
handles create site request .
