if(iwc.isParameterSet("show_old_users")){
if(iwc.isParameterSet(PARAM_NAME_SHOW_OLD)){ showUsers(sql); } if(iwc.isParameterSet(PARAM_NAME_CREATE_OLD)) { createOldUser(iwc);
	public void main(IWContext iwc)throws Exception{		df = DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT,iwc.getCurrentLocale());		String sql = iwc.getParameter("user_select_sql");						Form form = new Form();		TextArea ta = new TextArea("users_select_sql");		ta.keepStatusOnAction(true);		ta.setColumns(70);		ta.setRows(10);		int row = 1;		Table table = new Table();		table.add("Tranforms selected users from old user to new user",1,row++);		table.add(ta,1,row++);		SubmitButton fix = new SubmitButton("Transform users", "transform_old_users", "true");		SubmitButton show = new SubmitButton("Show users", "show_old_users", "true");		table.add(show,1,row);		table.add(fix,1,row);		row++;		CheckBox requireGroupCreation = new CheckBox("req_grp_crtn","true");		table.add(requireGroupCreation,1,row);		table.add("User group creation required (else user id without group created shown in log) ",1,row++);		CheckBox moveGroups = new CheckBox("reg_mv_grp", "true");		table.add(moveGroups, 1, row);		table.add("Move group that are in the way of ic_user_representative groups (relations will not be lost)", 1, row++);				BusyBar busyBar = new BusyBar("fix_busy");		busyBar.addBusyObject(fix);		busyBar.addBusyObject(show);		table.add(busyBar,1,row++);		table.add("DEFAULT SQL: "+getDefaultUserSelectSQL(),1,row++);		table.add("WARNING: Only select fields  \"ic_user_id, first_name,middle_name,last_name,user_representative\" in same order",1,row++);		form.add(table);		add(form);		if(iwc.isParameterSet("transform_old_users")){			runFix(iwc.getParameter("user_select_sql"),iwc.isParameterSet("req_grp_crtn"), iwc.isParameterSet("reg_mv_grp"));			showUsers(sql);		}		if(iwc.isParameterSet("show_old_users")){			showUsers(sql);		}	}