pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karel Hübl <karel.h...@gemsystem.cz>
Subject RE: in java how can i reference the instance define in a nested bxml's "bxml:id..."
Date Wed, 22 Jan 2014 13:48:33 GMT
Hi Mark,

May be you can use the containers getNamedComponent method. Sample app is attached.

Regards Karel

-----Original Message-----
From: Ripgiblet [mailto:mark@mrchambers.org] 
Sent: Wednesday, January 22, 2014 4:06 AM
To: user@pivot.apache.org
Subject: RE: in java how can i reference the instance define in a nested bxml's "bxml:id..."

This does not fix it, since property bindings still need to be in the same variable space
as the included .bxml files.

Not sure on the relevance of this link, 

Karel Hübl wrote
> The model instance can be shared between parent and nested bxml files 
> and you bound the gui control properties to shared model. It is little 
> more complex, but you can see description of application archtecture 
> we use
> here:
> https://code.google.com/a/apache-extras.org/p/pivot-contrib/wiki/Appli
> cationArchitecture

Thanks anyway for the application example, might have some useful stuff in it, but it does
not access an included bxml file.
And I don't think it can since unless you use inline, you cannot access the main model space...

I am trying to use Pivot to move GUI layout etc. into the xml file (with Style defined in
the .json file) and all program logic etc. in JAVA. (Which I suspect is the core concept behind
pivot.) What I need to be able to do is access the nested objects:
mUsernameTextInput = (TextInput)namespace.get("usernameTextInput");
and for a nested object maybe something like...
mUsernameTextInput = (TextInput)namespace.get("tab2.usernameTextInput");
This is so I can use generic .bxml in different parts of the application, with the same id's...
or allow id's to be set by variables, like bxml:id="$TextInputTab".

Anyway I have since done a work arround, by changing the .bxml files so that no TextInput
fields are in generic bxml files and are in the same variable space, and then manually set
them to have unique ID's.
But its a bit messy... 

Thanks for your response.


View this message in context: http://apache-pivot-users.399431.n3.nabble.com/in-java-how-can-i-reference-the-instance-define-in-a-nested-bxml-s-bxml-id-tp4022008p4022834.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

View raw message