Package muntjac :: Package terminal :: Module user_error :: Class UserError
[hide private]
[frames] | no frames]

Class UserError

source code

         object --+            
                  |            
util.IEventListener --+        
                      |        
   paintable.IPaintable --+    
                          |    
error_message.IErrorMessage --+
                              |
                             UserError

UserError is a controlled error occurred in application. User errors are occur in normal usage of the application and guide the user.


Authors:
Vaadin Ltd., Richard Lincoln

Version: 1.1.2

Instance Methods [hide private]
 
__init__(self, message, contentMode=None, errorLevel=None)
Creates a error message with level and content mode.
source code
 
getErrorLevel(self)
Gets the errors level.
source code
 
addListener(self, listener, iface=None)
Error messages are unmodifiable and thus listeners are not needed.
source code
 
addCallback(self, callback, eventType=None, *args) source code
 
removeListener(self, listener, iface=None)
Error messages are inmodifiable and thus listeners are not needed.
source code
 
removeCallback(self, callback, eventType=None) source code
 
requestRepaint(self)
Error messages are inmodifiable and thus listeners are not needed.
source code
 
paint(self, target)
Paints the IPaintable into a UIDL stream.
source code
 
requestRepaintRequests(self)
Request sending of repaint events on any further visible changes.
source code
 
__str__(self)
str(x)
source code
 
getDebugId(self)
Get's currently set debug identifier
source code
 
setDebugId(self, idd)
Adds an unique id for component that get's transferred to terminal for testing purposes.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  CONTENT_TEXT = 0
  CONTENT_PREFORMATTED = 1
  CONTENT_UIDL = 2
  CONTENT_XHTML = 3

Inherited from error_message.IErrorMessage: CRITICAL, ERROR, INFORMATION, SYSTEMERROR, WARNING

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, message, contentMode=None, errorLevel=None)
(Constructor)

source code 

Creates a error message with level and content mode.

Parameters:
  • message - the error message.
  • contentMode - the content Mode.
  • errorLevel - the level of error (defaults to Error).
Overrides: object.__init__

getErrorLevel(self)

source code 

Gets the errors level.

Returns:
the level of error as an integer.
Overrides: error_message.IErrorMessage.getErrorLevel
(inherited documentation)

addListener(self, listener, iface=None)

source code 

Error messages are unmodifiable and thus listeners are not needed. This method should be implemented as empty.

Parameters:
  • listener - the listener to be added.
Overrides: paintable.IPaintable.addListener
(inherited documentation)

addCallback(self, callback, eventType=None, *args)

source code 
Overrides: paintable.IPaintable.addCallback

removeListener(self, listener, iface=None)

source code 

Error messages are inmodifiable and thus listeners are not needed. This method should be implemented as empty.

Parameters:
  • listener - the listener to be removed.
Overrides: paintable.IPaintable.removeListener
(inherited documentation)

removeCallback(self, callback, eventType=None)

source code 
Overrides: paintable.IPaintable.removeCallback

requestRepaint(self)

source code 

Error messages are inmodifiable and thus listeners are not needed. This method should be implemented as empty.

Overrides: paintable.IPaintable.requestRepaint
(inherited documentation)

paint(self, target)

source code 

Paints the IPaintable into a UIDL stream. This method creates the UIDL sequence describing it and outputs it to the given UIDL stream.

It is called when the contents of the component should be painted in response to the component first being shown or having been altered so that its visual representation is changed.

Parameters:
  • target - the target UIDL stream where the component should paint itself to.
Raises:
Overrides: paintable.IPaintable.paint
(inherited documentation)

requestRepaintRequests(self)

source code 

Request sending of repaint events on any further visible changes. Normally the paintable only send up to one repaint request for listeners after paint as the paintable as the paintable assumes that the listeners already know about the repaint need. This method resets the assumtion. Paint implicitly does the assumtion reset functionality implemented by this method.

This method is normally used only by the terminals to note paintables about implicit repaints (painting the component without actually invoking paint method).

Overrides: paintable.IPaintable.requestRepaintRequests
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

getDebugId(self)

source code 

Get's currently set debug identifier

Returns:
current debug id, null if not set
Overrides: paintable.IPaintable.getDebugId
(inherited documentation)

setDebugId(self, idd)

source code 

Adds an unique id for component that get's transferred to terminal for testing purposes. Keeping identifiers unique throughout the Application instance is on programmers responsibility.

Note, that with the current terminal implementation the identifier cannot be changed while the component is visible. This means that the identifier should be set before the component is painted for the first time and kept the same while visible in the client.

Parameters:
  • idd - A short (< 20 chars) alphanumeric id
Overrides: paintable.IPaintable.setDebugId
(inherited documentation)