Closed thiagogjt closed 12 years ago
Works with 6.0.0.RC2 but doesn't work with 6.0.0.FL.20120113
Yes,I see. So I delay to merged it wait for the 6.0.0.RC3
There is a workaround to get zkui working with ZK 6.0.0.FL.20120117 and I would like to share it with you, just follow these steps:
1 - Download the zkui code provided by thiagogjt at https://github.com/thiagogjt/zkui/zipball/a5933bc48463503681654b2f4e61863c13eae42d
2 - Unpack the zip file downloaded and edit ZkuiGrailsPlugin.groovy version to "0.5.M3".
3 - Edit BuildConfig.groovy and change it by adding this line "grails.project.source.level = 1.6" and change zkVersion to "6.0.0.FL.20120117"
4 - Edit ComponentUtil.groovy of org.grails.plugins.zkui.util and around line 50 replace the line helper.addByCompoundValue(attval); for helper.addByCompoundValue(attval,null)
5 - Download zk-src-6.0.0-FL-2012-01-17 at zkoss's sourceforge.
6 - Replace BindComposer.java of org.grails.plugins.zkui.composer by the one of the zk-src-6.0.0-FL-2012-01-17 zip file located at org.zkoss.bind
7 - Edit the new BindComposer.java file of org.grails.plugins.zkui.composer. Change it's package to org.grails.plugins.zkui.composer and add the import org.zkoss.bind.*;
8 - Run grails package-plugin
9 - Create an app, install-plugin with the recently file grails-zkui-0.5.M3.zip
10 - Code your app with an .gsp :
<z:window apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('test.HelloVM')">
<z:label value="@bind(vm.message)"/>
<z:button label="Show" onClick="@command('showHello')"/>
</z:window>
And a View-Model:
import org.zkoss.bind.annotation.*
class HelloVM {
private String message
public String getMessage() {
return message
}
@NotifyChange("message") @Command
public void showHello() {
message = "Hello World!"
}
}
That should be enough to get it working. Hope this can be helpful.
hi,aaloise Thanks your workaround, I will be try it later.
I forgot to mention that before run grails package-plugin you should perform a grails upgrade.
And those steps are also working with ZK 6.0.0-FL-2012-02-01
0.5.M3 release use zk 6.0.0.FL.20120210
Great work,I will merged it as soon as possible.