A button's action listener is ignoring the defined closure

Report your bugs here. We promise to deal with them.

A button's action listener is ignoring the defined closure

Postby Holly Greger » 30 Jul 2010 21:54

Hello,

I am building a simple interface where i have a button whose action's closure never seems to get executed no matter what i do. I try the exact same code in a stand alone groovy console and it executes fine. I'm thinking SoapUI is the problem here. My code is the following.

Code: Select all
swing = new SwingBuilder()

retrieveAction = swing.action(name:'Retrieve', closure:{ event ->
    log.info "Retrieve Button Clicked!"   
    }, enabled:true)

frame = swing.frame(title:'Update Contact', size:[525,900], layout: new BL(), resizable:true){
   scrollPane(){
         panel{   
         tableLayout{
            tr{
               td(align:'CENTER',colspan:2){
                  panel(background:Color.RED){
                     button(action: retrieveAction)
                  }
                 }
            }
              ...


something interesting is the fact that my button receives its name from the action and am also able to disable it through the action as well so it's mapping to it with no problem but when the button is clicked the closure never gets called. Let me reiterate that this works just fine on a groovy console but not SoapUI. Any insight in this issue will be greatly appreciated.
Holly Greger
soapui pro users
soapui pro users
 
Posts: 5
Joined: 20 May 2010 14:47
Location: Weston, FL

Return to soapUI Pro Bugs