< 上一课

第 8 课后已完成的 updatecustomer.egl 文件

此代码是 updatecustomer.egl 文件的已完成版本。如果在文件中看到用红色 X 符号标记的任何错误,请确保您的代码与此代码相匹配:
package jsfhandlers;

import eglderbydb.access.CustomerLib;
import eglderbydb.data.*;
import com.ibm.egl.jsf.*;
import eglderbydb.StatusRec;

handler updatecustomer type JSFHandler
	{onConstructionFunction = onConstruction, 
	 onPrerenderFunction = onPrerender, 
 	 view = "updatecustomer.jsp",
 	 viewRootVar = viewRoot} 

	viewRoot UIViewRoot;
	customer Customer;
	status StatusRec;
		
	// Function Declarations
	function onConstruction()
	end

	function onPrerender(CID INT)
		customer.customerId = CID;
		CustomerLib.GetCustomer(customer, status);
	end
	
	function updateRecord()
		CustomerLib.UpdateCustomer(customer, status);
		forward to "allcustomers";
	end
end

返回至第 8 课:创建更新页面

< 上一课

反馈