Ok, in my application I followed your directions to implement Tiles features
using Clay.
I have the following component declared in the global clay config :

   <component jsfid="baseLayout" extends="clay">
       <attributes>
           <set name="clayJsfid" value="/gabarit/gabarit.html"/>
       </attributes>
   </component>

Then I have the page selectServices.xml wich contains :

<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE view PUBLIC
      "-//Apache Software Foundation//DTD Shale Clay View Configuration 1.0
//EN"
      "http://struts.apache.org/dtds/shale-clay-config_1_0.dtd";>
<view>
    <component jsfid="/selectServices.xml" extends="baseLayout">
        <symbols>
            <set name="titre" value="Accueil - Portail des services
ministériels" />
            <set name="entete" value="/gabarit/entete.html" />
            <set name="piv" value="/gabarit/piv.html" />
            <set name="ivpied" value="/gabarit/pivpied.html" />
            <set name="contenu" value="" />

        </symbols>
    </component>
</view>

And finally the page gabarit.html wich has a basic structure like that :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="fr" lang="fr">
<head jsfid="clay" clayJsfid="@entete" allowBody="false">
</head>
<body>
<div id="piv-bandeau" jsfid="clay" clayJsfid="@piv" allowBody="false">
</div>
<div id="contenu" jsfid="clay" clayJsfid="@contenu" allowBody="false">
</div>
<div id="piv-pied" jsfid="clay" clayJsfid="@ivpied" allowBody="false">
</div>
</body>
</html>

If you run this, you will receive a NullPointerException because contenu
symbol has the null value. So I was wondering if it was a correct behavior.

On 12/5/05, Gary VanMatre <[EMAIL PROTECTED]> wrote:
>
> > Something maybe that should improved is when the symbol value is null
> > instead of getting a nullpointer exception maybe do like Tiles does.
> >
>
> Clay's behavior handling symbol replacement should be as follows:
>
> If a symbol is null, it will be replaced as an empty string within the
> token if the token length is greater than the symbol.
>
> <set name="@myvalue">
> "testing @myvalue a symbol" --> "testing  a symbol "
>
> If the symbol is null and the target expression's length is zero, the
> attribute is ignored and not passed to the component.
>
> <set name="@myvalue">
> "@myvalue" --> N/A, ignored
>
> If a symbol is not defined, it will not be replaced with the token.
>
> "@myvalue" --> "@myvalue"
>
> Somthing that I fixed last weekend was the case sensitivity on
> symbols.  HTML attributes that are not defined by a bound component using
> the jsfid attribute, are considered symbols.
>
> <span jsfid="outputText" class="displayclass" />
>
> <set name="styleClass" value="@Class"/>
>
> The HTML parser normalizes the case of attributes to lower case.  The
> token replacement is now case insensitive.  The example above will now work.
>
> What is the scenario that you are talking about?  Please give an example.
>
> > --
> > Alexandre Poitras
> > Québec, Canada
> >
>
> Gary
>



--
Alexandre Poitras
Québec, Canada

Reply via email to