Skip to content

Commit

Permalink
add clear() for listbox
Browse files Browse the repository at this point in the history
  • Loading branch information
chanwit committed Mar 17, 2009
1 parent caa90be commit 6b25397
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ZkGrailsPlugin.groovy
Expand Up @@ -127,6 +127,12 @@ support to Grails applications.
closure.resolveStrategy = Closure.DELEGATE_FIRST
closure.call()
}

org.zkoss.zul.Listbox.metaClass.clear = { ->
while (delegate.itemCount > 0) {
delegate.removeItemAt(0)
}
}
}

def onChange = { event ->
Expand Down

0 comments on commit 6b25397

Please sign in to comment.