Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Shale Wiki" for change 
notification.

The following page has been changed by CedricDumoulin:
http://wiki.apache.org/shale/ShaleAndClayTutorial

The comment on the change is:
format and typo

------------------------------------------------------------------------------
        </component>
  }}}
  
- As we can see we have a section named “symbols”, Here we instruct Clay 
what to substitute the symbols with. In this case we have made some defaults to 
substitute in and the will be used unless we override them when defining a 
specific page. Now that we have a template to work with the work of creating 
specific pages start. Since we for now only want to replace the content part 
(defined by the symbol bodyContent) and the page title, we only need to create 
those parts. We now need to let Clay know about these. To tell Clay how to 
build our specifi pages we do that in the clay-views.xml file. If we open this 
file, we will find several page definitions:
+ As we can see we have a section named “symbols”, Here we instruct Clay 
what to substitute the symbols with. In this case we have made some defaults to 
substitute in and the will be used unless we override them when defining a 
specific page. Now that we have a template to work with the work of creating 
specific pages start. Since we for now only want to replace the content part 
(defined by the symbol bodyContent) and the page title, we only need to create 
those parts. We now need to let Clay know about these. To tell Clay how to 
build our specific pages we do that in the clay-views.xml file. If we open this 
file, we will find several page definitions:
  
  {{{
        <component jsfid="/page1.jsf" extends="baseLayout">
@@ -302, +302 @@

        </managed-bean>
  }}}
  
- Here we define the messages bean. In the this case it is a special purpose 
Shale bean. It purpose it to make available to us a resourcebundle that we have 
created. The name of that is Resource``Bundle.properties. You will find it the 
folder src/main/resources. This bean is available application wide (given by 
the scope section). It supports internationalization (I18N), so we can have 
several versions of the file where the are unique by their extension (_en, _no 
etc.).
+ Here we define the messages bean. In this case it is a special purpose Shale 
bean. Its purpose is to make available a resourcebundle that we have created, 
named {{{ResourceBundle.properties}}}. You will find it in folder 
{{{src/main/resources}}}. This bean is available application wide (given by the 
scope section). It supports internationalization (I18N), so we can have several 
versions of the file whose names differ by their extensions (_en, _no etc.).
  
- Another attribute to note is “allowBody”. This attribute tells Clay 
whether or not to include any content within this tags body or not. Another way 
to achieve the same is through the Clay meta information <!-- ### clay:remove 
### --> <!-- ### /clay:remove ### -->. One of the nice things about this that 
we can have mock content on a page so that during design time w eget the full 
picture, and then have it removed during runtime so that it does not interfere 
with the actual content (Open the page in a browser to see this effect).
+ Another attribute to note is “allowBody”. This attribute tells Clay 
whether or not to include any content within this tags body or not. Another way 
to achieve the same is through the Clay meta information {{{<!-- ### 
clay:remove ### --> <!-- ### /clay:remove ### -->}}}. One of the nice things 
about this that we can have mock content on a page so that during design time 
we get the full picture, and then have it removed during runtime so that it 
does not interfere with the actual content (Open the page in a browser to see 
this effect).
  
  If we more on and look at the second page (/page2.jsf) and its content 
(pageBody2.html) we see that we have used more of Clays functionalities.
  
@@ -340, +340 @@

  
  
     1.   <a> </a>
-    2.  <form> </form>
+    1.  <form> </form>
-    3.  <input type=txt>
+    1.  <input type=txt>
-    4.  <input type=checkbox>
+    1.  <input type=checkbox>
-    5.  <input type=radio>
+    1.  <input type=radio>
-    6.  <input type=submit>
+    1.  <input type=submit>
-    7.  <label> </label>
+    1.  <label> </label>
-    8.  <select> </select>
+    1.  <select> </select>
-    9.  <select multiple> </select>
+    1.  <select multiple> </select>
-   10.  <option>
+    1.  <option>
-   11.  <textarea> </textarea>
+    1.  <textarea> </textarea>
  
- This means that one can use these tags and add the Clay specifi attributes. 
Another thing to notice is that we have added a new symbol: @managed-bean-name. 
This symbol has special meaning in Shale/Clay. If we go back and look at the 
faces-config.xml file again, we will find the following declaration:
+ This means that one can use these tags and add the Clay specific attributes. 
Another thing to notice is that we have added a new symbol: @managed-bean-name. 
This symbol has special meaning in Shale/Clay. If we go back and look at the 
faces-config.xml file again, we will find the following declaration:
  
  {{{
        <!-- Backing bean for page1 -->

Reply via email to