Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Wavemaker AJAX


Published on

Published in: Technology, Art & Photos
  • Be the first to comment

  • Be the first to like this

Wavemaker AJAX

  1. 1. WaveMaker Visual AJAX Studio 4.0 Training Basics: Building Your First Application Designer Basics
  2. 2. Building your First Application Import data in Live Tables Drag-n-drop widgets in Page Designer Connect data to widgets in Page Designer 3. Bind data to GUI Can also import Java and Web Services Can deploy app to any Java server ** Steps 1 and 2 can be reversed – you can design first then add data <ul><li>Define Data </li></ul>2. Build GUI
  3. 3. Page Designer Overview Variable Editor Studio Version Design Toolbar Palette Canvas Property Editor 2. Build GUI
  4. 4. Commonly Used Widgets <ul><li>Panel </li></ul><ul><li>Label </li></ul><ul><li>Editor </li></ul><ul><li>Button </li></ul><ul><li>Spacer </li></ul><ul><li>Bevel </li></ul><ul><li>Splitter </li></ul><ul><li>Picture </li></ul><ul><li>Content </li></ul>2. Build GUI
  5. 5. Using a Panel Widget <ul><li>Container for other widgets </li></ul><ul><li>Useful for laying out pages </li></ul><ul><li>Not visible in final layout by default </li></ul><ul><ul><li>Unless certain style properties are specified </li></ul></ul><ul><li>Contents can be added: </li></ul><ul><ul><li>Left to right </li></ul></ul><ul><ul><li>Top to bottom </li></ul></ul><ul><ul><li>Use Box property to adjust </li></ul></ul><ul><li>Contents can be: </li></ul><ul><ul><li>Centered </li></ul></ul><ul><ul><li>Left or right justified </li></ul></ul><ul><ul><li>Top or bottom aligned </li></ul></ul><ul><ul><li>Use BoxPosition property to adjust </li></ul></ul>2. Build GUI
  6. 6. Panel Properties <ul><li>Common </li></ul><ul><ul><li>name – widget name, used to identify widget in Model Tree, on Canvas, and in binding dialogs </li></ul></ul><ul><ul><li>showing – if checked, widget is visible on Canvas </li></ul></ul><ul><li>Layout </li></ul><ul><ul><li>lock – if checked, widgets cannot be added or removed from the container </li></ul></ul><ul><ul><li>autoSize – if checked, widget’s size automatically adjusted to be large enough to hold its contents, cannot manually resize widget </li></ul></ul>2. Build GUI
  7. 7. Panel Properties <ul><li>Layout </li></ul><ul><ul><li>height / width – widget size </li></ul></ul><ul><ul><ul><li>Specify units: </li></ul></ul></ul><ul><ul><ul><ul><li>px – default type, pixel, </li></ul></ul></ul></ul><ul><ul><ul><ul><li>em – text size, adapts automatically to current screen size </li></ul></ul></ul></ul><ul><ul><ul><ul><li>pt – point,1/72 inch </li></ul></ul></ul></ul><ul><ul><ul><ul><li>flex – stretches widget to fill up proportional area of available space </li></ul></ul></ul></ul><ul><ul><ul><li>Specify value: </li></ul></ul></ul><ul><ul><ul><ul><li>for px, em, and pt, the value is the size of the widget </li></ul></ul></ul></ul><ul><ul><ul><ul><li>for flex, the value is the proportion </li></ul></ul></ul></ul>2. Build GUI
  8. 8. Panel Properties <ul><li>Layout </li></ul><ul><ul><li>box – arrangement of contents in widget </li></ul></ul><ul><ul><ul><li>Left-to-Right – added horizontally </li></ul></ul></ul><ul><ul><ul><li>Top-to-Bottom – added vertically </li></ul></ul></ul><ul><ul><li>boxPosition – justification of contents in widget </li></ul></ul><ul><ul><ul><li>If box is set to Left-to-Right, boxPosition can be: </li></ul></ul></ul><ul><ul><ul><ul><li>right </li></ul></ul></ul></ul><ul><ul><ul><ul><li>center </li></ul></ul></ul></ul><ul><ul><ul><ul><li>left </li></ul></ul></ul></ul><ul><ul><ul><li>If box is set to Top-to-Bottom, boxPosition can be: </li></ul></ul></ul><ul><ul><ul><ul><li>top </li></ul></ul></ul></ul><ul><ul><ul><ul><li>center </li></ul></ul></ul></ul><ul><ul><ul><ul><li>bottom </li></ul></ul></ul></ul>2. Build GUI
  9. 9. Setting Widget Size <ul><li>You can only set the either the height or the width of a widget depending on its parent container’s box setting. </li></ul><ul><ul><li>If the parent container’s box property is set to Top-to-Bottom, you can only adjust the width of the child widgets. The height is determined by the parent container’s height. </li></ul></ul><ul><ul><li>If the parent container’s box property is set to Right-to-Left, you can only adjust the height of the child widgets. The width is determined by the parent container’s width. </li></ul></ul>2. Build GUI
  10. 10. Arranging Widgets <ul><li>Using the Box Property: Top-to-Bottom </li></ul>
  11. 11. Arranging Widgets <ul><li>Using the Box Property: Left-to-Right </li></ul>
  12. 12. Sizing Widgets: Flex <ul><li>If a widget’s size (height/width) property is set to flex , the widget cannot be manually resized. </li></ul><ul><li>The widget will fill up the available space in its parent container relative to its set proportion. </li></ul><ul><ul><li>Example: flexPanel1 and flexPanel 2 flex = 1 </li></ul></ul><ul><ul><li>Example: flexPanel1=4 flexPanel2 = 1 flexPanel1 is 4 times the size as flexPanel1 </li></ul></ul>2. Build GUI
  13. 13. Changing the Look and Feel <ul><li>Using the Styles Property </li></ul><ul><ul><li>Custom design can be applied to widgets </li></ul></ul><ul><ul><li>Classes – built-in styling options </li></ul></ul><ul><ul><ul><li>Expand desired category and apply selections by checkbox </li></ul></ul></ul><ul><ul><li>Custom – use a class from a pre-defined CSS style sheet </li></ul></ul><ul><ul><li>Custom Styles – editor to input CSS style sheet </li></ul></ul>2. Build GUI
  14. 14. Using the Label widget <ul><li>Used to display static text </li></ul><ul><li>Common </li></ul><ul><ul><li>caption – value displayed to user, can be set in this field or dynamically set </li></ul></ul><ul><ul><li>showing – determines if the widget is visible </li></ul></ul><ul><ul><li>disabled – disables events from firing </li></ul></ul><ul><li>Formatting </li></ul><ul><ul><li>display – formatting options for caption </li></ul></ul><ul><ul><ul><li>Number, Date, Time, DateTime, Currency </li></ul></ul></ul><ul><ul><ul><li>Link, RegularExpression, Evaluation </li></ul></ul></ul><ul><ul><li>link – hyperlinks caption to URL or Service Variable </li></ul></ul>2. Build GUI
  15. 15. Using the Editor widget <ul><li>Editing </li></ul><ul><ul><li>An editor is a generic widget which can be configured using the display property as any type of input widget. By default it is a text input widget. </li></ul></ul><ul><ul><li>Changing the display property turns the editor into on of the following types of input / output widgets </li></ul></ul><ul><ul><ul><li>Text , Date, Time, Number </li></ul></ul></ul><ul><ul><ul><li>Currency, Select, Checkbox </li></ul></ul></ul><ul><ul><ul><li>TextArea, RadioButton, Slider </li></ul></ul></ul>2. Build GUI
  16. 16. Using the Editor Widget <ul><li>Setting the Display properties </li></ul><ul><ul><li>readonly – if checked, editor only displays data, not an input field </li></ul></ul><ul><ul><li>captionSize – the proportion of the field size to use for the caption </li></ul></ul><ul><ul><li>captionAlign – horizontal alignment </li></ul></ul><ul><ul><ul><li>right, left, center </li></ul></ul></ul><ul><ul><li>captionPosition – vertical alignment </li></ul></ul><ul><ul><ul><li>left, right, top, bottom </li></ul></ul></ul>2. Build GUI
  17. 17. Using the Editor Widget <ul><li>Configuring the default values </li></ul><ul><li>Use the Editing Property </li></ul><ul><ul><li>displayValue – set the default display value </li></ul></ul><ul><ul><li>dataValue – set the default data value </li></ul></ul><ul><ul><li>emptyValue – allows developers to control the value used when a user does not enter a value </li></ul></ul><ul><ul><ul><li>Default(unset) </li></ul></ul></ul><ul><ul><ul><li>Null </li></ul></ul></ul><ul><ul><ul><li>emptyString </li></ul></ul></ul><ul><ul><ul><li>false </li></ul></ul></ul>2. Build GUI
  18. 18. What’s the difference <ul><li>Display Value </li></ul><ul><ul><li>Visual presentation of data </li></ul></ul><ul><ul><li>Example: Date Editor </li></ul></ul><ul><ul><ul><li>9/30/2008 </li></ul></ul></ul><ul><li>Data Value </li></ul><ul><ul><li>Representation of how data is stored in the database </li></ul></ul><ul><ul><li>Example: Date Editor </li></ul></ul><ul><ul><ul><li>1222758000000 </li></ul></ul></ul><ul><ul><ul><li>Seconds since the Epoch </li></ul></ul></ul>2. Build GUI
  19. 19. Using the Button Widget <ul><li>Common </li></ul><ul><ul><li>disabled – if checked, when button is clicked at runtime, no event is fired </li></ul></ul><ul><li>Display </li></ul><ul><ul><li>hint – tip displayed at runtime when mouse is hovered over button </li></ul></ul><ul><li>Layout </li></ul><ul><ul><li>autoSize – by default, this property is checked, button will be sized to fit its caption </li></ul></ul><ul><ul><li>To manually size button, uncheck autoSize. </li></ul></ul><ul><li>Has on onClick Event which allows you to execute code when the button is clicked. </li></ul>2. Build GUI
  20. 20. Using the Spacer Widget <ul><li>Adds white space between widgets </li></ul><ul><li>Use to center, align, or lay out other widgets </li></ul><ul><li>By default, not visible at runtime </li></ul><ul><li>Size (height/width) is most useful property </li></ul>2. Build GUI
  21. 21. Using the Bevel widget <ul><li>Visible divider bar </li></ul><ul><li>Can be horizontal or vertical, depending on box orientation of parent container </li></ul>2. Build GUI
  22. 22. Using the Splitter widget <ul><li>Adjustable visible divider </li></ul><ul><li>User can move splitter to adjust size of containers on either side </li></ul><ul><li>Do not flex widgets on both side of splitter, one side must be set using px so it is resizable. </li></ul><ul><li>Layout </li></ul><ul><ul><li>minimum – limits Splitter’s range to top or left of container </li></ul></ul><ul><ul><li>maximum – limits Splitter’s range to bottom or right of container </li></ul></ul><ul><ul><li>-1, default, is unlimited movement </li></ul></ul>2. Build GUI
  23. 23. Using the Picture widget <ul><li>Used to display images </li></ul><ul><ul><li>Common </li></ul></ul><ul><ul><ul><li>source – location of image </li></ul></ul></ul><ul><ul><ul><ul><li>path is relative to webapproot folder in project directory, use backslash “/” </li></ul></ul></ul></ul><ul><ul><ul><ul><li>can be external URL </li></ul></ul></ul></ul><ul><ul><li>Layout </li></ul></ul><ul><ul><ul><li>aspect </li></ul></ul></ul><ul><ul><ul><ul><li>h – preserve image horizontally </li></ul></ul></ul></ul><ul><ul><ul><ul><li>v – preserve image vertically </li></ul></ul></ul></ul><ul><ul><ul><ul><li>none – default </li></ul></ul></ul></ul><ul><ul><li>Other </li></ul></ul><ul><ul><ul><li>link – URL or Service Variable </li></ul></ul></ul><ul><ul><ul><ul><li>creates an “image link” </li></ul></ul></ul></ul>2. Build GUI
  24. 24. Using the Content widget <ul><li>Displays HTML markup </li></ul><ul><li>Enter HTML code under Source  Markup </li></ul><ul><ul><li>Use <div> tags to encapsulate HTML </li></ul></ul><ul><ul><li>content – drop-down menu populated by <div id> tags from source in Markup tab </li></ul></ul>2. Build GUI
  25. 25. Keyboard Shortcuts <ul><li><Ctrl>-B – toggles box setting between Top-to-Bottom and Left-to-Right </li></ul><ul><li><Ctrl>-E – toggles boxPosition setting between top, center, bottom or left, center, right </li></ul><ul><li><Ctrl>-F – toggles the sizeUnits between flex and px </li></ul><ul><li><Shift> + dragging a widget – forces the widget out of the current container </li></ul><ul><li><Ctrl> + dragging a widget – forces the widget to remain in the current container </li></ul>2. Build GUI
  26. 26. Keyboard Shortcuts <ul><li><Ctrl>X – cut </li></ul><ul><li><Ctrl>C – copy </li></ul><ul><li><Ctrl>V – paste </li></ul><ul><li><Ctrl>S – saves the open project </li></ul><ul><li><Esc> – switches focus to the parent widget </li></ul>2. Build GUI
  27. 27. <ul><li>Questions? </li></ul>
  28. 28. Exercise 3 <ul><li>Layout a Page with the following </li></ul><ul><ul><li>Header </li></ul></ul><ul><ul><li>MainBody </li></ul></ul><ul><ul><li>Footer </li></ul></ul>