xiaochong / zkui

Grails ZK UI Plugin
http://grails.org/plugin/zkui
GNU Lesser General Public License v3.0
24 stars 8 forks source link

CRUD Example MVVM #40

Open joaopedrosouza opened 12 years ago

joaopedrosouza commented 12 years ago

Can someone provide a complete CRUD example with MVVM complete?

I trying to run the example of the manual, but is giving error: Org.zkoss ERROR - Failed to assign bind (vm.items) to class java.lang.String can not be converted to interface org.zkoss.zul.GroupsModel.

And dont have any idea how to do grails save a domain object.

Thanks for the attention.

Good work.

xiaochong commented 12 years ago

Missing '@' characters when copy code to grails doc

add '@' to bind (vm.items)

@bind (vm.items)
xiaochong commented 12 years ago

Grails ZK UI MVVM demo download

Based on grails 1.3.7,zkui 0.5.M2

https://github.com/xiaochong/zkui/downloads

joaopedrosouza commented 12 years ago

Nice. Now it works.

Can you add on this example a form to edit and save a value?

xiaochong commented 12 years ago

I will add it while my free time.

joaopedrosouza commented 12 years ago

Hi,

After a few hours, I changed your example to do a basic CRUD function (except remove).

I leave the file in this link (http://www.3.0solucoes.com.br/ZKDemo3.zip), if you want to add it to your repository, feel free.

This method of using ZK, included in the view of Grails, it was pretty cool.

My congratulations for the plugin.

xiaochong commented 12 years ago

Good work,I will add it to repository with some change.

aaloise commented 12 years ago

With the release of ZK 6 RC2, ZK Bind Syntax has several significant changes.

http://blog.zkoss.org/index.php/2011/12/06/zk-bind-syntax-and-other-refinements-from-zk-6-rc-to-rc2/

This needs to be considered to do a basic CRUD example

joaopedrosouza commented 12 years ago

Yeah, but example is a way to show to beginners like me. :)

aaloise commented 12 years ago

I agree with you. Examples are great learning tools. I'm just saying that those examples should be the most updated possible to help everybody productively.

The changes of zkbind in ZK 6 RC2 make examples with RC outdated and can confuse beginners.

xiaochong commented 12 years ago

Yes,I will release a M3 whith ZK 6 RC2 .

ckthum commented 12 years ago

Hi, any CRUD template based on MVVM available ? I couldn't find them in the M3 release. Thx.

xiaochong commented 12 years ago

I sorry ,CRUD template based on MVVM is not provided yet,but may be provided in the future.

velo6raptor commented 12 years ago

Hi i tried the MVVM example, i put the same code as in the Zip file and i have this error message

unable to resolve org.zkoss.bind.NotifyChange in SearchVM.groovy

xiaochong commented 12 years ago

Please Note

The latest ZK 6 brings with it a whole host of changes

Grails ZK UI Plugin 0.5.M3 Release Notes

Grails ZK UI MVVM demo for version 0.5.M3