You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Zsolt Koppany <zk...@web.de> on 2002/11/04 19:50:50 UTC

How to use tiles for a new class?

Hi,

I would like to assign additional parameters to a menu item defined by tiles 
<item...> and I get a parsing error.

My definition looks like:

<definition name="cb.project.toolbar" path="/templates/tabsLayout.jsp">
        <putList name="tabList">
            <item
                id="summary"
                value="Summary"
                link="/overview/proj_page.jsp"
                classtype="cv.struts.TilesMenuItem" />
            <item
                id="tracker"
                value="Tracker"
                link="/bugs/main.jsp"
                access="browse_tracker"
                classtype="cv.struts.TilesMenuItem" />
...

The class cv.struts.TilesMenuItem is a subclass of 
org.apache.struts.tiles.beans.SimpleMenuItem.

The error I get is:

RROR commons.digester.Digester     - Parse Error at line 32 column -1: 
Attribute "access" is not declared for element "item".
org.xml.sax.SAXParseException: Attribute "access" is not declared for element 
"item".
    at org.apache.crimson.parser.Parser2.error(Parser2.java:3160)
    at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1411)

How can I use additinal parameters?

Zsolt


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How to use tiles for a new class?

Posted by Cedric Dumoulin <ce...@apache.org>.
  Hi,

  You should disable the parser validation, or provide a new DTD for 
your config file, declaring your new attribute.

     Cedric

Zsolt Koppany wrote:

>Hi,
>
>I would like to assign additional parameters to a menu item defined by tiles 
><item...> and I get a parsing error.
>
>My definition looks like:
>
><definition name="cb.project.toolbar" path="/templates/tabsLayout.jsp">
>        <putList name="tabList">
>            <item
>                id="summary"
>                value="Summary"
>                link="/overview/proj_page.jsp"
>                classtype="cv.struts.TilesMenuItem" />
>            <item
>                id="tracker"
>                value="Tracker"
>                link="/bugs/main.jsp"
>                access="browse_tracker"
>                classtype="cv.struts.TilesMenuItem" />
>...
>
>The class cv.struts.TilesMenuItem is a subclass of 
>org.apache.struts.tiles.beans.SimpleMenuItem.
>
>The error I get is:
>
>RROR commons.digester.Digester     - Parse Error at line 32 column -1: 
>Attribute "access" is not declared for element "item".
>org.xml.sax.SAXParseException: Attribute "access" is not declared for element 
>"item".
>    at org.apache.crimson.parser.Parser2.error(Parser2.java:3160)
>    at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1411)
>
>How can I use additinal parameters?
>
>Zsolt
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>  
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>