Class Index | Minimal

Classes


Class jabberwerx.ui.XDataFormView


Extends jabberwerx.ui.JWView.

View for displaying XDataForm.

This displays the XDataForm including title, instructions and all visible fields.

This class provides the following events:

Class Summary
Constructor Attributes Constructor Name and Description
 

Creates a XDataFormView object.

Fields borrowed from class jabberwerx.ui.JWView:
jq
Method Summary
Method Attributes Method Name and Description
 

Creates XDataForm of type "cancel".

 
createDOM(doc)

Creates the DOM for XDataForm to display including title, instructions and DOM's of each field.

 

Returns array of field values for the passed field.

 

Creates XDataForm of type "submit".

 

Updates this view.

Methods borrowed from class jabberwerx.ui.JWView:
destroy, destroyDOM, dimensions, height, hide, parent, persistOptions, remove, render, restoreDOM, restoreRender, restoreUpdate, shouldBeSavedWithGraph, show, wasUnserialized, width, willBeSerialized
Methods borrowed from class jabberwerx.JWModel:
applyEvent, event
Methods borrowed from class jabberwerx.JWBase:
getClassName, graphUnserialized, init, invocation, shouldBeSerializedInline, toString
Class Detail
jabberwerx.ui.XDataFormView(dataForm)

Creates a XDataFormView object.

Parameters:
{jabberwerx.XDataForm} dataForm
Data form to initialize the view with.
Throws:
{TypeError}
If dataForm is not valid
Method Detail
{XDataForm} cancel()

Creates XDataForm of type "cancel".

Returns:
{XDataForm} Data form type cancel.

{Element} createDOM(doc)

Creates the DOM for XDataForm to display including title, instructions and DOM's of each field. DOM:

<div class="jabberwerx xdata_form_view">
     <table>
         <tr id="title_row">
         <td class="title" colspan="2">Title text</td>
         </tr>
         <tr id="instr">
         <td class="title" colspan="2">Instructions</td>
         </tr>
     </table>
     </div>
</div>
Parameters:
{Element} doc
Element for embedding the view
Returns:
{Element} The generated element to display

{Array} getFieldValues(field)

Returns array of field values for the passed field.

Parameters:
{jabberwerx.XDataFormField} field
Field for which to return the values
Returns:
{Array} Values for the field, can be empty.

{XDataForm} submit()

Creates XDataForm of type "submit".

Returns:
{XDataForm} Data form type submit.

{Boolean} update()

Updates this view. This method is called by jabberwerx.ui.JWView#dimensions, jabberwerx.ui.JWView#height, and jabberwerx.ui.JWView#width automatically, but may also be called directly to force an update of the view.

This method will size all child html controls on the form to fit within the width of client area. This is done here since width and height of the view should be esteblished before we can calculate the width of the client area, since we need to take scroll bars into account.

Returns:
{Boolean} true if the view is updatable (e.g. if jabberwerx.ui.JWView#jq is valid).

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 02 2014 13:23:43 GMT-0600 (MDT)