Adding CSV upload browse button to Ext.Action

前端 未结 1 796
时光取名叫无心
时光取名叫无心 2020-12-21 19:06

I am trying to create a CSV File upload on GeoExt Map App. I need to place the upload function within the Ext.Action, so that I can add it to the toolbar of the GeoExt Panel

相关标签:
1条回答
  • 2020-12-21 19:41

    You can't directly push the action into a toolbar since an Ext.Action is not a type of Ext.Component. An Ext.Action is basically a means of creating an abstraction layer which can be reused multiple times. Here you need to do the following:

    toolbarItems.push(new Ext.button.Button(action));
    

    From the documentation:

    Actions let you share handlers, configuration options and UI updates across any components that support the Action interface (primarily Ext.toolbar.Toolbar, Ext.button.Button and Ext.menu.Menu components)

    0 讨论(0)
提交回复
热议问题