Hi Cedric, where should I insert parserValidate="false"? Where should I use the <bean tag? In which file and which block?
Zsolt On Friday 06 December 2002 10:56, Cedric Dumoulin wrote: > Hi, > > You can extends SimpleMenuItem: > > * Write a class extending SimpleMenuItem, or implementing > SimpleMenu. Add your new attributes > * Declare your items in your tiles-config, and specify the classtype > attribute: <item classtype="YourClassName" ..../> > * Also specify your new attributes: <item ... myNewItem="aValue" .../> > * Enable the parser to parse your new attribute.There is several > possibilities: > o Disable the parser validation. This can be done in the > TilesPlugin configuration: parserValidate="false" > o Or create your own DTD declaring your new attributes: > + copy the original DTD, localize the item > specification, add your own attributes > + Specify your new DTD in the header of the > tiles-config file > > Now the parser should be able to validate your new attributes. > > Another possibility is to use the <bean .../> tag: > > o > > > <bean classtype="YourClassName"> > <set-property property="aName" value="aValue" /> > <set-property property="anotherName" value="anotherValue" /> > ..... > </bean> > > Hope this help, > > Cedric > > Zsolt Koppany wrote: > >Hi, > > > >I have written a class that extends SimpleMenuItem but when I want to > > assign new items (see example below) I get error logs. How can I fix it? > > > >Example: > > > ><item > > id="summary" > > value="Summary" > > selectionStyle="toolbar_summary_selected" > > link="/proj/summary.do" > > classtype="cv.struts.TilesMenuItem" /> > > > >Error messages: > > > > > >ERROR commons.digester.Digester - Parse Error at line 28 column -1: > >Attribute "loggedOn" is not declared for element "item". [main] > >org.xml.sax.SAXParseException: Attribute "loggedOn" is not declared for > >element "item". > > at org.apache.crimson.parser.Parser2.error(Parser2.java:3160) > > > > > >-- > >To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> For additional > > commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>