Awesome. That worked out perfectly. Thank you Carl-Eric. -Isaac Carter
-----Original Message----- From: Carl-Eric Menzel [mailto:[email protected]] Sent: Thursday, July 05, 2012 12:04 PM To: [email protected] Subject: Re: accessing components within a ListView 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] This e-mail and any attachments are intended only for the use of the addressee(s) named herein and may contain proprietary information. If you are not the intended recipient of this e-mail or believe that you received this email in error, please take immediate action to notify the sender of the apparent error by reply e-mail; permanently delete the e-mail and any attachments from your computer; and do not disseminate, distribute, use, or copy this message and any attachments. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
