Repository: wicket
Updated Branches:
  refs/heads/master a30bff2ba -> 490fdf676


WICKET-6025 - Guide information

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

Branch: refs/heads/master
Commit: 490fdf67646f1b987c2c1065a3fa6c55f6c5b338
Parents: a30bff2
Author: Tobias Soloschenko <tsolosche...@apache.org>
Authored: Sat Nov 14 09:19:55 2015 +0100
Committer: Tobias Soloschenko <tsolosche...@apache.org>
Committed: Sat Nov 14 09:19:55 2015 +0100

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


http://git-wip-us.apache.org/repos/asf/wicket/blob/490fdf67/wicket-user-guide/src/docs/guide/resources/resources_15.gdoc
----------------------------------------------------------------------
diff --git a/wicket-user-guide/src/docs/guide/resources/resources_15.gdoc 
b/wicket-user-guide/src/docs/guide/resources/resources_15.gdoc
index f522ac9..b3b4582 100644
--- a/wicket-user-guide/src/docs/guide/resources/resources_15.gdoc
+++ b/wicket-user-guide/src/docs/guide/resources/resources_15.gdoc
@@ -1,7 +1,21 @@
+The FileSystemResourceRenference comes along with the FileSystemResource, 
FileSystemResourceStreamReference and the FileSystemResourceStream. Those 
classes provide a simple way to handle resources with Java's NIO API in Wicket 
starting from JDK version 7.0. (Available since Wicket 7.2.0 / Wicket 8.0.0)
 
+Example: To include a resource which is zipped into a file and located in a 
specific folder in the file system you can simply write code like this:
 
-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.
+Java:
+{code}
+URI uri = 
URI.create("jar:file:///videosFolder/videos.zip!/folderInZip/Video.mp4");
+Path path = FileSystemResourceReference.getPath(uri);
+FileSystemResourceReference ref = new 
FileSystemResourceReference("video",path);
+Video video = new Video("video",ref);
+add(vide);
+{code}
 
-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.
+HTML:
+{code}
+<video wicket:id="video"/>
+{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
+Further FileSystemProviders and the corresponding FileSystems can be 
implemented as described here:
+
+[http://docs.oracle.com/javase/7/docs/technotes/guides/io/fsp/filesystemprovider.html|http://docs.oracle.com/javase/7/docs/technotes/guides/io/fsp/filesystemprovider.html]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/490fdf67/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
new file mode 100644
index 0000000..f522ac9
--- /dev/null
+++ b/wicket-user-guide/src/docs/guide/resources/resources_16.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/490fdf67/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 b0489c1..33055b3 100644
--- a/wicket-user-guide/src/docs/guide/toc.yml
+++ b/wicket-user-guide/src/docs/guide/toc.yml
@@ -130,7 +130,8 @@ resources:
   resources_12: Shared resources
   resources_13: Customizing resource loading
   resources_14: CssHeaderItem and JavaScriptHeaderItem compression
-  resources_15: Summary
+  resources_15: NIO resources
+  resources_16: Summary
 jsintegration:
   title: An example of integration with JavaScript
   jsintegration_1: What we want to do...

Reply via email to