Este código es la versión finalizada del archivo updatecustomer.egl. Si ve muchos errores marcados por símbolos X rojos en el archivo, asegúrese de que el código coincida con este código:
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;
// Declaraciones de función
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
Volver a Lección 8: Crear una página de actualización.