Changeset 5111
- Timestamp:
- 07/22/08 08:33:43 (5 weeks ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
WebContent/ITMILL/themes/tests-book/styles.css (modified) (1 diff)
-
src/com/itmill/toolkit/tests/book/BookTestApplication.java (modified) (4 diffs)
-
src/com/itmill/toolkit/tests/book/FormExample.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebContent/ITMILL/themes/tests-book/styles.css
r5106 r5111 8 8 background: white; 9 9 } 10 11 /*****************************************************************************/ 12 /* For example_Forms() */ 13 /*****************************************************************************/ 14 .i-form { 15 border: thin solid; 16 padding: 5px 5px 5px 5px; 17 } 18 10 19 11 20 /*****************************************************************************/ -
trunk/src/com/itmill/toolkit/tests/book/BookTestApplication.java
r5106 r5111 50 50 import com.itmill.toolkit.ui.PopupDateField; 51 51 import com.itmill.toolkit.ui.ProgressIndicator; 52 import com.itmill.toolkit.ui.RichTextArea; 52 53 import com.itmill.toolkit.ui.Select; 53 54 import com.itmill.toolkit.ui.TabSheet; … … 141 142 "progress/window", "progress/thread", "progress", 142 143 "customlayout", "spacing", "margin", "clientinfo", 143 "fillinform/templates", "notification", "print"}; 144 "fillinform/templates", "notification", "print", 145 "richtextfield"}; 144 146 for (int i = 0; i < examples.length; i++) { 145 147 main.addComponent(new Label("<a href='" + context.toString() + … … 220 222 } else if (example.equals("print")) { 221 223 example_Print(main, param); 224 } else if (example.equals("richtextfield")) { 225 example_RichTextField(main, param); 222 226 } else { 223 227 ; // main.addComponent(new Label("Unknown test '"+example+"'.")); … … 1379 1383 //main.addComponent(new Label("<p>Print this!</p>\n<script type='text/javascript'>print();</script>", Label.CONTENT_XHTML)); 1380 1384 } 1385 1386 void example_RichTextField(final Window main, String param) { 1387 // Create the rich text area 1388 final RichTextArea rtarea = new RichTextArea(); 1389 1390 // Set initial content as HTML 1391 rtarea.setValue("<h1>Hello</h1>\n<p>This contains some text.</p>"); 1392 1393 // Show the text edited in the rich text area as HTML. 1394 final Button show = new Button("Show HTML"); 1395 final Label html = new Label((String) rtarea.getValue()); 1396 show.addListener(new Button.ClickListener() { 1397 public void buttonClick(ClickEvent event) { 1398 html.setValue(rtarea.getValue()); 1399 } 1400 }); 1401 1402 main.addComponent(rtarea); 1403 main.addComponent(show); 1404 main.addComponent(html); 1405 } 1381 1406 } -
trunk/src/com/itmill/toolkit/tests/book/FormExample.java
r5072 r5111 211 211 212 212 // The Commit button calls form.commit(). 213 Button commit = new Button("Commit" );214 commit.addListener(new Button.ClickListener() {213 Button commit = new Button("Commit", form, "commit"); 214 /*commit.addListener(new Button.ClickListener() { 215 215 public void buttonClick(ClickEvent event) { 216 216 form.setValidationVisible(true); 217 217 form.commit(); 218 218 } 219 }); 219 });*/ 220 220 221 221 // The Discard button calls form.discard().
