On Thu, 5 Jul 2012 11:36:06 -0400
"Carter, Isaac" <[email protected]> wrote:
> I'm wondering if anyone knows how to properly access components that
> exist within a repeating listview? I have two buttons (we'll say an
> edit and remove button) that I'm repeat over and add them to the
> listview. I need to be able to disable all of the edit buttons that
> exist within a listView at a given moment in time when another
> property is being edited. Does anyone know how to access all of the
> other edit buttons that exist at a given time in the listview?
I'd do it the other way around: Instead of actively looking for the
buttons and *setting* the visibility, override onConfigure() in the
buttons and have them set their own enabled state depending on whatever
it is you need to check:
...
listItem.add(new Button("...") {
public void onConfigure() {
super.onConfigure();
this.setEnabled(!myObject.isEditing());
}
}
...
[untested pseudocode]
Hope this helps
Carl-Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]