| 1 | <div id="generate" data-dojo-type="dojox.mobile.ScrollableView" style="width: 100%;"> |
| 2 | <h1 data-dojo-type="dojox.mobile.Heading" back="Home" moveTo="foo">Simple Form Generate Example</h1> |
| 3 | <div class="field-title"></div> |
| 4 | <div id="main"> |
| 5 | <div id="leftNav"> |
| 6 | </div> |
| 7 | <div id="mainContent" class="generate-maincontent"> |
| 8 | <div id="outerModelArea"> |
| 9 | <h3 data-dojo-type="dojox.mobile.RoundRectCategory">Model</h3> |
| 10 | <div class="generate-textarea-row"> |
| 11 | <textarea class="generate-textarea-cell" data-dojo-type="dojox.mobile.TextArea" id="modelArea"> |
| 12 | { |
| 13 | "Serial": "11111", |
| 14 | "First": "John", |
| 15 | "Last": "Doe", |
| 16 | "Email": "[email protected]", |
| 17 | "Phones": [ |
| 18 | { |
| 19 | "Office": "111-111-1111" |
| 20 | }, |
| 21 | { |
| 22 | "Mobile": "222-222-2222" |
| 23 | } |
| 24 | ] |
| 25 | } |
| 26 | </textarea> |
| 27 | </div> |
| 28 | <div class="fieldset"> |
| 29 | <div class="spacer"></div> |
| 30 | <button id="generate1" type="button" data-dojo-type="dojox.mobile.Button" class="mblBlueButton" onclick="updateView()">Generate Form</button> |
| 31 | </div> |
| 32 | </div> |
| 33 | <div id="viewArea" style="display:none"> |
| 34 | <h3 data-dojo-type="dojox.mobile.RoundRectCategory">Generated View</h3> |
| 35 | <div class="fieldset"> |
| 36 | <div id="view" data-dojo-type="dojox.mvc.Generate" data-dojo-props="widgetMapping:{'String' : 'dojox.mobile.TextBox'}, idNameMapping:{'String' : 'TB'}"></div> |
| 37 | </div> |
| 38 | <div class="fieldset"> |
| 39 | <div class="spacer"></div> |
| 40 | <button id="updateModel" type="button" data-dojo-type="dojox.mobile.Button" class="mblBlueButton" onclick="updateModel()">Update Model</button> |
| 41 | </div> |
| 42 | </div> |
| 43 | <textarea style="display:none" data-dojo-type="dojox.mobile.TextArea" id="modelArea2"> |
| 44 | { |
| 45 | "Serial": "11111", |
| 46 | "First": "John", |
| 47 | "Middle": "J", |
| 48 | "Last": "Doe", |
| 49 | "Email": "[email protected]", |
| 50 | "Phones": [ |
| 51 | { |
| 52 | "Office": "111-111-1111" |
| 53 | }, |
| 54 | { |
| 55 | "Mobile": "222-222-2222" |
| 56 | } |
| 57 | ] |
| 58 | } |
| 59 | </textarea> |
| 60 | |
| 61 | </div> |
| 62 | </div></div> |