extjs4

ExtJS 4 Application Login & Authentification & Rights

自作多情 提交于 2020-01-01 12:01:39
问题 I'm developing an web application on Ext JS 4 using the new recommended application structure. Therefore I need to implement a authentification & rights system. The idea so far: The server is responsible to ensure the user role and rights. ExtJS frontend has to change according to the permissions and role I use a card layout. The first tab is the login screen, the second the application In my controller I check if the user is logged in. If he has a valid identity I switch to tab 2. If not he

Extjs 4.0.7, Editor Grid - how to get updated cell value?

北城余情 提交于 2020-01-01 10:56:17
问题 I need to get(retrieve) updated cell value in controller. (MVC) So I tried this, var modified = this.getItemGrid().getStore().getUpdatedRecords(); console.log(modified); // return [] empty array var modified = this.getItemList_Store().getUpdatedRecords(); console.log(modified); // return [] empty array but always it returns empty array even I updated some cell value. anybody know what I am doing wrong? Here is my part of view code, Ext.define("App.view.orders.ItemList_view", { extend: "Ext

ExtJS Layout, Horizontally then grow vertically

大憨熊 提交于 2020-01-01 10:14:13
问题 I have a Ext.panel.Panel into which I want to dynamically add other "smaller" panels representing different "things" in my application. This panel is at the top of a grid and it is the same width as the grid. When a "smaller" panel is dynamically added to this "container panel" I want the panels to be added horizontally then vertically if the total width of all the "little" panels is greater than the width of the container. I've tried 'fit', 'hbox', 'vbox', everything. Am I missing a layout

Explain MVC architecture of extjs

二次信任 提交于 2020-01-01 08:54:09
问题 I created a small sudoku app using Javascript. Now I am trying to convert that javascript code into extjs ( 4.1.1a ) code. I have gone through the docs to understand the MVC Architecture , but it seemed not so detailed for me as I am a beginner. Can someone please explain the MVC Architecture of Extjs based on my Sudoku app? The design of my sudoku app code is as follows: The description of the above design is as follows: container (blue) --> parent panel (grey) --> child panel (red) The "

EXT JS 4 use an model association to render a grid display value

巧了我就是萌 提交于 2020-01-01 05:31:07
问题 Details I have a grid used to display invoice information. The grid is populated using the Invoice store, the Invoice store uses the Invoice model, the Invoice model has a "has one" association with the InvoiceStatus model with a primary key of 'id' and a foren key of 'invoice_status_id'. Problem I'm not sure how to make the display value of the Invoice Grid's 'Status' column use the associated models 'name' inserted of the invoice_status_id. I know I need to create a renderer to do this

Extjs combobox: hide selected value from dropdown list

依然范特西╮ 提交于 2020-01-01 04:55:13
问题 I'm using ExtJS 4 and looking for a way I can hide currently selected value from combo's dropdown list? So instead of this ("Alaska" currently selected in combobox): I want the list of values look like this: In my case the combobox is not editable (i.e. you can't input an arbitrary value), I don't think it makes much sense to display the selected value two times: once in the input field and once in the dropdown list. I already see what is selected, I want the dropdown list to only show me

ExtJS 4 RowEditing disable edit on one column based on record

淺唱寂寞╮ 提交于 2019-12-31 09:22:04
问题 I'm implementing a grid panel with the four last columns editable for most of the rows. The problem is that I'd like to be able to disable editing on, let's say the first one if record.get('status') = 4 which is finalized and only two of the columns should be editable. Is there a way to disable showing the edit for those rows? I can do it using CellEditing but want to keep using the RowEditing plugin. Regards, Kristian 回答1: Use beforeedit event: grid.on('beforeedit', function(editor, e) { if

ExtJS 4 RowEditing disable edit on one column based on record

流过昼夜 提交于 2019-12-31 09:21:51
问题 I'm implementing a grid panel with the four last columns editable for most of the rows. The problem is that I'd like to be able to disable editing on, let's say the first one if record.get('status') = 4 which is finalized and only two of the columns should be editable. Is there a way to disable showing the edit for those rows? I can do it using CellEditing but want to keep using the RowEditing plugin. Regards, Kristian 回答1: Use beforeedit event: grid.on('beforeedit', function(editor, e) { if

Creating a .net like dictionary object in Javascript

三世轮回 提交于 2019-12-30 16:23:10
问题 I want to create a object in JavaScript which will store values in key, value pair and I should be able to pass some key and should be able to get its value back. In .NET world we can use dictionary class for this kind of implementation. Do we have any option in JavaScript world? I am using ExtJs 4.1, so if you know of any option in ExtJS even that would work. I have tried something like this but I cannot get value by key. var Widget = function(k, v) { this.key = k; this.value = v; }; var

Create pdf with wkhtmltopdf and rendering javascript

淺唱寂寞╮ 提交于 2019-12-30 06:12:51
问题 I'm attempting to create a PDF of a javascript chart that I have in a model window (my chart is a combination of javascript and css in an .aspx view). The only thing in the rendered PDF file is the static content from the window, the actual javascript chart is not there. My call to create the PDF is as follows: public byte[] WKHtmlToPdf(string url) { var fileName = " - "; var wkhtmlDir = "C:\\Temp\\wkhtml"; var wkhtml = "C:\\Temp\\wkhtml\\wkhtmltopdf.exe"; var p = new Process(); p.StartInfo