After our recent upgrade to WebMaker 8 we are experiencing errors in a number of forms that seem to be related to the reset action.
In many places where we use tables to display larger or complex records we utilize a popup dialog for editing a record of the table rather than editing all records in place. When the user clicks an "Add" button we use reset container to clear any values form the dialog. In WM8 this reset seems to set pick lists to an "undefined" selectedindex rather than to 0. When the select box is displayed is shows as blank rather than displaying our initial value entry of "--Please Select--". Since the reset also causes all of the onchange events to fire, the form throws errors when it tries to access, for example, a property such as control.options[selectedindex].text.
Is there any way to fix the reset so that the select boxes correctly display the initial option (i.e. set the controls to selectedindex = 0)?
We use "reset field in container" mode=reset
In many places where we use tables to display larger or complex records we utilize a popup dialog for editing a record of the table rather than editing all records in place. When the user clicks an "Add" button we use reset container to clear any values form the dialog. In WM8 this reset seems to set pick lists to an "undefined" selectedindex rather than to 0. When the select box is displayed is shows as blank rather than displaying our initial value entry of "--Please Select--". Since the reset also causes all of the onchange events to fire, the form throws errors when it tries to access, for example, a property such as control.options[selectedindex].text.
Is there any way to fix the reset so that the select boxes correctly display the initial option (i.e. set the controls to selectedindex = 0)?
We use "reset field in container" mode=reset
RE: WM8 reset resulting in errors
I'm sorry you are having an issue with this.
To enable us to investigate further, could you please confirm which patches you have installed for WM8, and also let us know the details of the WebMaker version you have upgraded from.
Many thanks,
Gerard
RE: WM8 reset resulting in errors
On the server we have installed BF patches through 12.4.0.0003
On our workstations, no WM patches are installed
RE: WM8 reset resulting in errors
For info, I think that the WebMaker studio patches should automatically get installed if included in a BizFlow server patch. For example, BizFlow patch 12.4.0.0002.00 included WM patch 8.0.0001. You should be able to check this using the Help - About WebMaker option in the studio.
We will look into this issue and get back to you shortly.
Regards,
Gerard
RE: WM8 reset resulting in errors
I have been looking at this, and have been able to get the same behaviour you have seen.
If you are just trying to clear out the contents of the popup dialog, you might be able to use the 'Clear' mode for the reset fields action instead of 'Reset'. I think this should correctly put the select box back to the 'please select' entry.
If you do need to reset the dialog to some default values, then you will need some script to correct the reset functionality.
I have attached a script file that will hopefully override the default functions to correct the issue. Please add this to your project on the Application Map tab, after changing the file extension back to js.
Hopefully with this file included, the reset functionality will work correctly, but please let me know how you get on.
Regards,
Gerard
RE: WM8 reset resulting in errors
We specifically do not use "clear" because (in earlier versions at least) that would muck up some of the bindings.
In any case, I applied your script fix and that did the trick.
RE: WM8 reset resulting in errors
I'm glad that script has worked for you. We will try and include this fix in a future WebMaker patch.
Regards,
Gerard
RE: WM8 reset resulting in errors
Cool, I'm looking forward to the fix.
RE: WM8 reset resulting in errors
The fix for this issue was included in WebMaker 8 patch 8.0.0003, and should be present by default in WebMaker 9.
I hope this helps.
Regards,
Gerard