< 上一個課程

第 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 課:建立更新頁面

< 上一個課程

意見