You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2005/12/05 19:51:13 UTC

DO NOT REPLY [Bug 37796] New: - NullPointerException when ClayJsfid parameter of Clay component has a null value

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37796>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37796

           Summary: NullPointerException when ClayJsfid parameter of Clay
                    component has a null value
           Product: Struts
           Version: Nightly Build
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Shale
        AssignedTo: dev@struts.apache.org
        ReportedBy: alexandre.poitras@gmail.com


Ok, in my application I implement a template engine � la Tiles 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 a null value.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org