I'm using SmartGWTPower-2.3 and Firefox 3.6.8. This does not happen using I.E. 8
I have a DynamicForm form, with a textItem, name, that must be unique to a specified table in the database on a remote server. That table is also represented in the form in a ListGrid. I define the validator in the ds.xml file:
When I enter a duplicate name, the invalid icon appears next to the name textItem, as expected. Then I hit the Save button and before saving the form the code checks for validation errors by calling isValid().
Although the invalid icon is still displayed in the form, indicating an error, form.hasErrors() returns false. If I hit the Save button again, form.hasErrors() will return true, and continue to return true until I exit the current form.
What causes the form.hasErrors() to return false on the first attempt?
When using I.E. form.hasErrors() will return true everytime when there is an error on the form.
I have a DynamicForm form, with a textItem, name, that must be unique to a specified table in the database on a remote server. That table is also represented in the form in a ListGrid. I define the validator in the ds.xml file:
Code:
<field name="name" length="51" type="text"> <validators> <validator type="isUnique" requiresServer="true" /> </validators> </field>
Code:
public Boolean isValid(){ if (form.hasErrors()){ SC.logWarn("form.hasErrors is true"); return false; } SC.logWarn("form.hasErrors is false"); return true; }
What causes the form.hasErrors() to return false on the first attempt?
When using I.E. form.hasErrors() will return true everytime when there is an error on the form.
Comment