org.zkoss.zul.impl
Class InputElement.ExtraCtrl

java.lang.Object
  extended by org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
      extended by org.zkoss.zul.impl.InputElement.ExtraCtrl
All Implemented Interfaces:
Errorable, InputableX, Movable, Sizable, ZIndexed, PrologAllowed
Direct Known Subclasses:
Combobox.ExtraCtrl
Enclosing class:
InputElement

protected class InputElement.ExtraCtrl
extends HtmlBasedComponent.ExtraCtrl
implements InputableX, Errorable

A utility class to implement AbstractComponent.getExtraCtrl(). It is used only by component developers.


Constructor Summary
protected InputElement.ExtraCtrl()
           
 
Method Summary
 void setErrorByClient(java.lang.String value, java.lang.String msg)
          Sets or clears the error by client.
 boolean setTextByClient(java.lang.String value)
          Sets the value in string (aka., text) by the client.
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
setHeightByClient, setLeftByClient, setPrologContent, setTopByClient, setWidthByClient, setZIndexByClient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputElement.ExtraCtrl

protected InputElement.ExtraCtrl()
Method Detail

setTextByClient

public boolean setTextByClient(java.lang.String value)
                        throws WrongValueException
Description copied from interface: InputableX
Sets the value in string (aka., text) by the client.

This method is designed to be used by engine. Don't invoke it directly. Otherwise, the client and server might mismatch.

Specified by:
setTextByClient in interface InputableX
Returns:
false if nothing is changed.
Throws:
WrongValueException

setErrorByClient

public void setErrorByClient(java.lang.String value,
                             java.lang.String msg)
Description copied from interface: Errorable
Sets or clears the error by client.

This method is designed to be used by engine. Don't invoke it directly. Otherwise, the client and server might mismatch.

Specified by:
setErrorByClient in interface Errorable
Parameters:
value - the vaue that user entered and causes an error.
msg - the message describes the error, if not null. If null, it means user at the client cleared the error. This happens: user entered a wrong value and corrected by restoring the default value. If user restored the error by typing another value, a regular event, like InputEvent, is sent instead.


Copyright © 2005-2009 Potix Corporation. All Rights Reserved.