pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger and Beth Whitcomb <RogerandB...@rbwhitcomb.com>
Subject Re: How to iterate over an bxml form to get all the TextInputs added to it?
Date Wed, 11 Jun 2014 20:37:32 GMT
Hi,
     All the components can be iterated through using the 
"Sequence<Component>" interface, something like this:

private void iterateTextInputs(Container container) {
     for (Component comp : container) {
         if (comp instanceof Container) {
             iterateTextInputs((Container)comp);
         } else if (comp instanceof TextInput) {
             TextInput textInput = (TextInput)comp;
             // Do whatever you need to do
         }
     }
}

Then you would call this method with your Border component:
     @BXML Border borderComponent;
     iterateTextInputs(borderComponent);

HTH,
~Roger

On 6/11/14 12:11 AM, V SANTOSH PAVAN RAJU Bs wrote:
> Hi,
> In my application I created one Border component in bxml file and then 
> added TablePane to it. And then added multiple rows to that TablePane. 
> And in each Row i have added several textinput components.
>
> Now i want to iterate through the Border component to get all the 
> TextInputs. Is there any way of doing this?
>
> -- 
> Thanks & Regards
> B.S.V.S.Pavan Raju.
> Skype: skype_pavan1
> Hyderabad.


Mime
View raw message