SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Downloaden Sie, um offline zu lesen
Ext JS

Πως να μετατρέψετε τις σελίδες σας σε
       interactive applications




      Σουργκούνης Θεοδόσης
         www.kamibu.com
Τι είναι το Ext JS;
Το Ext JS είναι ένα framework που βοηθάει στην
ανάπτυξη διαδραστικών σελίδων

   Γιατί το χρειαζόμαστε;
Επιταχύνει τη διαδικασία της ανάπτυξης, διευκολύνει την
ομοιομορφία και βοηθάει στη σωστή δομή του κώδικα

   Είναι συμβατό;
Το Ext JS είναι συμβατό με όλους τους μεγάλους
browsers που χρησιμοποιούνται σήμερα

Παραδείγματα: http://www.kamibu.com/techtalk/extjs
Ext.MessageBox

Ext.MessageBox.alert( 'Title here', 'Hello world!' );

Ext.MessageBox.prompt( 'Title here', 'Insert value' );

Ext.MessageBox.wait( 'Please wait...' );

Ext.MessageBox.progress( 'title', 'almost ready', '2%' );
Selectors ( Ext.DomQuery )

Επιλογή με ID:
var el = Ext.get( 'my-div' );
Επιλογή με αναφορά:
var el = Ext.get( myDivElement );
Επιλογή με CSS selector:
var el = Ext.select( selector );
     Element: 'div > span'
     Class or id: '#my-div .class'
     Attribute: 'form[method=post]'
     Pseudo Classes: 'div:first-child'
     CSS Value: 'div{background*=no-repeat}'
Ext.Element

el.setSize( 100, 200, {
   duration: 1,
   easing: 'backBoth'
});


el.createChild({
   tag:'h1',
   id:'header',
   html:'Header 1'
});
Events

   Φυσικά events (click, mouseover, keypress ... )

   Software driven events ( datachanged, beforedestroy ... )



el.on( 'click', doSomething );

Ορίσματα στην συνάρτηση doSomething
1. eventObject
2. DOM element
The Component Model
The Component Model

var panel1 = new Ext.Panel({            new Ext.Window({
    height: 200,                            id: 'myWin',
    width: 300,                             height: 200,
    title: "I am a happy panel!!",          width: 300,
    html: "Hello there!"                    title: "A window",
});                                         items: [
                                                panel1,
var panel2 = {                                  panel2
   xtype: 'panel',                          ]
   width: 300,                          });
   height: 200,
   title: "Plain Panel",
   html: 'Panel with xtype specified'
   listeners: {
       click: fn
   }
};
The Component Life Cycle
Containers
var myWin = new Ext.Window({
    height: 400,
    width: 400,
    items: [{
        xtype: 'panel',
        html: 'I am a panel',
        frame: true,
        height: 100
    },{
        html: '<b> I am a bold panel</b>',
        frame: true
    }]
});
myWin.show();
Containers

Ext.getCmp( 'myWin' ).add({
    title: 'Appended Panel',
    id: 'addedPanel',
    html: "hello there!"
});
Ext.getCmp( 'myWin' ).doLayout();

var panel = Ext.getCmp( 'addedPanel' );
Ext.getCmp( 'myWin' ).remove( panel );

Ext.getCmp( 'myWin' ).findByType( 'panel' );
Panel
Panel
var myPanel = new Ext.Panel({
    width: 200,
    height: 150,
    collapsible: true,
    renderTo: Ext.getBody(),
    tbar: TopToolbar,
    bbar: BottomToolbar,
    html: 'My first Toolbar Panel!'
    tools: [
      {
          id: 'gear'
      },{
          id: 'help'
      }]
});
Buttons and Menus

new Ext.Button({
    text: 'Plain Button',
    handler: handler
    menu: {
       defaults: {
          checked: false,
       },
       items: [
          { text: 'Red' },
          { text: 'Green' },
          { text: 'Blue' }
       ]
    }
});
Toolbars
var toolbar = {
  items: [
     {
        text: 'Add',
     },
     '->',
     'Select one of theese: ',
     {
        xtype: 'combo',
        store: [ 'Toolbars', 'Are', 'Awesome' ]
     }
  ]
}
Window

