pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Whitcomb <Roger.Whitc...@actian.com>
Subject RE: Data Binding and Accordion Headers
Date Tue, 30 Sep 2014 20:10:42 GMT
I think the reason the text didn't get updated is that the update is triggered by the header
data *component* changing.  So, if you still have the same component (just with different
text) then no update happens.  So, I would create a new component ("new Label('updated text')")
and set that as the header data using "setHeaderData(accordion, <new label>)".


-----Original Message-----
From: Nick Makes [mailto:npm622@yahoo.com] 
Sent: Tuesday, September 30, 2014 12:53 PM
To: user@pivot.apache.org
Subject: Re: Data Binding and Accordion Headers

That was my initial go at it...using Accordion.setHeaderData(...) under the ButtonGroup listener,
but the text wouldn't update on screen. I figured it had something to do with it being a static
property, but now you're making me second guess myself and think that I had just a dumb error.

For reference, I'm building a three-paned date selector. The out of the box Calendar support
is good, but I find the the pop-up cumbersome when wanting to flip through years or very far
apart months quickly. Also, my available dates are only those found in a database table so
it's not a full calendar. 

Anyways, I ended up utilizing a CardPane that had a toolbar up top to control whether the
Years, Months, or Days buttons were shown; data binding TextFields in that toolbar to display
the respective button group selections. The added bonus was the easy inclusion of animated

It was your text field comment that spurred me to think of the alternative route. Thanks for
the responses, always appreciate the feedback. 


Sent from my iPhone

On Sep 30, 2014, at 3:39 PM, Roger Whitcomb <Roger.Whitcomb@actian.com> wrote:

Hi again,
   It just occurred to me that you don't really need to use data binding in order to accomplish
this.  Just hook up a ButtonGroupListener, and in the "selectionChanged" method just update
the accordion header data accordingly.  I've done this with TabPane, where typing into a text
field updates the tab's data.


-----Original Message-----
From: Nick Makes [mailto:npm622@yahoo.com] 
Sent: Monday, September 29, 2014 1:21 PM
To: user@pivot.apache.org
Subject: Data Binding and Accordion Headers

This may be a simple answer, but I recently tried to use data binding on a Accordion.headerData
attribute I'm setting in the markup I have for a TablePane. I get the error that static properties
are not supported with data binding?

I feel like I'm just going about trying to associate dynamic text with a component's header
within an Accordion pane the wrong way here. However, as I'm getting my feet wet with data
binding at the moment I figured this could have been a "two stones" moment. 

Any advice?  Basically, I want to associate a ButtonGroup's current selection's ButtonData
and have that be displayed in the Accordion's header bar for that particular pane. 

Any help here would be greatly appreciated. 


Sent from my iPhone

View raw message