xiaochong / zkui

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

MVVM - renderErrors #91

Open aaloise opened 11 years ago

aaloise commented 11 years ago

Component renderErrors is only working in MVVM if an Exceptions is thrown. Here some code for example:

    if(!selected.save(flush:true)){
            form.renderErrors(bean:selected)                       
    }

This doesn' do nothing to the view, but if I change to the following....

    if(!selected.save(flush:true)){
            form.renderErrors(bean:selected)
            throw new Exception("")
    }

Then I can see the message appearing next to the textbox with the wrong value

I don't think this is a normal behaviour.

xiaochong commented 11 years ago

renderErrors is not intended to be used in MVVM