-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I use CSA to check the input. if users let the input blank,program stop submit.
i have a composer to receive the onClick event for button "search".I was able to notify user,but how to stop the onClick event sending to server?
Well, it's really a trade-off,
CSA can help developers handle events on client side, because it makes javascript code which is processed on client side.
But if you want to make that with composer......there are two cases:
1.The definition of onClick event is within composer (java class), thus it is very hard to avoid server handling event, because composer is triggered by ZK event, which will be served on server side.
2.The definition of onclick event is located on zul page, well, it's exact a client side action, server does nothing and client won't sent event to server, because the 'onclick' event in javascript is not 'onClick' in ZK. The former is defined by HTML. 'onclick' event is processed on client side but 'onClick' on server side. The sample code you provided is a better solution to your question.
Asked: 2009-01-20 07:23:31 +0800
Seen: 137 times
Last updated: Jan 21 '09