You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shale.apache.org by "Hermod Opstvedt (JIRA)" <ji...@apache.org> on 2007/02/14 08:04:17 UTC

[jira] Created: (SHALE-410) Add warning when duplicate renderids are found in a component definition

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.


[jira] Commented: (SHALE-410) Add warning when duplicate renderids are found in a component definition

Posted by "Gary VanMatre (JIRA)" <ji...@apache.org>.
    [ 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.