Search Results

Search found 427 results on 18 pages for 'extjs'.

Page 4/18 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Call a function in an ExtJS XTemplate

    - by Snowright
    I'm familiar with using a function to determine a specific condition using xtemplate but not sure how to directly call a function without the conditional if statement. My code, for example, wants to append some characters to a string that I am using within my xtemplate. I think the best way to do it is append the characters when the xtemplate is rendered. var myTpl = new Ext.XTemplate( '<tpl for=".">', '<tpl if="this.isThumbnailed(thumbnailed) == true">', '<img src=this.getThumbUrl(rawThumbUrl)/>', //this call to function does not work, also tried variations of this. '</tpl>', '</tpl>', { isThumbnailed : function(thumbnailed) { return ...; }, getThumbUrl : function(rawThumbUrl) { //... //this function does not get called. return ...; } } )

    Read the article

  • date renderer issue in extjs

    - by harsh
    Hi, I have a date renderer issue for a column. when browser language is in english the date is displayed in this format 09/14/2009 09:23 AM But when i change the browser language to german(or any other language except english) the date is not rendered it displays NAN/NAN/NAN 12:NAN PM Here is the code.. var dateRenderer = Ext.util.Format.dateRenderer('m/d/Y h:i A'); var colModel = new Ext.grid.ColumnModel([ { header: xppo.st('SDE_DATE_OCCURRED'), width: 75, sortable: true, dataIndex: 'DateOccurred', renderer: dateRenderer } ]); How can i render the date in other languages.Please help me with this issue. Thanks

    Read the article

  • Safari Extjs grid rendering issue

    - by Natkeeran
    Hello: Here is a simple illustration of what I mean. It works in IE, and FF, but not in Safari. I have four panels which are dynamically added to a tabpanel item. Three are grid panels, and one is a form panel. I need to preserve the grids proportions or sizes. I tried several layout methods (table, column, absolute etc), and nothing seems work so far. For table layout, all sizes end up being the same width. It seems my best bet is column layout, and they seem to render properly in FF, IE, but not in Safari as shown in the image. (Here it seems that column goes to second row, when the item does not fit into the current row). Initially, the title bar, and several of the column headings does not show. Any suggestions. Thank you.

    Read the article

  • ExtJs store, how to load data using a MemoryProxy

    - by Miau
    Hi there I m trying to load a json store using a MemoryProxy ( i need to use a proxy because I use different sources depending on scenarios) it kinda looks like this var data = Ext.decode(gridArrayData); var proxy = new Ext.data.MemoryProxy(data); var store = new Ext.data.GroupingStore({ proxy: proxy }); however when I inspect this I can see that the proxy has 10 rows of data, but not the store I m lost as to why Any pointers?

    Read the article

  • ExtJS RowEditor on Grid

    - by Ian Warner
    Hi When my users edits the Grid via RowEditor combo entries and checkboxes are annoying 1 Apple 2 Orange 3 Pear For instance with the combo above the user will select Orange then update - the Grid now instead of saying orange will display the number 2 - I would like it to show orange when a successful edit has been made. code for my combo editor : { allowBlank : false, displayField : 'team', editable : false, emptyText : 'Select Team', forceSelection : true, lazyRender : true, mode : 'remote', name : 'team', store : storeTeam, triggerAction : 'all', valueField : 'id', xtype : 'combo' } I think I read that you could send the complete row back to insert or I should listen to the update of the grid and then change the field but I need some guidance on what is best Cheers

    Read the article

  • Extjs combobox - doQuery callback?

    - by Ben
    Hi there, I'm using the following combobox: var cb = new Ext.form.ComboBox({ store: someDs, fieldLabel: 'test', valueField:'name', displayField:'name_id', typeAhead: true, minChars: 3, triggerAction: 'query' }); So when the user typed in 3 chars, a query to the server is made showing the proper results. Now I try to make the user input programmatically usint the doQuery() function of the combobox. After calling the doQuery() method, I want to seledct an Item via setValue(). cb.doQuery('myval'); cb.setValue('myval'); The problem is that setValue() can't select the propper value, because at the time it is called, the request started through doQuery() hasn't finished. So I need something like a callback in which I could use setValue() - but doQuery() doesn't seem to have a callback function. any ideas? thanks!

    Read the article

  • ExtJS GridPanel Scrollbar does not appear in IE7 but it does in Firefox, etc

    - by Snowright
    Setup I have an accordion layout containing a "properties" panel that nests two inner panels. The first inner panel holds a Ext.DataView, while the second panel is the Ext.grid.GridPanel in question. In the screenshot below, the white space containing the folder icon is the dataview, and below that is the gridpanel. Problem In Firefox, Chrome, and Opera, there is a scrollbar that appears when my gridpanel has an overflow of properties. It is only in Internet Explorer that it does not appear. I am, however, able to scroll using my mouse scroll button in all browsers, including IE. I've also tried removing our custom css file in case it was affecting it somehow, but there was no change in doing so. I'm not sure exactly what code I should show as I don't know where the exact problem is coming from but here is the code for the mainpanel and gridpanel. var mainPanel = new Ext.Panel({ id : 'main-property-panel', title : 'Properties', height : 350, autoWidth : true, tbar : [comboPropertyActions], items : [panel1] //panel1 holds the DataView }); var propertiesGrid = new Ext.grid.GridPanel({ stripeRows : true, height : mainPanel.getSize().height-iconDataView.getSize().height-mainPanel.getFrameHeight(), autoWidth : true, store : propertiesStore, cm : propertiesColumnModel }) //Add gridpanel to mainPanel mainPanel.add(propertiesGrid); mainPanel.doLayout(); Any help into the right direction would be greatly appreciated. Thank you.

    Read the article

  • how to set style to grid in extjs

    - by vaishali
    how to set style to grid so that it display font-family i am tring like this style: {'font-family': 'Brush Script MT', 'font-weight': 'bold' } but result does not show according to it. and i m also trying style:'font-family:Brush Script MT; font-size:300px', but it also not show the result according to it.. can u pls tell me why?

    Read the article

  • ExtJS: remove a grid from a tabpanel when its underlying store is empty

    - by Antonio
    Hi, I have TabPanel which contains, among other things, a Grid connected to a Store. Several events may remove elements from the store. I would like the Grid to be removed from the TabPanel when the store is empty and, possibly, to have a single place in my code to check for this event. I thought about using store listeners, but unfortunately this causes exceptions in Ext code. My assumption is that this happens because rendering is performed on the grid after this is removed from the tabpanel. Any idea on how to accomplish such a task without messing up Ext is much appreciated. Thanks :) By the way, this is a code excerpt: var myStore = new Ext.data.Store({ reader: new Ext.data.JsonReader({fields: MyRecord}), listeners:{ 'clear': function(store, recs) { myTabPanel.remove(myGrid); }, 'remove': function(store, rec, idx) { if (store.getCount() == 0) { myTabPanel.remove(myGrid); } } } }); var myGrid = new Ext.grid.GridPanel({ id: "myGrid", title: "A Grid", store: myStore, frame:false, border:false, columns: [ { header: 'Remove', align:'center', width: 45, sortable: false, renderer: function(value, metaData, record, rowIndex, colIndex, store) { return '<img src="images/remove.png" width="34" height="18"/>'; } },{ header: 'Some Data', dataIndex: 'data', sortable: true } ], listeners:{ 'cellclick':function(grid, rowIndex, colIndex, e){ var rec = myStore.getAt(rowIndex); if(colIndex == 0){ myStore.remove(rec); } } } }); var myTabPanel= new Ext.TabPanel({ activeTab: 0, items: [ fooPanel, barPanel, myGrid] });

    Read the article

  • Extjs internet explorer object not found problem.

    - by john misoskian
    hi; this code run firefox , but error on ie why ? please help me. xxx.js code: var gridFormf = new Ext.FormPanel({ id: 'company-form', frame: true, labelAlign: 'left', title: 'Is Emri', bodyStyle:'padding:5px', width: 1, tbar: [ newIsEmri,delIsEmri,edIsEmri,rapIsEmri,serIsEmri ], layout: 'column', // Specifies that the items will now be arranged in columns items: [ { columnWidth: 0.3, layout: 'fit', items: [{ columnWidth: 1, xtype: 'fieldset', labelWidth: 90, title:'Ekip / Servis', defaults: {width: 120, border:false}, // Default config options for child items defaultType: 'textfield', autoHeight: true, bodyStyle: Ext.isIE ? 'padding:0 0 5px 15px;' : 'padding:10px 15px;', border: true, style: { "margin-left": "10px", // when you add custom margin in IE 6... "margin-right": Ext.isIE6 ? (Ext.isStrict ? "-10px" : "-13px") : "0" // you have to adjust for it somewhere else }, items: [{ fieldLabel: 'Ekip / Personel', name: 'SERVIS_VEREN' }] },{ columnWidth: 1, xtype: 'fieldset', labelWidth: 90, title:'Ürün', defaults: {width: 120, border:false}, // Default config options for child items defaultType: 'textfield', autoHeight: true, bodyStyle: Ext.isIE ? 'padding:0 0 5px 15px;' : 'padding:10px 15px;', border: true, style: { "margin-left": "10px", // when you add custom margin in IE 6... "margin-right": Ext.isIE6 ? (Ext.isStrict ? "-10px" : "-13px") : "0" // you have to adjust for it somewhere else }, items: [{ fieldLabel: 'Cihaz', name: 'URUN_CIHAZ_ADI' }, { fieldLabel: 'Marka', name: 'URUN_MARKA_ADI' }, { fieldLabel: 'Model', name: 'URUN_MODEL_ADI' },{ fieldLabel: 'Seri No', name: 'URUN_SERI_NO' } ] }] },{ columnWidth: 0.3, layout: 'fit', items: [{ columnWidth: 1, xtype: 'fieldset', labelWidth: 90, title: 'Servis Gelis Türü', defaults: { width: 140, border: false }, // Default config options for child items defaultType: 'textfield', autoHeight: true, bodyStyle: Ext.isIE ? 'padding:0 0 5px 15px;' : 'padding:10px 15px;', border: true, style: { "margin-left": "10px", // when you add custom margin in IE 6... "margin-right": Ext.isIE6 ? (Ext.isStrict ? "-10px" : "-13px") : "0" // you have to adjust for it somewhere else }, items: [{ fieldLabel: 'Gelis Türü', name: 'SERVIS_GELIS_TURU' }] },RadioPanels ] },{ columnWidth: 0.3, layout: 'fit', items: [{ columnWidth:1, autoHeight: true, border: true, items: [gridAksesuar] },gridAriza,{ columnWidth: 1, xtype: 'textarea', labelWidth: 0, width:250, defaultType: 'textarea', autoHeight: true, border: false, name:'ARIZA_ACIKLAMASI' }] },{ columnWidth: 1.0, layout: 'fit', items: gridFormx }] }); My html code : <script src="/ApplicationJs/xxx.js" type="text/javascript"></script> <script type="text/javascript"> Ext.onReady(function() { var viewport = new Ext.Viewport({ layout:'fit', items: [gridFormf] }); </script> Internet explorer return to error. Error description is object gridFormf is not found.

    Read the article

  • ExtJS: Ext.data.DataReader: #realize was called with invalid remote-data

    - by TomH
    I'm receiving a "Ext.data.DataReader: #realize was called with invalid remote-data" error when I create a new record via a POST request. Although similar to the discussion at this SO conversation, my situation is slightly different: My server returns the pk of the new record and additional information that is to be associated with the new record in the grid. My server returns the following: {'success':true,'message':'Created Quote','data': [{'id':'610'}, {'quoteNumber':'1'}]} Where id is the PK for the record in the mysql database. quoteNumber is a db generated value that needs to be added to the created record. Other relevant bits: var quoteRecord = Ext.data.Record.create([{name:'id', type:'int'},{name:'quoteNumber', type:'int'},{name:'slideID'}, {name:'speaker'},{name:'quote'}, {name:'metadataID'}, {name:'priorityID'}]); var quoteWriter = new Ext.data.JsonWriter({ writeAllFields:false, encode:true }); var quoteReader = new Ext.data.JsonReader({id:'id', root:'data',totalProperty: 'totalitems', successProperty: 'success',messageProperty: 'message',idProperty:'id'}, quoteRecord); I'm stumped. Anyone?? thanks tom

    Read the article

  • Extjs: Tree, Selecting node after creating the tree

    - by Natkeeran
    I have a simple TreePanel. I would like to select a particular node upon loading it. The nodes are from a remote file (json). The tree is loading as expected. However, the node is not being selected. Firebug shows node as undefined. This perhaps because of the async property. But, I an unable to configure this other wise, or specify the node be selected. Any suggestions welcomed, and thank you. LeftMenuTree = new Ext.tree.TreePanel({ renderTo: 'TreeMenu', collapsible: false, height: 450, border: false, userArrows: true, animate: true, autoScroll: true, id: 'testtest', dataUrl: fileName, root: { nodeType: 'async', iconCls:'home-icon', expanded:true, text: rootText }, listeners: { "click": { fn: onPoseClick, scope: this } }, "afterrender": { fn: setNode, scope: this } }); function setNode(){ alert (SelectedNode); if (SelectedNode == "Orders"){ var treepanel = Ext.getCmp('testtest'); var node = treepanel.getNodeById("PendingItems"); node.select(); } }

    Read the article

  • Extjs DataView ArrayStore problem

    - by cvista
    Hi I have the following JS: http://monobin.com/__m1c171c4e and the following code: Code: var tpl = new Ext.XTemplate( '<tpl for=".">', '<div class="thumb-wrap" id="{Name}">', '<div class="thumb"><img src="{ImageMedium}" title="{Name}"></div>', '<span class="x-editable">{Name}</span></div>', '</tpl>', '<div class="x-clear"></div>' ); var store = new Ext.data.ArrayStore({ fields: [{ name: 'name' }, { name: 'ImageMedium'}], data: res.data.SimilarArtists }); var panel = new Ext.Panel({ frame: true, width: 535, autoHeight: true, collapsible: true, layout: 'fit', title: 'Simple DataView (0 items selected)', items: new Ext.DataView({ store: store, tpl: tpl, autoHeight: true, multiSelect: true, overClass: 'x-view-over', itemSelector: 'div.thumb-wrap', emptyText: 'No images to display', prepareData: function (data) { data.Name = Ext.util.Format.ellipsis(data.Name, 15); return data; }, plugins: [ new Ext.DataView.DragSelector(), new Ext.DataView.LabelEditor({ dataIndex: 'name' }) ], listeners: { selectionchange: { fn: function (dv, nodes) { } } } }) }); So binding the DataView to the child array of res.data.SimilarArtists But nothing seems to happen? prepareData doesnt even get called? What am i doing wrong? w://

    Read the article

  • Extjs - Dynamically generate fields in a FormPanel

    - by Benjamin
    Hi all, I've got a script that generates a form panel: var form = new Ext.FormPanel({ id: 'form-exploit-zombie-'+zombie_ip, formId: 'form-exploit-zombie-'+zombie_ip, border: false, labelWidth: 75, formBind: true, defaultType: 'textfield', url: '/ui/modules/exploit/new', autoHeight: true, buttons:[{ text: 'Execute exploit', handler: function() { var form = Ext.getCmp('form-exploit-zombie-'+zombie_ip); form.getForm().submit({ waitMsg: 'Running exploit ...', success: function() { Ext.beef.msg('Yeh!', 'Exploit sent to the zombie.') }, failure: function() { Ext.beef.msg('Ehhh!', 'An error occured while trying to send the exploit.') } }); } }] }); that same scripts then retrieves a json file from my server which defines how many input fields that form should contain. The script then adds those fields to the form: Ext.each(inputs, function(input) { var input_name; var input_type = 'TextField'; var input_definition = new Array(); if(typeof input == 'string') { input_name = input; var field = new Ext.form.TextField({ id: 'form-zombie-'+zombie_ip+'-field-'+input_name, fieldLabel: input_name, name: 'txt_'+input_name, width: 175, allowBlank:false }); form.add(field); } else if(typeof input == 'object') { //input_name = array_key(input); for(definition in input) { if(typeof definition == 'string') { } } } else { return; } }); Finally, the form is added to the appropriate panel in my interface: panel.add(form); panel.doLayout(); The problem I have is: when I submit the form by clicking on the button, the http request sent to my server does not contain the fields added to the form. In other words, I'm not posting those fields to the server. Anyone knows why and how I could fix that? Thanks for your time.

    Read the article

  • extjs add plugins to dynamic form fields

    - by Anurag Uniyal
    I am creating a form dynamically from the fields returned from server using json e.g. data is "items": [ {"xtype": "textfield", "fieldLabel": "Name", "name": "name"}, {"xtype": "textfield", "fieldLabel": "Description", "name": "description"}, {"xtype": "textarea", "fieldLabel": "Text", "name": "text"} ], Now I want to add a custom plugin to each field usually on client side I do this plugins:new Ext.ux.plugins.MyPlugin() but as my form fields are coming from server, how can I add plugin to field e.g. something like this (but that doesn't work) "plugins": "Ext.ux.plugins.MyPlugin"

    Read the article

  • ExtJS: dynamically ajust layout after adding/removing some form fields

    - by Sergei Stolyarov
    I have form layout with some TextField elements and one HtmlEditor element. Some TextField elements are "hideable", i.e. could be hid or showed. After hiding/showing elements HtmlEditor instance break layout — there appear empty space or element doesn't end at the window border. Is it possible to tell to HtmlEditor instance use all remaining available space? Even in case when some elements are hidden/showed. I've tried to use anchor property, but it works well until some element removed from the layout. Updated Here is a sample code: var htmlEditor = new Ext.form.HtmlEditor({ anchor: '100% -54', hideLabel: true }); var fp = new Ext.form.FormPanel({ items: [{xtype: 'textfield', fieldLabel: 'zzz', mode: 'local'}, {xtype: 'textfield', fieldLabel: 'nnn', id: 'id-one', mode: 'local'}, htmlEditor] }); var w = new Ext.Window({layout: 'fit', height: 400, width: 600, tbar: [{text: 'click', handler: function() { // hide element Ext.getCmp('id-one').getEl().up('.x-form-item').setDisplayed(false); w.doLayout(); } }], items: fp }); w.show(); Execute, click toolbar button "click", one field should disappear, then look at empty space below htmleditor.

    Read the article

  • ExtJS: Login with 'Remember me' functionality

    - by Chau
    I'm trying to create a simple login window with the very common 'Remember me' functionality. The login validation is done AJAX style, thus the browser won't remember my input. My approach is to use the built-in state functionality, but how to use it confuses me. Ext.state.Manager.setProvider(new Ext.state.CookieProvider({ expires: new Date(new Date().getTime()+(1000*60*60*24*7)), //7 days from now })); ... { xtype: 'textfield', fieldLabel: 'User name', id: 'txt-username', stateful: true, stateId: 'username' }, { xtype: 'textfield', fieldLabel: 'Password', id: 'txt-password', inputType: 'password', stateful: true, stateId: 'password' }, { xtype: 'button', text: 'Validate', stateEvents: 'click' } I know I have to implement the getState method, but on what component (my guess is on the two textfields)? Another thing I fail to realize is, how is my click event on the button connected to the state properties of my textfields?

    Read the article

  • gwt/extjs - form not submitting

    - by msaif
    i have form tag received from designer. i need to submit the form from GWT given below. FormPanel form = null; Button submit = null; function onModuleLoad(){ form = FormPanel.wrap(DOM.getElementById("MyForm")); form.setEncoding(FormPanel.ENCODING_MULTIPART); submit = Button.wrap(DOM.getElementById("OK")); submit.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { // button clicked confirmed form.submit(); } }); formSubmitHandler = form.addSubmitHandler(new SubmitHandler(){ public void onSubmit(SubmitEvent event) { } }); } but form was not submitted. designer wrote the following lines. form action="./a.cgi" method="post" name="MyForm" id="MyForm" input type="button" value="OK" form

    Read the article

  • extjs - 'Store is undefined'

    - by Jamie
    Hi all, I'm pretty sure this a trivial problem and i'm just being a bit stupid. Your help would be hugely appreciated. In controls/dashboard.js I have: Ext.ill.WCSS.controls.dashboard = { xtype:'portal', region:'center', margins:'35 5 5 0', items:[{ columnWidth: 1, style:'padding:10px', items:[{ title: 'My Cluster Jobs', layout:'fit', html: "test" }] },{ columnWidth: 1, style:'padding:10px', items:[{ title: 'All Cluster Jobs', iconCls: 'icon-queue', html: "test", items: new Ext.grid.GridPanel({ title: 'Cluster Job Queue', store: Ext.ill.WCSS.stores.dashboardClusterJobs, width: 791, height: 333, frame: true, loadMask: true, stateful: false, autoHeight: true, stripeRows: true, floating: false, footer: false, collapsible: false, animCollapse: false, titleCollapse: false, columns:[ { xtype: 'gridcolumn', header: 'Job ID', sortable: true, resizable: true, width: 100, dataIndex: 'JB_job_number', fixed: false }, { xtype: 'gridcolumn', header: 'Priority', sortable: true, resizable: true, width: 100, dataIndex: 'JAT_prio', fixed: false }, { xtype: 'gridcolumn', header: 'User', sortable: true, resizable: true, width: 100, dataIndex: 'JB_owner' }, { xtype: 'gridcolumn', header: 'State', sortable: true, resizable: true, width: 100, dataIndex: 'state' }, { xtype: 'gridcolumn', header: 'Date Submitted', sortable: true, resizable: true, width: 100, dataIndex: 'JAT_start_time' }, { xtype: 'gridcolumn', header: 'Queue', sortable: true, resizable: true, width: 100, dataIndex: 'queue_name' }, { xtype: 'gridcolumn', header: 'CPUs', sortable: true, resizable: true, width: 100, dataIndex: 'slots' } ], bbar: { xtype: 'paging', store: 'storeClusterQueue', displayInfo: true, refreshText: 'Retrieving queue status...', emptyMsg: 'No jobs to retrieve', id: 'clusterQueuePaging' } }) }] }] }; Simple enough, note the reference to 'Ext.ill.WCSS.stores.dashboardClusterJobs' So in stores/dashboard.js I just have this: Ext.ill.WCSS.stores.dashboardClusterJobs = new Ext.data.XmlStore({ storeId: 'storeClusterJobs', record: 'job_list', autoLoad: true, url: 'joblist.xml', idPath: 'job_info', remoteSort: false, fields: [ { name: 'JB_job_number' }, { name: 'JAT_prio' }, { name: 'JB_name' }, { name: 'JB_owner' }, { name: 'state' }, { name: 'JAT_start_time' }, { name: 'slots' }, { name: 'queue_name' } ] }); I run the code and I get 'store is undefined' :S It's confusing me a lot. All of the javascripts have been included in the correct order. i.e. <script type="text/javascript" src="/js/portal.js"></script> <script type="text/javascript" src="/js/stores/dashboard.js"></script> <script type="text/javascript" src="/js/controls/dashboard.js"></script> Thanks guys!

    Read the article

  • how to refresh Window in extjs

    - by vaishali
    i have one window in that i passed two dynamic gridPanel 1)FeaturGrid 2)gvpropertywn. i want to refresh testWin (Window) how i can? can u pls help me? testWin = new Ext.Window({ id:'resultwindow', title: LangVarTestWinText, width: 400, height: 300, layout : 'border', closeAction:'hide', closable : true, //items:[FeaturGrid] items:[FeaturGrid,gvpropertywn] }); }

    Read the article

  • GridPanel in Extjs is not loaded

    - by pho3nix
    I have this code in my application, but this not load any data. Data is accessible but wont display in my gridpanel, anyone have idea, why? Ext.onReady(function () { Ext.QuickTips.init(); Ext.form.Field.prototype.msgTarget = 'side'; var btnAdd = new Ext.Button({ id: 'btnAdd', text: 'Adicionar', iconCls: 'application_add', handler: function (s) { } }); var btnEdit = new Ext.Button({ id: 'btnEdit', text: 'Editar', iconCls: 'application_edit', handler: function (s) { } }); var btnRemove = new Ext.Button({ id: 'btnRemove', text: 'Apagar', iconCls: 'application_delete', handler: function (s) { } }); var tbar = new Ext.Toolbar({ items: [btnAdd, btnEdit, btnRemove] }); var formFind = new Ext.FormPanel({ height: 100 }); var store = new Ext.data.JsonStore({ remoteSort: true, idProperty: 'ContentId', root: 'rows', totalProperty: 'results', fields: [ { name: 'ContentId', type: 'int' }, { name: 'Name' }, { name: 'Version' }, { name: 'State' }, { name: 'CreatedDateTime' }, { name: 'PublishedDateTime'}, { name: 'CreatedByUser' }, { name: 'PublishedByUser' } ], proxy: new Ext.data.ScriptTagProxy({ url: '/Admin/ArticleList' }) }); store.setDefaultSort('ContentId', 'desc'); var paging = new Ext.PagingToolbar({ store: store, pageSize: 25, displayInfo: true, displayMsg: 'Foram encontrados {2} registos. Mostrando {0} de {1}', emptyMsg: "Nenhum registo encontrado." }); var grid = new Ext.grid.GridPanel({ id: 'grid', height: 700, store: store, loadMask: true, loadingText: 'Carregando...', autoHeight: true, cm: new Ext.grid.ColumnModel ([ { id: 'ContentId', dataIndex: 'ContentId', header: 'Identif.', width: 60, sortable: true }, { id: 'Name', dataIndex: 'Name', header: 'Titulo', width: 75, sortable: true }, { id: 'Version', dataIndex: 'Version', header: 'Versão', width: 75, sortable: true }, { id: 'State', dataIndex: 'State', header: 'Estado', width: 75, sortable: true }, { id: 'CreatedDateTime', dataIndex: 'CreatedDateTime', header: 'Data de Criação', width: 85, sortable: true }, { id: 'PublishedDateTime', dataIndex: 'PublishedDateTime', header: 'Data de Publicação', width: 75, sortable: true }, { id: 'CreatedByUser', dataIndex: 'CreatedByUser', header: 'Criado por', width: 75, sortable: true }, { id: 'PublishedByUser', dataIndex: 'PublishedByUser', header: 'Publicado por', width: 85, sortable: true } ]), stripeRows: true, viewConfig: { forceFit: true }, bbar: paging }); var panel = new Ext.Panel({ id: 'panel', renderTo: Ext.getBody(), layout: 'fit', tbar: tbar, items: [grid] }); store.load(); // trigger the data store load });

    Read the article

  • ExtJS combo setting problem

    - by Hubidubi
    Hi I run into an interesting problem while was using combos in input form. My form contains combos that get data from json stores. It works fine when adding new record, but when the form is opened for editing an existing record, sometimes the id appears as selected not its value (eg: there's 5 instead of "apple"). I think it tries to set the value before it finishes loading the combo. Is there a way to solve this? I put the code down here that creates combos: function dictComboMaker( store, fieldLabel, hiddenName, name, allowBlank, myToolTipp ) { comboo = { xtype : 'combo', id: 'id-'+name, allowBlank: allowBlank, fieldLabel : fieldLabel, forceSelection : true, displayField : 'value', valueField : 'id', editable: false, name: name, hiddenName : hiddenName, minChars : 2, mode: 'remote', triggerAction : 'all', store : store }; function dictJsonMaker(url) { store = new Ext.data.JsonStore({ root : 'results', // 1 fields : [ 'id','value' ], url : url, autoLoad: true}); return store; } var comboKarStore = dictJsonMaker('/service/karok'); var comboKar= dictComboMaker(comboKarStore, 'Kar', 'karid', 'kar', false, ''); // then comboKar is added to the form Hubidubi

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >