You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by ts...@apache.org on 2015/12/11 18:38:46 UTC

wicket git commit: WICKET-6042 - documentation

Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x 195130f9e -> 24a19c24f


WICKET-6042 - documentation

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

Branch: refs/heads/wicket-7.x
Commit: 24a19c24f7eaa365e829d5e2bd0c2f918ac051c7
Parents: 195130f
Author: Tobias Soloschenko <ts...@apache.org>
Authored: Fri Dec 11 18:35:53 2015 +0100
Committer: Tobias Soloschenko <ts...@apache.org>
Committed: Fri Dec 11 18:35:53 2015 +0100

----------------------------------------------------------------------
 .../src/docs/guide/resources/resources_16.gdoc   | 19 ++++++++++++++++---
 .../src/docs/guide/resources/resources_17.gdoc   |  7 +++++++
 wicket-user-guide/src/docs/guide/toc.yml         |  3 ++-
 3 files changed, 25 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/24a19c24/wicket-user-guide/src/docs/guide/resources/resources_16.gdoc
----------------------------------------------------------------------
diff --git a/wicket-user-guide/src/docs/guide/resources/resources_16.gdoc b/wicket-user-guide/src/docs/guide/resources/resources_16.gdoc
index f522ac9..3a8c152 100644
--- a/wicket-user-guide/src/docs/guide/resources/resources_16.gdoc
+++ b/wicket-user-guide/src/docs/guide/resources/resources_16.gdoc
@@ -1,7 +1,20 @@
+Another way to receive external image resources is to use the corresponding component with a model which contains the target URL. 
 
+The ExternalImage and ExternalSource components which are available since Wicket 7.2.0 / Wicket 8.0.0 fulfill that task.
 
-In this chapter we have learnt how to manage resources with the built-in mechanism provided by Wicket. With this mechanism we handle resources from Java code and Wicket will automatically take care of generating a valid URL for them. We have also seen how resources can be bundled as package resources with a component that depends on them to make it self-contained.
+The following example demonstrates the usage of a CompoundPropertyModel with the model object "ImageSrc". The model object, bound to surrounding component / page, contains an attribute named "url" which is read by the component:
 
-Then, in the second part of the chapter, we have built a custom resource and we have learnt how to mount it to an arbitrary URL and how to make it globally available as shared resource.
+Java:
+{code}
+ImageSrc imageSrc = new ImageSrc();
+imageSrc.setUrl("http://www.google.de/test.jpg");
+setDefaultModel(new CompoundPropertyModel<>(imageSrc));
+add(new ExternalImage("url"));
+{code}
 
-Finally, in the last part of the paragraph we took a peek at the mechanism provided by the framework to customize the locations where the resource-lookup algorithm searches for resources. 
\ No newline at end of file
+HTML:
+{code}
+<video wicket:id="video"/>
+{code}
+
+The ExternalImage can also be constructed by passing in a Model (src) and Model of List (srcSet). For ExternalSource only the srcSet is available.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/24a19c24/wicket-user-guide/src/docs/guide/resources/resources_17.gdoc
----------------------------------------------------------------------
diff --git a/wicket-user-guide/src/docs/guide/resources/resources_17.gdoc b/wicket-user-guide/src/docs/guide/resources/resources_17.gdoc
new file mode 100644
index 0000000..f522ac9
--- /dev/null
+++ b/wicket-user-guide/src/docs/guide/resources/resources_17.gdoc
@@ -0,0 +1,7 @@
+
+
+In this chapter we have learnt how to manage resources with the built-in mechanism provided by Wicket. With this mechanism we handle resources from Java code and Wicket will automatically take care of generating a valid URL for them. We have also seen how resources can be bundled as package resources with a component that depends on them to make it self-contained.
+
+Then, in the second part of the chapter, we have built a custom resource and we have learnt how to mount it to an arbitrary URL and how to make it globally available as shared resource.
+
+Finally, in the last part of the paragraph we took a peek at the mechanism provided by the framework to customize the locations where the resource-lookup algorithm searches for resources. 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/24a19c24/wicket-user-guide/src/docs/guide/toc.yml
----------------------------------------------------------------------
diff --git a/wicket-user-guide/src/docs/guide/toc.yml b/wicket-user-guide/src/docs/guide/toc.yml
index 33055b3..520d57b 100644
--- a/wicket-user-guide/src/docs/guide/toc.yml
+++ b/wicket-user-guide/src/docs/guide/toc.yml
@@ -131,7 +131,8 @@ resources:
   resources_13: Customizing resource loading
   resources_14: CssHeaderItem and JavaScriptHeaderItem compression
   resources_15: NIO resources
-  resources_16: Summary
+  resources_16: Resourcen derived through models
+  resources_17: Summary
 jsintegration:
   title: An example of integration with JavaScript
   jsintegration_1: What we want to do...