Go Back   SmartClient Forums > Technical Q&A
Wiki Register Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 20th Mar 2012, 08:15
yavery yavery is offline
Registered Developer
 
Join Date: Oct 2008
Posts: 408
Default SearchForm vs. "required" fields issue

Hi,

I have an issue with the SearchForm component vs. "required" fields. The problem is that
fields marked as "required" in the data source, initially show up properly, but as soon as a
validation fails, it forgets about the "hiliteRequiredFields=false" it should be observing ...

To reproduce, you can use the following code in the ISC Feature Explorer :

Code:
isc.SearchForm.create
({
    ID: "boundForm",
    dataSource: "builtins",
    fields :
[
  { name : 'intField1' },
  { name : 'intField2' },
  { name : 'intField3' }
]
});
Code:
<DataSource ID="builtins">
    <fields>
        <field name="intField1" type="integer" title="Integer" required="true"/>
        <field name="intField2" type="integer" title="Integer" required="true"/>
        <field name="intField3" type="integer" title="Integer"/>
        <field name="intField4" type="integer" title="Integer"/>
    </fields>
</DataSource>
The scenario :

1) Fields initially display properly.
2) Go to each of the fields and enter alpha data (a,b,c,...) to trigger the numeric validation failure.
3) Go back to each of the fields and clear the data, to remove the validation failure.
4) You will notice that intField1 and intField2 which are marked "required" in the datasource will
not clear their bold captions, validation icons, etc ... intField3 works as expected.

Is this a known issue ? Is there any way around this behavior ?

Thanks,
Reply With Quote
  #2  
Old 21st Mar 2012, 12:55
Isomorphic Isomorphic is online now
Administrator
 
Join Date: May 2006
Posts: 35,695
Default

How are you triggering validation on this test case?
We tweaked the test to make it run in the feature explorer:
Code:
isc.DataSource.create({
ID:"builtins",
fields:[
{name:"intField1", type:"integer", title:"Integer", required:true},
{name:"intField2", type:"integer", title:"Integer", required:true},
{name:"intField3", type:"integer", title:"Integer"},
{name:"intField4", type:"integer", title:"integer"}

]
});


isc.SearchForm.create
({
    ID: "boundForm",
    dataSource: "builtins",
    fields :
[
  { name : 'intField1' },
  { name : 'intField2' },
  { name : 'intField3' }
]
});
If you then enter "a" into each field, open the developer console and run "boundForm.validate()" the errors show up.
If you clear the errors and again run "boundForm.validate()" the errors are cleared properly.

Can you show us your full test case and step-by-step code to reproduce the problem?

Thanks
Isomorphic Software
Reply With Quote
  #3  
Old 21st Mar 2012, 14:37
yavery yavery is offline
Registered Developer
 
Join Date: Oct 2008
Posts: 408
Default

I just run it as-is. When I enter 'a' in a field and tab to the next field, it gets automatically validated. Then
enter 'a' in that second field and tab to the next, etc, etc ...

I then go back to each of the fields and remove the 'a' value by pressing the delete key. In those fields that
are marked 'required' the validation doesn't go away, whereas in those not marked 'required' it goes away ...

You have the full code in my initial post ... There's no additional code to this.

Let me know if you can't reproduce this. It's quite straight forward.

Thanks,
Reply With Quote
  #4  
Old 21st Mar 2012, 14:41
yavery yavery is offline
Registered Developer
 
Join Date: Oct 2008
Posts: 408
Default

I'm sorry, actually, add the following to the "SearchForm" definition ...

Code:
validateOnExit : true,
Sorry about that. Thanks!
Reply With Quote
  #5  
Old 23rd Mar 2012, 05:53
yavery yavery is offline
Registered Developer
 
Join Date: Oct 2008
Posts: 408
Default

Hi guys,

Were you able to reproduce this ? What's the status ?

Thanks,
Reply With Quote
  #6  
Old 23rd Mar 2012, 13:56
Isomorphic Isomorphic is online now
Administrator
 
Join Date: May 2006
Posts: 35,695
Default

The validateOnExit line was key to reproducing it. Thanks.
This is now fixed - please try the next nightly build (3.0p branch) to pick up the change.
Reply With Quote
  #7  
Old 23rd Mar 2012, 14:52
yavery yavery is offline
Registered Developer
 
Join Date: Oct 2008
Posts: 408
Default

Excellent news ... Tx! I'm assuming it'll also get rolled into 8.2p, right ?

Also, we took a recent 8.2p build (SmartClient_SC_SNAPSHOT-2012-03-13_v82p)
and noticed that the listGrid/treeGrid selectionChanged event has changed behavior
on INTERNET EXPLORER, or does't get fired as it did priorly ... This behavior gap
was noticed when we upgraded from SmartClient_SC_SNAPSHOT-2012-02-09_v82p
to SmartClient_SC_SNAPSHOT-2012-03-13_v82p.

Anyone else reported that ? Fixed lately ?

Thanks,

Last edited by yavery; 24th Mar 2012 at 07:03..
Reply With Quote
  #8  
Old 26th Mar 2012, 14:53
Isomorphic Isomorphic is online now
Administrator
 
Join Date: May 2006
Posts: 35,695
Default

There has been some work around listGrid selection recently. As far as we are aware there are no outstanding holes in this behavior in the latest code. There may have been a temporary regression of some sort in the build you mention. Regardless your best bet on this is to get the latest nightly and if you encounter issues let us know in a new thread so we can take a look at the specific issue you hit.

Thanks
Reply With Quote
  #9  
Old 27th Mar 2012, 09:10
yavery yavery is offline
Registered Developer
 
Join Date: Oct 2008
Posts: 408
Default

There was an issue with ListGrid::selectionChanged() but it turns out to have been fixed in the latest build.

Thanks!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating hidden fields in a list grid ev.kaushik Technical Q&A 13 10th Feb 2014 12:35
Issue with applying a previously saved viewState after adding new fields to a grid senordhuff Technical Q&A 11 17th Feb 2012 22:00
Issue AdvancedCriteria with DateTime Fields chris1978 Smart GWT Technical Q&A 2 13th Dec 2010 02:23
SmartClient 6.5.1:Patch for issue with filter editor and frozen fields Isomorphic Addendums 0 8th Jul 2009 09:54
SmartClient 6.5.1: Patch for issue: Incremental ListGrid fields and canEdit:false Isomorphic Addendums 0 29th Aug 2008 14:11

© 2010,2011 Isomorphic Software. All Rights Reserved