SlideShare una empresa de Scribd logo
1 de 43
Descargar para leer sin conexión
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
});
Ευχαριστούμε!

 Ερωτήσεις;

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Destacado

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ø
 

Destacado (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
 

Similar a 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
 

Similar a 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
 

Último

Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentMahmoud Rabie
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Nikki Chapple
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sectoritnewsafrica
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessWSO2
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 

Último (20)

Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career Development
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 

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