Repository: wicket
Updated Branches:
  refs/heads/master e22614277 -> 324302079


WICKET-6367 UserGuide bugs/improvements

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/32430207
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/32430207
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/32430207

Branch: refs/heads/master
Commit: 32430207921f00ad59f36902d75667128c134eb1
Parents: e226142
Author: Andrea Del Bene <[email protected]>
Authored: Wed May 10 17:54:08 2017 +0200
Committer: Andrea Del Bene <[email protected]>
Committed: Wed May 10 17:54:08 2017 +0200

----------------------------------------------------------------------
 wicket-user-guide/src/main/asciidoc/ajax/ajax_3.adoc         | 2 +-
 .../src/main/asciidoc/jsintegration/jsintegration_2.adoc     | 2 +-
 wicket-user-guide/src/main/asciidoc/nativewebsockets.adoc    | 2 +-
 .../main/asciidoc/nativewebsockets/nativewebsockets_1.adoc   | 2 +-
 .../main/asciidoc/nativewebsockets/nativewebsockets_2.adoc   | 8 ++++----
 .../src/main/asciidoc/repeaters/repeaters_4.adoc             | 4 ++--
 6 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/32430207/wicket-user-guide/src/main/asciidoc/ajax/ajax_3.adoc
----------------------------------------------------------------------
diff --git a/wicket-user-guide/src/main/asciidoc/ajax/ajax_3.adoc 
b/wicket-user-guide/src/main/asciidoc/ajax/ajax_3.adoc
index cc4bcec..5fe8a4b 100644
--- a/wicket-user-guide/src/main/asciidoc/ajax/ajax_3.adoc
+++ b/wicket-user-guide/src/main/asciidoc/ajax/ajax_3.adoc
@@ -120,5 +120,5 @@ dynamicLabel.add(new 
AbstractAjaxTimerBehavior(Duration.seconds(3)) {
 add(dynamicLabel);
 ----
 
-NOTE: As side effect AJAX components and behaviors make their hosting page 
stateful. As a consequence they are unfit for those pages that must stay 
stateless. Project WicketStuff provides a module with a stateless version of 
the most common AJAX components and behaviors. You can find more informations 
on this module in Appendix B. 
+NOTE: By default AJAX components and behaviors are _stateful_, but as we will 
see very soon they can be easily turned to statelss if we need to use them in 
stateless pages.
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/32430207/wicket-user-guide/src/main/asciidoc/jsintegration/jsintegration_2.adoc
----------------------------------------------------------------------
diff --git 
a/wicket-user-guide/src/main/asciidoc/jsintegration/jsintegration_2.adoc 
b/wicket-user-guide/src/main/asciidoc/jsintegration/jsintegration_2.adoc
index 371eb9a..e839d9a 100644
--- a/wicket-user-guide/src/main/asciidoc/jsintegration/jsintegration_2.adoc
+++ b/wicket-user-guide/src/main/asciidoc/jsintegration/jsintegration_2.adoc
@@ -1,7 +1,7 @@
 
 
 
-Our new component will extend the a built-in text field 
_org.apache.wicket.extensions.markup.html.form.DateTextField_ which already 
uses a java.util.Date as model object and already performs conversion and 
validation for input values. Since the component must be self-contained, we 
must ensure that the JavaScript libraries it relies on (JQuery and JQuery UI) 
will be always available. 
+Our new component will extend the built-in text field 
_org.apache.wicket.extensions.markup.html.form.DateTextField_ which already 
uses a java.util.Date as model object and already performs conversion and 
validation for input values. Since the component must be self-contained, we 
must ensure that the JavaScript libraries it relies on (JQuery and JQuery UI) 
will be always available. 
 
 Starting from version 6.0 Wicket has adopted JQuery as backing JavaScript 
library so we can use the  version bundled with Wicket for our custom 
datepicker. 
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/32430207/wicket-user-guide/src/main/asciidoc/nativewebsockets.adoc
----------------------------------------------------------------------
diff --git a/wicket-user-guide/src/main/asciidoc/nativewebsockets.adoc 
b/wicket-user-guide/src/main/asciidoc/nativewebsockets.adoc
index aff2803..96f1e80 100644
--- a/wicket-user-guide/src/main/asciidoc/nativewebsockets.adoc
+++ b/wicket-user-guide/src/main/asciidoc/nativewebsockets.adoc
@@ -1,5 +1,5 @@
 
-http://en.wikipedia.org/wiki/WebSocket[WebSockets]
+http://en.wikipedia.org/wiki/WebSocket[WebSockets] is a technology that 
provides full-duplex communications channels over a single TCP connection. 
 This means that once the browser establish a web socket connection to the 
server the server can push data back to the browser without the browser 
explicitly asking again and again whether there is something new for it.
 
 Wicket Native WebSockets modules provide functionality to integrate with the 
non-standard APIs provided by different web containers (like 
http://tomcat.apache.org/[Apache Tomcat]

http://git-wip-us.apache.org/repos/asf/wicket/blob/32430207/wicket-user-guide/src/main/asciidoc/nativewebsockets/nativewebsockets_1.adoc
----------------------------------------------------------------------
diff --git 
a/wicket-user-guide/src/main/asciidoc/nativewebsockets/nativewebsockets_1.adoc 
b/wicket-user-guide/src/main/asciidoc/nativewebsockets/nativewebsockets_1.adoc
index b960ffe..d285e11 100644
--- 
a/wicket-user-guide/src/main/asciidoc/nativewebsockets/nativewebsockets_1.adoc
+++ 
b/wicket-user-guide/src/main/asciidoc/nativewebsockets/nativewebsockets_1.adoc
@@ -4,7 +4,7 @@ Each of the modules provide a specialization of 
_org.apache.wicket.protocol.http
 WebSockets communication can be used in a Wicket page by using 
_org.apache.wicket.protocol.ws.api.WebSocketBehavior_ or in a IResource by 
exteding _org.apache.wicket.protocol.ws.api.WebSocketResource_.
 When a client is connected it is being registered in a application scoped 
registry using as a key the application name, the client http session id, and 
the id of the page or the resource name that registered it. Later when the 
server needs to push a message it can use this registry to filter out which 
clients need to receive the message.
 
-When a message is received from the client Wicket wraps it in 
_IWebSocketMessage_ and calls WebSocketBehavior1.*onMessage()* or 
WebSocketResource1.*onMessage()* where the application logic can react on it.
+When a message is received from the client Wicket wraps it in 
_IWebSocketMessage_ and calls WebSocketBehavior.*onMessage()* or 
WebSocketResource.*onMessage()* where the application logic can react on it.
 The server can push plain text and binary data to the client, but it can also 
add components for re-render, prepend/append JavaScript as it can do with 
 <<_working_with_ajax,Ajax>>.
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/32430207/wicket-user-guide/src/main/asciidoc/nativewebsockets/nativewebsockets_2.adoc
----------------------------------------------------------------------
diff --git 
a/wicket-user-guide/src/main/asciidoc/nativewebsockets/nativewebsockets_2.adoc 
b/wicket-user-guide/src/main/asciidoc/nativewebsockets/nativewebsockets_2.adoc
index 1e72b12..46acfe0 100644
--- 
a/wicket-user-guide/src/main/asciidoc/nativewebsockets/nativewebsockets_2.adoc
+++ 
b/wicket-user-guide/src/main/asciidoc/nativewebsockets/nativewebsockets_2.adoc
@@ -33,8 +33,8 @@ Depending on the web container that is used the application 
has to add a depende
 </dependency>
 ----
 
-NOTE: All web containers providing JSR356 implementation are built with Java 
7. This is the reason why _wicket-native-websocket-javax_ module is available 
only with Wicket 7.x+. If your application runs with JRE 7.x then you can
-use _wicket-native-websocket-javax_ together with the latest version of Wicket 
6.x. Beware that the API/implementation of _wicket-native-websocket-javax_ may 
change before Wicket 7.0.0 is released!
+NOTE: All web containers providing JSR356 implementation are built with Java 
7. This is the reason why _wicket-native-websocket-javax_ module is available 
only with Wicket 7.x+. If your application runs with JRE 6.x then you can
+use _wicket-native-websocket-javax_ together with the latest version of Wicket 
6.x.
 
 NOTE: The examples above show snippets for Maven's pom.xml but the application 
can use any other dependency management tool like http://www.gradle.org/[Gradle]
 
@@ -91,12 +91,12 @@ public class MyPage extends WebPage {
 }
 ----
 
-Use _message.getText()_ to read the message sent by the client and use 
_handler.push(String)_ to push a text message to the connected client. 
Additionally you can use _handler.add(Component...)_ to add Wicket components 
for re-render, _handler1.prependJavaScript(CharSequence)_ and 
_handler1.appendJavaScript(CharSequence)_ as you do with _AjaxRequestTarget_.
+Use _message.getText()_ to read the message sent by the client and use 
_handler.push(String)_ to push a text message to the connected client. 
Additionally you can use _handler.add(Component...)_ to add Wicket components 
for re-render, _handler.prependJavaScript(CharSequence)_ and 
_handler.appendJavaScript(CharSequence)_ as you do with _AjaxRequestTarget_.
 
 * *WebSocketResource*
 
 Wicket allows one thread at a time to use a page instance to simplify the 
usage of the pages in multithreaded enviroment. When a WebSocket message is 
sent to a page Wicket needs to acquire the lock to that page to be able to pass 
the _IWebSocketMessage_ to the _WebSocketBehavior_. This may be problematic 
when the application needs to send many messages from the client to the server.
-For this reason Wicket provides _WebSocketResource_ - an IResource 
implemetation that provides the same APIs as _WebSocketBehavior_. The benefit 
is that there is no need of synchronization as with the pages and the drawback 
is that _WebSocketRequesthandler1.add(Component...)_ method cannot be used 
because there is no access to the components in an _IResource_.
+For this reason Wicket provides _WebSocketResource_ - an IResource 
implemetation that provides the same APIs as _WebSocketBehavior_. The benefit 
is that there is no need of synchronization as with the pages and the drawback 
is that _WebSocketRequesthandler.add(Component...)_ method cannot be used 
because there is no access to the components in an _IResource_.
 
 To register such WebSocket resource add such line to _YourApplication1.init()_ 
method:
 [source,java]

http://git-wip-us.apache.org/repos/asf/wicket/blob/32430207/wicket-user-guide/src/main/asciidoc/repeaters/repeaters_4.adoc
----------------------------------------------------------------------
diff --git a/wicket-user-guide/src/main/asciidoc/repeaters/repeaters_4.adoc 
b/wicket-user-guide/src/main/asciidoc/repeaters/repeaters_4.adoc
index 46c35c7..420bc8f 100644
--- a/wicket-user-guide/src/main/asciidoc/repeaters/repeaters_4.adoc
+++ b/wicket-user-guide/src/main/asciidoc/repeaters/repeaters_4.adoc
@@ -22,7 +22,7 @@ Class _org.apache.wicket.markup.repeater.data.DataView_ is 
the simplest pageable
 ----
 <table>
        <tr>
-          <th>Name</th><th>Surename</th><th>Address</th><th>Email</th>
+          <th>Name</th><th>Surname</th><th>Address</th><th>Email</th>
        </tr>
        <tr wicket:id="rows">
           <td wicket:id="dataRow"></td>
@@ -45,7 +45,7 @@ DataView<Person> dataView = new DataView<Person>("rows", 
listDataProvider) {
     RepeatingView repeatingView = new RepeatingView("dataRow");
 
     repeatingView.add(new Label(repeatingView.newChildId(), person.getName()));
-    repeatingView.add(new Label(repeatingView.newChildId(), 
person.getSurename()));
+    repeatingView.add(new Label(repeatingView.newChildId(), 
person.getSurname()));
     repeatingView.add(new Label(repeatingView.newChildId(), 
person.getAddress()));    
     repeatingView.add(new Label(repeatingView.newChildId(), 
person.getEmail()));
     item.add(repeatingView); 

Reply via email to