If this is a patch, can you please submit it by attaching it to a
new JIRA
ticket (http://issues.apache.org/jira/browse/PIVOT)? Routing
contributions
through JIRA help with possible legal ramifications.
That was my bad - I forgot that we are managing patch submissions via
JIRA now and had asked Roy to post it to the list directly.
Roy-
Regarding the patch: if I understand you correctly, I believe it is
intended to make WTKX IDs defined in an include available in the
parent namespace without needing to qualify the name with the
include's ID. Is that correct? For example, given the following WTKX:
foo.wtkx:
<Window>
<content>
<wtkx:include wtkx:id="bar" src="bar.wtkx"/>
</content>
</Window>
bar.wtkx
<BoxPane>
<Label wtkx:id="myLabel"/>
</BoxPane>
The "label" value would now be accessible via get("myLabel") on the
root serializer, not just get("bar.myLabel").
I'm not sure I like that particular solution, since I think it could
generate confusion. For example, what if "myLabel" is also defined in
the parent include? However, I have another suggestion that might suit
your needs (I actually think Noel may have made a similar suggestion a
while back). Currently, if an include defines named values and isn't
given an ID itself, WTKXSerializer displays a warning (because there's
no way to access those values). However, we could simply add those
named objects to the parent namespace in that case. If the
<wtkx:include> tag does have a "wtkx:id" attribute, they would remain
accessible via the fully-qualified name only.
Would this address what you are trying to accomplish?
In response to the other question you had asked about why we don't use
the @WTKX annotation in the tutorials: WTKX binding uses reflection to
set member variables, which are generally private. This is considered
a privileged operation by the JVM, and untrusted code (such as that
which often runs in a web browser) isn't allowed to execute it. Using
@WTKX in the tutorials would require us to sign all of the tutorial
apps, which wouldn't otherwise be necessary.
Greg