pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cuong Diep <cu...@fortresshill.co.uk>
Subject Components made up of Java class and WTKX markup
Date Fri, 29 Jan 2010 17:10:06 GMT
Hi there,

First off, I'd says thanks to the devs.  I've never got round to learning
Swing and Pivot seems so much easier!

But to my question:

Let's say I have the class AboutPane [extends BoxPane] and I have the markup
file AboutPane.wtkx which has the content

<mycorp:AboutPane ...>
    <Label wtkx:id="version" text="Version 1.0" />

That is, AboutPane always has a Label to display a 'version' value.

To include in my app, I do a '<wtkx:include src="AboutPane.wtkx />' in my
main markup file, but within AboutPane.java, how do I reference the
'version' property from within, say, AboutPane's constructor?

Inversely, I can do a '<mycorp:AboutPane />' in my main markup file, but how
do tell Pivot to parse and render AboutPane.wtkx (as it automagically
includes the version Label)?

I don't know if you guys have looked at Apache Wicket, but they have the
principle of a component (which may contain child components) being
implicitly linked to a markup file.  So, in theory, I can reuse and
distribute that component.  What is Pivot's guide for this can of usecase?



View raw message