RE: ext:Label in FormLayout
Hi Mrozik,
Are you running some custom validation logic that makes a call to the .isValid() function()? Maybe you could post a full sample which demonstrates how to reproduce the issue.
RE: ext:Label in FormLayout
I forgot to mention, placing an <ext:Label> control inside a FormPanel is not a problem.
Somewhere a script is making a call to the .isValid() function of a Label, but the Label does not have that function. I'm unsure if the call is being made from our script or a custom script.
RE: ext:Label in FormLayout
A piece of code (dynamic) that causes exception is:
var valid=true;this.form.items.each(function(f){if(!f. isValid(true)){valid=false;return false;}})
- 'f' variable points to my label ctl00_pageContentPlaceHolderCenter_labelRodzaj
- full code of page is in attachment.
As I know our code doesn't do nothing special - only save button check form valid:
Code:
<Click OnEvent="FormSave" Before="var valid= #{FormPanel1}.getForm().isValid(); if(valid){#{FormStatusBar}.showBusy('Saving form...');} return valid;">
<EventMask ShowMask="true" MinDelay="1000" Target="CustomTarget" CustomTarget="={#{FormPanel1}.getEl()}" />
</Click>
Thanks for your help
Mrozik
RE: ext:Label in FormLayout
Hi Mrozik,
I'm not sure if you're still having an issue or not? The call to FormPanel1.getForm().isValid() is correct.
The first chunk of code you posted should be revised as follows:
Example
Code:
var valid=true;this.form.items.each(function(f){if(f.isValid && !f.isValid(true)){valid=false;return false;}})
Notice the extra check of "f.isValid" added to the if statement.
Hope this helps.
RE: ext:Label in FormLayout
Hi,
I'm still looking for solution.
First piece of code I posted is generated on the fly by Coolite library when calling FormPanel1.getForm().isValid() in 'Before' handler - how can I rewrite it to retrieve 'if(f.isValid && !f.isValid(true)' as you wrote?
Mrozik
RE: ext:Label in FormLayout
k. I think I found the issue. There appears to be a defect in the client-side implementation of the MonitorValid property.
We should be able to fix easily.
RE: ext:Label in FormLayout
ok. I've committed a fix to the svn source code repository.
We are expecting to have another public maintenance release (v0.8.2), although no time frame has been set for that release.
If you do not have access to the svn repository, you can work-around the problem by setting MonitorValid="false".
Hope this helps.
RE: ext:Label in FormLayout
Thank you for your fix.
Regards
Mrozik