public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
  ServerSiteModel model=(ServerSiteModel)getModel();
  AMPropertySheet ps=(AMPropertySheet)getChild(PROPERTY_ATTRIBUTE);
  String serverName=(String)getPageSessionAttribute(PG_ATTR_SERVER_NAME);
  String name=(String)getDisplayFieldValue(TF_NAME);
  name=name.trim();
  if (name.length() > 0) {
    try {
      model.cloneServer(serverName,name);
      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","serverconfig.clone.server.missing.atributes");
    forwardTo();
  }
}

public void handleButton1Request ( RequestInvocationEvent event ) throws ModelControlException { ServerSiteModel model = ( ServerSiteModel ) getModel ( ) ; AMPropertySheet ps = ( AMPropertySheet ) getChild ( PROPERTY_ATTRIBUTE ) ; String serverName = ( String ) getPageSessionAttribute ( PG_ATTR_SERVER_NAME ) ; String name = ( String ) getDisplayFieldValue ( TF_NAME ) ; name = name . trim ( ) ; if ( name . length ( ) > 0 ) { try { model . cloneServer ( serverName , name ) ; 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" , "serverconfig.clone.server.missing.atributes" ) ; forwardTo ( ) ; } }
handles clone server request .
