I think that there may be a good case for symbol replacement on a
symbol. Here is what I was trying to do:
class MyBean {
String prop = "propValue";
public String getProp();
public void setProp(String string);
}
Client.html
<span jsfid="clay" clayJsfid="Template.html" foo="#{myBean.prop}"/>
Template.html (bean and property agnostic)
<body>
<span jsfid="tree" value="@foo"/>
<span jsfid="outputText value="@foo"/>
</body>
Custom component
<component jsfid="tree" extends="panelGroup">
<element renderId="1" jsfid="outputText">
<attributes>
<set name="value" value="@value"/>
</attributes>
</element>
<element render="2".../>
</component>
Now when client.html is rendered the 1st span is outputting
@value
while the 2nd span is outputting correctly (or as I had intended)
myValue
I believe that this is because the attribute override is only
happening for first level attributes, not nested attributes.
2 possible solutions
(A)
I think that symbol replacement could also be done for symbols
themselves, and I think that it would solve this case.
This way the symbol table for tree and thereby it's first child would
look like this
{ @value=> @foo
@foo => #{myBean.prop}
}
so that when symbol replacement is done for @value in the 1st child
the result is #{myBean.prop}
(B)
The override of value in tree in Template.html could reach down into
tree's children as well.
I am currently in favor of (A) as I think it might be less disruptive.
Ryan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]