Package org.zkoss.zul

Class Longbox

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.ext.Disable, org.zkoss.zk.ui.ext.Readonly, org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.sys.ComponentCtrl, Constrainted

    public class Longbox
    extends NumberInputElement
    An edit box for holding an integer.

    Default getZclass(): z-longbox.(since 3.5.0)

    Author:
    tomyeh
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent

        org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
      • Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent

        org.zkoss.zk.ui.AbstractComponent.Children, org.zkoss.zk.ui.AbstractComponent.ForwardInfo, org.zkoss.zk.ui.AbstractComponent.TargetInfo
    • Field Summary

      • Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent

        _zclass
      • Fields inherited from interface org.zkoss.zk.ui.Component

        APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
      • Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl

        AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_CLONED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, AFTER_PARENT_CHANGED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
    • Constructor Summary

      Constructors 
      Constructor Description
      Longbox()  
      Longbox​(int value)  
      Longbox​(long value)  
    • Constructor Detail

      • Longbox

        public Longbox()
      • Longbox

        public Longbox​(long value)
                throws org.zkoss.zk.ui.WrongValueException
        Throws:
        org.zkoss.zk.ui.WrongValueException
      • Longbox

        public Longbox​(int value)
                throws org.zkoss.zk.ui.WrongValueException
        Throws:
        org.zkoss.zk.ui.WrongValueException
    • Method Detail

      • getValue

        public java.lang.Long getValue()
                                throws org.zkoss.zk.ui.WrongValueException
        Returns the value (in Long), might be null unless a constraint stops it.
        Throws:
        org.zkoss.zk.ui.WrongValueException - if user entered a wrong value
      • longValue

        public long longValue()
                       throws org.zkoss.zk.ui.WrongValueException
        Returns the value in long. If null, zero is returned.
        Throws:
        org.zkoss.zk.ui.WrongValueException
      • intValue

        public long intValue()
                      throws org.zkoss.zk.ui.WrongValueException
        Returns the value in int. If null, zero is returned.
        Throws:
        org.zkoss.zk.ui.WrongValueException
      • setValue

        public void setValue​(java.lang.Long value)
                      throws org.zkoss.zk.ui.WrongValueException
        Sets the value (in Long).
        Throws:
        org.zkoss.zk.ui.WrongValueException - if value is wrong
      • getZclass

        public java.lang.String getZclass()
        Overrides:
        getZclass in class org.zkoss.zk.ui.HtmlBasedComponent
      • marshall

        protected java.lang.Object marshall​(java.lang.Object value)
        Description copied from class: InputElement
        Marshall value to be sent to the client if needed.

        Overrides it if the value to be sent to the client is not JSON Compatible.

        Overrides:
        marshall in class InputElement
        Parameters:
        value - the value to be sent to the client
        Returns:
        the marshalled value
      • unmarshall

        protected java.lang.Object unmarshall​(java.lang.Object value)
        Description copied from class: InputElement
        Unmarshall value returned from client if needed.

        Overrides it if the value returned is not JSON Compatible.

        Overrides:
        unmarshall in class InputElement
        Parameters:
        value - the value returned from client
        Returns:
        the unmarshalled value
      • setConstraint

        public void setConstraint​(java.lang.String constr)
        Overrides:
        setConstraint in class InputElement
        Parameters:
        constr - a list of constraints separated by comma. Example: no positive, no zero
        Since:
        10.2.0
      • getPropertyAccess

        public org.zkoss.zk.ui.sys.PropertyAccess getPropertyAccess​(java.lang.String prop)
        Specified by:
        getPropertyAccess in interface org.zkoss.zk.ui.sys.ComponentCtrl
        Overrides:
        getPropertyAccess in class NumberInputElement