You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by rg...@apache.org on 2011/10/26 15:11:41 UTC

svn commit: r1189185 - /incubator/wookie/trunk/widgets/templates/browse/readme.txt

Author: rgardler
Date: Wed Oct 26 13:11:40 2011
New Revision: 1189185

URL: http://svn.apache.org/viewvc?rev=1189185&view=rev
Log:
Improve documentation for those wanting to use the browse widget template.

Modified:
    incubator/wookie/trunk/widgets/templates/browse/readme.txt

Modified: incubator/wookie/trunk/widgets/templates/browse/readme.txt
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/browse/readme.txt?rev=1189185&r1=1189184&r2=1189185&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/templates/browse/readme.txt (original)
+++ incubator/wookie/trunk/widgets/templates/browse/readme.txt Wed Oct 26 13:11:40 2011
@@ -1,9 +1,9 @@
-This widget template provides an interface for displaying a list of items coupled with an interface for searching and filtering those items.
+This widget template provides an interface for displaying a list of items coupled with an 
+interface for searching and filtering those items. It is assumed that a suitable REST API
+is available for retrieving search results in XML format.
 
-It is assumed that the results are retrieved from a remote server in XML format.
-
-At this time the location of that remote server is hard coded, however, it is easy to make it 
-parameterized and thus make this template more generally useful.
+[NOTE: the XML restriction is relatively easy to work around if your REST API returns another
+format such as JSON. Join us on the dev mailing list and we'll help you work it out]
 
 * Customizing
 
@@ -12,12 +12,21 @@ This section describes how the template 
 ** Results list
 
 The initial results list is generated by retrieving and XML document from the URL defined by
-browse.index.url. This document is then transformed into HTML using "index2html.xsl"
+"browse.index.url". This document is then transformed into HTML using a stylesheet defined
+in "browse.index.xsl.url" which degaults to "index2html.xsl".
 
-** Result detail
+If a search had been performed in the form provided then the results are retrieved from the 
+URL defined by "browse.search.url". Note that the variable "query" defines the search string
+entered by the user.
 
-When an item is expanded an ajax request is made to retrieve the details of the item in question. 
-The XML returned is then transformed using XSLT to provide the HTML content for the item expanded.
+The results are displayed in an accordion control.
+
+** Result detail
 
-The XSLT is currently found in detail2html.xsl. To change the layout of the detail section your 
-widget should provide its own detail2html.xsl file.
+When an item is expanded an ajax request is made to retrieve the details of the item in question.
+The URL used is defined by "browse.get.detail.url", you can use the variable "itemId" as the
+identifier for this item.
+ 
+The XML returned is then transformed using XSLT to provide the HTML content that will be inserted
+into the expanded control. The location of the XSLT file is defined by "browse.detail.xsl.url" and
+defaults to "detail2html.xsl" 
\ No newline at end of file