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 text

------------------------------------------------------------------------------
     1.  <option>
     1.  <textarea> </textarea>
  
- 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:
+ 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 -->
        <managed-bean id="page1">
-               <managed-bean-name>page2</managed-bean-name>
+               <managed-bean-name>page1</managed-bean-name>
                <managed-bean-class>
                        com com.acme.test.TestVC
                </managed-bean-class>
@@ -378, +378 @@

        </managed-bean>
  }}}
  
- What we do here is to define what is known as a backing beans or managed 
beans. These are beans that Shale will make available to us. Shale uses an 
implicit mapping strategy to decide which beans it should instantiate for a 
given view. If our page is called page1, it will then look for a managed bean 
with the same name and instantiate it. If you have a path to your page that 
spans several folders as in /foo/bar/pages/page1 then you need to define it as 
foo$bar$pages$page1 for Shale to find it and associate it with the page.
+ What we do here is to define what is known as a backing beans or managed 
beans. These are beans that Shale will make available to us. Shale uses an 
implicit mapping strategy to decide which beans it should instantiate for a 
given view. If our page is called page1, it will then look for a managed bean 
with the same name and instantiate it. If you have a path to your page that 
spans several folders as in {{{/foo/bar/pages/page1}}} then you need to define 
it as {{{foo$bar$pages$page1}}} for Shale to find it and associate it with the 
page.
  
- Clay will when it sees the symbol managed-bean-name, replace it with the 
implicitly mapped bean that Shale is providing. In our case page1.
+ When Clay sees the symbol [EMAIL PROTECTED], it replaces it with the 
implicitly mapped bean that Shale is providing. In our case {{{page1}}}.
  
- Lets take a closer look at the bean (com.acme.test.TestVC) that we are using 
for our backing bean. The first thing we notice is that it inherits from  
[http://shale.apache.org/shale-view AbstractViewController]. This class gives 
us some hooks (callbacks) into some Shale added lifecycle methods so that we 
can perform certain tasks that are relevant to that particular lifecycle. The 
next thing to notice is that is refers to a class Person. If you look in the 
faces-config.xml file again you will find the following declaration:
+ Lets take a closer look at the bean {{{com.acme.test.TestVC}}} that we are 
using for our backing bean. The first thing we notice is that it inherits from  
[http://shale.apache.org/shale-view AbstractViewController]. This class gives 
us some hooks (callbacks) into some Shale added lifecycle methods so that we 
can perform certain tasks that are relevant to that particular lifecycle. The 
next thing to notice is that is refers to a class Person. If you look in the 
{{{faces-config.xml}}} file again you will find the following declaration:
  
  {{{
        <managed-bean id="person">

Reply via email to