Using genericplugin

  1. #1

    Using genericplugin

    Hi, I'm trying to use the Extjs plugin Ext.ux.Exporter with a gridpanel. I keep getting an error Ext is undefined, probably because I'm not putting the code in the correct place. Can you give some pointers on how to use this plugin. The plugin is at http://edspencer.net/2009/11/ext-ux-...el-or-csv.html

    thanks,
    chris
  2. #2
    Where do you place script tag to that javascript file with plugin?
    try to add it to the head after ResourcePlaceholder control
    <head ...>
           <ext:ResourcePlaceHolder runat="server" Mode="ScriptFiles"/>
           <script type="text/javascript" src="..."></script>
    </head>
  3. #3
    Quote Originally Posted by Vladimir View Post
    Where do you place script tag to that javascript file with plugin?
    try to add it to the head after ResourcePlaceholder control
    <head ...>
           <ext:ResourcePlaceHolder runat="server" Mode="ScriptFiles"/>
           <script type="text/javascript" src="..."></script>
    </head>

    Thanks, that works for including the js file required by the plugin and eliminates the "Ext is undefined" error, but I'm still not sure how to use the <ext:GenericPlugin> setting. Here's what I have:


    <ext:GridPanel ID="gpStatsReport" runat="server" >
        <Store>  ...  </Store>
        <TopBar>
            <ext:Toolbar ID="Toolbar1" runat="server">
                <Items>  ...  </Items>
            </ext:Toolbar>
        </TopBar>
    
       
        <Plugins>
            <ext:GenericPlugin ID="ExcelDownload" runat="server" InstanceName="Ext.ux.Exporter.Button" >
            
            </ext:GenericPlugin>
        </Plugins>
    </ext:GridPanel>

    Here's the js to initialize the plugin:
            //Create the Download button and add it to the top toolbar
            var exportButton = new Ext.ux.Exporter.Button({
              component: gpStatsReport,
              text     : "Download as .xls"
            });
            
            gpStatsReport.getTopToolbar().add(exportButton);
    I'm having trouble putting them together - how can I get the plugin to appear in the ToolBar?
    thanks,
    Chris
  4. #4
    Hi,

    Well, how would you use that plugin in JavaScript?
  5. #5
    Well, it's not a plugin, it's an extension.

    So, you should not use an <ext:GenericPlugin> to use it.

    If you need to use it in markup or code behind, you should implement a custom control.

Similar Threads

  1. [CLOSED] GenericPlugin
    By majunior in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Oct 03, 2011, 7:19 PM
  2. My GenericPlugin don´t work with <ext:TextField
    By reinaldo.designerdigital in forum 1.x Help
    Replies: 4
    Last Post: Jan 27, 2009, 2:56 PM
  3. [CLOSED] CustomConfig in GenericPlugin
    By tdracz in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Dec 02, 2008, 3:02 PM

Tags for this Thread

Posting Permissions