PDA

View Full Version : Simple Window.show() not working



Tbaseflug
May 23, 2012, 3:15 PM
I have a simple function - through which I am just trying to show a window - the alert is working - but the window is not showing? I noticed that - via an attached JS file - I am having a hard time in picking up calls to controls - but this case, just will not show the window - even though the alert is firing, etc. and see nothing that would prohibit this.



function addNote(id) {
alert(id);
Window3.show();
}



And here is my simple window



<ext:Window runat="server" ID="Window3" Modal="true" Width="850" Height="200" Hidden="true">
<Items>
<ext:Panel runat="server" ID="test1">
</ext:Panel>
</Items>
</ext:Window>

Vladimir
May 23, 2012, 3:32 PM
Try this


App.Window3.show();

Tbaseflug
May 23, 2012, 3:35 PM
That seemed to do the trick - what is the relevance of "App." now in 2.0? Do I need to use it for all controls?

Vladimir
May 23, 2012, 3:37 PM
See #90 of Changelog



90. ResourceManager Namespace is "App" by default. Any widget will share own client id in that namespace.


Example (client side)

//Old
TextField1.setValue("Hello World!");


//New
App.TextField1.setValue("Hello World!");


or


//New
#{TextField1}.setValue("Hello World!");


You can set up an empty Namespace to get the same as it's in Ext.NET v1.


Example


<ext:ResourceManager runat="server" Namespace="" />