01: /* InputableX.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Tue Jan 29 12:51:25 2008, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2008 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.zk.ui.ext.client;
20:
21: import org.zkoss.zk.ui.WrongValueException;
22:
23: /**
24: * Implemented by the object returned by {@link org.zkoss.zk.ui.sys.ComponentCtrl#getExtraCtrl},
25: * if a component allows users to change its content from the client.
26: *
27: * <p>{@link org.zkoss.zk.ui.event.InputEvent} will be sent wih name as "onChange" after
28: * {@link #setTextByClient} is called
29: * to notify application developers that it is called by user
30: * (rather than by codes).
31: *
32: * <p>For components that implement this interface MIGHT also support
33: * {@link org.zkoss.zk.ui.event.InputEvent} with "onChanging". It is used to notified the server
34: * that user is changing its content (changing is on progress and not finished).
35: *
36: * <p>The server usually uses onChanging to implement auto-completion and
37: * similar feature.
38: *
39: * @author tomyeh
40: * @see org.zkoss.zk.ui.event.InputEvent
41: * @since 3.0.3
42: */
43: public interface InputableX {
44: /** Sets the value in string (aka., text) by the client.
45: * <p>This method is designed to be used by engine.
46: * Don't invoke it directly. Otherwise, the client and server
47: * might mismatch.
48: *
49: * @return false if nothing is changed.
50: */
51: public boolean setTextByClient(String value)
52: throws WrongValueException;
53: }
|