struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Gary VanMatre)
Subject Re: <Shale> Clay isEL and replaceMnemoic
Date Tue, 01 Nov 2005 15:30:06 GMT
>Gary, one more thing that would be nice would be if the parser allowed
>symbols and there values to be specified on the component and element xml
> Would this be a difficult fix?
>For example,
><component jsfid="foo" extends="baz" mySymbol="bar" allowBody="false"/>
> <element renderId="1" jsfid="myComp" anotherSymbol="myBean"/>
> <element renderId="1" jsfid="myComp" anotherSymbol="anotherBean"/>
>I noticed that the Builder adds symbols to target ComponentBeans based on
>whether or not the token is a known attribute.
>Could the component/element parser do the same; if not jsfid, extends, id,
>allowBody, facetName, etc then add token as symbol?

We could do this by registering a custom Rule with the digester but I would rather allow the
document to be validated against the DTD.

>Right now the dtd stops you. But I think it might be nice to be able to
>push the symbol definitions back to the component/element level in some
>For example, the above definition overrides the symbol anotherSymbol inside
>myComp with 2 different values. I couldn't do this at the html level because
>I would have to commit to 1 value for anotherSymbol. E.g. <span jsfid="foo"
>mySymbol="bar" anotherSymbol="myBean"/>.
>I promise to chill out on the symbols after this!

I was planning on extending the DTD to handle the symbols.  My first thought was to create
a symbols node like the attributes node under the component and element nodes.  This collection
would inherit from an extended parents symbols.  

<component ....>
       <set name="mySymbol" value="bar"/>
       <set name="anotherSymbol" value="myBean"/>

Another design that might be more inline with the html counter-part would be to create a "set-symbol"
node similar to the struts set-property node.

<component ....>
    <set-symbol  name="mySymbol" value="bar"/>
    <set-symbol  name="anotherSymbol" value="myBean"/>


What do you think?  Which would be the best to maintain?   

> Thanks, Ryan


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message