Repository: wicket Updated Branches: refs/heads/master e4fbb2a86 -> d129c980b
WICKET-6367 Fix for parsing error when a wrong inner html anchor is found Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/d129c980 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/d129c980 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/d129c980 Branch: refs/heads/master Commit: d129c980b8cf288948f1690fc0bccbe6807a032e Parents: e4fbb2a Author: Andrea Del Bene <andrea.delb...@innoteam.it> Authored: Fri May 19 16:13:55 2017 +0200 Committer: Andrea Del Bene <andrea.delb...@innoteam.it> Committed: Fri May 19 16:13:55 2017 +0200 ---------------------------------------------------------------------- .../main/asciidoc/componentLifecycle/componentLifecycle_4.adoc | 4 ++-- wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_3.adoc | 2 +- .../src/main/asciidoc/keepControl/keepControl_11.adoc | 3 +-- wicket-user-guide/src/main/asciidoc/layout/layout_2.adoc | 2 +- .../src/main/asciidoc/requestProcessing/requestProcessing_3.adoc | 4 ++-- wicket-user-guide/src/main/asciidoc/resources/resources_10.adoc | 2 +- wicket-user-guide/src/main/asciidoc/resources/resources_4.adoc | 2 +- wicket-user-guide/src/main/asciidoc/security/security_4.adoc | 2 +- 8 files changed, 10 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/d129c980/wicket-user-guide/src/main/asciidoc/componentLifecycle/componentLifecycle_4.adoc ---------------------------------------------------------------------- diff --git a/wicket-user-guide/src/main/asciidoc/componentLifecycle/componentLifecycle_4.adoc b/wicket-user-guide/src/main/asciidoc/componentLifecycle/componentLifecycle_4.adoc index 2c7cd56..db28a95 100644 --- a/wicket-user-guide/src/main/asciidoc/componentLifecycle/componentLifecycle_4.adoc +++ b/wicket-user-guide/src/main/asciidoc/componentLifecycle/componentLifecycle_4.adoc @@ -3,7 +3,7 @@ This stage is triggered each time a component is rendered by Wicket, typically w === Method onConfigure -Method _onConfigure()_ has been introduced in order to provide a good point to manage the component states such as its visibility or enabled state. This method is called before the render phase starts. As stated in <<keepControl.adoc#_hiding_or_disabling_a_component,chapter 6.1>>, _isVisible_ and _isEnabled_ are called multiple times when a page or a component is rendered, so it's highly recommended not to directly override these method, but rather to use _onConfigure_ to change component states. On the contrary method _onBeforeRender_ (see the next paragraph) is not indicated for this task because it will not be invoked if component visibility is set to false. +Method _onConfigure()_ has been introduced in order to provide a good point to manage the component states such as its visibility or enabled state. This method is called before the render phase starts. As stated in <<_hiding_or_disabling_a_component,chapter 6.1>>, _isVisible_ and _isEnabled_ are called multiple times when a page or a component is rendered, so it's highly recommended not to directly override these method, but rather to use _onConfigure_ to change component states. On the contrary method _onBeforeRender_ (see the next paragraph) is not indicated for this task because it will not be invoked if component visibility is set to false. === Method onBeforeRender @@ -104,7 +104,7 @@ public class HomePage extends WebPage { Just like we do with _onInitialize_, if we decide to override _onComponentTag_ we must remember to call the same method of the super class because also this class may also customize the tag. Overriding _onComponentTag_ is perfectly fine if we have to customize the tag of a specific component, but if we wanted to reuse the code across different components we should consider to use a behavior in place of this hook method. -We have already seen in <<keepControl.adoc#_modifing_tag_attributes,chapter 6.2>> how to use behavior _AttributeModifier_ to manipulate the tag's attribute. In <<advanced.adoc#_enriching_components_with_behaviors,chapter 19.1>> we will see that base class _Behavior_ offers also a callback method named _onComponentTag(ComponentTag, Component)_ that can be used in place of the hook method _onComponentTag(ComponentTag)_. +We have already seen in <<_modifing_tag_attributes,chapter 6.2>> how to use behavior _AttributeModifier_ to manipulate the tag's attribute. In <<_enriching_components_with_behaviors,chapter 19.1>> we will see that base class _Behavior_ offers also a callback method named _onComponentTag(ComponentTag, Component)_ that can be used in place of the hook method _onComponentTag(ComponentTag)_. === Methods onComponentTagBody http://git-wip-us.apache.org/repos/asf/wicket/blob/d129c980/wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_3.adoc ---------------------------------------------------------------------- diff --git a/wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_3.adoc b/wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_3.adoc index 7137589..6c1601f 100644 --- a/wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_3.adoc +++ b/wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_3.adoc @@ -30,7 +30,7 @@ public class HomePage extends WebPage { ---- Apart from subclassing _WebPage_, _HomePage_ defines a constructor that adds a _Label_ component to itself. -Method _add(Component component)_ is inherited from ancestor class _org.apache.wicket.MarkupContainer_ and is used to add children components to a web page. We'll see more about _MarkupContainer_ later in <<layout.adoc#_here_comes_the_inheritance,chapter 5.2>>. +Method _add(Component component)_ is inherited from ancestor class _org.apache.wicket.MarkupContainer_ and is used to add children components to a web page. We'll see more about _MarkupContainer_ later in <<_here_comes_the_inheritance,chapter 5.2>>. Class _org.apache.wicket.markup.html.basic.Label_ is the simplest component shipped with Wicket. It just inserts a string (the second argument of its constructor) inside the corresponding HTML tag. Just like any other Wicket component, _Label_ needs a textual id (_'helloMessage'_ in our example) to be instantiated. At runtime Wicket will use this value to find the HTML tag we want to bind to the component. This tag must have a special attribute called _wicket:id_ and its value must be identical to the component id (comparison is case-sensitive!). http://git-wip-us.apache.org/repos/asf/wicket/blob/d129c980/wicket-user-guide/src/main/asciidoc/keepControl/keepControl_11.adoc ---------------------------------------------------------------------- diff --git a/wicket-user-guide/src/main/asciidoc/keepControl/keepControl_11.adoc b/wicket-user-guide/src/main/asciidoc/keepControl/keepControl_11.adoc index af47963..720524e 100644 --- a/wicket-user-guide/src/main/asciidoc/keepControl/keepControl_11.adoc +++ b/wicket-user-guide/src/main/asciidoc/keepControl/keepControl_11.adoc @@ -4,5 +4,4 @@ In this chapter we have seen the tools provided by Wicket to gain complete control over the generated HTML. However we didn't see yet how we can repeat a portion of HTML with Wicket. With classic server-side technologies like PHP or JSP we use loops (like _while_ or _for_) inside our pages to achieve this result. To perform this task Wicket provides a special-purpose family of components called repeaters and designed to repeat their markup body to display a set of items. -But to fully understand how these components work, we must first learn more of Wicket's basics. That's why repeaters will be introduced later in -<<_displaying_multiple_items_with_repeaters,chapter 13>>. +But to fully understand how these components work, we must first learn more of Wicket's basics. That's why repeaters will be introduced later in <<_displaying_multiple_items_with_repeaters,chapter 13>>. http://git-wip-us.apache.org/repos/asf/wicket/blob/d129c980/wicket-user-guide/src/main/asciidoc/layout/layout_2.adoc ---------------------------------------------------------------------- diff --git a/wicket-user-guide/src/main/asciidoc/layout/layout_2.adoc b/wicket-user-guide/src/main/asciidoc/layout/layout_2.adoc index 70d7fe3..d0fce6d 100644 --- a/wicket-user-guide/src/main/asciidoc/layout/layout_2.adoc +++ b/wicket-user-guide/src/main/asciidoc/layout/layout_2.adoc @@ -22,7 +22,7 @@ image::../img/page-panel-hierarchy.png[] _Illustration: Hierarchy of WebPage and Panel classes_ -Subclasses of _MarkupContainer_ can contain children components that can be added with method _add(Component...)_ (seen in <<whyLearn.adoc#_benefits_of_component_oriented_frameworks_for_web_development,chapter 3.3>>). _MarkupContainer_ implements a full set of methods to manage children components. The basic operations we can do on them are: +Subclasses of _MarkupContainer_ can contain children components that can be added with method _add(Component...)_ (seen in <<_benefits_of_component_oriented_frameworks_for_web_development,chapter 3.3>>). _MarkupContainer_ implements a full set of methods to manage children components. The basic operations we can do on them are: * add one or more children components (with method _add_). * remove a specific child component (with method _remove_). http://git-wip-us.apache.org/repos/asf/wicket/blob/d129c980/wicket-user-guide/src/main/asciidoc/requestProcessing/requestProcessing_3.adoc ---------------------------------------------------------------------- diff --git a/wicket-user-guide/src/main/asciidoc/requestProcessing/requestProcessing_3.adoc b/wicket-user-guide/src/main/asciidoc/requestProcessing/requestProcessing_3.adoc index 73c0102..761e13d 100644 --- a/wicket-user-guide/src/main/asciidoc/requestProcessing/requestProcessing_3.adoc +++ b/wicket-user-guide/src/main/asciidoc/requestProcessing/requestProcessing_3.adoc @@ -5,7 +5,7 @@ Class _org.apache.wicket.request.cycle.RequestCycle_ is the entity in charge of Method _createRequestCycle_ is declared as final, so we can't override it to return a custom subclass of _RequestCycle_. Instead, we must build a request cycle provider implementing interface _org.apache.wicket.IRequestCycleProvider_, and then we must tell our application class to use it via the _setRequestCycleProvider_ method. -The current running request cycle can be retrieved at any time by calling its static method _RequestCycle.get()_. Strictly speaking this method returns the request cycle associated with the current (or local) thread, which is the thread that is serving the current request. A similar _get()_ method is also implemented in classes _org.apache.wicket.Application_ (as we have seen in <<helloWorld.adoc#_configuration_of_wicket_applications,paragraph 4.2.2>>) and _org.apache.wicket.Session_ in order to get the application and the session in use by the current thread. +The current running request cycle can be retrieved at any time by calling its static method _RequestCycle.get()_. Strictly speaking this method returns the request cycle associated with the current (or local) thread, which is the thread that is serving the current request. A similar _get()_ method is also implemented in classes _org.apache.wicket.Application_ (as we have seen in <<_configuration_of_wicket_applications,paragraph 4.2.2>>) and _org.apache.wicket.Session_ in order to get the application and the session in use by the current thread. NOTE: The implementation of the get method takes advantage of the standard class _java.lang.ThreadLocal_. See its JavaDoc for an introduction to local-thread variables. @@ -45,7 +45,7 @@ The overloaded _urlFor_ method from above also has a corresponding version that === Method setResponsePage -The _RequestCycle_ class contains the implementation of the _setResponsePage_ method we use to redirect a user to a specific page (see <<helloWorld.adoc#_wicket_links,paragraph 4.4>>). The namesake method of class _org.apache.wicket.Component_ is just a convenience method that internally invokes the actual implementation on current request cycle: +The _RequestCycle_ class contains the implementation of the _setResponsePage_ method we use to redirect a user to a specific page (see <<_wicket_links,paragraph 4.4>>). The namesake method of class _org.apache.wicket.Component_ is just a convenience method that internally invokes the actual implementation on current request cycle: [source,java] ---- http://git-wip-us.apache.org/repos/asf/wicket/blob/d129c980/wicket-user-guide/src/main/asciidoc/resources/resources_10.adoc ---------------------------------------------------------------------- diff --git a/wicket-user-guide/src/main/asciidoc/resources/resources_10.adoc b/wicket-user-guide/src/main/asciidoc/resources/resources_10.adoc index 0147138..e1926bf 100644 --- a/wicket-user-guide/src/main/asciidoc/resources/resources_10.adoc +++ b/wicket-user-guide/src/main/asciidoc/resources/resources_10.adoc @@ -3,7 +3,7 @@ In Wicket the best way to add dynamic functionalities to our application (such as csv export, a pdf generated on the fly, etc...) is implementing a custom resource. In this paragraph as example of custom resource we will build a basic RSS feeds generator which can be used to publish feeds on our site (project CustomResourceMounting). Instead of generating a RSS feed by hand we will use Rome framework and its utility classes. -As hinted above in <<resources.adoc#_static_vs_dynamic_resources,paragraph 16.1>>, class _AbstractResource_ can be used as base class to implement new resources. This class defines abstract method _newResourceResponse_ which is invoked when the resource is requested. The following is the code of our RSS feeds generator: +As hinted above in <<_static_vs_dynamic_resources,paragraph 16.1>>, class _AbstractResource_ can be used as base class to implement new resources. This class defines abstract method _newResourceResponse_ which is invoked when the resource is requested. The following is the code of our RSS feeds generator: [source,java] ---- http://git-wip-us.apache.org/repos/asf/wicket/blob/d129c980/wicket-user-guide/src/main/asciidoc/resources/resources_4.adoc ---------------------------------------------------------------------- diff --git a/wicket-user-guide/src/main/asciidoc/resources/resources_4.adoc b/wicket-user-guide/src/main/asciidoc/resources/resources_4.adoc index 59ae47e..2491f36 100644 --- a/wicket-user-guide/src/main/asciidoc/resources/resources_4.adoc +++ b/wicket-user-guide/src/main/asciidoc/resources/resources_4.adoc @@ -1,7 +1,7 @@ -Wicket comes with interface _org.apache.wicket.markup.html.IHeaderContributor_ which allows components and behaviors (which will be introduced later in <<advanced.adoc#_enriching_components_with_behaviors,paragraph 18.1>>) to contribute to the header section of their page. The only method defined in this interface is _renderHead(IHeaderResponse response)_ where _IHeaderResponse_ is an interface which defines method _render(HeaderItem item)_ to write static resources or free-form text into the header section of the page. +Wicket comes with interface _org.apache.wicket.markup.html.IHeaderContributor_ which allows components and behaviors (which will be introduced later in <<_enriching_components_with_behaviors,paragraph 18.1>>) to contribute to the header section of their page. The only method defined in this interface is _renderHead(IHeaderResponse response)_ where _IHeaderResponse_ is an interface which defines method _render(HeaderItem item)_ to write static resources or free-form text into the header section of the page. Header entries are instances of abstract class _org.apache.wicket.markup.head.HeaderItem_. Wicket provides a set of built-in implementations of this class suited for the most common types of resources. With the exception of _PriorityHeaderItem_, every implementation of _HeaderItem_ is an abstract factory class: http://git-wip-us.apache.org/repos/asf/wicket/blob/d129c980/wicket-user-guide/src/main/asciidoc/security/security_4.adoc ---------------------------------------------------------------------- diff --git a/wicket-user-guide/src/main/asciidoc/security/security_4.adoc b/wicket-user-guide/src/main/asciidoc/security/security_4.adoc index ae43881..6150dcc 100644 --- a/wicket-user-guide/src/main/asciidoc/security/security_4.adoc +++ b/wicket-user-guide/src/main/asciidoc/security/security_4.adoc @@ -1,5 +1,5 @@ -In chapter <<urls.adoc#_generating_structured_and_clear_urls,10.6>> we have seen how to encrypt URLs using _CryptoMapper_ request mapper. To encrypt/decrypt page URLs _CryptoMapper_ uses an instance of _org.apache.wicket.util.crypt.ICrypt_ interface: +In chapter <<_generating_structured_and_clear_urls,10.6>> we have seen how to encrypt URLs using _CryptoMapper_ request mapper. To encrypt/decrypt page URLs _CryptoMapper_ uses an instance of _org.apache.wicket.util.crypt.ICrypt_ interface: [source,java] ----