You can do it in AP level as needed (but it is recommended to buy a ZK EE License and use the official feature) , please refer to
http://ben-bai.blogspot.tw/2013/04/zk-mvvm-show-validation-message-in.html
benbai ( 2013-04-30 15:32:49 +0800 )editFirst time here? Check out the FAQ!
Hi
After reading ZK Documentation on the above subject, i could not able to find way according to my requirement. Here is my requirement.
Is this requirement can be possible using MVVM Form validator ?
You can do at as below:
Specify an id mapping to validationMessages in zul page.
Call addInvalidMessage to add message into validationMessages with a key as needed in validator.
Then you can get message by @bind(id['key'])
For more information, please refer to
Online demo: (not really need to)
MVVM Form Binding with Validator
Related Code: (these are enough)
MVVMFormBindingwith_Validator.zul
FormBindingWithValidatorTestVM.java
and the related article at my blog (not really need to)
But how we can get the reference of validation message holders in the VM (JAVA). Your example shows how to retrieve the value from zul. Please help
You can call
ValidationMessages vmsgs = ((BinderCtrl)ctx.getBindContext().getBinder()).getValidationMessages();
but it is not a smple map, please refer to
AbstractValidator.java#addInvalidMessages
ValidationMessagesImpl.java#addMessages
What do you want to achieve?
Very simple.
On Clicking submit button, i do not what to show the error message next to field using label. Instead of that, i would like to show in the modal window in the list/grid with all the messages with ok button.
It is available only ZK EE. Please check Display Multiple Messages here
You can do it in AP level as needed (but it is recommended to buy a ZK EE License and use the official feature) , please refer to
http://ben-bai.blogspot.tw/2013/04/zk-mvvm-show-validation-message-in.html
benbai ( 2013-04-30 15:32:49 +0800 )editAsked: 2013-04-25 08:10:57 +0800
Seen: 302 times
Last updated: Apr 30 '13
Databinding and auto-complete on combobox
Composite component and bind in ZK 6
How to detach / reattach MVVM windows?
Is there a way to resolve view model properties as input to client side javascripts?
How can I synchronize data in a ListBox in MVVM ? [closed]
MVVM Validator: class not found ? [closed]
How to Call Child ViewModel Method from Parent Window? [closed]
Any help please....
Senthilchettyin ( 2013-04-25 16:35:49 +0800 )editGREAT WORK. Thank you benbai.
Senthilchettyin ( 2013-04-29 08:17:41 +0800 )edit