public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
  String acsUrl=getDisplayFieldStringValue("SalesforceLoginURL");
  try {
    if ((acsUrl != null) && (acsUrl.length() > 0)) {
      String realm=(String)getPageSessionAttribute("entityRealm");
      String entityId=(String)getPageSessionAttribute(ENTITY_ID);
      TaskModel model=(TaskModel)getModelInternal();
      model.setAcsUrl(realm,entityId,acsUrl);
      redirectToHome();
    }
 else     if ((acsUrl == null) || !(acsUrl.length() > 0)) {
      ConfigureSalesForceAppsFinishWarningViewBean vb=(ConfigureSalesForceAppsFinishWarningViewBean)getViewBean(ConfigureSalesForceAppsFinishWarningViewBean.class);
      vb.forwardTo(getRequestContext());
    }
  }
 catch (  AMConsoleException e) {
    setInlineAlertMessage(CCAlert.TYPE_ERROR,"message.error",e.getMessage());
  }
}

public void handleButton1Request ( RequestInvocationEvent event ) throws ModelControlException { String acsUrl = getDisplayFieldStringValue ( "SalesforceLoginURL" ) ; try { if ( ( acsUrl != null ) && ( acsUrl . length ( ) > 0 ) ) { String realm = ( String ) getPageSessionAttribute ( "entityRealm" ) ; String entityId = ( String ) getPageSessionAttribute ( ENTITY_ID ) ; TaskModel model = ( TaskModel ) getModelInternal ( ) ; model . setAcsUrl ( realm , entityId , acsUrl ) ; redirectToHome ( ) ; } else if ( ( acsUrl == null ) || ! ( acsUrl . length ( ) > 0 ) ) { ConfigureSalesForceAppsFinishWarningViewBean vb = ( ConfigureSalesForceAppsFinishWarningViewBean ) getViewBean ( ConfigureSalesForceAppsFinishWarningViewBean . class ) ; vb . forwardTo ( getRequestContext ( ) ) ; } } catch ( AMConsoleException e ) { setInlineAlertMessage ( CCAlert . TYPE_ERROR , "message.error" , e . getMessage ( ) ) ; } }
handles finish button request .
