@Component(parameters = {"value=message:button.value.cancel"})
private Submit cancelButton;
private boolean isCancelButtonPressed;
@OnEvent(component = "cancelButton", value = EventConstants.SELECTED)
void onSelectedFromCancelButton()
{
isCancelButtonPressed = true;
editForm.clearErrors();
}
@CommitAfter
@OnEvent(value = EventConstants.SUCCESS)
Class onSuccess()
{
if (!isCancelButtonPressed)
shipmentOrderDAO.doSave(entity);
return BrowseOrder.class;
}
with regards
Sven Homburg
Founder of the Chenille Kit Project
http://chenillekit.codehaus.org
2010/1/29 Kiss Izolda <[email protected]>
> Hi,
>
> I have forms with param clientValidation="true". I need two buttons: one
> submit and one back. As I havn't found any better solution I have iplemented
> the back button as org.apache.tapestry5.corelib.components.Sumbit (Java code
> has to be run before returning to the previous page). The problem is when
> the back button is peressed fields with param validate="required" can't be
> empty.
> I migth need some component like "ActionButton" which functions as an
> action link and is rendered as input type="button". (I guess I could trick
> simulating function of an action link by adding an onlick param to the
> button, but hope there does a proper solution exist.)
>
> thanks in advance
>
> Izolda
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>