PDA

View Full Version : [CLOSED] AutoFitErrors="false" for all FormPanels in a page ?



Peter.Treier
Aug 11, 2016, 8:57 AM
Hello,

I was wondering if it was possible to assign a global default parameter for all FormPanels in a page.



ext:FormPanel ID="FormTest" runat="server" Frame="true" MonitorValid="true">
<Defaults>
<ext:Parameter Name="AllowBlank" Value="false" Mode="Raw" />
<ext:Parameter Name="msgTarget" Value="side" Mode="Value" />
<ext:Parameter Name="AutoFitErrors" Value="false" Mode="Raw" />
</Defaults>
...


Just as you can do with a normal Form, using the "Defaults" tag, but for all the page...

Is that somehow possible?

Thanks in advance for the answer.

fabricio.murta
Aug 11, 2016, 9:00 PM
Hello Peter!

All components supports this <Default> block, and its scope applies to whichever components are enclosed by it.

For example, if your page is enclosed in a <ext:ViewPort />, you can define the defaults there as you shown in your code snippet, and they should apply for anything inside the viewport.

If you don't use a viewport to enclose all components in the page though, I can suggest you to wrap the page in a <ext:container />, provided for some reason using the viewport is undesired for you (for example if you have the viewport on a master page and don't want the defaults everywhere on the website).

I hope this helps!

fabricio.murta
Sep 02, 2016, 9:04 PM
Hello!

We didn't hear back from you for some days now. Did the above help you at all?