Tuesday, April 30, 2013
ZK MVVM: Show Validation Message in Modal Window
Simple Note
Introduction
This article describe how to display validation message in a modal window, this is a custom way to simulate the EE only feature so just simple note.
NOTE: It is better to buy a ZK EE License and use the official feature for better stability.
The Result
View demo on line
http://screencast.com/t/zuHrho5u3
The Program
MVVM_Show_Validation_Message_in_Modal_Window.zul
https://github.com/benbai123/ZK_Practice/blob/master/Pattern/MVVM/AdvancedMVVM/WebContent/MVVM_Show_Validation_Message_in_Modal_Window.zul
ShowMessageInModalWinTestVM.java
https://github.com/benbai123/ZK_Practice/blob/master/Pattern/MVVM/AdvancedMVVM/src/blog/ben/test/mvvm/formbinding/ShowMessageInModalWinTestVM.java
Reference
Related thread on forum
http://forum.zkoss.org/question/86565/mvvm-form-binding-validator/
AbstractValidator.java
https://github.com/zkoss/zk/blob/v6.5.1.1/zkbind/src/org/zkoss/bind/validator/AbstractValidator.java#L67
Subscribe to:
Post Comments (Atom)
can i use zk framework for commercial website in free.
ReplyDeleteYou can use ZK CE, just need to open source to whom you delivered (follow GPL)
Deletethank you.
Deletecan i view excel file in iframe.
ReplyDeletewhen i want to view excel file in iframe it's automatically download. how to view excel,word file in viewable mode.
What is your testing browser?
Deletecrome,IE,Firfox
Deleteseems it is the spec now, refer to
Deletehttp://stackoverflow.com/questions/13525404/displaying-excel-page-in-iframe-not-possible
thank you.
Deletecan i scroll menu pupup. i want to display after 10 menu item it should be scroll.
ReplyDeleteyou can try set a fixed height if a menupopup has lots of children
Deletee.g.,
<menupopup onCreate='if (self.getChildren().size() > 3) {self.setHeight("75px"); self.setStyle("overflow: auto;");}'>
it use zscript but we are not recommend zscript i our production server.
Deletethank you. I have done using java code.but zk has issue with menu popup because when getting too many menu items it over ride below page. it should be scroll according to window size.
Deletedo you mean adjust the height of menupopup to prevent it causes vertical scrollbar?
Deleteyes.
Delete
Deletetry this:
https://gist.github.com/benbai123/5704968
thanks it's working fine.
ReplyDelete