You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Jason Dorsey <Ja...@netiq.com> on 2011/12/09 19:51:20 UTC

Object Data Bindong

Hey,

Is there a way to bind a label's text to an object's data during runtime?

I have created a pane that has a list of rows that display certain values from members of data objects. These objects have threads that will alter some of these values based on the outcome of those threads. What I am trying to do is bind the label text to the value of the data member of that object. The data member is private, but I have a getter for it.

All the examples that I am finding are showing me what needs to be done when there is an action in the UI to change text or when the binding is done in the initialize method. Since these rows are being created dynamically I cannot use that as a reference.

Any help is appreciated.

Thanks,

Jason Dorsey | Engineering Intern
1233 West Loop South
Houston, TX 77027 USA
Jason.Dorsey@netiq.com<ma...@attachmate.com>
www.attachmate.com<http://www.attachmate.com>  |  www.netiq.com<http://www.netiq.com>


RE: Object Data Bindong

Posted by Jason Dorsey <Ja...@netiq.com>.
I figured out a workaround.

I just create a reference to the dynamically created labels in their corresponding object and altered the code to update the label (via setText) when the proper setter method was called.

Although this works...would still like to know if the correct way to bind data in this manner exists.

Jason Dorsey | Engineering Intern
1233 West Loop South
Houston, TX 77027 USA
Jason.Dorsey@netiq.com<ma...@attachmate.com>
www.attachmate.com<http://www.attachmate.com>  |  www.netiq.com<http://www.netiq.com>

From: Jason Dorsey [mailto:Jason.Dorsey@netiq.com]
Sent: Friday, December 09, 2011 12:51 PM
To: user@pivot.apache.org
Subject: Object Data Bindong

Hey,

Is there a way to bind a label's text to an object's data during runtime?

I have created a pane that has a list of rows that display certain values from members of data objects. These objects have threads that will alter some of these values based on the outcome of those threads. What I am trying to do is bind the label text to the value of the data member of that object. The data member is private, but I have a getter for it.

All the examples that I am finding are showing me what needs to be done when there is an action in the UI to change text or when the binding is done in the initialize method. Since these rows are being created dynamically I cannot use that as a reference.

Any help is appreciated.

Thanks,

Jason Dorsey | Engineering Intern
1233 West Loop South
Houston, TX 77027 USA
Jason.Dorsey@netiq.com<ma...@attachmate.com>
www.attachmate.com<http://www.attachmate.com>  |  www.netiq.com<http://www.netiq.com>