You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ja...@mac.com on 2004/12/03 20:16:16 UTC
accessing the global application namespace from inside a library?
I'm code generating a bunch of components such as popup pick lists and
so forth from my entity model (POJOs + doclet tags / annotations) using
Gram (Groovy + JAM) and am placing the components into a library.
Its all working very nicely indeed apart from one thing. Inside the
library's component templates, I can't access the current global
application components. I'd like inside a library to be able to refer
to the current global application components - in particular the
currently defined border component.
e.g. from inside my popup library I'd like to refer to @Border which
would be the global border. The same popup library could be reused by 3
different applications each of which defines a different border.
One work around could be to import the global application library into
the popup library as some named library; but that requires the reusable
library knowing about the location of the library which uses it, which
feels wrong. So I wonder if there's some kind of notation for escaping
out of the popup library's namespace, back into the global namespace?
e.g.
// in the global namespace, refer to a component
@popup:CustomerPicker
// in the popup namespace, refer to the global @Border...
// I''ve made these up as suggestions...
@/:Border
@..:Border
@::Border
Another solution could be to reserve a namespace name as being global -
such as 'global'?
Is there already a way of doing this? I've tried trawling the source
code but haven't found the 'component ID string parser' code yet which
describes the full syntax, which seems to be something like this...
[name] '@' [ namespacePrefix ':'] [componentType]
James
-------
http://radio.weblogs.com/0112098/
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org