public static String removeAdditionalParty(HttpServletRequest request,HttpServletResponse response){
  ShoppingCart cart=getCartObject(request);
  String partyId=request.getParameter("additionalPartyId");
  String roleTypeId[]=request.getParameterValues("additionalRoleTypeId");
  List<String> eventList=new LinkedList<String>();
  Locale locale=UtilHttp.getLocale(request);
  int i;
  if (UtilValidate.isEmpty(partyId) || roleTypeId.length < 1) {
    request.setAttribute("_ERROR_MESSAGE_",UtilProperties.getMessage(resource_error,"OrderPartyIdAndOrRoleTypeIdNotDefined",locale));
    return "error";
  }
  if (request.getAttribute("_EVENT_MESSAGE_LIST_") != null) {
    List<String> msg=UtilGenerics.checkList(request.getAttribute("_EVENT_MESSAGE_LIST_"));
    eventList.addAll(msg);
  }
  for (i=0; i < roleTypeId.length; i++) {
    try {
      cart.removeAdditionalPartyRole(partyId,roleTypeId[i]);
    }
 catch (    Exception e) {
      Debug.logInfo(e.getLocalizedMessage(),module);
      eventList.add(e.getLocalizedMessage());
    }
  }
  request.removeAttribute("_EVENT_MESSAGE_LIST_");
  request.setAttribute("_EVENT_MESSAGE_LIST_",eventList);
  return "success";
}

public static String removeAdditionalParty ( HttpServletRequest request , HttpServletResponse response ) { ShoppingCart cart = getCartObject ( request ) ; String partyId = request . getParameter ( "additionalPartyId" ) ; String roleTypeId [ ] = request . getParameterValues ( "additionalRoleTypeId" ) ; List < String > eventList = new LinkedList < String > ( ) ; Locale locale = UtilHttp . getLocale ( request ) ; int i ; if ( UtilValidate . isEmpty ( partyId ) || roleTypeId . length < 1 ) { request . setAttribute ( "_ERROR_MESSAGE_" , UtilProperties . getMessage ( resource_error , "OrderPartyIdAndOrRoleTypeIdNotDefined" , locale ) ) ; return "error" ; } if ( request . getAttribute ( "_EVENT_MESSAGE_LIST_" ) != null ) { List < String > msg = UtilGenerics . checkList ( request . getAttribute ( "_EVENT_MESSAGE_LIST_" ) ) ; eventList . addAll ( msg ) ; } for ( i = 0 ; i < roleTypeId . length ; i ++ ) { try { cart . removeAdditionalPartyRole ( partyId , roleTypeId [ i ] ) ; } catch ( Exception e ) { Debug . logInfo ( e . getLocalizedMessage ( ) , module ) ; eventList . add ( e . getLocalizedMessage ( ) ) ; } } request . removeAttribute ( "_EVENT_MESSAGE_LIST_" ) ; request . setAttribute ( "_EVENT_MESSAGE_LIST_" , eventList ) ; return "success" ; }
removes a previously associated party to order
