WICKET-3435 Revamp Wicket Examples with the new website L&F Bootstrapify Ajax, Pub, niceurl, navomatic, linkomatic and images examples
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/6337fb99 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/6337fb99 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/6337fb99 Branch: refs/heads/3435-use-bootstrap-for-examples Commit: 6337fb99f6846a81621f31f587b1e54e4fc5a425 Parents: d7d944d Author: Martin Tzvetanov Grigorov <[email protected]> Authored: Sat Nov 29 16:44:35 2014 +0100 Committer: Martin Tzvetanov Grigorov <[email protected]> Committed: Sat Nov 29 16:44:35 2014 +0100 ---------------------------------------------------------------------- wicket-examples/pom.xml | 6 +++ .../wicket/examples/ajax/builtin/BasePage.html | 3 +- .../examples/ajax/builtin/ChoicePage.html | 14 ++++-- .../examples/ajax/builtin/ChoicePage.java | 5 +- .../examples/ajax/builtin/EffectsPage.html | 6 +-- .../examples/ajax/builtin/FileUploadPage.html | 25 +++++++--- .../examples/ajax/builtin/FileUploadPage.java | 11 +++-- .../wicket/examples/ajax/builtin/FormPage.html | 29 ++++++++---- .../wicket/examples/ajax/builtin/FormPage.java | 5 +- .../wicket/examples/ajax/builtin/GuestBook.html | 48 +++++++++++-------- .../ajax/builtin/OnChangeAjaxBehaviorPage.html | 16 ++++--- .../wicket/examples/ajax/builtin/TodoList.html | 33 ++++++------- .../wicket/examples/ajax/builtin/TodoList.java | 11 ----- .../org/apache/wicket/examples/images/Home.html | 21 ++++---- .../apache/wicket/examples/linkomatic/Home.html | 50 +++++++++++--------- .../apache/wicket/examples/linkomatic/Home.java | 6 +-- .../navomatic/NavomaticApplication.java | 9 ---- .../apache/wicket/examples/navomatic/Page1.html | 5 +- .../apache/wicket/examples/navomatic/Page2.html | 5 +- .../apache/wicket/examples/navomatic/Page3.html | 3 +- .../apache/wicket/examples/niceurl/Home.html | 17 +++---- .../org/apache/wicket/examples/pub/Home.html | 3 +- .../org/apache/wicket/examples/pub/Home.java | 2 + .../apache/wicket/examples/pub/Home_da_DK.html | 3 +- .../apache/wicket/examples/pub/Home_de_DE.html | 3 +- .../apache/wicket/examples/pub/Home_en_CA.html | 3 +- .../org/apache/wicket/examples/pub/Home_hu.html | 3 +- .../apache/wicket/examples/pub/Home_ko_KR.html | 3 +- .../apache/wicket/examples/pub/Home_nl_NL.html | 3 +- .../apache/wicket/examples/pub/Home_zh_CN.html | 5 +- .../unicodeconverter/UnicodeConverter.html | 43 +++++++++-------- .../unicodeconverter/UnicodeConverter.java | 18 +++---- 32 files changed, 242 insertions(+), 175 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/pom.xml ---------------------------------------------------------------------- diff --git a/wicket-examples/pom.xml b/wicket-examples/pom.xml index 6265442..04ab888 100644 --- a/wicket-examples/pom.xml +++ b/wicket-examples/pom.xml @@ -83,6 +83,12 @@ <version>0.10.0-SNAPSHOT</version> </dependency> <dependency> + <groupId>de.agilecoders.wicket</groupId> + <artifactId>wicket-bootstrap-extensions</artifactId> + <version>0.10.0-SNAPSHOT</version> + </dependency> + + <dependency> <groupId>net.ftlines.wicket-source</groupId> <artifactId>wicket-source</artifactId> <version>7.0.0</version> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/BasePage.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/BasePage.html b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/BasePage.html index c013695..c7d498c 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/BasePage.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/BasePage.html @@ -5,8 +5,9 @@ <link rel="stylesheet" type="text/css" href="style.css"/> </head> <body> - <span wicket:id="mainNavigation"></span> +<wicket:extend> <a href="Index.html" wicket:id="back">[go back]</a><p/> <wicket:child/> +</wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/ChoicePage.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/ChoicePage.html b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/ChoicePage.html index 27c44bf..0feb6d1 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/ChoicePage.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/ChoicePage.html @@ -7,9 +7,17 @@ Whenever the Make select box value is changed it will submit the new value to se <br/><br/> <form wicket:id="form"> - <select wicket:id="makes"></select> - <select wicket:id="models"></select> - <input type="submit" wicket:id="go" value="Submit"/> + <div class="form-group"> + <div class="col-sm-2"> + <select wicket:id="makes" class="form-control"></select> + </div> + <div class="col-sm-2"> + <select wicket:id="models" class="form-control"></select> + </div> + + <input type="submit" wicket:id="go" class="btn btn-primary" value="Submit"/> + </div> + </form> <div wicket:id="feedback"></div> </wicket:extend> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/ChoicePage.java ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/ChoicePage.java b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/ChoicePage.java index e2b5988..fb3d5ee 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/ChoicePage.java +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/ChoicePage.java @@ -28,12 +28,13 @@ import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.ajax.markup.html.form.AjaxButton; import org.apache.wicket.markup.html.form.DropDownChoice; import org.apache.wicket.markup.html.form.Form; -import org.apache.wicket.markup.html.panel.FeedbackPanel; import org.apache.wicket.model.AbstractReadOnlyModel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; +import de.agilecoders.wicket.core.markup.html.bootstrap.common.NotificationPanel; + /** * Linked select boxes example * @@ -109,7 +110,7 @@ public class ChoicePage extends BasePage form.add(makes); form.add(models); - final FeedbackPanel feedback = new FeedbackPanel("feedback"); + final NotificationPanel feedback = new NotificationPanel("feedback"); feedback.setOutputMarkupId(true); add(feedback); http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/EffectsPage.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/EffectsPage.html b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/EffectsPage.html index 241c86e..ff5f463 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/EffectsPage.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/EffectsPage.html @@ -7,14 +7,14 @@ </head> <wicket:extend> <style> - div.container { font-size: 14pt; } + div.container2 { font-size: 14pt; } /* make effects work nicely with inline elements */ .ui-effects-wrapper { display:inline; } </style> -<div class="container"> +<div class="container2"> counter 1:<span wicket:id="c1"></span> <br/> <br/> @@ -24,4 +24,4 @@ counter 2: <span wicket:id="c2"></span> <a href="#" wicket:id="c1-link">counter1++ and shake</a>  <a href="#" wicket:id="c2-link">counter2++ and highlight</a> </div> </wicket:extend> -</html> \ No newline at end of file +</html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.html b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.html index 9351d4c..03f6559 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.html @@ -6,11 +6,24 @@ Demonstrates Wicket's ability to transparently handle multipart forms via AJAX.< <div wicket:id="feedback"></div> -<form wicket:id="form"> - Text field: <input wicket:id="text" type="text"/><br/> - File field: <input wicket:id="file" type="file"/> (<span wicket:id="max"></span> max)<br/><br/> - <div wicket:id="progress"></div> - <input type="submit" value="Regular Submit"/> <input wicket:id="ajaxSubmit" type="button" value="Ajax Submit"/> +<form wicket:id="form" class="form-horizontal"> + <div class="form-group"> + <label class="control-label col-sm-1" wicket:for="text">Text field:</label> + <div class="col-sm-3"> + <input wicket:id="text" type="text" class="form-control"/> + </div> + </div> + <div class="form-group"> + <label class="control-label col-sm-1" wicket:for="file">File field:</label> + <div class="col-sm-3"> + <input wicket:id="file" type="file"/> (<span wicket:id="max"></span> max)<br/><br/> + </div> + </div> + <div class="col-sm-offset-1"> + <div wicket:id="progress"></div> + <input wicket:id="ajaxSubmit" type="button" class="btn btn-primary" value="Ajax Submit"/> <input type="submit" class="btn btn-default" value="Regular Submit"/> + </div> + </form> -</wicket:extend> \ No newline at end of file +</wicket:extend> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.java ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.java b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.java index 1d1c69b..5a0cc5b 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.java +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.java @@ -24,13 +24,14 @@ import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.markup.html.form.upload.FileUpload; -import org.apache.wicket.markup.html.form.upload.FileUploadField; -import org.apache.wicket.markup.html.panel.FeedbackPanel; import org.apache.wicket.model.AbstractReadOnlyModel; import org.apache.wicket.model.Model; import org.apache.wicket.util.lang.Bytes; import org.apache.wicket.validation.validator.StringValidator; +import de.agilecoders.wicket.core.markup.html.bootstrap.common.NotificationPanel; +import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.fileinput.BootstrapFileInputField; + /** * Demos ajax handling of a multipart form * @@ -40,7 +41,7 @@ public class FileUploadPage extends BasePage { private static final long serialVersionUID = 1L; - private final FileUploadField file; + private final BootstrapFileInputField file; private final TextField<String> text; /** @@ -50,7 +51,7 @@ public class FileUploadPage extends BasePage { // create a feedback panel - final Component feedback = new FeedbackPanel("feedback").setOutputMarkupId(true); + final Component feedback = new NotificationPanel("feedback").setOutputMarkupId(true); add(feedback); // create the form @@ -86,7 +87,7 @@ public class FileUploadPage extends BasePage text.add(StringValidator.minimumLength(2)); // create the file upload field - form.add(file = new FileUploadField("file")); + form.add(file = new BootstrapFileInputField("file")); form.add(new Label("max", new AbstractReadOnlyModel<String>() { http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FormPage.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FormPage.html b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FormPage.html index 36ac554..f4c3fe8 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FormPage.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FormPage.html @@ -9,13 +9,26 @@ <br/> <div wicket:id="feedback">[[ feedback ]]</div> - <form wicket:id="form"> - <label wicket:id="name-label">[name label]</label>: <input type="text" wicket:id="name"/> - <br/><label wicket:id="email-label">[email label]</label>: <input type="text" wicket:id="email"/> - <br/> - <br/> - <input type="submit" value="submit via ajax" wicket:id="ajax-button"/> - <input type="submit" value="submit"/> - </form> + <form wicket:id="form" class="form-horizontal"> + <div class="form-group"> + <label wicket:id="name-label" class="control-label col-sm-1">[name label]</label> + <div class="col-sm-3"> + <input type="text" wicket:id="name" class="form-control"/> + </div> + </div> + + <div class="form-group"> + <label wicket:id="email-label" class="control-label col-sm-1">[email label]</label> + <div class="col-sm-3"> + <input type="text" wicket:id="email" class="form-control"/> + </div> + </div> + + <div class="col-sm-offset-1"> + <input type="submit" value="submit via ajax" wicket:id="ajax-button" class="btn btn-primary"/> + <input type="submit" value="normal submit" class="btn btn-default"/> + </div> + + </form> </wicket:extend> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FormPage.java ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FormPage.java b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FormPage.java index e17561b..37b748b 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FormPage.java +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FormPage.java @@ -23,7 +23,6 @@ import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.FormComponent; import org.apache.wicket.markup.html.form.RequiredTextField; import org.apache.wicket.markup.html.form.SimpleFormComponentLabel; -import org.apache.wicket.markup.html.panel.FeedbackPanel; import org.apache.wicket.model.CompoundPropertyModel; import org.apache.wicket.model.ResourceModel; import org.apache.wicket.util.io.IClusterable; @@ -31,6 +30,8 @@ import org.apache.wicket.util.time.Duration; import org.apache.wicket.validation.validator.EmailAddressValidator; import org.apache.wicket.validation.validator.StringValidator; +import de.agilecoders.wicket.core.markup.html.bootstrap.common.NotificationPanel; + /** * Page to demonstrate instant ajax validaion feedback. Validation is triggered as the user is * typing, but is throttled so that only one ajax call is made to the server per second. @@ -46,7 +47,7 @@ public class FormPage extends BasePage public FormPage() { // create feedback panel to show errors - final FeedbackPanel feedback = new FeedbackPanel("feedback"); + final NotificationPanel feedback = new NotificationPanel("feedback"); feedback.setOutputMarkupId(true); add(feedback); http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/GuestBook.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/GuestBook.html b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/GuestBook.html index 37a0415..9a8207b 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/GuestBook.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/GuestBook.html @@ -6,27 +6,37 @@ </head> <body> <wicket:extend> - <form wicket:id = "commentForm" id = "commentForm"> - Add your comment here: - <p/> - <textarea wicket:id = "text">This is a comment</textarea> - <p/> - <input type = "submit" value = "Submit"/> + <form wicket:id="commentForm" class="form-horizontal"> + <label wicket:for="text">Add your comment here:</label> + <div class="form-group"> + <div class="col-sm-3"> + <textarea wicket:id="text" class="form-control">This is a comment</textarea> + </div> + <div class="col-sm-1"> + <input type="submit" value="Submit" class="btn btn-lg btn-primary"/> + </div> + </div> + + </form> - <div wicket:id="comments"> - <span wicket:id="comments"> - <p> - <span wicket:id = "date">1/1/2004</span><br /> - <span wicket:id = "text">Comment text goes here.</span> - </p> - </span> + + <div class="row"> + <div class="col-sm-3"> + <div wicket:id="comments" class="list-group"> + <div wicket:id="comments" class="list-group-item"> + <span wicket:id="date">1/1/2004</span><br/> + <span wicket:id="text">Comment text goes here.</span> + </div> + </div> + <wicket:remove> + <p> + 1/2/2004<br/> + More comment text here. + </p> + </wicket:remove> + </div> </div> - <wicket:remove> - <p> - 1/2/2004<br/> - More comment text here. - </p> - </wicket:remove> + </wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/OnChangeAjaxBehaviorPage.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/OnChangeAjaxBehaviorPage.html b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/OnChangeAjaxBehaviorPage.html index 1c218cc..2b30cc6 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/OnChangeAjaxBehaviorPage.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/OnChangeAjaxBehaviorPage.html @@ -2,12 +2,16 @@ <html xmlns:wicket="http://wicket.apache.org"> <body> <wicket:extend> - - <form wicket:id="form"> - Field: <input type="text" wicket:id="field" size="50"/><br/> - Values:<span wicket:id="selectedValue"></span><br/> - </form> + <div class="row"> + <div class="col-sm-4"> + Start typing the name of some country + <form wicket:id="form"> + <input type="text" wicket:id="field" size="50" class="form-control"/><br/> + Countries:<span wicket:id="selectedValue"></span><br/> + </form> + </div> + </div> </wicket:extend> </body> -</html> \ No newline at end of file +</html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TodoList.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TodoList.html b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TodoList.html index 8ec68d4..d67ac56 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TodoList.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TodoList.html @@ -5,13 +5,10 @@ <link rel="stylesheet" type="text/css" href="style.css" /> <wicket:head> <style type="text/css"> - div { - aborder : 1px solid red; - } .item { + display: block; } .itemCheck { - float : left; width : 50px; text-align : right; padding-right : 10px; @@ -23,26 +20,30 @@ </wicket:head> </head> <body> - <wicket:extend> - <a href="#" wicket:id="ajaxback">Ajax Back</a> - <div wicket:id="showItems"> +<wicket:extend> + + <div wicket:id="showItems" style="padding-top: 30px"> <div class="item" wicket:id="item"> - <div class="itemCheck"><input type="checkbox" wicket:id="check" /></div> - <div class="itemText"><span wicket:id="text">item text</span></div> + <label class="itemText"> + <span class="itemCheck"><input type="checkbox" wicket:id="check"/></span> + <span wicket:id="text" >item text</span> + </label> </div> </div> - <div class="item"> + <div class="item row"> <div class="itemCheck"> </div> - <div class="itemText" wicket:id="addItems"> - <a href="#" wicket:id="link">New item</a>    <a href="#" wicket:id="remove">Remove completed</a> + <div class="itemText col-sm-4" wicket:id="addItems"> + <a wicket:id="link" class="btn btn-link">New item</a>     + <a wicket:id="remove" class="btn btn-link">Remove completed</a> + <form wicket:id="form"> - <input type="text" wicket:id="text" /> - <input type="button" wicket:id="add" value="Add item" /> or - <input type="button" wicket:id="cancel" value="Cancel" /> + <input type="text" wicket:id="text" class="form-control"/> + <input type="button" wicket:id="add" value="Add item" class="btn btn-primary btn-sm"/> + <input type="button" wicket:id="cancel" value="Cancel" class="btn btn-default btn-sm"/> </form> </div> </div> - </wicket:extend> +</wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TodoList.java ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TodoList.java b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TodoList.java index 9c37a48..68d1fa7 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TodoList.java +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TodoList.java @@ -411,17 +411,6 @@ public class TodoList extends BasePage showItems = new TodoItemsContainer("showItems"); add(showItems); - add(new AjaxFallbackLink<Void>("ajaxback") - { - /** - * @see org.apache.wicket.ajax.markup.html.AjaxFallbackLink#onClick(org.apache.wicket.ajax.AjaxRequestTarget) - */ - @Override - public void onClick(AjaxRequestTarget target) - { - setResponsePage(getPage()); - } - }); // add the add container for the todo items. add(new AddItemsContainer("addItems")); } http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/images/Home.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/images/Home.html b/wicket-examples/src/main/java/org/apache/wicket/examples/images/Home.html index 7624089..b8c8dc6 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/images/Home.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/images/Home.html @@ -4,18 +4,19 @@ <link rel="stylesheet" type="text/css" href="style.css"/> </head> <body> - <span wicket:id="mainNavigation"/> - <img src = "Image1.gif"/> - <img wicket:id = "image2" src = "Image2.gif"/> - <img wicket:id = "image3"/> - <img wicket:id = "image4"/> - <img wicket:id = "image5"/> - <img wicket:id = "okButton"/> - <img wicket:id = "cancelButton"/> - <img wicket:id = "imageModelResourceReference"/> - <img wicket:id = "imageModelResource"/> +<wicket:extend> + <img src="Image1.gif"/> + <img wicket:id="image2" src="Image2.gif"/> + <img wicket:id="image3"/> + <img wicket:id="image4"/> + <img wicket:id="image5"/> + <img wicket:id="okButton"/> + <img wicket:id="cancelButton"/> + <img wicket:id="imageModelResourceReference"/> + <img wicket:id="imageModelResource"/> <wicket:link> <img src="Image2.gif" /> </wicket:link> +</wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.html b/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.html index c0e435e..8b67d6d 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.html @@ -4,59 +4,63 @@ <link rel="stylesheet" type="text/css" href="style.css"/> </head> <body> - - <span wicket:id="mainNavigation"/> +<wicket:extend> <!-- Example to demonstrate different kinds of linking supported --> - <a wicket:id = "actionLink">Action link clicked <span wicket:id = "linkClickCount">0</span> times</a> + <a class="btn btn-link" wicket:id = "actionLink">Action link clicked <span wicket:id = "linkClickCount">0</span> times</a> <p> - <a wicket:id = "linkToAnchor">Execute link and go to the link's anchor</a> + <a class="btn btn-link" wicket:id = "linkToAnchor">Execute link and go to the link's anchor</a> </p><p> - <a wicket:id = "anotherlinkToAnchor" href="#anotherAnchor">Another anchor link, this time using href attribute's value</a> + <a class="btn btn-link" wicket:id = "anotherlinkToAnchor" href="#anotherAnchor">Another anchor link, this time using href attribute's value</a> </p><p> - <input type="button" wicket:id = "actionOnClickLink" value="click me" /> + <input type="button" class="btn btn-primary" wicket:id = "actionOnClickLink" value="click me" /> Button link clicked <span wicket:id = "onClickLinkClickCount">0</span> times </p><p> - <a wicket:id = "page1Link">Click this BookmarkablePageLink to go to Page1</a> + <a class="btn btn-link" wicket:id = "page1Link">Click this BookmarkablePageLink to go to Page1</a> </p><p> - <wicket:link><a href = "Page2.html">Click this 'autolink' to go to Page2</a></wicket:link> + <wicket:link><a class="btn btn-link" href = "Page2.html">Click this 'autolink' to go to Page2</a></wicket:link> </p><p> - <a wicket:id = "page3Link">Click this BookmarkablePageLink to go to Page3</a> + <a class="btn btn-link" wicket:id = "page3Link">Click this BookmarkablePageLink to go to Page3</a> </p><p> - <a wicket:id = "bookDetailsLink">Click this PageLink for BookDetails on The Hobbit</a> + <a class="btn btn-link" wicket:id = "bookDetailsLink">Click this PageLink for BookDetails on The Hobbit</a> </p><p> - <a wicket:id = "bookDetailsLink2">Click this PageLink for BookDetails on Inside The Matrix</a> + <a class="btn btn-link" wicket:id = "bookDetailsLink2">Click this PageLink for BookDetails on Inside The Matrix</a> </p><p> <map wicket:id = "imageMap"></map> <img border="0" wicket:id="imageForMap" src = "ImageMap.gif"/> </p><p> - <a wicket:id = "popupLink">Click this link for a popup</a> + <a class="btn btn-link" wicket:id = "popupLink">Click this link for a popup</a> </p><p> - <input type="submit" wicket:id = "popupButtonLink" value="Click this button for a popup" /> + <input type="submit" class="btn btn-info" wicket:id = "popupButtonLink" value="Click this button for a popup" /> </p><p> - <a wicket:id = "google" href="#">[link text here]</a> + <a class="btn btn-link" wicket:id = "google" href="#">[link text here]</a> </p><p> - <a wicket:id = "googlePopup" href="#">[link text here]</a> + <a class="btn btn-link" wicket:id = "googlePopup" href="#">[link text here]</a> </p><p> - <a wicket:id = "cancelButtonLink">cancel button</a> + <a class="btn btn-link" wicket:id = "cancelButtonLink">cancel button</a> </p><p> - <a wicket:id = "downloadLink">Download button</a> + <a class="btn btn-link" wicket:id = "downloadLink">Download button</a> </p><p> <form wicket:id="redirectForm"> - <input wicket:id="redirectUrl" type="text" size="50" /><input type="submit" value="go"/> + <div class="form-group"> + <div class="col-sm-4"> + <input wicket:id="redirectUrl" class="form-control" type="text" size="50" /> + </div> + <input type="submit" class="btn btn-default" value="go"/> + </div> + </form> </p><p> - <a wicket:id="linkWithLabel">[will be set in .java]</a> + <a class="btn btn-link" wicket:id="linkWithLabel">[will be set in .java]</a> </p><p> <div wicket:id="anchorLabel">[label for anchor]</div> </p><p> <div id="anotherAnchor">This is another div that serves as an anchor</div> </p> - <p> - <span wicket:id="feedback" /> - </p> - + <div wicket:id="feedback"></div> + +</wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.java ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.java b/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.java index 314eead..63954f1 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.java +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.java @@ -35,18 +35,18 @@ import org.apache.wicket.markup.html.link.Link; import org.apache.wicket.markup.html.link.PopupSettings; import org.apache.wicket.markup.html.link.ResourceLink; import org.apache.wicket.markup.html.pages.RedirectPage; -import org.apache.wicket.markup.html.panel.FeedbackPanel; import org.apache.wicket.markup.parser.filter.RelativePathPrefixHandler; import org.apache.wicket.model.AbstractReadOnlyModel; import org.apache.wicket.model.CompoundPropertyModel; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; -import org.apache.wicket.request.mapper.parameter.INamedParameters; import org.apache.wicket.request.resource.PackageResourceReference; import org.apache.wicket.request.resource.SharedResourceReference; import org.apache.wicket.util.file.Files; import org.apache.wicket.util.time.Duration; +import de.agilecoders.wicket.core.markup.html.bootstrap.common.NotificationPanel; + /** * Demonstrates different flavors of hyperlinks. @@ -180,7 +180,7 @@ public class Home extends WicketExamplePage }, "Downlöad\"here now.tmp").setCacheDuration(Duration.NONE).setDeleteAfterDownload(true)); // redirect to external url form - FeedbackPanel feedbackPanel = new FeedbackPanel("feedback"); + NotificationPanel feedbackPanel = new NotificationPanel("feedback"); add(feedbackPanel); add(new RedirectForm("redirectForm")); http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/NavomaticApplication.java ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/NavomaticApplication.java b/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/NavomaticApplication.java index 2656575..1f4df6c 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/NavomaticApplication.java +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/NavomaticApplication.java @@ -27,13 +27,6 @@ import org.apache.wicket.markup.html.link.DisabledLinkBehavior; */ public class NavomaticApplication extends WicketExampleApplication { - /** - * Constructor. - */ - public NavomaticApplication() - { - } - @Override protected void init() { @@ -50,6 +43,4 @@ public class NavomaticApplication extends WicketExampleApplication { return Page1.class; } - - } http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page1.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page1.html b/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page1.html index a619ce0..c325b0c 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page1.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page1.html @@ -4,7 +4,8 @@ <link rel="stylesheet" type="text/css" href="style.css"/> </head> <body> - <div wicket:id = "mainNavigation"></div> +<wicket:extend> + <div wicket:id = "navomaticBorder"> <div style = "width:250px"> <div style="text-align: center;"><h3>Page 1</h3></div> @@ -15,5 +16,7 @@ and click the "Page2" link now. </div> </div> + +</wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page2.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page2.html b/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page2.html index 90c64e9..5458aa8 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page2.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page2.html @@ -4,7 +4,8 @@ <link rel="stylesheet" type="text/css" href="style.css"/> </head> <body> - <div wicket:id = "mainNavigation"></div> +<wicket:extend> + <div wicket:id = "navomaticBorder"> <div style = "width:250px"> <div style="text-align: center;"><h3>Page 2</h3></div> @@ -13,5 +14,7 @@ italicized text. Go ahead and click the Page3 link. </div> </div> + +</wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page3.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page3.html b/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page3.html index 4daf41d..d65a08a 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page3.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page3.html @@ -4,7 +4,7 @@ <link rel="stylesheet" type="text/css" href="style.css"/> </head> <body> - <div wicket:id = "mainNavigation"></div> +<wicket:extend> <div wicket:id = "navomaticBorder"> <div style = "width:400px"> <div style="text-align: center;"><h3>Page 3</h3></div> @@ -26,5 +26,6 @@ adding navigation links to each. </div> </div> +</wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/niceurl/Home.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/niceurl/Home.html b/wicket-examples/src/main/java/org/apache/wicket/examples/niceurl/Home.html index 5bac931..e647401 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/niceurl/Home.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/niceurl/Home.html @@ -5,7 +5,7 @@ </head> <body> - <span wicket:id="mainNavigation"></span> + <wicket:extend> <p> This example displays how you can work with 'nice' urls for bookmarkable pages. @@ -13,33 +13,34 @@ <p> These links refer to pages that were mounted one by one <br /> - <a wicket:id="page1Link"> + <a wicket:id="page1Link" class="btn btn-link"> Click this BookmarkablePageLink to go to Page 1 </a><br/> - <a wicket:id="page2Link"> + <a wicket:id="page2Link" class="btn btn-link"> Click this BookmarkablePageLink to go to Page 2 </a>  After Page 2 is displayed click refresh link to see url parameters in action <br /> - <a wicket:id="page2LinkPp"> + <a wicket:id="page2LinkPp" class="btn btn-link"> Same as page 2, but now the url parameters are encoded with placeholders in the segments </a> <br /> - <a wicket:id="page2LinkUp"> + <a wicket:id="page2LinkUp" class="btn btn-link"> Same as page 2, but now the url parameters are encoded in the segments in Wicket 1.4 style </a> </p> <p> These links refere to pages that were mounted as a whole package <br /> - <a wicket:id="page3Link"> + <a wicket:id="page3Link" class="btn btn-link"> Click this BookmarkablePageLink to go to Page 3 </a><br/> - <a wicket:id="page4Link"> + <a wicket:id="page4Link" class="btn btn-link"> Click this BookmarkablePageLink to go to Page 4 </a><br/> - <a wicket:id="page5Link"> + <a wicket:id="page5Link" class="btn btn-link"> Click this BookmarkablePageLink to go to Page 5 </a>  After Page 5 is displayed click refresh link to see url parameters in action <br /> </p> + </wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home.html b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home.html index 95d778a..cc6d75f 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home.html @@ -4,7 +4,7 @@ <link rel="stylesheet" type="text/css" href="style.css"/> </head> <body> - <span wicket:id="mainNavigation"></span> +<wicket:extend> <span wicket:id = "salutation">Salutation</span> <p> This is tooootally the best beer you can get for under a buck. @@ -22,5 +22,6 @@ <a href="#" wicket:id="goKorean">[go Korean]</a>  <a href="#" wicket:id="goHungarian">[go Hungarian]</a> </p> +</wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home.java ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home.java b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home.java index 7e1230c..79fab13 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home.java +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home.java @@ -45,6 +45,8 @@ public final class Home extends WicketExamplePage */ public Home(final PageParameters parameters) { + super(parameters); + add(new Image("beer", new PackageResourceReference(Home.class, "Beer.gif"))); // create a dummy object to serve as our substitution model http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_da_DK.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_da_DK.html b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_da_DK.html index fd5972c..c29515d 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_da_DK.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_da_DK.html @@ -5,7 +5,7 @@ <link rel="stylesheet" type="text/css" href="style.css"/> </head> <body> - <span wicket:id="mainNavigation"></span> +<wicket:extend> <span wicket:id = "salutation">Salutation</span> <p> En rigtig god øl fra en af de gode danske mikrobryggerier. @@ -23,5 +23,6 @@ <a href="#" wicket:id="goKorean">[go Korean]</a>  <a href="#" wicket:id="goHungarian">[go Hungarian]</a> </p> +</wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_de_DE.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_de_DE.html b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_de_DE.html index 2c6f7f8..6e37d43 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_de_DE.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_de_DE.html @@ -4,7 +4,7 @@ <link rel="stylesheet" type="text/css" href="style.css"/> </head> <body> - <span wicket:id="mainNavigation"></span> +<wicket:extend> <span wicket:id = "salutation">Salutation</span> <p> Etwas ganz besonderes aus der Region @@ -22,5 +22,6 @@ <a href="#" wicket:id="goKorean">[go Korean]</a>  <a href="#" wicket:id="goHungarian">[go Hungarian]</a> </p> +</wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_en_CA.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_en_CA.html b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_en_CA.html index 7d7be53..20e6f65 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_en_CA.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_en_CA.html @@ -4,7 +4,7 @@ <link rel="stylesheet" type="text/css" href="style.css"/> </head> <body> - <span wicket:id="mainNavigation"></span> +<wicket:extend> <span wicket:id = "salutation">Salutation</span> <p> Super beer for a Looney, eh? @@ -22,5 +22,6 @@ <a href="#" wicket:id="goKorean">[go Korean]</a>  <a href="#" wicket:id="goHungarian">[go Hungarian]</a> </p> +</wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_hu.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_hu.html b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_hu.html index 85f9504..d6ac4c9 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_hu.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_hu.html @@ -5,7 +5,7 @@ <link rel="stylesheet" type="text/css" href="style.css"/> </head> <body> - <span wicket:id="mainNavigation"></span> +<wicket:extend> <span wicket:id = "salutation">Salutation</span> <p> Iszol te eleget? Nehogy kiszáradj! @@ -23,5 +23,6 @@ <a href="#" wicket:id="goKorean">[go Korean]</a>  <a href="#" wicket:id="goHungarian">[go Hungarian]</a> </p> +</wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_ko_KR.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_ko_KR.html b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_ko_KR.html index 2bae112..dfd6e97 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_ko_KR.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_ko_KR.html @@ -4,7 +4,7 @@ <link rel="stylesheet" type="text/css" href="style.css"/> </head> <body> - <span wicket:id="mainNavigation"></span> +<wicket:extend> <span wicket:id = "salutation">인사</span> <p> 안녕하세요, 맥주 드릴까요? @@ -22,5 +22,6 @@ <a href="#" wicket:id="goKorean">[go Korean]</a>  <a href="#" wicket:id="goHungarian">[go Hungarian]</a> </p> +</wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_nl_NL.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_nl_NL.html b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_nl_NL.html index 84b7d15..053c5e6 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_nl_NL.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_nl_NL.html @@ -4,7 +4,7 @@ <link rel="stylesheet" type="text/css" href="style.css"/> </head> <body> - <span wicket:id="mainNavigation"></span> +<wicket:extend> <span wicket:id = "salutation">Salutation</span> <p> Goed bier uut t oosten. @@ -22,5 +22,6 @@ <a href="#" wicket:id="goKorean">[go Korean]</a>  <a href="#" wicket:id="goHungarian">[go Hungarian]</a> </p> +</wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_zh_CN.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_zh_CN.html b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_zh_CN.html index b2dd759..b2088a2 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_zh_CN.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/pub/Home_zh_CN.html @@ -6,7 +6,7 @@ <link rel="stylesheet" type="text/css" href="style.css"/> </head> <body> - <span wicket:id="mainNavigation"></span> +<wicket:extend> <span wicket:id = "salutation">Salutation</span> <p> æ¨çæä½³éæ© @@ -23,6 +23,7 @@ <a href="#" wicket:id="goDanish">[go Danish]</a>  <a href="#" wicket:id="goKorean">[go Korean]</a>  <a href="#" wicket:id="goHungarian">[go Hungarian]</a> - </p> + </p> +</wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/unicodeconverter/UnicodeConverter.html ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/unicodeconverter/UnicodeConverter.html b/wicket-examples/src/main/java/org/apache/wicket/examples/unicodeconverter/UnicodeConverter.html index c1f9bef..be497de 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/unicodeconverter/UnicodeConverter.html +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/unicodeconverter/UnicodeConverter.html @@ -5,31 +5,34 @@ <link rel="stylesheet" type="text/css" href="style.css"/> </head> <body> - <span wicket:id="mainNavigation"/> +<wicket:extend> <form wicket:id="form"> <table> - <tr> - <td colspan="3"> - Paste in some unicode to test. For instance, - <a href="http://babelfish.altavista.com/tr" target="new">translate something to chinese</a> - </td> - </tr> - <tr> - <td> - <textarea wicket:id="source" rows="10" cols="40">input</textarea> - </td> - <td align="middle"> - <select wicket:id="translationType"></select> - <br /> - <input type="submit" value="translate" /> - </td> - <td valign="top"> - <textarea wicket:id="target" rows="10" cols="40">input</textarea> - </td> - </tr> + <tr> + <td colspan="3"> + Paste in some unicode to test. For instance, + <a href="https://translate.google.com/" target="new">translate something to chinese</a> + </td> + </tr> + <tr> + <td> + <textarea wicket:id="source" rows="10" cols="40" class="form-control">input</textarea> + </td> + <td> </td> + <td align="middle"> + <select wicket:id="translationType" class="form-control"></select> + <br/> + <input type="submit" value="translate" class="btn btn-default"/> + </td> + <td> </td> + <td valign="top"> + <textarea wicket:id="target" rows="10" cols="40" class="form-control">input</textarea> + </td> + </tr> </table> </form> +</wicket:extend> </body> </html> http://git-wip-us.apache.org/repos/asf/wicket/blob/6337fb99/wicket-examples/src/main/java/org/apache/wicket/examples/unicodeconverter/UnicodeConverter.java ---------------------------------------------------------------------- diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/unicodeconverter/UnicodeConverter.java b/wicket-examples/src/main/java/org/apache/wicket/examples/unicodeconverter/UnicodeConverter.java index 7f5c7f1..6acfd9a 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/unicodeconverter/UnicodeConverter.java +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/unicodeconverter/UnicodeConverter.java @@ -65,14 +65,16 @@ public class UnicodeConverter extends WicketExamplePage @Override public String getObject() { - String result; - if (TO_ESCAPED_UNICODE.equals(translationType)) + String result = ""; + if (Strings.isEmpty(source) == false) { - result = Strings.toEscapedUnicode(source); - } - else - { - result = Strings.fromEscapedUnicode(source); + if (TO_ESCAPED_UNICODE.equals(translationType)) + { + result = Strings.toEscapedUnicode(source); + } else + { + result = Strings.fromEscapedUnicode(source); + } } return result; } @@ -137,4 +139,4 @@ public class UnicodeConverter extends WicketExamplePage { this.translationType = translationType; } -} \ No newline at end of file +}
