PDA

View Full Version : [CLOSED] Access Child items within loader Component



Digital.Dynamics
Jun 12, 2012, 10:33 AM
Hi,

We have a dynamic window created on client side. Within this window, there is a loader that loads another page. This last page include a formPanel as child and other components (like textfield, numberfield,...)

We want to access this FormPanel items and change values without reloading the window loader.

Could you provide an example.

Thanks.

Daniil
Jun 12, 2012, 10:35 AM
Hi,

This one looks a duplicate.
http://forums.ext.net/showthread.php?19482

Can I remove?

Digital.Dynamics
Jun 12, 2012, 10:51 AM
Yes you can, we post twice by error !

Daniil
Jun 12, 2012, 11:35 AM
Done.

Please provide the Loader configuration.

Generally, you can access FormPanel items client side:

FormPanelCliendId.items

Digital.Dynamics
Jun 12, 2012, 12:30 PM
Yes, we access with the items property but in our case no success.

We use the below function to create a new window and load the page "Jobs_Add.aspx" (which is a detail form). We want to keep this template in order to use in all other window. The page and its childs are loading correctly. We use the Ext.getCmp("FormPanel1") but still same problem.



<ext:Viewport ID="ViewPortJobsAdd" runat="server" Layout="BorderLayout">
<Items>
<ext:FormPanel ID="FormPanel1" AutoScroll="true" Region="Center" Layout="Form" runat="server"
ButtonAlign="Center" Frame="true" AnchorHorizontal="40%" Border="false" Header="true"
Title="Add new job" Padding="15">
<Items>
<ext:TextField ID="txfJob_ID" FieldLabel="Job_En"
runat="server" AllowBlank="true" AnchorHorizontal="50%" Name="Job_ID" Hidden="true">
</ext:TextField>
<ext:TextField ID="txfJob_En" FieldLabel="Job_En"
runat="server" AllowBlank="false" AnchorHorizontal="50%" Name="Job_Name_En">
</ext:TextField>


<ext:FieldContainer ID="fdcLateIn_2" FieldLabel="Time Late"
runat="server" AnchorHorizontal="60%" Layout="HBoxLayout" Note="hr_Job_FullDayDeduct">
<Items>
<ext:NumberField ID="nbf_Late_In_H2" LabelWidth="50" MaxValue="23" MinValue="0" runat="server"
FieldLabel="<%$ Resources:ParadigmMres, hr_Job_Hours %>" Name="Late_In_H2" />
<ext:NumberField ID="nbf_Late_In_M2" LabelWidth="50" MaxValue="60" MinValue="0" runat="server"
FieldLabel="<%$ Resources:ParadigmMres, hr_Job_Minutes %>" Name="Late_In_M2" />
</Items>
</ext:FieldContainer>
</Items>
</ext:FormPanel>
</Items>
</ext:Viewport>





var openEditWindow = function(editURL, recordID)
{
var lastPath = path.substring(0, path.lastIndexOf("/")+1);
var window = Ext.getCmp("w" + editURL);
if(!window)
{
var window = new Ext.Window({
id : "w" + editURL,
layout: 'fit',
//title : editURL,
//iconCls : "#PageWhiteCode",
width : 650,
height : 380,
frame : false,
border : false,
maximizable : true,
minimizable : true,
closeAction : "hide",
loader : {
renderer : 'html',
autoLoad : false,
url : lastPath+'Jobs_Add.aspx?recordID='+ recordID,
loadMask : {
showMask : true
}
}
});
}
window.show();
window.loader.load({
url : lastPath+'Jobs_Add.aspx?recordID='+ recordID,
loadMask : {
showMask : true
}
});
}

Daniil
Jun 12, 2012, 4:09 PM
Please try

App.FormPanel1.items

The CHANGELOG item #90:
http://examples2.ext.net/#/Getting_Started/Release_Documents/CHANGELOG/

Does it help?