<s> from __pyjamas__ import console <EOL> from pyjamas import Factory <EOL> from pyjamas import DOM <EOL> from pyjamas . ui . Widget import Widget <EOL> class Hidden ( Widget ) : <EOL> _props = [ ( "<STR_LIT:name>" , "<STR_LIT:Name>" , "<STR_LIT:Name>" , None ) , <EOL> ( "<STR_LIT:value>" , "<STR_LIT>" , "<STR_LIT>" , None ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , None ) , <EOL> ] <EOL> def __init__ ( self , name = None , value = None , ** kwargs ) : <EOL> name = kwargs . get ( "<STR_LIT:Name>" , name ) <EOL> if name is not None : <EOL> kwargs [ '<STR_LIT:Name>' ] = name <EOL> value = kwargs . get ( "<STR_LIT>" , value ) <EOL> if value is not None : <EOL> kwargs [ '<STR_LIT>' ] = kwargs . get ( "<STR_LIT>" , value ) <EOL> element = kwargs . pop ( '<STR_LIT>' , None ) or DOM . createElement ( "<STR_LIT:input>" ) <EOL> self . setElement ( element ) <EOL> DOM . setAttribute ( element , "<STR_LIT:type>" , "<STR_LIT>" ) <EOL> Widget . __init__ ( self , ** kwargs ) <EOL> @ classmethod <EOL> def _getProps ( self ) : <EOL> return Widget . _getProps ( ) + self . _props <EOL> def getDefaultValue ( self ) : <EOL> return DOM . getAttribute ( self . getElement ( ) , "<STR_LIT>" ) <EOL> def getName ( self ) : <EOL> return DOM . getAttribute ( self . getElement ( ) , "<STR_LIT:name>" ) <EOL> def getValue ( self ) : <EOL> return DOM . getAttribute ( self . getElement ( ) , "<STR_LIT:value>" ) <EOL> def setDefaultValue ( self , defaultValue ) : <EOL> DOM . setAttribute ( self . getElement ( ) , "<STR_LIT>" , defaultValue ) <EOL> def setName ( self , name ) : <EOL> if name is None : <EOL> raise ValueError ( "<STR_LIT>" ) <EOL> console . error ( "<STR_LIT>" ) <EOL> elif len ( name ) == <NUM_LIT:0> : <EOL> raise ValueError ( "<STR_LIT>" ) <EOL> console . error ( "<STR_LIT>" ) <EOL> DOM . setAttribute ( self . getElement ( ) , "<STR_LIT:name>" , name ) <EOL> def setValue ( self , value ) : <EOL> DOM . setAttribute ( self . getElement ( ) , "<STR_LIT:value>" , value ) <EOL> Factory . registerClass ( '<STR_LIT>' , '<STR_LIT>' , Hidden ) </s>
