shale-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary VanMatre (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SHALE-410) Add warning when duplicate renderids are found in a component definition
Date Sun, 11 Mar 2007 02:02:51 GMT

    [ https://issues.apache.org/struts/browse/SHALE-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40485
] 

Gary VanMatre commented on SHALE-410:
-------------------------------------

I've been thinking about the best way to handle this one.  The clay metadata manages inheritance
using sets (TreeSet).  We use the digester to map into corresponding beans that implement
the Comparable interface.  

Currently, we are using the simple xpath rules.

            digester.addObjectCreate(
                    "*/element",
                    org.apache.shale.clay.config.beans.ElementBean.class);
            digester.addSetProperties("*/element");
            digester.addSetNext(
                    "*/element",
                    "addChild",
                    "org.apache.shale.clay.config.beans.ElementBean");

What if we implemented our own digester Rule that made the check for a duplicate before adding
to the parent?

digester.addRule("*/element", new ElementRule());


> Add warning when duplicate renderids are found in a component definition
> ------------------------------------------------------------------------
>
>                 Key: SHALE-410
>                 URL: https://issues.apache.org/struts/browse/SHALE-410
>             Project: Shale
>          Issue Type: Improvement
>          Components: Clay
>    Affects Versions: 1.0.4
>            Reporter: Hermod Opstvedt
>            Priority: Minor
>
> When defining a new Clay component I did the error of duplicating the renderId's for
two sibling elements within the component defintion. There was no error/warning issued.. The
effect was that the last defined element was simply not rendered. I think it would be nice
if a warning was issued (logged) when Clay encounters this situation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message