var win = new Ext.Window({
    html : 'My first Window',
    id : 'myWin',
    height : 200,
    width : 300,
    constrain : true
});
win.show();
Window
var win = new Ext.Window({
    height: 75,
    width: 200,
    modal: true,
    title: 'This is a window',
    html: 'Try to move or resize me. I dare you.',
    plain: true,
    border: false,
    resizable: false,
    draggable: false,
    closable: false,
    buttonAlign: 'center',
    buttons: [ ... ]
});
win.show();
Laying it all out
Container Layout
var myWin = new Ext.Window({
  height : 300,
  width : 300,
  title : 'A window with a container layout',
  autoScroll : true,
  items : [ panel1, panel2 ]
}
Anchor Layout
var myWin = new Ext.Window({
    height: 300,
    width: 300,
    layout: 'anchor',
    anchorSize: '400',
    items: [{
        title: 'Panel1',
        anchor: '100%, 25%',
        frame: true
    },{
        title: 'Panel2',
        anchor: '0, 50%',
        frame: true
    }
});
myWin.show();
Form Layout
var myWin = new Ext.Window({
  height: 240,                      {
  width: 200,                            xtype: 'panel',
  bodyStyle: 'padding: 5px',             fieldLabel: ' ',
  layout: 'form',                        labelSeparator: ' ',
  labelWidth: 50,                        frame: true,
  defaultType: 'field',                  title: 'Instructions',
  items: [{                              html: 'Please fill in the form',
      fieldLabel: 'Name',                height: 55
      width: 110                    }]
  },{                             });
      xtype: 'combo',             myWin.show();
      fieldLabel: 'Location',
      width: 120,
      store: storeObject
  },
Absolute Layout

var myWin = new Ext.Window({     {
  height: 300,                       title: 'Panel2',
  width: 300,                        x: 90,
  layout: 'absolute',                y: 120,
  autoScroll: true,                  height: 75,
  border: false,                     width: 77,
  items: [{                          html: 'x: 90, y: 120',
     title: 'Panel1',                frame: true
     x: 50,                       }]
     y: 50,                    }).show();
     height: 100,
     width: 100,
     html: 'x: 50, y:50',
     frame: true
  },
Fit Layout
var myWin = new Ext.Window({
    height : 200,
    width : 200,
    layout : 'fit',
    border : false,
    items : [
       {
         title : 'Panel1',
         html : 'I fit in my parent!',
         frame : true
       }
    ]
});
myWin.show();
Accordion Layout
var myWin = new Ext.Window({
    layout: 'accordion',
    layoutConfig: {
        animate: true
    },
    items: [{
        xtype: 'form',
        title: 'General info',
        items: {
            fieldLabel: 'Name',
            anchor: '-10',
        }
    },{
        title: 'Instructions',
        html: 'Please enter information.',
    }]
});
myWin.show();
Card Layout
var myWin = new Ext.Window({
    title: 'A Window with a Card layout',
    layout: 'card',
    items: [{
        title: 'Bio',
        value: 'Tell us about yourself'
    },{
        title: 'Congratulations',
        html: 'Thank you for filling out our form!'
    }],
    bbar: bottomToolbar
});

myWin.show();
Column Layout
var myWin = new Ext.Window({
    id: 'myWin',
    title: 'A Window with a Card layout',
    layout: 'column',
    defaults: {
        frame: true
    },
    items: [{
        title: 'Col 1',
        columnWidth: .3
    },{
        title: 'Col 3',
        html: "100px fixed width",
        width: 100
    }]
});
myWin.show();
Table Layout
var myWin = new Ext.Window({
  title: 'A Window with a Table layout',     {
  layout: 'table',                                html: '3'
  layoutConfig: {                            },
      columns: 3                             {
  },                                              html: '4',
  defaults: {                                     rowspan: 2,
      height: 50,                                 height: 100
      width: 50                              },
  },                                         {
  items: [{                                       html: '5'
      html: '1',                             },
      colspan: 3,                            {
      width: 150                                  html: '6',
  },                                              colspan: 3,
  {                                               width: 150
      html: '2',                             }]
      rowspan: 2,                          });
      height: 100                          myWin.show();
  },
Border Layout
Border Layout
new Ext.Viewport({                         {
  layout: 'border',                              title: 'East Panel',
  defaults: {                                    region: 'east',
      frame: true,                               width: 100,
      split: true                                minWidth: 75,
  },                                             maxWidth: 150,
  items: [{                                      collapsible: true
      title: 'North Panel',                },{
      region: 'north',                           title: 'West Panel',
      height: 100,                               region: 'west',
      collapsible: true                          collapsible: true,
  },{                                            collapseMode: 'mini'
      title: 'South Panel',                },{
      region: 'south',                           title: 'Center Panel',
      height: 75,                                region: 'center'
      split: false,                        }]
      margins: {                     });
          top: 5
      }
  },
Form panels

var form = new Ext.Form.FormPanel({
    ...
    initialConfig: {
        method: 'GET',
        fileUpload: true,
        standardSubmit: false,
        url: 'http://...'
        baseParams: {
            foo: 'bar'
        }
    }
});
Form Fields
var textfield = {
  xtype: 'textfield',
  fieldLabel: 'Full Name',
  emptyText: 'Enter your full name here!',
  maskRe: /[a-z]/i,
  msgTarget: 'side'
}
var browsefile = {
  xtype: 'textfield',
  fieldLabel: 'Browse for a file',
  inputType: 'file'
}
var textarea = {
  xtype: 'textarea',
}
Combo box


var combo = {                           Ειδική περίπτωση: timefield
  xtype: 'combo',
  fieldLabel: 'Select a name',
  store: new Ext.data.ArrayStore({
      data: [ ['Jack Slocum'], ... ],
      fields: ['name']
  }),
  displayField: 'name',
  mode: 'local'
}
More form fields

var htmleditor = {
  xtype: 'htmleditor',
  fieldLabel: 'Enter any text'
}

var datefield = {
  xtype: 'datefield',
  fieldLabel: 'Select date'
}

var checkbox = {
  xtype: 'checkbox',
  fieldLabel: 'Click me'
}
Load and Submit
Μπορούμε να υποβάλουμε τη φόρμα μας σύγχρονα ή
ασύγχρονα, μέσω του ορίσματος standardSubmit. Για να
υποβάλουμε τη φόρμα, εκτελούμε

myFormPanel.getForm().submit(config)

Το config στην περίπτωση της ασύγχρονης υποβολής μπορεί
να περιέχει handlers, όπως onSuccess ή onFailure, ή
οτιδήποτε άλλο από το initialConfig.

myFormPanel.getForm().load({
   url: 'data.php',
});
Trees
Trees

var rootNode = {                var tree = {
  text: 'Root Node',              xtype: 'treepanel',
  expanded: true,                 root: rootNode
  children: [                   }
     {
         text: 'Child 1',       new Ext.Window({
         leaf: true                layout: 'fit',
     },{                           items: tree
         text: 'Child 2',       }).show();
         children: [ ... ]
     }
  ]
}
Data Store
How Stores work




Proxy             Reader
 HttpProxy          Array Reader
 ScriptTagProxy     XML Reader
 MemoryProxy        JSON Reader
Grid Panel
Building a simple Grid Panel
var arrayData = [
    ['Jay Gracia', 'MD' ],
    ['Aaron Baker', 'VA' ],
];
var nameRecord = Ext.data.Record.create([
    'name', 'state'
]);
var arrayReader = new Ext.data.ArrayReader({}, nameRecord );

var memoryProxy = new Ext.data.MemoryProxy( arrayData );

var store = new Ext.data.Store({
   reader: arrayReader,
   proxy: memoryProxy
});

var store = new Ext.data.ArrayStore({
   data: arrayData,
   fields: [ 'name', 'state' ]
});
Building a simple Grid Panel
var gridView = new Ext.grid.GridView();
var colModel = new Ext.grid.ColumnModel([
    {
        header: 'Full Name',
        sortable: true,
        dataIndex: 'name'
    },{
        header: 'State',
        dataIndex: 'state'
    }
]);
var selModel = new Ext.grid.RowSelectionModel({
    singleSelect: true
});
Building a simple Grid Panel

var grid = new Ext.grid.GridPanel({
    title: 'Our first grid',
    store: store,
    view: gridView,
    colModel: colModel,
    selModel: selModel
});
Ευχαριστούμε!

 Ερωτήσεις;

Weitere ähnliche Inhalte

Was ist angesagt?

Groovy puzzlers jug-moscow-part 2
Groovy puzzlers jug-moscow-part 2Groovy puzzlers jug-moscow-part 2
Groovy puzzlers jug-moscow-part 2Evgeny Borisov
 
The Ring programming language version 1.10 book - Part 71 of 212
The Ring programming language version 1.10 book - Part 71 of 212The Ring programming language version 1.10 book - Part 71 of 212
The Ring programming language version 1.10 book - Part 71 of 212Mahmoud Samir Fayed
 
The Ring programming language version 1.5 book - Part 9 of 31
The Ring programming language version 1.5 book - Part 9 of 31The Ring programming language version 1.5 book - Part 9 of 31
The Ring programming language version 1.5 book - Part 9 of 31Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 46 of 189
The Ring programming language version 1.6 book - Part 46 of 189The Ring programming language version 1.6 book - Part 46 of 189
The Ring programming language version 1.6 book - Part 46 of 189Mahmoud Samir Fayed
 
RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”apostlion
 
The Ring programming language version 1.2 book - Part 30 of 84
The Ring programming language version 1.2 book - Part 30 of 84The Ring programming language version 1.2 book - Part 30 of 84
The Ring programming language version 1.2 book - Part 30 of 84Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 33 of 88
The Ring programming language version 1.3 book - Part 33 of 88The Ring programming language version 1.3 book - Part 33 of 88
The Ring programming language version 1.3 book - Part 33 of 88Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 42 of 184
The Ring programming language version 1.5.3 book - Part 42 of 184The Ring programming language version 1.5.3 book - Part 42 of 184
The Ring programming language version 1.5.3 book - Part 42 of 184Mahmoud Samir Fayed
 
Beautiful python - PyLadies
Beautiful python - PyLadiesBeautiful python - PyLadies
Beautiful python - PyLadiesAlicia Pérez
 
The Ring programming language version 1.7 book - Part 57 of 196
The Ring programming language version 1.7 book - Part 57 of 196The Ring programming language version 1.7 book - Part 57 of 196
The Ring programming language version 1.7 book - Part 57 of 196Mahmoud Samir Fayed
 
Functional programming techniques in real-world microservices
Functional programming techniques in real-world microservicesFunctional programming techniques in real-world microservices
Functional programming techniques in real-world microservicesAndrás Papp
 
To be Continued - multithreading with Project Loom and Kotlin's Coroutines
To be Continued - multithreading with Project Loom and Kotlin's CoroutinesTo be Continued - multithreading with Project Loom and Kotlin's Coroutines
To be Continued - multithreading with Project Loom and Kotlin's CoroutinesArtur Skowroński
 
PyCon Siberia 2016. Не доверяйте тестам!
PyCon Siberia 2016. Не доверяйте тестам!PyCon Siberia 2016. Не доверяйте тестам!
PyCon Siberia 2016. Не доверяйте тестам!Ivan Tsyganov
 
The Ring programming language version 1.5.2 book - Part 50 of 181
The Ring programming language version 1.5.2 book - Part 50 of 181The Ring programming language version 1.5.2 book - Part 50 of 181
The Ring programming language version 1.5.2 book - Part 50 of 181Mahmoud Samir Fayed
 
The Ring programming language version 1.5.1 book - Part 41 of 180
The Ring programming language version 1.5.1 book - Part 41 of 180The Ring programming language version 1.5.1 book - Part 41 of 180
The Ring programming language version 1.5.1 book - Part 41 of 180Mahmoud Samir Fayed
 
かとうの Kotlin 講座 こってり版
かとうの Kotlin 講座 こってり版かとうの Kotlin 講座 こってり版
かとうの Kotlin 講座 こってり版Yutaka Kato
 
The Ring programming language version 1.5.2 book - Part 52 of 181
The Ring programming language version 1.5.2 book - Part 52 of 181The Ring programming language version 1.5.2 book - Part 52 of 181
The Ring programming language version 1.5.2 book - Part 52 of 181Mahmoud Samir Fayed
 
The Ring programming language version 1.5.4 book - Part 46 of 185
The Ring programming language version 1.5.4 book - Part 46 of 185The Ring programming language version 1.5.4 book - Part 46 of 185
The Ring programming language version 1.5.4 book - Part 46 of 185Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 53 of 189
The Ring programming language version 1.6 book - Part 53 of 189The Ring programming language version 1.6 book - Part 53 of 189
The Ring programming language version 1.6 book - Part 53 of 189Mahmoud Samir Fayed
 
Crush Candy with DukeScript
Crush Candy with DukeScriptCrush Candy with DukeScript
Crush Candy with DukeScriptAnton Epple
 

Was ist angesagt? (20)

Groovy puzzlers jug-moscow-part 2
Groovy puzzlers jug-moscow-part 2Groovy puzzlers jug-moscow-part 2
Groovy puzzlers jug-moscow-part 2
 
The Ring programming language version 1.10 book - Part 71 of 212
The Ring programming language version 1.10 book - Part 71 of 212The Ring programming language version 1.10 book - Part 71 of 212
The Ring programming language version 1.10 book - Part 71 of 212
 
The Ring programming language version 1.5 book - Part 9 of 31
The Ring programming language version 1.5 book - Part 9 of 31The Ring programming language version 1.5 book - Part 9 of 31
The Ring programming language version 1.5 book - Part 9 of 31
 
The Ring programming language version 1.6 book - Part 46 of 189
The Ring programming language version 1.6 book - Part 46 of 189The Ring programming language version 1.6 book - Part 46 of 189
The Ring programming language version 1.6 book - Part 46 of 189
 
RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”
 
The Ring programming language version 1.2 book - Part 30 of 84
The Ring programming language version 1.2 book - Part 30 of 84The Ring programming language version 1.2 book - Part 30 of 84
The Ring programming language version 1.2 book - Part 30 of 84
 
The Ring programming language version 1.3 book - Part 33 of 88
The Ring programming language version 1.3 book - Part 33 of 88The Ring programming language version 1.3 book - Part 33 of 88
The Ring programming language version 1.3 book - Part 33 of 88
 
The Ring programming language version 1.5.3 book - Part 42 of 184
The Ring programming language version 1.5.3 book - Part 42 of 184The Ring programming language version 1.5.3 book - Part 42 of 184
The Ring programming language version 1.5.3 book - Part 42 of 184
 
Beautiful python - PyLadies
Beautiful python - PyLadiesBeautiful python - PyLadies
Beautiful python - PyLadies
 
The Ring programming language version 1.7 book - Part 57 of 196
The Ring programming language version 1.7 book - Part 57 of 196The Ring programming language version 1.7 book - Part 57 of 196
The Ring programming language version 1.7 book - Part 57 of 196
 
Functional programming techniques in real-world microservices
Functional programming techniques in real-world microservicesFunctional programming techniques in real-world microservices
Functional programming techniques in real-world microservices
 
To be Continued - multithreading with Project Loom and Kotlin's Coroutines
To be Continued - multithreading with Project Loom and Kotlin's CoroutinesTo be Continued - multithreading with Project Loom and Kotlin's Coroutines
To be Continued - multithreading with Project Loom and Kotlin's Coroutines
 
PyCon Siberia 2016. Не доверяйте тестам!
PyCon Siberia 2016. Не доверяйте тестам!PyCon Siberia 2016. Не доверяйте тестам!
PyCon Siberia 2016. Не доверяйте тестам!
 
The Ring programming language version 1.5.2 book - Part 50 of 181
The Ring programming language version 1.5.2 book - Part 50 of 181The Ring programming language version 1.5.2 book - Part 50 of 181
The Ring programming language version 1.5.2 book - Part 50 of 181
 
The Ring programming language version 1.5.1 book - Part 41 of 180
The Ring programming language version 1.5.1 book - Part 41 of 180The Ring programming language version 1.5.1 book - Part 41 of 180
The Ring programming language version 1.5.1 book - Part 41 of 180
 
かとうの Kotlin 講座 こってり版
かとうの Kotlin 講座 こってり版かとうの Kotlin 講座 こってり版
かとうの Kotlin 講座 こってり版
 
The Ring programming language version 1.5.2 book - Part 52 of 181
The Ring programming language version 1.5.2 book - Part 52 of 181The Ring programming language version 1.5.2 book - Part 52 of 181
The Ring programming language version 1.5.2 book - Part 52 of 181
 
The Ring programming language version 1.5.4 book - Part 46 of 185
The Ring programming language version 1.5.4 book - Part 46 of 185The Ring programming language version 1.5.4 book - Part 46 of 185
The Ring programming language version 1.5.4 book - Part 46 of 185
 
The Ring programming language version 1.6 book - Part 53 of 189
The Ring programming language version 1.6 book - Part 53 of 189The Ring programming language version 1.6 book - Part 53 of 189
The Ring programming language version 1.6 book - Part 53 of 189
 
Crush Candy with DukeScript
Crush Candy with DukeScriptCrush Candy with DukeScript
Crush Candy with DukeScript
 

Andere mochten auch

Google maps: a quick approach (Greek)
Google maps: a quick approach (Greek)Google maps: a quick approach (Greek)
Google maps: a quick approach (Greek)Theodosis Sourgounis
 
Conventions of magazine front covers
Conventions of magazine front coversConventions of magazine front covers
Conventions of magazine front coversk13086
 
The Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post FormatsThe Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post FormatsBarry Feldman
 
The Outcome Economy
The Outcome EconomyThe Outcome Economy
The Outcome EconomyHelge Tennø
 

Andere mochten auch (7)

Web sql: a quick approach (Greek)
Web sql: a quick approach (Greek)Web sql: a quick approach (Greek)
Web sql: a quick approach (Greek)
 
Frontend Optimizations (Greek)
Frontend Optimizations (Greek)Frontend Optimizations (Greek)
Frontend Optimizations (Greek)
 
jQuery: a quick approach (Greek)
jQuery: a quick approach (Greek)jQuery: a quick approach (Greek)
jQuery: a quick approach (Greek)
 
Google maps: a quick approach (Greek)
Google maps: a quick approach (Greek)Google maps: a quick approach (Greek)
Google maps: a quick approach (Greek)
 
Conventions of magazine front covers
Conventions of magazine front coversConventions of magazine front covers
Conventions of magazine front covers
 
The Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post FormatsThe Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post Formats
 
The Outcome Economy
The Outcome EconomyThe Outcome Economy
The Outcome Economy
 

Ähnlich wie Ext JS (Greek)

Ubuntu app development
Ubuntu app development Ubuntu app development
Ubuntu app development Xiaoguo Liu
 
Exploring Canvas
Exploring CanvasExploring Canvas
Exploring CanvasKevin Hoyt
 
Extjsslides 091216224157-phpapp02
Extjsslides 091216224157-phpapp02Extjsslides 091216224157-phpapp02
Extjsslides 091216224157-phpapp02Charles Ferentchak
 
I need to create a page looks like a picture. But it looks different.pdf
I need to create a page looks like a picture. But it looks different.pdfI need to create a page looks like a picture. But it looks different.pdf
I need to create a page looks like a picture. But it looks different.pdfallurafashions98
 
WPF L02-Graphics, Binding and Animation
WPF L02-Graphics, Binding and AnimationWPF L02-Graphics, Binding and Animation
WPF L02-Graphics, Binding and AnimationMohammad Shaker
 
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSencha
 
Building mobile web apps with Mobello
Building mobile web apps with MobelloBuilding mobile web apps with Mobello
Building mobile web apps with MobelloJeong-Geun Kim
 
Drawing with the HTML5 Canvas
Drawing with the HTML5 CanvasDrawing with the HTML5 Canvas
Drawing with the HTML5 CanvasHenry Osborne
 
Aprimorando sua Aplicação com Ext JS 4 - BrazilJS
Aprimorando sua Aplicação com Ext JS 4 - BrazilJSAprimorando sua Aplicação com Ext JS 4 - BrazilJS
Aprimorando sua Aplicação com Ext JS 4 - BrazilJSLoiane Groner
 
Exploring Canvas
Exploring CanvasExploring Canvas
Exploring CanvasKevin Hoyt
 
UI Design From Scratch - Part 5 - transcript.pdf
UI Design From Scratch - Part 5 - transcript.pdfUI Design From Scratch - Part 5 - transcript.pdf
UI Design From Scratch - Part 5 - transcript.pdfShaiAlmog1
 
RIA - Entwicklung mit Ext JS
RIA - Entwicklung mit Ext JSRIA - Entwicklung mit Ext JS
RIA - Entwicklung mit Ext JSDominik Jungowski
 
The Ring programming language version 1.9 book - Part 52 of 210
The Ring programming language version 1.9 book - Part 52 of 210The Ring programming language version 1.9 book - Part 52 of 210
The Ring programming language version 1.9 book - Part 52 of 210Mahmoud Samir Fayed
 
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange LoopCSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange LoopLara Schenck
 

Ähnlich wie Ext JS (Greek) (20)

Ubuntu app development
Ubuntu app development Ubuntu app development
Ubuntu app development
 
Exploring Canvas
Exploring CanvasExploring Canvas
Exploring Canvas
 
Extjsslides 091216224157-phpapp02
Extjsslides 091216224157-phpapp02Extjsslides 091216224157-phpapp02
Extjsslides 091216224157-phpapp02
 
I need to create a page looks like a picture. But it looks different.pdf
I need to create a page looks like a picture. But it looks different.pdfI need to create a page looks like a picture. But it looks different.pdf
I need to create a page looks like a picture. But it looks different.pdf
 
Prototype UI Intro
Prototype UI IntroPrototype UI Intro
Prototype UI Intro
 
WPF L02-Graphics, Binding and Animation
WPF L02-Graphics, Binding and AnimationWPF L02-Graphics, Binding and Animation
WPF L02-Graphics, Binding and Animation
 
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
 
Building mobile web apps with Mobello
Building mobile web apps with MobelloBuilding mobile web apps with Mobello
Building mobile web apps with Mobello
 
Java Fx Tutorial01
Java Fx Tutorial01Java Fx Tutorial01
Java Fx Tutorial01
 
Drawing with the HTML5 Canvas
Drawing with the HTML5 CanvasDrawing with the HTML5 Canvas
Drawing with the HTML5 Canvas
 
Aprimorando sua Aplicação com Ext JS 4 - BrazilJS
Aprimorando sua Aplicação com Ext JS 4 - BrazilJSAprimorando sua Aplicação com Ext JS 4 - BrazilJS
Aprimorando sua Aplicação com Ext JS 4 - BrazilJS
 
Exploring Canvas
Exploring CanvasExploring Canvas
Exploring Canvas
 
Prototype UI
Prototype UIPrototype UI
Prototype UI
 
UI Design From Scratch - Part 5 - transcript.pdf
UI Design From Scratch - Part 5 - transcript.pdfUI Design From Scratch - Part 5 - transcript.pdf
UI Design From Scratch - Part 5 - transcript.pdf
 
RIA - Entwicklung mit Ext JS
RIA - Entwicklung mit Ext JSRIA - Entwicklung mit Ext JS
RIA - Entwicklung mit Ext JS
 
Codigo taller-plugins
Codigo taller-pluginsCodigo taller-plugins
Codigo taller-plugins
 
Css5 canvas
Css5 canvasCss5 canvas
Css5 canvas
 
Ext JS Introduction
Ext JS IntroductionExt JS Introduction
Ext JS Introduction
 
The Ring programming language version 1.9 book - Part 52 of 210
The Ring programming language version 1.9 book - Part 52 of 210The Ring programming language version 1.9 book - Part 52 of 210
The Ring programming language version 1.9 book - Part 52 of 210
 
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange LoopCSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
 

Kürzlich hochgeladen

What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Kürzlich hochgeladen (20)

What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

Ext JS (Greek)

  • 1. Ext JS Πως να μετατρέψετε τις σελίδες σας σε interactive applications Σουργκούνης Θεοδόσης www.kamibu.com
  • 2. Τι είναι το Ext JS; Το Ext JS είναι ένα framework που βοηθάει στην ανάπτυξη διαδραστικών σελίδων Γιατί το χρειαζόμαστε; Επιταχύνει τη διαδικασία της ανάπτυξης, διευκολύνει την ομοιομορφία και βοηθάει στη σωστή δομή του κώδικα Είναι συμβατό; Το Ext JS είναι συμβατό με όλους τους μεγάλους browsers που χρησιμοποιούνται σήμερα Παραδείγματα: http://www.kamibu.com/techtalk/extjs
  • 3. Ext.MessageBox Ext.MessageBox.alert( 'Title here', 'Hello world!' ); Ext.MessageBox.prompt( 'Title here', 'Insert value' ); Ext.MessageBox.wait( 'Please wait...' ); Ext.MessageBox.progress( 'title', 'almost ready', '2%' );
  • 4. Selectors ( Ext.DomQuery ) Επιλογή με ID: var el = Ext.get( 'my-div' ); Επιλογή με αναφορά: var el = Ext.get( myDivElement ); Επιλογή με CSS selector: var el = Ext.select( selector ); Element: 'div > span' Class or id: '#my-div .class' Attribute: 'form[method=post]' Pseudo Classes: 'div:first-child' CSS Value: 'div{background*=no-repeat}'
  • 5. Ext.Element el.setSize( 100, 200, { duration: 1, easing: 'backBoth' }); el.createChild({ tag:'h1', id:'header', html:'Header 1' });
  • 6. Events Φυσικά events (click, mouseover, keypress ... ) Software driven events ( datachanged, beforedestroy ... ) el.on( 'click', doSomething ); Ορίσματα στην συνάρτηση doSomething 1. eventObject 2. DOM element
  • 8. The Component Model var panel1 = new Ext.Panel({ new Ext.Window({ height: 200, id: 'myWin', width: 300, height: 200, title: "I am a happy panel!!", width: 300, html: "Hello there!" title: "A window", }); items: [ panel1, var panel2 = { panel2 xtype: 'panel', ] width: 300, }); height: 200, title: "Plain Panel", html: 'Panel with xtype specified' listeners: { click: fn } };
  • 10. Containers var myWin = new Ext.Window({ height: 400, width: 400, items: [{ xtype: 'panel', html: 'I am a panel', frame: true, height: 100 },{ html: '<b> I am a bold panel</b>', frame: true }] }); myWin.show();
  • 11. Containers Ext.getCmp( 'myWin' ).add({ title: 'Appended Panel', id: 'addedPanel', html: "hello there!" }); Ext.getCmp( 'myWin' ).doLayout(); var panel = Ext.getCmp( 'addedPanel' ); Ext.getCmp( 'myWin' ).remove( panel ); Ext.getCmp( 'myWin' ).findByType( 'panel' );
  • 12. Panel
  • 13. Panel var myPanel = new Ext.Panel({ width: 200, height: 150, collapsible: true, renderTo: Ext.getBody(), tbar: TopToolbar, bbar: BottomToolbar, html: 'My first Toolbar Panel!' tools: [ { id: 'gear' },{ id: 'help' }] });
  • 14. Buttons and Menus new Ext.Button({ text: 'Plain Button', handler: handler menu: { defaults: { checked: false, }, items: [ { text: 'Red' }, { text: 'Green' }, { text: 'Blue' } ] } });
  • 15. Toolbars var toolbar = { items: [ { text: 'Add', }, '->', 'Select one of theese: ', { xtype: 'combo', store: [ 'Toolbars', 'Are', 'Awesome' ] } ] }
  • 16. Window var win = new Ext.Window({ html : 'My first Window', id : 'myWin', height : 200, width : 300, constrain : true }); win.show();
  • 17. Window var win = new Ext.Window({ height: 75, width: 200, modal: true, title: 'This is a window', html: 'Try to move or resize me. I dare you.', plain: true, border: false, resizable: false, draggable: false, closable: false, buttonAlign: 'center', buttons: [ ... ] }); win.show();
  • 19. Container Layout var myWin = new Ext.Window({ height : 300, width : 300, title : 'A window with a container layout', autoScroll : true, items : [ panel1, panel2 ] }
  • 20. Anchor Layout var myWin = new Ext.Window({ height: 300, width: 300, layout: 'anchor', anchorSize: '400', items: [{ title: 'Panel1', anchor: '100%, 25%', frame: true },{ title: 'Panel2', anchor: '0, 50%', frame: true } }); myWin.show();
  • 21. Form Layout var myWin = new Ext.Window({ height: 240, { width: 200, xtype: 'panel', bodyStyle: 'padding: 5px', fieldLabel: ' ', layout: 'form', labelSeparator: ' ', labelWidth: 50, frame: true, defaultType: 'field', title: 'Instructions', items: [{ html: 'Please fill in the form', fieldLabel: 'Name', height: 55 width: 110 }] },{ }); xtype: 'combo', myWin.show(); fieldLabel: 'Location', width: 120, store: storeObject },
  • 22. Absolute Layout var myWin = new Ext.Window({ { height: 300, title: 'Panel2', width: 300, x: 90, layout: 'absolute', y: 120, autoScroll: true, height: 75, border: false, width: 77, items: [{ html: 'x: 90, y: 120', title: 'Panel1', frame: true x: 50, }] y: 50, }).show(); height: 100, width: 100, html: 'x: 50, y:50', frame: true },
  • 23. Fit Layout var myWin = new Ext.Window({ height : 200, width : 200, layout : 'fit', border : false, items : [ { title : 'Panel1', html : 'I fit in my parent!', frame : true } ] }); myWin.show();
  • 24. Accordion Layout var myWin = new Ext.Window({ layout: 'accordion', layoutConfig: { animate: true }, items: [{ xtype: 'form', title: 'General info', items: { fieldLabel: 'Name', anchor: '-10', } },{ title: 'Instructions', html: 'Please enter information.', }] }); myWin.show();
  • 25. Card Layout var myWin = new Ext.Window({ title: 'A Window with a Card layout', layout: 'card', items: [{ title: 'Bio', value: 'Tell us about yourself' },{ title: 'Congratulations', html: 'Thank you for filling out our form!' }], bbar: bottomToolbar }); myWin.show();
  • 26. Column Layout var myWin = new Ext.Window({ id: 'myWin', title: 'A Window with a Card layout', layout: 'column', defaults: { frame: true }, items: [{ title: 'Col 1', columnWidth: .3 },{ title: 'Col 3', html: "100px fixed width", width: 100 }] }); myWin.show();
  • 27. Table Layout var myWin = new Ext.Window({ title: 'A Window with a Table layout', { layout: 'table', html: '3' layoutConfig: { }, columns: 3 { }, html: '4', defaults: { rowspan: 2, height: 50, height: 100 width: 50 }, }, { items: [{ html: '5' html: '1', }, colspan: 3, { width: 150 html: '6', }, colspan: 3, { width: 150 html: '2', }] rowspan: 2, }); height: 100 myWin.show(); },
  • 29. Border Layout new Ext.Viewport({ { layout: 'border', title: 'East Panel', defaults: { region: 'east', frame: true, width: 100, split: true minWidth: 75, }, maxWidth: 150, items: [{ collapsible: true title: 'North Panel', },{ region: 'north', title: 'West Panel', height: 100, region: 'west', collapsible: true collapsible: true, },{ collapseMode: 'mini' title: 'South Panel', },{ region: 'south', title: 'Center Panel', height: 75, region: 'center' split: false, }] margins: { }); top: 5 } },
  • 30. Form panels var form = new Ext.Form.FormPanel({ ... initialConfig: { method: 'GET', fileUpload: true, standardSubmit: false, url: 'http://...' baseParams: { foo: 'bar' } } });
  • 31. Form Fields var textfield = { xtype: 'textfield', fieldLabel: 'Full Name', emptyText: 'Enter your full name here!', maskRe: /[a-z]/i, msgTarget: 'side' } var browsefile = { xtype: 'textfield', fieldLabel: 'Browse for a file', inputType: 'file' } var textarea = { xtype: 'textarea', }
  • 32. Combo box var combo = { Ειδική περίπτωση: timefield xtype: 'combo', fieldLabel: 'Select a name', store: new Ext.data.ArrayStore({ data: [ ['Jack Slocum'], ... ], fields: ['name'] }), displayField: 'name', mode: 'local' }
  • 33. More form fields var htmleditor = { xtype: 'htmleditor', fieldLabel: 'Enter any text' } var datefield = { xtype: 'datefield', fieldLabel: 'Select date' } var checkbox = { xtype: 'checkbox', fieldLabel: 'Click me' }
  • 34. Load and Submit Μπορούμε να υποβάλουμε τη φόρμα μας σύγχρονα ή ασύγχρονα, μέσω του ορίσματος standardSubmit. Για να υποβάλουμε τη φόρμα, εκτελούμε myFormPanel.getForm().submit(config) Το config στην περίπτωση της ασύγχρονης υποβολής μπορεί να περιέχει handlers, όπως onSuccess ή onFailure, ή οτιδήποτε άλλο από το initialConfig. myFormPanel.getForm().load({ url: 'data.php', });
  • 35. Trees
  • 36. Trees var rootNode = { var tree = { text: 'Root Node', xtype: 'treepanel', expanded: true, root: rootNode children: [ } { text: 'Child 1', new Ext.Window({ leaf: true layout: 'fit', },{ items: tree text: 'Child 2', }).show(); children: [ ... ] } ] }
  • 38. How Stores work Proxy Reader HttpProxy Array Reader ScriptTagProxy XML Reader MemoryProxy JSON Reader
  • 40. Building a simple Grid Panel var arrayData = [ ['Jay Gracia', 'MD' ], ['Aaron Baker', 'VA' ], ]; var nameRecord = Ext.data.Record.create([ 'name', 'state' ]); var arrayReader = new Ext.data.ArrayReader({}, nameRecord ); var memoryProxy = new Ext.data.MemoryProxy( arrayData ); var store = new Ext.data.Store({ reader: arrayReader, proxy: memoryProxy }); var store = new Ext.data.ArrayStore({ data: arrayData, fields: [ 'name', 'state' ] });
  • 41. Building a simple Grid Panel var gridView = new Ext.grid.GridView(); var colModel = new Ext.grid.ColumnModel([ { header: 'Full Name', sortable: true, dataIndex: 'name' },{ header: 'State', dataIndex: 'state' } ]); var selModel = new Ext.grid.RowSelectionModel({ singleSelect: true });
  • 42. Building a simple Grid Panel var grid = new Ext.grid.GridPanel({ title: 'Our first grid', store: store, view: gridView, colModel: colModel, selModel: selModel });