request.setAttribute("ItemLines",of.getItemLines());
}
if (typeOfOperation != null && typeOfOperation.equals("REMOVEITEM")) {
String removeIDs = request.getParameter("removeID");
StringTokenizer st;
Iterator itr;
Vector removeKeys = new Vector();
((OrderForm)form).convertArrayToItemLines();
((OrderForm)form).convertFormbeanToValueObject("edit");
ItemLines itemLines = ((OrderForm)form).getItemLines();
if (itemLines != null) {
st = new StringTokenizer(removeIDs, ",");
while (st.hasMoreTokens()) {
String str = st.nextToken();
int removeToken = Integer.parseInt(str);
itr = itemLines.keySet().iterator();
while (itr.hasNext()) {
Object obj = itr.next();
ItemElement ILE = (ItemElement)itemLines.get(obj);
IntMember ItemId = (IntMember)ILE.get("ItemId");
Integer currItemId = (Integer)ItemId.getMemberValue();
if (currItemId.intValue() == removeToken) {
String status = ILE.getLineStatus();
if (status.equals("Active")) {
ILE.setLineStatus("Deleted");
} else if (status.equals("New")) {
removeKeys.add(obj);
}
}
}
} // end while (st.hasMoreTokens())
for (int i = 0; i < removeKeys.size(); i++) {
itemLines.remove(removeKeys.get(i));
}
}
((OrderForm)form).setJurisdictionVec(taxJurisdiction);
((OrderForm)form).setItemLines(itemLines);
request.setAttribute("ItemLines",itemLines);
}
if (typeOfOperation != null && typeOfOperation.equals("ADDITEM")) {
String newItemID = request.getParameter("theitemid");
ItemList IL = null;
ListGenerator lg = ListGenerator.getListGenerator(dataSource);
IL = (ItemList)lg.getItemList(individualID, 1, 10, "", "ItemID");
OrderForm orderForm = (OrderForm)form;
orderForm.convertArrayToItemLines();
orderForm.convertFormbeanToValueObject("edit");
StringTokenizer st;
String token, nextItr;
if (newItemID != null) {
st = new StringTokenizer(newItemID, ",");
ItemLines itemLines = (orderForm).getItemLines();
Integer intJurisdictionID = (orderForm).getJurisdictionID();
int jurisdictionID = intJurisdictionID.intValue();
if (itemLines == null) {
itemLines = new ItemLines();
}
int counter = itemLines.size();
while (st.hasMoreTokens()) {
token = (String)st.nextToken();
int intToken = Integer.parseInt(token);
Iterator itr = IL.keySet().iterator();
while (itr.hasNext()) {
nextItr = (String)itr.next();