Package pyjamas :: Module ui :: Class FormPanel
[hide private]
[frames] | no frames]

Class FormPanel

source code

UIObject --+            
           |            
      Widget --+        
               |        
           Panel --+    
                   |    
         SimplePanel --+
                       |
                      FormPanel

A panel that wraps its contents in an HTML <FORM> element.

This panel can be used to achieve interoperability with servers that accept traditional HTML form encoding. The following widgets will be submitted to the server if they are contained within this panel:

* TextBox * PasswordTextBox * RadioButton * CheckBox * TextArea * ListBox * FileUpload * Hidden

In particular, FileUpload is only useful when used within a FormPanel, because the browser will only upload files using form submission.

Instance Methods [hide private]
 
__init__(self, target=None) source code
 
addFormHandler(self, handler) source code
 
getAction(self) source code
 
getEncoding(self) source code
 
getMethod(self) source code
 
getTarget(self) source code
 
getTextContents(self, iframe) source code
 
_onload(self, form, event, b) source code
 
_onsubmit(self, form, event, b) source code
 
hookEvents(self, iframe, form, listener) source code
 
onFormSubmit(self) source code
 
onFrameLoad(self) source code
 
removeFormHandler(self, handler) source code
 
setAction(self, url) source code
 
setEncoding(self, encodingType) source code
 
setMethod(self, method) source code
 
submit(self) source code
 
submitImpl(self, form, iframe) source code
 
onAttach(self)
Called when this widget has an element, and that element is on the document's DOM tree, and we have a parent widget.
source code
 
onDetach(self)
Called when this widget is being removed from the DOM tree of the document.
source code
 
setTarget(self, target) source code
 
unhookEvents(self, iframe, form) source code

Inherited from SimplePanel: add, getContainerElement, getWidget, remove, setWidget

Inherited from Panel: __iter__, adopt, clear, disown

Inherited from Widget: getID, getLayoutData, getParent, isAttached, onBrowserEvent, onLoad, removeFromParent, setID, setLayoutData, setParent

Inherited from UIObject: addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getTitle, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setTitle, setVisible, setWidth, setzIndex, sinkEvents, unsinkEvents

Class Variables [hide private]
  ENCODING_MULTIPART = "multipart/form-data"
  ENCODING_URLENCODED = "application/x-www-form-urlencoded"
  METHOD_GET = "get"
  METHOD_POST = "post"
Method Details [hide private]

__init__(self, target=None)
(Constructor)

source code 
Overrides: Widget.__init__

onAttach(self)

source code 

Called when this widget has an element, and that element is on the document's DOM tree, and we have a parent widget.

Overrides: Widget.onAttach
(inherited documentation)

onDetach(self)

source code 

Called when this widget is being removed from the DOM tree of the document.

Overrides: Widget.onDetach
(inherited documentation)