Thanks mark
When I redisplay form using
form.showForm("material-type-display-pipeline", data);
it will redisplay the form but the continuation id changes and If I post
the form this point it doesn't execute the correct flow and comes back
with a blank page.
I am trying to have all the messages displayed with an <output> widget
in the form and not have to create a new JXTemplate pipeline as the user
could continue to edit the form even after saving the changes.
Below is a piece of the flow script that I am using.
var msg = form.getWidget("message");
form.save(bean);
try {
if(dispatch != null) {
if(dispatch.equals("create")) {
sproxy.createMaterialType(locale,bean);
dispatch = "update"; //reset to ensure back button
will not create new objects
}else if(dispatch.equals("update")) {
sproxy.updateMaterialType(locale,bean);
}
//Load form with data from DB
bean = sproxy.readMaterialType(locale,bean.name);
form.load(bean);
var args = [bean.name];
var i18nVal = Packages.MessageHandler.getMessage
(inventoryMessages,myForm.locale,"materialType.message.save",args);
msg.value = i18nVal;
}
}catch(ex) {
if(ex instanceof Packages.exceptions.BaseAppException)
{
var i18nVal = Packages.ExceptionHandler.
getWebExceptionMessage(inventoryMessages,myForm.locale,ex);
msg.value = i18nVal;
} else {
throw ex;
}
}
//Redisplay the form with the transaction messages
form.showForm("material-type-display-pipeline", data);
-----Original Message-----
From: Mark Lundquist [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 9:31 AM
To: [EMAIL PROTECTED]
Subject: Re: Cform - Help with redisplaying form after submission
On Apr 6, 2004, at 8:43 AM, Uchenna Igwebuike wrote:
> I have a form that after validation by cocoon, the transaction could
> still fail for some other reasons. I want to redisplay the form with
> some messages after it has been submitted. I cannot seem to use the
> <action> widget for this as it does not perform validation.
You can explicitly redisplay the form from your flow, and use
JXTemplate to implement the failure message(s).
~mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]