I need to call a method on certain componentes within a rich dialog panel. I get all components of the panel and then loop over them like this:

List<ULCComponent> listComponent = panel.getComponents();
for(int i = 0; i < listComponent.size(); i++){
    if(listComponent.get(i) instanceof RLabel){
        RLabel label = (RLabel) listComponent.get(i);
        ((RLabel) listComponent.get(i)).setVisible(in.showLabel);

In both lines with the casting I get exceptions:

Unexpected token: identifier 'listComponent'

What is wrong?

asked 18.03.2010 at 08:48

Dirk%20Busmann's gravatar image

Dirk Busmann
accept rate: 0%

The normal Java casting

(RLabel) panel.getComponents(i)

does not work in ivyScript. You have to use

panel.getComponents(i) AS RLabel

then it should work. Do not forget to import RLabel.


answered 19.03.2010 at 03:41

Benedict%20Groppe's gravatar image

Benedict Groppe
accept rate: 50%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 18.03.2010 at 08:48

Seen: 1,142 times

Last updated: 18.03.2010 at 08:48