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
 
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
 
Game dev 101 part 3
Game dev 101 part 3Game dev 101 part 3
Game dev 101 part 3
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Kürzlich hochgeladen (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

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 });