function genericHandlerSingleRowWorkPatTable(THnd, prefix, tblId) {
	
	this.gTblHnd = THnd;
	this.prefix = prefix;
	this.tblId = tblId;
	_initialize = function() {
		console.log("@@@ genericHandlerSingleRowWorkPatTable:: init called");
	};
	
	this.doOnLoad = function(xxtablepara, xxtablecaption) {
		try {
			console.log("@@@ DEBUG:: genericHandlerSingleRowWorkPatTable::doOnLoad("+this.tblId+") called.");

			document.getElementById("xx" + this.prefix+"tablepara").innerHTML = xxtablepara; //"This is the table instructions.";
			document.getElementById("xx" + this.prefix+"tablecaption").innerHTML = xxtablecaption; //"This is the table caption.";
			
			this.gTblHnd.onClearRowData(); // ensure the table is clear
			
			//
			// isNewRecord is returning null for a new record and false otherwise
			// will use the false state to detemine a saved record.
			//
			if (g_form.isNewRecord()==false) {
				// if the summary variables are populated
				// populate the table row with the information.
				// This will only happen following submission of the form with data.
				console.log("@@@ DEBUG:: genericHandlerSingleRowWorkPatTable:: NOT a new record");
				var wps1 = g_form.getValue("Wpat"+this.prefix+"SummaryRow1");
				console.log("@@@ DEBUG:: genericHandlerSingleRowWorkPatTable:: HR_WorkPatternTable_onLoad WPS1= {" + wps1 + "}");
				if(wps1!="") {
					this.gTblHnd.setRowData(1, wps1);
				}
				
				// now the table is populated make it read-only (disabled)
				this.gTblHnd.setDisabledState(true);
			}
		} catch (err)
		{
			console.log("@@@ An error occurred in genericHandlerSingleRowWorkPatTable::doOnLand, message="+err.message);
		}
		return;
	};
	
	this.doOnSubmit = function() {
		try {
			var errRep = "on the "+this.tblId+" Work hours and work pattern table";
			var row = 1; // only one row
			var error = false; // be positive.
			
			if(this.gTblHnd.isRowValid(row)!=true)
			{
				errRep += "Row "+row;
				error = true; // error found
			}
			
			errRep += " has errors. Incorrect forms can not be submitted.\n";
			
			if(error) // found validation error(s) on the table alert the user and return false
				{
				alert(errRep);
				console.log("@@@ table reports errors.");
				return false;
			}
			else // row 1 is the only row that must have data.
				{
					if(this.gTblHnd.isEmptyRow(1)==true) {
						// report row one needs completing
						alert("The "+this.tblId+" Work hours and work pattern table, must contain a valid date(if shown), hours and work pattern, before the form can be submitted.");
						console.log("@@@ table reports errors.");
						return false;
					}
					// row one has data and it is valid
										
					// write the packed data to the summary variable.
					g_form.setValue("Wpat"+this.prefix+"SummaryRow1", this.gTblHnd.getRowData(1)); // required
					
					console.log("@@@ processing table ["+this.tblId+"] Wpat"+this.prefix+"SummaryRow1"  + g_form.getValue("Wpat"+this.prefix+"SummaryRow1"));
				}
				
				return true; // valid form
			} catch (err)
			{
				console.log("@@@ An error occurred in genericHandlerSingleRowWorkPatTable::doOnSubmit, message="+err.message);
			}
			return;
		};
	
		this.type = 'genericHandlerSingleRowWorkPatTable';
		_initialize();
	
	}
