此程式碼是 allcustomers.egl 檔的已完成版本。如果您在檔案中看到使用紅色 X 符號標示的任何錯誤,請確保您的程式碼與此程式碼相符:
package jsfhandlers;
import eglderbydb.access.CustomerLib;
import eglderbydb.data.*;
import com.ibm.egl.jsf*;
import eglderbydb.StatusRec;
handler allcustomers type JSFHandler
{onConstructionFunction = onConstruction,
onPreRenderFunction = onPreRender,
view = "allcustomers.jsp",
viewRootVar = viewRoot}
viewRoot UIViewRoot;
customers Customer[0];
status StatusRec;
function onConstruction()
end
function onPrerender()
CustomerLib.GetCustomerListAll(customers, status);
end
end
回到第 6 課之後完成的 allcustomers.egl 檔。