Hi,
I have a wizard of 3-steps.
STEP1–>STEP2–>STEP3
I have added the below code (in action snippet for button on step1) to show error message when no row selected for a table in STEP1.
var table = $(‘#CatalogTable’),list,items;var editor = table.data(‘object’).editor;
if (table.length)
{
list = table.data(‘object’).list;
items = list.getSelectedItems();
}
if(!items.length)
{
editor.handleMessages(d
{
message: ‘Please Select an Offer!’,
severity: ‘ERROR’
}
]);
}
else { editor.clearMessages(); }
When I come back to the STEP-1 by clicking on back button from STEP-2,
still the error message being shown on page.
How could I get rid of this ?
Thanks in advance!
Page 1 / 1
Can you add a snippet as an action to your back button to clear messages from the editor?
Hi Raymond,
var table = $(‘#CatalogTable’),list,items;var editor = table.data(‘object’).editor;
editor.clearMessages();
I added above lines as an action snippet for back button.
It works!!!
I thought there could be some other way (declarative) than having a snippet to clear messages
Thank you!
Glad it worked!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.