runnerTable.add(getText(runner.getUser().getName()), 1, runRow);
if (runner.getUser() != null) { runnerTable.add(getText(runner.getUser().getName()), 1, runRow); } else { runnerTable.add(getText(runner.getName()), 1, runRow); }
	private void stepSix(IWContext iwc) throws RemoteException {		Form form = new Form();		form.maintainParameter(PARAMETER_PERSONAL_ID);		form.addParameter(PARAMETER_ACTION, "-1");				Table table = new Table();		table.setCellpadding(0);		table.setCellspacing(0);		table.setWidth(Table.HUNDRED_PERCENT);		form.add(table);		int row = 1;		table.add(getPhasesTable(isIcelandic ? 6 : 5, isIcelandic ? 7 : 6, "run_reg.payment_info", "Payment info"), 1, row++);		table.setHeight(row++, 12);		table.add(getInformationTable(localize("run_reg.information_text_step_6", "Information text 6...")), 1, row++);		table.setHeight(row++, 18);				Map runners = (Map) iwc.getSessionAttribute(SESSION_ATTRIBUTE_RUNNER_MAP);		Table runnerTable = new Table();		runnerTable.setWidth(Table.HUNDRED_PERCENT);		runnerTable.setCellspacing(0);		runnerTable.add(getHeader(localize("run_reg.runner_name", "Runner name")), 1, 1);		runnerTable.add(getHeader(localize("run_reg.run", "Run")), 2, 1);		runnerTable.add(getHeader(localize("run_reg.distance", "Distance")), 3, 1);		runnerTable.add(getHeader(localize("run_reg.price", "Price")), 4, 1);		table.add(runnerTable, 1, row++);		table.setHeight(row++, 18);		int runRow = 2;				float totalAmount = 0;		int chipsToBuy = 0;		Iterator iter = runners.values().iterator();		while (iter.hasNext()) {			Runner runner = (Runner) iter.next();			runnerTable.add(getText(runner.getUser().getName()), 1, runRow);			runnerTable.add(getText(localize(runner.getRun().getName(), runner.getRun().getName())), 2, runRow);			runnerTable.add(getText(localize(runner.getDistance().getName(), runner.getDistance().getName())), 3, runRow);			float runPrice = getRunBusiness(iwc).getPriceForRunner(runner, iwc.getCurrentLocale(), chipDiscount);			totalAmount += runPrice;			runnerTable.add(getText(formatAmount(iwc.getCurrentLocale(), runPrice)), 4, runRow++);						if (runner.isBuyChip()) {				chipsToBuy++;			}		}				int numberOfChildren = getRunBusiness(iwc).getNumberOfChildren(runners.values());		if (numberOfChildren > 1) {			float childrenDiscount = -(numberOfChildren * childDiscount);			totalAmount += childrenDiscount;						runnerTable.setHeight(runRow++, 12);			runnerTable.add(getText(localize("run_reg.family_discount", "Family discount")), 1, runRow);			runnerTable.add(getText(formatAmount(iwc.getCurrentLocale(), childrenDiscount)), 4, runRow++);		}				if (chipsToBuy > 0) {			float totalChips = chipsToBuy * price;			totalAmount += totalChips;						runnerTable.setHeight(runRow++, 12);			runnerTable.add(getText(chipsToBuy + "x " + localize("run_reg.multi_use_chips", "Multi use chips")), 1, runRow);			runnerTable.add(getText(formatAmount(iwc.getCurrentLocale(), totalChips)), 4, runRow++);		}				runnerTable.setHeight(runRow++, 12);		runnerTable.add(getHeader(localize("run_reg.total_amount", "Total amount")), 1, runRow);		runnerTable.add(getHeader(formatAmount(iwc.getCurrentLocale(), totalAmount)), 4, runRow);		runnerTable.setColumnAlignment(4, Table.HORIZONTAL_ALIGN_RIGHT);		Table creditCardTable = new Table();		creditCardTable.setWidth(Table.HUNDRED_PERCENT);		creditCardTable.setWidth(1, "50%");		creditCardTable.setWidth(3, "50%");		creditCardTable.setWidth(2, 12);		creditCardTable.setColumns(3);		creditCardTable.setCellspacing(0);		creditCardTable.setCellpadding(0);		table.setTopCellBorder(1, row, 1, "#D7D7D7", "solid");		table.setCellpaddingBottom(1, row++, 6);		table.add(creditCardTable, 1, row++);		int creditRow = 1;				creditCardTable.add(getHeader(localize("run_reg.credit_card_information", "Credit card information")), 1, creditRow);		Collection images = getRunBusiness(iwc).getCreditCardImages();		if (images != null) {			Iterator iterator = images.iterator();			while (iterator.hasNext()) {				Image image = (Image) iterator.next();				creditCardTable.add(image, 3, creditRow);				if (iterator.hasNext()) {					creditCardTable.add(Text.getNonBrakingSpace(), 3, creditRow);				}			}		}		creditCardTable.setAlignment(3, creditRow++, Table.HORIZONTAL_ALIGN_RIGHT);		creditCardTable.setHeight(creditRow++, 12);		TextInput nameField = (TextInput) getStyledInterface(new TextInput(PARAMETER_NAME_ON_CARD));		nameField.setAsNotEmpty(localize("run_reg.must_supply_card_holder_name", "You must supply card holder name"));		nameField.keepStatusOnAction(true);				TextInput ccv = (TextInput) getStyledInterface(new TextInput(PARAMETER_CCV));		ccv.setLength(3);		ccv.setMaxlength(3);		ccv.setMininumLength(3, localize("run_reg.not_valid_ccv", "Not a valid CCV number"));		ccv.setAsIntegers(localize("run_reg.not_valid_ccv", "Not a valid CCV number"));		ccv.setAsNotEmpty(localize("run_reg.must_supply_ccv", "You must enter the CCV number"));		ccv.keepStatusOnAction(true);				IWTimestamp stamp = new IWTimestamp();		DropdownMenu month = (DropdownMenu) getStyledInterface(new DropdownMenu(PARAMETER_EXPIRES_MONTH));		for (int a = 1; a <= 12; a++) {			month.addMenuElement(a < 10 ? "0" + a : String.valueOf(a), a < 10 ? "0" + a : String.valueOf(a));		}		month.keepStatusOnAction(true);		DropdownMenu year = (DropdownMenu) getStyledInterface(new DropdownMenu(PARAMETER_EXPIRES_YEAR));		for (int a = stamp.getYear(); a <= stamp.getYear() + 8; a++) {			year.addMenuElement(String.valueOf(a).substring(2), String.valueOf(a));		}		year.keepStatusOnAction(true);				creditCardTable.add(getHeader(localize("run_reg.card_holder", "Card holder")), 1, creditRow);		creditCardTable.add(getHeader(localize("run_reg.card_number", "Card number")), 3, creditRow++);		creditCardTable.add(nameField, 1, creditRow);		for (int a = 1; a <= 4; a++) {			TextInput cardNumber = (TextInput) getStyledInterface(new TextInput(PARAMETER_CARD_NUMBER + "_" + a));			cardNumber.setLength(4);			cardNumber.setMaxlength(4);			cardNumber.setMininumLength(4, localize("run_reg.not_valid_card_number", "Not a valid card number"));			cardNumber.setAsIntegers(localize("run_reg.not_valid_card_number", "Not a valid card number"));			cardNumber.setAsNotEmpty(localize("run_reg.must_supply_card_number", "You must enter the credit card number"));			cardNumber.keepStatusOnAction(true);			creditCardTable.add(cardNumber, 3, creditRow);			if (a != 4) {				creditCardTable.add(Text.getNonBrakingSpace(), 3, creditRow);			}		}		creditRow++;		creditCardTable.setHeight(creditRow++, 3);		creditCardTable.add(getHeader(localize("run_reg.card_expires", "Card expires")), 1, creditRow);		creditCardTable.add(getHeader(localize("run_reg.ccv_number", "CCV number")), 3, creditRow++);		creditCardTable.add(month, 1, creditRow);		creditCardTable.add(getText("/"), 1, creditRow);		creditCardTable.add(year, 1, creditRow);		creditCardTable.add(ccv, 3, creditRow++);				TextInput emailField = (TextInput) getStyledInterface(new TextInput(PARAMETER_CARD_HOLDER_EMAIL));		emailField.setAsEmail(localize("run_reg.email_err_msg", "Not a valid email address"));		emailField.setWidth(Table.HUNDRED_PERCENT);		emailField.keepStatusOnAction(true);				creditCardTable.setHeight(creditRow++, 3);		creditCardTable.add(getHeader(localize("run_reg.card_holder_email", "Email")), 1, creditRow++);		creditCardTable.add(emailField, 1, creditRow++);		creditCardTable.add(new HiddenInput(PARAMETER_AMOUNT, String.valueOf(totalAmount)));		creditCardTable.setHeight(creditRow++, 18);		creditCardTable.mergeCells(1, creditRow, creditCardTable.getColumns(), creditRow);		creditCardTable.add(getText(localize("run_reg.read_conditions", "Please read before you finish your payment") + ": "), 1, creditRow);				Help help = new Help();		help.setHelpTextBundle(IWMarathonConstants.IW_BUNDLE_IDENTIFIER);		help.setHelpTextKey("terms_and_conditions");		help.setShowAsText(true);		help.setLinkText(localize("run_reg.terms_and_conditions", "Terms and conditions"));		creditCardTable.add(help, 1, creditRow);		SubmitButton previous = (SubmitButton) getButton(new SubmitButton(localize("previous", "Previous")));		previous.setValueOnClick(PARAMETER_ACTION, String.valueOf(ACTION_STEP_FIVE));		SubmitButton next = (SubmitButton) getButton(new SubmitButton(localize("run_reg.pay", "Pay")));		next.setValueOnClick(PARAMETER_ACTION, String.valueOf(ACTION_SAVE));		table.setHeight(row++, 18);		table.add(previous, 1, row);		table.add(Text.getNonBrakingSpace(), 1, row);		table.add(next, 1, row);		table.setAlignment(1, row, Table.HORIZONTAL_ALIGN_RIGHT);		add(form);	}