How to create a dynamic URL Link for a panel with auto load option (with dynamic parameters)

  1. #1

    How to create a dynamic URL Link for a panel with auto load option (with dynamic parameters)

    hi ....

    i have a panel that will autoload an url which has some parameters that will be passed down to an ext js 4 application .
    basically what i'm asking is how to dynamically create a url and assign it to a panel that will autoload on the link in itself.
    (i am very new to ext.net) thanks you in advance.

    <ext:Panel ID="Panel1" runat="server" ViewText="Trend" Width="400" Height="400">
    <AutoLoad runat="server"

    Url="http://localhost:52015/AppNoW/AppNoW.aspx?homeView=forwarding-kpi-KpiMultiLine&hierarchy=Product&customerId=104qwe70 w0,1042ew0wq000&yearId=2011&customer=APPLE COMPUTER, US ARMY"



    />
    <Listeners>
    <Update Fn="function() {
    //update
    var me = this;
    var cmp = arguments;
    debugger;

    }" />
    <BeforeRender Fn="function() {
    //BeforeRender
    var me = this;
    var cmp = arguments;
    debugger;

    }" />

    </Listeners>

    </ext:Panel>
  2. #2
    Hi ,

    this is the solution...

    beforeshow... i grab the values in the comboboxes... then on show, i clear the panel .... setting it to values on initilization....

    
            <AutoLoad runat="server"  NoCache="true" ReloadOnEvent="true" TriggerEvent="show" Mode="IFrame" DiscardUrl="true" ShowMask="true"
             
               Url="EMPTY"
               
               /> 
                
               <Listeners> 
               
                   <Show Fn="function() {
                                     //Show
                                     var me = this;
                                     var cmp = Ext.getCmp('Panel1');
                                     cmp.clearContent();
                                  }" />
    
                   <BeforeShow  Fn="function() {
                                          //BeforeShow
                                            var me = this;
                                            var cmp = Ext.getCmp('Panel1');
                                            var _year = Context.get({source:'fTime.View', member:'Value'});
                                            var year = Framework.ComboBox.decodeValue(_year).get(0)[0];
    
                                            var _customerId = Context.get({source:'fCustomer.View', member:'Value'});
                                            var customerId = null;
                                            for (var x = 0;   ; x++)
                                            {
                                                var check = Framework.ComboBox.decodeValue(_customerId).get(0)[x];
                                                if( check == undefined) break;
                                                if(x == 0){
                                                   customerId =  Framework.ComboBox.decodeValue(_customerId).get(0)[x];
                                                   };
                                                else{
                                                  customerId =  customerId +','+ Framework.ComboBox.decodeValue(_customerId).get(0)[x];
                                                };
                                           
                                            }
                                            var _hierarchy;
                                            if( customerId != null )  _hierarchy = 'Customer';
                                            else {
                                                    customerId = '104dsfs000,10feew';
                                                    _hierarchy = 'Customer';
                                                }
                                            var hierarchy = _hierarchy;
    
                                            var link = '/AppNow/App.aspx?homeView=piMultiLine&hierarchy='+ hierarchy 
                                                       + '&customerId='+ customerId
                                                       + '&yearId='+ year
                                                       + '&customer= ';
                                           cmp.autoLoad.url = link;
                                  }" />
                    
               </Listeners>
            </fwk:Panel>

Similar Threads

  1. [CLOSED] Grid Panel dynamic Data load
    By sisa in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 19, 2012, 5:37 PM
  2. Replies: 0
    Last Post: Nov 01, 2011, 1:06 PM
  3. [CLOSED] Create a dynamic event for dynamic components.
    By stoque in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: May 10, 2011, 9:16 PM
  4. Dynamic Create GridPanel and Load Data Error
    By fancycloud in forum Examples and Extras
    Replies: 2
    Last Post: Jan 05, 2010, 2:52 AM
  5. Opening a window from a dynamic link
    By t0ny in forum 1.x Help
    Replies: 2
    Last Post: Jun 11, 2008, 5:42 AM

Posting Permissions