com.smartgwt.client.widgets.form
Class DynamicForm

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.smartgwt.client.widgets.BaseWidget
              extended by com.smartgwt.client.widgets.Canvas
                  extended by com.smartgwt.client.widgets.form.DynamicForm
All Implemented Interfaces:
HasHandlers, com.google.gwt.user.client.EventListener, DataBoundComponent, HasClickHandlers, HasDoubleClickHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFocusChangedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasResizedHandlers, HasRightMouseDownHandlers, HasScrolledHandlers, HasShowContextMenuHandlers, HasItemChangedHandlers, HasItemChangeHandlers, HasItemKeyPressHandlers, HasSubmitValuesHandlers
Direct Known Subclasses:
PropertySheet, SearchForm

public class DynamicForm
extends Canvas
implements DataBoundComponent, HasSubmitValuesHandlers, HasItemChangeHandlers, HasItemChangedHandlers, HasItemKeyPressHandlers

The DynamicForm manages a collection of FormItems which represent user input controls. The DynamicForm provides layout, value management, validation and databinding for the controls it manages.

To create a DynamicForm, set fields to an Array of Objects describing the FormItems you want to use. For example:

    isc.DynamicForm.create({
        fields:[
            {name:"userName", type:"text"},  // creates a TextItem
            {name:"usState", type:"select"}  // creates a SelectItem
        ]
    })
 
The item name is an identifier for the item that must be unique just within this form. It is used: The item type controls what kind of FormItem is created. See FormItemType.

The title and defaultValue are also commonly specified. All FormItems share a common set of properties for controlling 'form layout'. Other properties common to all FormItems are documented on the FormItem class, and properties specific to particular FormItems are documented on the respective FormItems.

NOTE: For very simple forms consisting of exactly one item, you still use a DynamicForm. See the "fontSelector" form in the ${isc.DocUtils.linkForExampleId('toolstrip', 'Toolstrip example')}.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.smartgwt.client.widgets.BaseWidget
config, configOnly, id, isElementSet
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
DynamicForm()
           
DynamicForm(com.google.gwt.core.client.JavaScriptObject jsObj)
           
 
Method Summary
 void addFormulaField()
          Convenience method to display a com.smartgwt.client..FormulaBuilder to create a new Formula Field.
 HandlerRegistration addItemChangedHandler(ItemChangedHandler handler)
          Add a itemChanged handler.
 HandlerRegistration addItemChangeHandler(ItemChangeHandler handler)
          Add a itemChange handler.
 HandlerRegistration addItemKeyPressHandler(ItemKeyPressHandler handler)
          Add a itemKeyPress handler.
 HandlerRegistration addSubmitValuesHandler(SubmitValuesHandler handler)
          Add a submitValues handler.
 void addSummaryField()
          Convenience method to display a com.smartgwt.client..SummaryBuilder to create a new Summary Field.
 java.lang.Boolean anySelected()
          Whether at least one item is selected
 void cancel()
           This method exists for clean integration with existing server frameworks that have a 'cancel' feature which typically clears session state associated with the form.
 void cancel(DSRequest requestProperties)
           This method exists for clean integration with existing server frameworks that have a 'cancel' feature which typically clears session state associated with the form.
 void clearErrors(boolean show)
          Clears all errors for this DynamicForm.
 void clearFieldErrors(java.lang.String fieldName, boolean show)
          Clear any validation errors on the field passed in.
 void clearValue(java.lang.String fieldName)
          Clears the value for some field via a call to com.smartgwt.client.widgets.form.fields.FormItem#clearValue if appropriate. If there is no item associated with the field name, the field will just be cleared within our stored set of values.
 void clearValues()
          Reset to default form values and clear errors
protected  com.google.gwt.core.client.JavaScriptObject create()
           
 void deselectAllRecords()
           Deselect all records
 void deselectRecord(int record)
          Deselect a Record passed in explicitly, or by index.
 void deselectRecord(Record record)
          Deselect a Record passed in explicitly, or by index.
 void deselectRecords(int[] records)
          Deselect a list of Records passed in explicitly, or by index.
 void deselectRecords(Record[] records)
          Deselect a list of Records passed in explicitly, or by index.
 void disableHilite(java.lang.String hiliteID)
          Disable a hilite
 void disableHiliting()
          Disable all hilites.
 void editNewRecord()
          Prepare to edit a new record by clearing the current set of values (or replacing them with initialValues if specified).
 void editNewRecord(java.util.Map initialValues)
          Prepare to edit a new record by clearing the current set of values (or replacing them with initialValues if specified).
 void editRecord(Record record)
          Edit an existing record.
 void editSelectedData(ListGrid selectionComponent)
           
 void editSelectedData(java.lang.String listGridID)
           
 void enableHilite(java.lang.String hiliteID)
          Enable / disable a hilites
 void enableHilite(java.lang.String hiliteID, boolean enable)
          Enable / disable a hilites
 void enableHiliting()
          Enable all hilites.
 void enableHiliting(boolean enable)
          Enable all hilites.
 void fetchData()
          Uses a "fetch" operation on the current DataSource to retrieve data that matches the provided criteria, and displays the matching data in this component.
 void fetchData(Criteria criteria)
          Uses a "fetch" operation on the current DataSource to retrieve data that matches the provided criteria, and displays the matching data in this component.
 void fetchData(Criteria criteria, DSCallback callback)
          Uses a "fetch" operation on the current DataSource to retrieve data that matches the provided criteria, and displays the matching data in this component.
 void fetchData(Criteria criteria, DSCallback callback, DSRequest requestProperties)
          Uses a "fetch" operation on the current DataSource to retrieve data that matches the provided criteria, and displays the matching data in this component.
 void filterData()
          Retrieves data that matches the provided criteria and displays the matching data in this component.
 void filterData(Criteria criteria)
          Retrieves data that matches the provided criteria and displays the matching data in this component.
 void filterData(Criteria criteria, DSCallback callback)
          Retrieves data that matches the provided criteria and displays the matching data in this component.
 void filterData(Criteria criteria, DSCallback callback, DSRequest requestProperties)
          Retrieves data that matches the provided criteria and displays the matching data in this component.
 void focusInItem(FormItem formItem)
          Move the keyboard focus into a particular item.
 void focusInItem(int itemNumber)
          Move the keyboard focus into a particular item.
 void focusInItem(java.lang.String itemName)
          Move the keyboard focus into a particular item.
 java.lang.String getAction()
          The URL to which the form will submit its values.
 java.lang.Boolean getAddDropValues()
          Indicates whether to add "drop values" to items dropped on this component, if both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key.
 java.lang.String getAddFormulaFieldText()
          Text for a menu item allowing users to add a formula field
 java.lang.String getAddOperation()
          Operation ID this component should use when performing add operations.
 java.lang.String getAddSummaryFieldText()
          Text for a menu item allowing users to add a formula field
 java.lang.Boolean getAutoFetchAsFilter()
          If DataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData()
 java.lang.Boolean getAutoFetchData()
          If true, when this component is first drawn, automatically call DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on DataBoundComponent.getAutoFetchAsFilter() .
 java.lang.Boolean getAutoFocus()
          If true, when the form is drawn, focus will automatically be put into the first focusable element in the form.
Note that to put focus in a different item you can explicitly call dynamicForm.focusInItem(itemName)
 java.lang.Boolean getCanAddFormulaFields()
          Adds an item to the header context menu allowing users to launch a dialog to define a new field based on values present in other fields, using the com.smartgwt.client..FormulaBuilder.
 java.lang.Boolean getCanAddSummaryFields()
          Adds an item to the header context menu allowing users to launch a dialog to define a new text field that can contain both user-defined text and the formatted values present in other fields, using the com.smartgwt.client..SummaryBuilder.
 java.lang.String getCancelParamName()
          The name of the special field sent to the server as part of cancel()
 java.lang.String getCancelParamValue()
          The value of the special field sent to the server as part of cancel()
 java.lang.Boolean getCanFocus()
          DynamicForms are considered to have focus if any of their form items have focus. Note that setting dynamicForm.canFocus to false will have no effect on whether form items within the form may recieve focus.
 java.lang.Boolean getCanSubmit()
          Governs whether this form will be used to perform a standard HTML form submission. Note that if true, submit() will perform a native HTML submission to the specified action URL.
Wherever possible we strongly recommend using the 'DataBound Component Methods' to send data to the server as they provide a far more sophisticated interface, with built in options for server validation, required fields, etc.
 int getCellBorder()
          Width of border for the table that form is drawn in.
 int getCellPadding()
          The amount of empty space, in pixels, surrounding each form item within its cell in the layout grid.
 int getCellSpacing()
          Return the cellSpacing.
 int getDataPageSize()
          When using data paging, how many records to fetch at a time.
 DataSource getDataSource()
          The DataSource that this component should bind to for default fields and for performing DSRequest.
 java.lang.Boolean getDisableValidation()
          If set to true, client-side validators will not run on the form when validate() is called.
 Record[] getDragData()
           During a drag-and-drop interaction, this method returns the set of records being dragged out of the component.
 DragDataAction getDragDataAction()
          Indicates what to do with data dragged into another DataBoundComponent.
 java.lang.String getDragTrackerStyle()
          CSS Style to apply to the drag tracker when dragging occurs on this component.
 java.util.Map getDropValues()
          When an item is dropped on this component, and addDropValues is true and both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key, this object provides the "drop values" that SmartGWT will apply to the dropped object before updating it.
 java.lang.String getDuplicateDragMessage()
          Message to show when a user attempts to transfer duplicate records into this component, and preventDuplicates is enabled.
 java.lang.String getEditFormulaFieldText()
          Text for a menu item allowing users to edit a formula field
 java.lang.String getEditSummaryFieldText()
          Text for a menu item allowing users to edit the formatter for a field
 Encoding getEncoding()
          encoding for the form, use MULTIPART_ENCODING for file upload forms
 java.lang.String getErrorItemCellStyle()
          If showInlineErrors is false we show all errors for the form item in a single item rendered at the top of the form.
This attribute specifies the cellStyle to apply to this item.
 java.util.Map getErrors()
          Returns the set of errors.
 java.lang.String getErrorsPreamble()
          If showInlineErrors is false we show all errors for the form item in a single item rendered at the top of the form.
This attribute specifies an introductory string rendered out before the individual error messages.
 java.lang.Boolean getExportAll()
          Setting exportAll to true prevents the component from passing it's list of fields to the export call.
 java.lang.String[] getExportFields()
          The list of field-names to export.
 java.lang.String getFetchOperation()
          Operation ID this component should use when performing fetch operations.
 FormItem getField(java.lang.String name)
           
 java.lang.String[] getFieldErrors(java.lang.String fieldName)
          Returns any validation errors for some field in this valuesManager.
 FormItem[] getFields()
          Return thhe form fields
 java.lang.Boolean getFixedColWidths()
          If true, we ensure that column widths are at least as large as you specify them.
 java.lang.String getHiliteProperty()
          Marker that can be set on a record to flag that record as hilited.
 java.lang.Boolean getHiliteRequiredFields()
          Indicates whether the titles of required items in this form should use the special prefix and suffix specified by the next two properties, instead of the standard prefix and suffix.
 Criteria getInitialCriteria()
          Criteria to use when DataBoundComponent.setAutoFetchData(Boolean) is used.
 FormItem getItem(java.lang.String name)
           
 Alignment getItemHoverAlign()
          Text alignment for hovers shown for items
 int getItemHoverDelay()
          If the user rolls over an item, how long a delay before we fire any hover action / show a hover for that item?
 java.lang.Integer getItemHoverHeight()
          A default height for hovers shown for items
 java.lang.Integer getItemHoverOpacity()
          Opacity for hovers shown for items
 java.lang.String getItemHoverStyle()
          CSS Style for hovers shown for items
 java.lang.Integer getItemHoverVAlign()
          Vertical text alignment for hovers shown for items
 java.lang.Integer getItemHoverWidth()
          A default width for hovers shown for items
 FormLayoutType getItemLayout()
          Layout style to use with this form.
 int getLongTextEditorThreshold()
          When creating form items for fields with text type data, if the specified length of the field exceeds this threshold we will create form item of type this.longTextEditorType (a TextAreaItem by default), rather than a simple text item.
 java.lang.String getLongTextEditorType()
          Name of the Form Item class to use for text fields which exceed the longTextEditorThreshold for this form.
 FormMethod getMethod()
          The mechanism by which form data is sent to the action URL.
 int getMinColWidth()
          Minimum width of a form column.
 int getNumCols()
          The number of columns of titles and items in this form's layout grid.
 OperatorId getOperator()
          When operator has been set for any FormItem in this form, what logical operator should be applied across the ${isc.DocUtils.linkForRef('object:Criterion','criteria')} produced by the form items? Only applicable to forms that have a dataSource.
static DynamicForm getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
           
 java.lang.Boolean getPreventDuplicates()
          If set, detect and prevent duplicate records from being transferred to this component, either via drag and drop or via DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent).
 int getRecordIndex(Record record)
          Get the index of the provided record.
 java.lang.Boolean getRejectInvalidValueOnChange()
          If validateOnChange is true, and validation fails for an item on change, with no suggested value, should we revert to the previous value, or continue to display the bad value entered by the user.
 java.lang.String getRemoveOperation()
          Operation ID this component should use when performing remove operations.
 java.lang.String getRequiredRightTitlePrefix()
          The string prepended to the title of every required item in this form if highlightRequiredFields is true and the titleOrientation property is set to "right".
 java.lang.String getRequiredRightTitleSuffix()
          The string appended to the title of every required item in this form if highlightRequiredFields is true and the titleOrientation property is set to "right".
 java.lang.String getRequiredTitlePrefix()
          The string prepended to the title of every required item in this form if highlightRequiredFields is true.
 java.lang.String getRequiredTitleSuffix()
          The string appended to the title of every required item in this form if highlightRequiredFields is true.
 java.lang.String getRightTitlePrefix()
          The string prepended to the title of an item in this form if its titleOrientation property is set to "right".
 java.lang.String getRightTitleSuffix()
          The string appended to the title of an item in this form if its titleOrientation property is set to "right".
 java.lang.Boolean getSaveOnEnter()
          If true, when the user hits the Enter key while focussed in a text-item in this form, we automatically submit the form to the server using the submit() method.
 DSOperationType getSaveOperationType()
          Default DSOperationType to be performed when saveData() is called. This property is automatically set on a call to editRecord(com.smartgwt.client.data.Record) or editNewRecord(), or may be set directly via setSaveOperationType(com.smartgwt.client.types.DSOperationType).
 VisibilityMode getSectionVisibilityMode()
          If the form has sections, [implemented as SectionItems], this attribute controls whether multiple sections can be expanded at once.
 java.lang.Boolean getSelectOnFocus()
          If this property is set to true, whenever a text-based field in this form (TextItem, TextAreaItem) is given focus programmatically (see focusInItem(int)), all text within the item will be selected.
 java.lang.Boolean getShowComplexFields()
          Whether to show fields of non-atomic types when a DataBoundComponent is given a DataSource but no component.fields.
 java.lang.Boolean getShowComplexFieldsRecursively()
          If set, this DynamicForm will set both showComplexFields and showComplexFieldsRecursively on any nested component used for showing/editing a complex field.
 java.lang.Boolean getShowDetailFields()
          Whether to show fields marked detail:true when a DataBoundComponent is given a DataSource but no component.fields.
 java.lang.Boolean getShowErrorIcons()
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed next to form items when showInlineErrors is true. These properties are boolean values, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.
 java.lang.Boolean getShowErrorStyle()
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed next to form items when showInlineErrors is true. These properties are boolean values, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.
 java.lang.Boolean getShowErrorText()
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed next to form items when showInlineErrors is true. These properties are boolean values, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.
 java.lang.Boolean getShowHiddenFields()
          Whether to show fields marked hidden:true when a DataBoundComponent is given a DataSource but no component.fields.
 java.lang.Boolean getShowInlineErrors()
          If true, field errors are written into the form next to the item(s) where the errors occurred.
 java.lang.Boolean getShowTitlesWithErrorMessages()
          Indicates whether on validation failure, the error message displayed to the user should be prepended with the title for the item.
 java.lang.String getTarget()
          The name of a window or frame that will receive the results returned by the form's action.
 java.lang.String getTitleField()
          Method to return the fieldName which represents the "title" for records in this Component.
If this.titleField is explicitly specified it will always be used. Otherwise, default implementation will check titleField for databound compounds.
For non databound components returns the first defined field name of "title", "name", or "id".
 java.lang.String getTitleFieldValue(Record record)
          Get the value of the titleField for the passed record
 TitleOrientation getTitleOrientation()
          Default orientation for titles for items in this form.
 java.lang.String getTitlePrefix()
          The string prepended to the title of every item in this form.
 java.lang.String getTitleSuffix()
          The string appended to the title of every item in this form.
 java.lang.String getUnknownErrorMessage()
          The error message for a failed validator that does not specify its own errorMessage.
 java.lang.String getUpdateOperation()
          Operation ID this component should use when performing update operations.
 java.lang.Boolean getUseAllDataSourceFields()
          If true, the set of fields given by the "default binding" (see fields) is used, with any fields specified in component.fields acting as overrides that can suppress or modify the display of individual fields, without having to list the entire set of fields that should be shown.
 java.lang.Boolean getUseFlatFields()
          The useFlatFields flag causes all simple type fields anywhere in a nested set of DataSources to be exposed as a flat list for form binding.
 java.lang.Boolean getValidateOnChange()
          If true, form fields will be validated when each item's "change" handler is fired as well as when the entire form is submitted or validated.
Note that this property can also be set at the item level to enable finer granularity validation in response to user interaction - if true at either level, validation will occur on change.
 java.lang.String getValidationURL()
          validationURL can be set to do server-side validation against a different URL from where the form will ultimately save, as part of an incremental upgrade strategy for Struts and Struts-like applications.
 java.lang.Object getValue(java.lang.String fieldName)
           
 java.lang.String getValueAsString(java.lang.String fieldName)
           
 java.util.Map getValues()
          Returns the current set of values where each propertyName is the name of a form item in the form, and each property value is the value held by that form item.
 Criteria getValuesAsCriteria()
           
 ValuesManager getValuesManager()
          Return the ValuesManager for this form.
 java.lang.Boolean getWrapItemTitles()
          Whether titles for form items should wrap.
 java.lang.Boolean hasErrors()
          Return whether this form currently has any validation errors.
Validation errors are set up automatically by validation, or may be explicitly set via setErrors(java.util.Map, boolean) or setFieldErrors(java.lang.String, java.lang.String, boolean).
 java.lang.Boolean hasFieldErrors(java.lang.String fieldName)
          Does this form currently h ave any validation errors on the field passed in?
Validation errors are set up automatically by validation, or may be explicitly set via setErrors(java.util.Map, boolean) or setFieldErrors(java.lang.String, java.lang.String, boolean).
 void hideItem(java.lang.String itemName)
          Hide a form item via FormItem.hide()
 void invalidateCache()
          Invalidate the current data cache for this databound component via a call to this.data.invalidateCache().
 java.lang.Boolean isNewRecord()
          Returns true if saveOperationType is currently "add".
protected  void onInit()
           
 com.google.gwt.core.client.JavaScriptObject rememberValues()
          Make a snapshot of the current set of values, so we can reset to them later.
 void reset()
           Resets values to the state it was the last time setValues() or rememberValues() was called.
 void resetValues()
           Same as reset().
 void saveData()
           
 void saveData(DSCallback callback)
           
 void saveData(DSCallback callback, DSRequest requestProperties)
           
 void selectAllRecords()
          Select all records
 void selectRecord(int record)
          Select/deselect a Record passed in explicitly, or by index.
 void selectRecord(int record, boolean newState)
          Select/deselect a Record passed in explicitly, or by index.
 void selectRecord(Record record)
          Select/deselect a Record passed in explicitly, or by index.
 void selectRecord(Record record, boolean newState)
          Select/deselect a Record passed in explicitly, or by index.
 void selectRecords(int[] records)
          Select/deselect a list of Records passed in explicitly, or by index.
 void selectRecords(int[] records, boolean newState)
          Select/deselect a list of Records passed in explicitly, or by index.
 void selectRecords(Record[] records)
          Select/deselect a list of Records passed in explicitly, or by index.
 void selectRecords(Record[] records, boolean newState)
          Select/deselect a list of Records passed in explicitly, or by index.
 void setAction(java.lang.String action)
          The URL to which the form will submit its values.
 void setAddDropValues(java.lang.Boolean addDropValues)
          Indicates whether to add "drop values" to items dropped on this component, if both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key.
 void setAddFormulaFieldText(java.lang.String addFormulaFieldText)
          Text for a menu item allowing users to add a formula field
 void setAddOperation(java.lang.String addOperation)
          Operation ID this component should use when performing add operations.
 void setAddSummaryFieldText(java.lang.String addSummaryFieldText)
          Text for a menu item allowing users to add a formula field
 void setAutoFetchAsFilter(java.lang.Boolean autoFetchAsFilter)
          If DataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData()
 void setAutoFetchData(java.lang.Boolean autoFetchData)
          If true, when this component is first drawn, automatically call DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on DataBoundComponent.getAutoFetchAsFilter() .
 void setAutoFocus(java.lang.Boolean autoFocus)
          If true, when the form is drawn, focus will automatically be put into the first focusable element in the form.
Note that to put focus in a different item you can explicitly call dynamicForm.focusInItem(itemName)
 void setCanAddFormulaFields(java.lang.Boolean canAddFormulaFields)
          Adds an item to the header context menu allowing users to launch a dialog to define a new field based on values present in other fields, using the com.smartgwt.client..FormulaBuilder.
 void setCanAddSummaryFields(java.lang.Boolean canAddSummaryFields)
          Adds an item to the header context menu allowing users to launch a dialog to define a new text field that can contain both user-defined text and the formatted values present in other fields, using the com.smartgwt.client..SummaryBuilder.
 void setCancelParamName(java.lang.String cancelParamName)
          The name of the special field sent to the server as part of cancel()
 void setCancelParamValue(java.lang.String cancelParamValue)
          The value of the special field sent to the server as part of cancel()
 void setCanFocus(java.lang.Boolean canFocus)
          DynamicForms are considered to have focus if any of their form items have focus. Note that setting dynamicForm.canFocus to false will have no effect on whether form items within the form may recieve focus.
 void setCanSubmit(java.lang.Boolean canSubmit)
          Governs whether this form will be used to perform a standard HTML form submission. Note that if true, submit() will perform a native HTML submission to the specified action URL.
Wherever possible we strongly recommend using the 'DataBound Component Methods' to send data to the server as they provide a far more sophisticated interface, with built in options for server validation, required fields, etc.
 void setCellBorder(int cellBorder)
          Width of border for the table that form is drawn in.
 void setCellPadding(int cellPadding)
          The amount of empty space, in pixels, surrounding each form item within its cell in the layout grid.
 void setCellSpacing(int cellSpacing)
          Set the cellSpacing.
 void setColWidths(java.lang.Object... colWidths)
           
 void setDataPageSize(int dataPageSize)
          When using data paging, how many records to fetch at a time.
 void setDataSource(DataSource dataSource)
          The DataSource that this component should bind to for default fields and for performing DSRequest.
 void setDisableValidation(java.lang.Boolean disableValidation)
          If set to true, client-side validators will not run on the form when validate() is called.
 void setDragDataAction(DragDataAction dragDataAction)
          Indicates what to do with data dragged into another DataBoundComponent.
 void setDragTrackerStyle(java.lang.String dragTrackerStyle)
          CSS Style to apply to the drag tracker when dragging occurs on this component.
 void setDropValues(java.util.Map dropValues)
          When an item is dropped on this component, and addDropValues is true and both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key, this object provides the "drop values" that SmartGWT will apply to the dropped object before updating it.
 void setDuplicateDragMessage(java.lang.String duplicateDragMessage)
          Message to show when a user attempts to transfer duplicate records into this component, and preventDuplicates is enabled.
 void setEditFormulaFieldText(java.lang.String editFormulaFieldText)
          Text for a menu item allowing users to edit a formula field
 void setEditSummaryFieldText(java.lang.String editSummaryFieldText)
          Text for a menu item allowing users to edit the formatter for a field
 void setEncoding(Encoding encoding)
          encoding for the form, use MULTIPART_ENCODING for file upload forms
 void setErrorItemCellStyle(java.lang.String errorItemCellStyle)
          If showInlineErrors is false we show all errors for the form item in a single item rendered at the top of the form.
This attribute specifies the cellStyle to apply to this item.
 void setErrorOrientation(FormErrorOrientation errorOrientation)
           
 void setErrors(java.util.Map errors, boolean showErrors)
          Setter for validation errors on this form.
 void setErrorsPreamble(java.lang.String errorsPreamble)
          If showInlineErrors is false we show all errors for the form item in a single item rendered at the top of the form.
This attribute specifies an introductory string rendered out before the individual error messages.
 void setExportAll(java.lang.Boolean exportAll)
          Setting exportAll to true prevents the component from passing it's list of fields to the export call.
 void setExportFields(java.lang.String[] exportFields)
          The list of field-names to export.
 void setFetchOperation(java.lang.String fetchOperation)
          Operation ID this component should use when performing fetch operations.
 void setFieldErrors(java.lang.String fieldName, java.lang.String[] errors, boolean showErrors)
          Set field validation errors for some field.
 void setFieldErrors(java.lang.String fieldName, java.lang.String error, boolean showErrors)
          Set field validation error for some field.
 void setFields(FormItem... fields)
          An array of field objects, specifying the order, layout, and types of each field in the DynamicForm.
 void setFixedColWidths(java.lang.Boolean fixedColWidths)
          If true, we ensure that column widths are at least as large as you specify them.
 void setHiliteProperty(java.lang.String hiliteProperty)
          Marker that can be set on a record to flag that record as hilited.
 void setHiliteRequiredFields(java.lang.Boolean hiliteRequiredFields)
          Indicates whether the titles of required items in this form should use the special prefix and suffix specified by the next two properties, instead of the standard prefix and suffix.
 void setInitialCriteria(Criteria initialCriteria)
          Criteria to use when DataBoundComponent.setAutoFetchData(Boolean) is used.
 void setItemHoverAlign(Alignment itemHoverAlign)
          Text alignment for hovers shown for items
 void setItemHoverDelay(int itemHoverDelay)
          If the user rolls over an item, how long a delay before we fire any hover action / show a hover for that item?
 void setItemHoverFormatter(FormItemHoverFormatter hoverFormatter)
          The FormItemHoverFormatter should return the HTML to display in a hover canvas when the user holds the mousepointer over this item.
 void setItemHoverHeight(java.lang.Integer itemHoverHeight)
          A default height for hovers shown for items
 void setItemHoverOpacity(java.lang.Integer itemHoverOpacity)
          Opacity for hovers shown for items
 void setItemHoverStyle(java.lang.String itemHoverStyle)
          CSS Style for hovers shown for items
 void setItemHoverVAlign(java.lang.Integer itemHoverVAlign)
          Vertical text alignment for hovers shown for items
 void setItemHoverWidth(java.lang.Integer itemHoverWidth)
          A default width for hovers shown for items
 void setItemLayout(FormLayoutType itemLayout)
          Layout style to use with this form.
 void setItems(FormItem... items)
          Synonym for setFields(com.smartgwt.client.widgets.form.fields.FormItem[]).
 void setItemTitleHoverFormatter(FormItemHoverFormatter hoverFormatter)
          The FormItemHoverFormatter should return the HTML to display in a hover canvas when the user holds the mousepointer over the item's title.
 void setLongTextEditorThreshold(int longTextEditorThreshold)
          When creating form items for fields with text type data, if the specified length of the field exceeds this threshold we will create form item of type this.longTextEditorType (a TextAreaItem by default), rather than a simple text item.
 void setLongTextEditorType(java.lang.String longTextEditorType)
          Name of the Form Item class to use for text fields which exceed the longTextEditorThreshold for this form.
 void setMethod(FormMethod method)
          The mechanism by which form data is sent to the action URL.
 void setMinColWidth(int minColWidth)
          Minimum width of a form column.
 void setNumCols(int numCols)
          The number of columns of titles and items in this form's layout grid.
 void setOperator(OperatorId operator)
          When operator has been set for any FormItem in this form, what logical operator should be applied across the ${isc.DocUtils.linkForRef('object:Criterion','criteria')} produced by the form items? Only applicable to forms that have a dataSource.
 void setPreventDuplicates(java.lang.Boolean preventDuplicates)
          If set, detect and prevent duplicate records from being transferred to this component, either via drag and drop or via DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent).
 void setRejectInvalidValueOnChange(java.lang.Boolean rejectInvalidValueOnChange)
          If validateOnChange is true, and validation fails for an item on change, with no suggested value, should we revert to the previous value, or continue to display the bad value entered by the user.
 void setRemoveOperation(java.lang.String removeOperation)
          Operation ID this component should use when performing remove operations.
 void setRequiredRightTitlePrefix(java.lang.String requiredRightTitlePrefix)
          The string prepended to the title of every required item in this form if highlightRequiredFields is true and the titleOrientation property is set to "right".
 void setRequiredRightTitleSuffix(java.lang.String requiredRightTitleSuffix)
          The string appended to the title of every required item in this form if highlightRequiredFields is true and the titleOrientation property is set to "right".
 void setRequiredTitlePrefix(java.lang.String requiredTitlePrefix)
          The string prepended to the title of every required item in this form if highlightRequiredFields is true.
 void setRequiredTitleSuffix(java.lang.String requiredTitleSuffix)
          The string appended to the title of every required item in this form if highlightRequiredFields is true.
 void setResizeFrom(java.lang.String... resizeFrom)
           
 void setRightTitlePrefix(java.lang.String rightTitlePrefix)
          The string prepended to the title of an item in this form if its titleOrientation property is set to "right".
 void setRightTitleSuffix(java.lang.String rightTitleSuffix)
          The string appended to the title of an item in this form if its titleOrientation property is set to "right".
 void setSaveOnEnter(java.lang.Boolean saveOnEnter)
          If true, when the user hits the Enter key while focussed in a text-item in this form, we automatically submit the form to the server using the submit() method.
 void setSaveOperationType(DSOperationType saveOperationType)
          Default DSOperationType to be performed when saveData() is called. This property is automatically set on a call to editRecord(com.smartgwt.client.data.Record) or editNewRecord(), or may be set directly via setSaveOperationType(com.smartgwt.client.types.DSOperationType).
 void setSectionVisibilityMode(VisibilityMode sectionVisibilityMode)
          If the form has sections, [implemented as SectionItems], this attribute controls whether multiple sections can be expanded at once.
 void setSelectOnFocus(java.lang.Boolean selectOnFocus)
          If this property is set to true, whenever a text-based field in this form (TextItem, TextAreaItem) is given focus programmatically (see focusInItem(int)), all text within the item will be selected.
 void setShowComplexFields(java.lang.Boolean showComplexFields)
          Whether to show fields of non-atomic types when a DataBoundComponent is given a DataSource but no component.fields.
 void setShowComplexFieldsRecursively(java.lang.Boolean showComplexFieldsRecursively)
          If set, this DynamicForm will set both showComplexFields and showComplexFieldsRecursively on any nested component used for showing/editing a complex field.
 void setShowDetailFields(java.lang.Boolean showDetailFields)
          Whether to show fields marked detail:true when a DataBoundComponent is given a DataSource but no component.fields.
 void setShowErrorIcons(java.lang.Boolean showErrorIcons)
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed next to form items when showInlineErrors is true. These properties are boolean values, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.
 void setShowErrorStyle(java.lang.Boolean showErrorStyle)
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed next to form items when showInlineErrors is true. These properties are boolean values, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.
 void setShowErrorText(java.lang.Boolean showErrorText)
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed next to form items when showInlineErrors is true. These properties are boolean values, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.
 void setShowHiddenFields(java.lang.Boolean showHiddenFields)
          Whether to show fields marked hidden:true when a DataBoundComponent is given a DataSource but no component.fields.
 void setShowInlineErrors(java.lang.Boolean showInlineErrors)
          If true, field errors are written into the form next to the item(s) where the errors occurred.
 void setShowTitlesWithErrorMessages(java.lang.Boolean showTitlesWithErrorMessages)
          Indicates whether on validation failure, the error message displayed to the user should be prepended with the title for the item.
 void setTarget(java.lang.String target)
          The name of a window or frame that will receive the results returned by the form's action.
 void setTitleField(java.lang.String titleField)
           
 void setTitleOrientation(TitleOrientation titleOrientation)
          Default orientation for titles for items in this form.
 void setTitlePrefix(java.lang.String titlePrefix)
          The string prepended to the title of every item in this form.
 void setTitleSuffix(java.lang.String titleSuffix)
          The string appended to the title of every item in this form.
 void setTitleWidth(int titleWidth)
           
 void setTitleWidth(java.lang.String titleWidth)
           
 void setUnknownErrorMessage(java.lang.String unknownErrorMessage)
          The error message for a failed validator that does not specify its own errorMessage.
 void setUpdateOperation(java.lang.String updateOperation)
          Operation ID this component should use when performing update operations.
 void setUseAllDataSourceFields(boolean useAllDataSourceFields)
          If true, the set of fields given by the "default binding" (see DataBoundComponent.fields) is used, with any fields specified in component.fields acting as overrides that can suppress or modify the display of individual fields, without having to list the entire set of fields that should be shown.
 void setUseAllDataSourceFields(java.lang.Boolean useAllDataSourceFields)
          If true, the set of fields given by the "default binding" (see fields) is used, with any fields specified in component.fields acting as overrides that can suppress or modify the display of individual fields, without having to list the entire set of fields that should be shown.
 void setUseFlatFields(java.lang.Boolean useFlatFields)
          The useFlatFields flag causes all simple type fields anywhere in a nested set of DataSources to be exposed as a flat list for form binding.
 void setValidateOnChange(java.lang.Boolean validateOnChange)
          If true, form fields will be validated when each item's "change" handler is fired as well as when the entire form is submitted or validated.
Note that this property can also be set at the item level to enable finer granularity validation in response to user interaction - if true at either level, validation will occur on change.
 void setValidationURL(java.lang.String validationURL)
          validationURL can be set to do server-side validation against a different URL from where the form will ultimately save, as part of an incremental upgrade strategy for Struts and Struts-like applications.
 void setValue(java.lang.String fieldName, boolean value)
          Set the value for some field.
 void setValue(java.lang.String fieldName, DataClass value)
          Set the value for some field.
 void setValue(java.lang.String fieldName, DataClass[] value)
          Set the value for some field.
 void setValue(java.lang.String fieldName, double value)
          Set the value for some field.
 void setValue(java.lang.String fieldName, com.google.gwt.core.client.JavaScriptObject value)
          Set the value for some field.
 void setValue(java.lang.String fieldName, java.util.Map value)
          Set the value for some field.
 void setValue(java.lang.String fieldName, Record value)
          Set the value for some field.
 void setValue(java.lang.String fieldName, Record[] value)
          Set the value for some field.
 void setValue(java.lang.String fieldName, java.lang.String value)
          Sets the value for some field
 void setValues(java.util.Map values)
          et the values for this DynamicForm.
 void setValuesManager(ValuesManager valuesManager)
          If set at init time, this dynamicForm will be created as a member form for the specified valuesManager.
 void setWrapItemTitles(java.lang.Boolean wrapItemTitles)
          Whether titles for form items should wrap.
 void showErrors()
          If this form has any outstanding validation errors, show them now.
This method is called when the set of errors are changed by setErrors(java.util.Map, boolean) or validate(boolean).
 void showFieldErrors(java.lang.String fieldName)
          If this form has any outstanding validation errors for the field passed in, show them now. Called when field errors are set directly via setFieldErrors(java.lang.String, java.lang.String, boolean) / com.smartgwt.client.widgets.form.DynamicForm#addFieldErrors / clearFieldErrors(java.lang.String, boolean).
Default implementation simply falls through to showErrors().
 void showItem(java.lang.String itemName)
          Show a form item via FormItem.show()
 void submit()
          submit() is automatically called when a SubmitItem included in the form is clicked, or, if saveOnEnter is set, when the "Enter" key is pressed in a text input.
 void submit(DSCallback callback)
          submit() is automatically called when a SubmitItem included in the form is clicked, or, if saveOnEnter is set, when the "Enter" key is pressed in a text input.
 void submit(DSCallback callback, DSRequest requestProperties)
          submit() is automatically called when a SubmitItem included in the form is clicked, or, if saveOnEnter is set, when the "Enter" key is pressed in a text input.
 void submitForm()
          Submits the form to the URL defined by action, identically to how a plain HTML <form> element would submit data, as either an HTTP GET or POST as specified by method.
 void transferSelectedData(DataBoundComponent source)
          Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction.
 void transferSelectedData(DataBoundComponent source, int index)
          Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction.
 boolean validate()
          Validates the form without submitting it, and redraws the form to display error messages if there are any validation errors.
 java.lang.Boolean validate(boolean validateHiddenFields)
          Validates the form without submitting it, and redraws the form to display error messages if there are any validation errors.
 void validateData()
           Perform validation on the client and the server.
 java.lang.Boolean valuesHaveChanged()
          Compares the current set of values with the values stored by the call to the rememberValues() method.
 
Methods inherited from class com.smartgwt.client.widgets.Canvas
addChild, addChild, addChild, addClickHandler, addDoubleClickHandler, addDragMoveHandler, addDragRepositionMoveHandler, addDragRepositionStartHandler, addDragRepositionStopHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addDropHandler, addDropMoveHandler, addDropOutHandler, addDropOverHandler, addFocusChangedHandler, addHoverHandler, addHoverHiddenHandler, addKeyDownHandler, addKeyPressHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseStillDownHandler, addMouseUpHandler, addMouseWheelHandler, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addScrolledHandler, addShowContextMenuHandler, addStyleName, adjustForContent, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, blur, bringToFront, clear, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsFocus, containsPoint, containsPoint, convertToCanvasArray, disable, enable, focus, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowTime, getAnimateTime, getAppImgDir, getAutoShowParent, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getCanAcceptDrop, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanHover, getCanSelectText, getChildren, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getContents, getContextMenu, getCursor, getDefaultHeight, getDefaultWidth, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragOpacity, getDragRepositionCursor, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragType, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getExtraSpace, getGroupTitle, getHeight, getHeightAsString, getHoverAlign, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlPosition, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getLeft, getMargin, getMatchElement, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOverflow, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getParentElement, getPercentBox, getPosition, getPrefix, getPrompt, getRect, getRedrawOnResize, getResizeBarTarget, getRight, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowDepth, getShadowImage, getShadowOffset, getShadowSoftness, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowResizeBar, getShowShadow, getSkinImgDir, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapResizeToGrid, getSnapTo, getSnapToGrid, getSnapVDirection, getSnapVGap, getStyleName, getTabIndex, getTitle, getTooltip, getTop, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWidth, getVSnapOrigin, getVSnapOrigin, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideContextMenu, imgHTML, imgHTML, imgHTML, intersects, isDirty, isDisabled, isDrawn, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, parentResized, redraw, redraw, removeChild, removeChild, resizeBy, resizeBy, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAlign, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowTime, setAnimateTime, setAppImgDir, setAutoHeight, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanHover, setCanSelectText, setChildren, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setContents, setContextMenu, setCursor, setDefaultHeight, setDefaultWidth, setDisabled, setDisabledCursor, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragOpacity, setDragRepositionCursor, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setExtraSpace, setGroupTitle, setHeight, setHeight, setHeight100, setHoverAlign, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlPosition, setImage, setImage, setIsGroup, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeft, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNoDoubleClicks, setOpacity, setOverflow, setPadding, setPageLeft, setPageTop, setParentElement, setPercentBox, setPosition, setPrefix, setPrompt, setRect, setRect, setRedrawOnResize, setResizeBarTarget, setRight, setScrollbarSize, setShadowDepth, setShadowImage, setShadowOffset, setShadowSoftness, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowResizeBar, setShowShadow, setSkinImgDir, setSmoothFade, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToGrid, setSnapTo, setSnapToGrid, setSnapVDirection, setSnapVGap, setStyleName, setTabIndex, setTitle, setTooltip, setTop, setVisibility, setVisible, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showNextTo, showNextTo, showPrintPreview, updateHover, updateHover, updateShadow, visibleAtPoint, visibleAtPoint, willAcceptDrop
 
Methods inherited from class com.smartgwt.client.widgets.BaseWidget
addDrawHandler, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getElement, getElement, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, hashCode, isConfigOnly, isCreated, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDragTracker, setElement, setHtmlElement, setID, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, toString
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setPixelSize, setSize, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.smartgwt.client.widgets.DataBoundComponent
getOrCreateJsObj
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

DynamicForm

public DynamicForm()

DynamicForm

public DynamicForm(com.google.gwt.core.client.JavaScriptObject jsObj)
Method Detail

getOrCreateRef

public static DynamicForm getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

create

protected com.google.gwt.core.client.JavaScriptObject create()
Overrides:
create in class Canvas

setSaveOperationType

public void setSaveOperationType(DSOperationType saveOperationType)
Default DSOperationType to be performed when saveData() is called. This property is automatically set on a call to editRecord(com.smartgwt.client.data.Record) or editNewRecord(), or may be set directly via setSaveOperationType(com.smartgwt.client.types.DSOperationType).

If saveOperationType is unset, the form will heuristically determine whether an "add" or "update" operation is intended based on whether the primaryKey field is present and editable. Setter for the default DSOperationType when saveData() is called. Note that this property can also be set by calling editRecord(com.smartgwt.client.data.Record) or editNewRecord()

Parameters:
saveOperationType - Operation type to use as a default. Valid values are "add" or "update".. Default value is null

getSaveOperationType

public DSOperationType getSaveOperationType()
Default DSOperationType to be performed when saveData() is called. This property is automatically set on a call to editRecord(com.smartgwt.client.data.Record) or editNewRecord(), or may be set directly via setSaveOperationType(com.smartgwt.client.types.DSOperationType).

If saveOperationType is unset, the form will heuristically determine whether an "add" or "update" operation is intended based on whether the primaryKey field is present and editable.

Returns:
Returns the DSOperationType to be performed when saveData() is called. Valid options are "add" or "update".

If a DSRequest configuration object is passed in containing an explicit operationType this will be returned. Otherwise saveOperationType will be returned.


setItemLayout

public void setItemLayout(FormLayoutType itemLayout)
Layout style to use with this form.

The default of "table" uses a tabular layout similar to HTML tables, but with much more powerful control over sizing, item visibility and reflow, overflow handling, etc.

itemLayout:"absolute" allows absolute positioning of every form item. This provides maximum flexibility in placement, with the following limitations:

Note : This is an advanced setting

Parameters:
itemLayout - itemLayout Default value is "table"

getItemLayout

public FormLayoutType getItemLayout()
Layout style to use with this form.

The default of "table" uses a tabular layout similar to HTML tables, but with much more powerful control over sizing, item visibility and reflow, overflow handling, etc.

itemLayout:"absolute" allows absolute positioning of every form item. This provides maximum flexibility in placement, with the following limitations:

Returns:
FormLayoutType

setNumCols

public void setNumCols(int numCols)
The number of columns of titles and items in this form's layout grid. A title and corresponding item each have their own column, so to display two form elements per row (each having a title and item), you would set this property to 4.

Parameters:
numCols - numCols Default value is 2

getNumCols

public int getNumCols()
The number of columns of titles and items in this form's layout grid. A title and corresponding item each have their own column, so to display two form elements per row (each having a title and item), you would set this property to 4.

Returns:
int

setFixedColWidths

public void setFixedColWidths(java.lang.Boolean fixedColWidths)
If true, we ensure that column widths are at least as large as you specify them. This means that if any single column overflows (due to, eg, a long unbreakable title), the form as a whole overflows.

If false, columns will have their specified sizes as long as no column overflows. If any column overflows, space will be taken from any other columns that aren't filling the available room, until there is no more free space, in which case the form as a whole overflows.

Parameters:
fixedColWidths - fixedColWidths Default value is false

getFixedColWidths

public java.lang.Boolean getFixedColWidths()
If true, we ensure that column widths are at least as large as you specify them. This means that if any single column overflows (due to, eg, a long unbreakable title), the form as a whole overflows.

If false, columns will have their specified sizes as long as no column overflows. If any column overflows, space will be taken from any other columns that aren't filling the available room, until there is no more free space, in which case the form as a whole overflows.

Returns:
Boolean

setMinColWidth

public void setMinColWidth(int minColWidth)
Minimum width of a form column.

Parameters:
minColWidth - minColWidth Default value is 20

getMinColWidth

public int getMinColWidth()
Minimum width of a form column.

Returns:
int

setCellPadding

public void setCellPadding(int cellPadding)
The amount of empty space, in pixels, surrounding each form item within its cell in the layout grid.

Parameters:
cellPadding - cellPadding Default value is 2

getCellPadding

public int getCellPadding()
The amount of empty space, in pixels, surrounding each form item within its cell in the layout grid.

Returns:
int

setCellBorder

public void setCellBorder(int cellBorder)
Width of border for the table that form is drawn in. This is primarily used for debugging form layout.

Parameters:
cellBorder - cellBorder Default value is 0

getCellBorder

public int getCellBorder()
Width of border for the table that form is drawn in. This is primarily used for debugging form layout.

Returns:
int

setSectionVisibilityMode

public void setSectionVisibilityMode(VisibilityMode sectionVisibilityMode)
If the form has sections, [implemented as SectionItems], this attribute controls whether multiple sections can be expanded at once.

Parameters:
sectionVisibilityMode - sectionVisibilityMode Default value is "multiple"

getSectionVisibilityMode

public VisibilityMode getSectionVisibilityMode()
If the form has sections, [implemented as SectionItems], this attribute controls whether multiple sections can be expanded at once.

Returns:
VisibilityMode

setLongTextEditorThreshold

public void setLongTextEditorThreshold(int longTextEditorThreshold)
When creating form items for fields with text type data, if the specified length of the field exceeds this threshold we will create form item of type this.longTextEditorType (a TextAreaItem by default), rather than a simple text item. Overridden by explicitly specifying editorType for the field.

Parameters:
longTextEditorThreshold - longTextEditorThreshold Default value is 255

getLongTextEditorThreshold

public int getLongTextEditorThreshold()
When creating form items for fields with text type data, if the specified length of the field exceeds this threshold we will create form item of type this.longTextEditorType (a TextAreaItem by default), rather than a simple text item. Overridden by explicitly specifying editorType for the field.

Returns:
int

setLongTextEditorType

public void setLongTextEditorType(java.lang.String longTextEditorType)
Name of the Form Item class to use for text fields which exceed the longTextEditorThreshold for this form.

Parameters:
longTextEditorType - longTextEditorType Default value is "textArea"

getLongTextEditorType

public java.lang.String getLongTextEditorType()
Name of the Form Item class to use for text fields which exceed the longTextEditorThreshold for this form.

Returns:
String

setTitleOrientation

public void setTitleOrientation(TitleOrientation titleOrientation)
Default orientation for titles for items in this form. TitleOrientation lists valid options.

Note that titles on the left or right take up a cell in tabular 'form layouts', but titles on top do not.

Parameters:
titleOrientation - titleOrientation Default value is "left"

getTitleOrientation

public TitleOrientation getTitleOrientation()
Default orientation for titles for items in this form. TitleOrientation lists valid options.

Note that titles on the left or right take up a cell in tabular 'form layouts', but titles on top do not.

Returns:
Return the orientation of the title for a specific item or the default title orientation if no item is passed.

setTitlePrefix

public void setTitlePrefix(java.lang.String titlePrefix)
The string prepended to the title of every item in this form.

Parameters:
titlePrefix - titlePrefix Default value is ""

getTitlePrefix

public java.lang.String getTitlePrefix()
The string prepended to the title of every item in this form.

Returns:
String

setRightTitlePrefix

public void setRightTitlePrefix(java.lang.String rightTitlePrefix)
The string prepended to the title of an item in this form if its titleOrientation property is set to "right".

Parameters:
rightTitlePrefix - rightTitlePrefix Default value is ": "

getRightTitlePrefix

public java.lang.String getRightTitlePrefix()
The string prepended to the title of an item in this form if its titleOrientation property is set to "right".

Returns:
String

setTitleSuffix

public void setTitleSuffix(java.lang.String titleSuffix)
The string appended to the title of every item in this form.

Parameters:
titleSuffix - titleSuffix Default value is " :"

getTitleSuffix

public java.lang.String getTitleSuffix()
The string appended to the title of every item in this form.

Returns:
String

setRightTitleSuffix

public void setRightTitleSuffix(java.lang.String rightTitleSuffix)
The string appended to the title of an item in this form if its titleOrientation property is set to "right".

Parameters:
rightTitleSuffix - rightTitleSuffix Default value is ""

getRightTitleSuffix

public java.lang.String getRightTitleSuffix()
The string appended to the title of an item in this form if its titleOrientation property is set to "right".

Returns:
String

setWrapItemTitles

public void setWrapItemTitles(java.lang.Boolean wrapItemTitles)
Whether titles for form items should wrap. If not specified, titles will wrap by default. Can be overridden for individual items via wrapTitle

Parameters:
wrapItemTitles - wrapItemTitles Default value is null

getWrapItemTitles

public java.lang.Boolean getWrapItemTitles()
Whether titles for form items should wrap. If not specified, titles will wrap by default. Can be overridden for individual items via wrapTitle

Returns:
Boolean

setShowInlineErrors

public void setShowInlineErrors(java.lang.Boolean showInlineErrors)
If true, field errors are written into the form next to the item(s) where the errors occurred. Errors may appear as text or just an icon (via showErrorText:false}.

If false, errors are written at the top of the form.

To do some other kind of error display, override showErrors().

Parameters:
showInlineErrors - showInlineErrors Default value is true

getShowInlineErrors

public java.lang.Boolean getShowInlineErrors()
If true, field errors are written into the form next to the item(s) where the errors occurred. Errors may appear as text or just an icon (via showErrorText:false}.

If false, errors are written at the top of the form.

To do some other kind of error display, override showErrors().

Returns:
Boolean

setShowErrorIcons

public void setShowErrorIcons(java.lang.Boolean showErrorIcons)
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed next to form items when showInlineErrors is true. These properties are boolean values, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.

The HTML displayed next to a form item with errors is generated by com.smartgwt.client.widgets.form.fields.FormItem#getErrorHTML. The default implemenation of that method respects showErrorIcons and showErrorText as follows:

showErrorIcons, or showErrorIcon at the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed by errorIconSrc, errorIconWidth and errorIconHeight

showErrorText determines whether the text of the validation error should be displayed next to fields which have validation errors. The attribute showTitlesWithErrorMessages may be set to prefix error messages with the form item's title + ":" (may be desired if the item has showTitle set to false).

errorOrientation controls where the error HTML should appear relative to form items. Therefore the combination of showErrorText:false and errorOrientation:"left" creates a compact validation error display consisting of just an icon, to the left of the item with the error message available via a hover (similar appearance to ListGrid validation error display).

In addition to this, showErrorStyle determines whether fields with validation errors should have special styling applied to them. See com.smartgwt.client..FormItemBaseStyle for a discussion for how error styling is calculated.

Parameters:
showErrorIcons - showErrorIcons Default value is true

getShowErrorIcons

public java.lang.Boolean getShowErrorIcons()
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed next to form items when showInlineErrors is true. These properties are boolean values, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.

The HTML displayed next to a form item with errors is generated by com.smartgwt.client.widgets.form.fields.FormItem#getErrorHTML. The default implemenation of that method respects showErrorIcons and showErrorText as follows:

showErrorIcons, or showErrorIcon at the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed by errorIconSrc, errorIconWidth and errorIconHeight

showErrorText determines whether the text of the validation error should be displayed next to fields which have validation errors. The attribute showTitlesWithErrorMessages may be set to prefix error messages with the form item's title + ":" (may be desired if the item has showTitle set to false).

errorOrientation controls where the error HTML should appear relative to form items. Therefore the combination of showErrorText:false and errorOrientation:"left" creates a compact validation error display consisting of just an icon, to the left of the item with the error message available via a hover (similar appearance to ListGrid validation error display).

In addition to this, showErrorStyle determines whether fields with validation errors should have special styling applied to them. See com.smartgwt.client..FormItemBaseStyle for a discussion for how error styling is calculated.

Returns:
Boolean

setShowErrorText

public void setShowErrorText(java.lang.Boolean showErrorText)
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed next to form items when showInlineErrors is true. These properties are boolean values, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.

The HTML displayed next to a form item with errors is generated by com.smartgwt.client.widgets.form.fields.FormItem#getErrorHTML. The default implemenation of that method respects showErrorIcons and showErrorText as follows:

showErrorIcons, or showErrorIcon at the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed by errorIconSrc, errorIconWidth and errorIconHeight

showErrorText determines whether the text of the validation error should be displayed next to fields which have validation errors. The attribute showTitlesWithErrorMessages may be set to prefix error messages with the form item's title + ":" (may be desired if the item has showTitle set to false).

errorOrientation controls where the error HTML should appear relative to form items. Therefore the combination of showErrorText:false and errorOrientation:"left" creates a compact validation error display consisting of just an icon, to the left of the item with the error message available via a hover (similar appearance to ListGrid validation error display).

In addition to this, showErrorStyle determines whether fields with validation errors should have special styling applied to them. See com.smartgwt.client..FormItemBaseStyle for a discussion for how error styling is calculated.

Parameters:
showErrorText - showErrorText Default value is false

getShowErrorText

public java.lang.Boolean getShowErrorText()
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed next to form items when showInlineErrors is true. These properties are boolean values, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.

The HTML displayed next to a form item with errors is generated by com.smartgwt.client.widgets.form.fields.FormItem#getErrorHTML. The default implemenation of that method respects showErrorIcons and showErrorText as follows:

showErrorIcons, or showErrorIcon at the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed by errorIconSrc, errorIconWidth and errorIconHeight

showErrorText determines whether the text of the validation error should be displayed next to fields which have validation errors. The attribute showTitlesWithErrorMessages may be set to prefix error messages with the form item's title + ":" (may be desired if the item has showTitle set to false).

errorOrientation controls where the error HTML should appear relative to form items. Therefore the combination of showErrorText:false and errorOrientation:"left" creates a compact validation error display consisting of just an icon, to the left of the item with the error message available via a hover (similar appearance to ListGrid validation error display).

In addition to this, showErrorStyle determines whether fields with validation errors should have special styling applied to them. See com.smartgwt.client..FormItemBaseStyle for a discussion for how error styling is calculated.

Returns:
Boolean

setShowErrorStyle

public void setShowErrorStyle(java.lang.Boolean showErrorStyle)
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed next to form items when showInlineErrors is true. These properties are boolean values, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.

The HTML displayed next to a form item with errors is generated by com.smartgwt.client.widgets.form.fields.FormItem#getErrorHTML. The default implemenation of that method respects showErrorIcons and showErrorText as follows:

showErrorIcons, or showErrorIcon at the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed by errorIconSrc, errorIconWidth and errorIconHeight

showErrorText determines whether the text of the validation error should be displayed next to fields which have validation errors. The attribute showTitlesWithErrorMessages may be set to prefix error messages with the form item's title + ":" (may be desired if the item has showTitle set to false).

errorOrientation controls where the error HTML should appear relative to form items. Therefore the combination of showErrorText:false and errorOrientation:"left" creates a compact validation error display consisting of just an icon, to the left of the item with the error message available via a hover (similar appearance to ListGrid validation error display).

In addition to this, showErrorStyle determines whether fields with validation errors should have special styling applied to them. See com.smartgwt.client..FormItemBaseStyle for a discussion for how error styling is calculated.

Parameters:
showErrorStyle - showErrorStyle Default value is true

getShowErrorStyle

public java.lang.Boolean getShowErrorStyle()
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed next to form items when showInlineErrors is true. These properties are boolean values, and can be set on a DynamicForm to control the behavior form-wide, or set on individual FormItems.

The HTML displayed next to a form item with errors is generated by com.smartgwt.client.widgets.form.fields.FormItem#getErrorHTML. The default implemenation of that method respects showErrorIcons and showErrorText as follows:

showErrorIcons, or showErrorIcon at the FormItem level controls whether an error icon should appear next to fields which have validation errors. The icon's appearance is governed by errorIconSrc, errorIconWidth and errorIconHeight

showErrorText determines whether the text of the validation error should be displayed next to fields which have validation errors. The attribute showTitlesWithErrorMessages may be set to prefix error messages with the form item's title + ":" (may be desired if the item has showTitle set to false).

errorOrientation controls where the error HTML should appear relative to form items. Therefore the combination of showErrorText:false and errorOrientation:"left" creates a compact validation error display consisting of just an icon, to the left of the item with the error message available via a hover (similar appearance to ListGrid validation error display).

In addition to this, showErrorStyle determines whether fields with validation errors should have special styling applied to them. See com.smartgwt.client..FormItemBaseStyle for a discussion for how error styling is calculated.

Returns:
Boolean

setErrorItemCellStyle

public void setErrorItemCellStyle(java.lang.String errorItemCellStyle)
                           throws java.lang.IllegalStateException
If showInlineErrors is false we show all errors for the form item in a single item rendered at the top of the form.
This attribute specifies the cellStyle to apply to this item.

Parameters:
errorItemCellStyle - errorItemCellStyle Default value is "formCellError"
Throws:
java.lang.IllegalStateException - this property cannot be changed after the component has been created

getErrorItemCellStyle

public java.lang.String getErrorItemCellStyle()
If showInlineErrors is false we show all errors for the form item in a single item rendered at the top of the form.
This attribute specifies the cellStyle to apply to this item.

Returns:
String

setErrorsPreamble

public void setErrorsPreamble(java.lang.String errorsPreamble)
                       throws java.lang.IllegalStateException
If showInlineErrors is false we show all errors for the form item in a single item rendered at the top of the form.
This attribute specifies an introductory string rendered out before the individual error messages.

Parameters:
errorsPreamble - errorsPreamble Default value is "The following errors were found"
Throws:
java.lang.IllegalStateException - this property cannot be changed after the component has been created

getErrorsPreamble

public java.lang.String getErrorsPreamble()
If showInlineErrors is false we show all errors for the form item in a single item rendered at the top of the form.
This attribute specifies an introductory string rendered out before the individual error messages.

Returns:
String

setShowTitlesWithErrorMessages

public void setShowTitlesWithErrorMessages(java.lang.Boolean showTitlesWithErrorMessages)
Indicates whether on validation failure, the error message displayed to the user should be prepended with the title for the item.

Parameters:
showTitlesWithErrorMessages - showTitlesWithErrorMessages Default value is false

getShowTitlesWithErrorMessages

public java.lang.Boolean getShowTitlesWithErrorMessages()
Indicates whether on validation failure, the error message displayed to the user should be prepended with the title for the item.

Returns:
Boolean

setHiliteRequiredFields

public void setHiliteRequiredFields(java.lang.Boolean hiliteRequiredFields)
Indicates whether the titles of required items in this form should use the special prefix and suffix specified by the next two properties, instead of the standard prefix and suffix.

Parameters:
hiliteRequiredFields - hiliteRequiredFields Default value is true

getHiliteRequiredFields

public java.lang.Boolean getHiliteRequiredFields()
Indicates whether the titles of required items in this form should use the special prefix and suffix specified by the next two properties, instead of the standard prefix and suffix.

Returns:
Boolean

setRequiredTitlePrefix

public void setRequiredTitlePrefix(java.lang.String requiredTitlePrefix)
The string prepended to the title of every required item in this form if highlightRequiredFields is true.

Parameters:
requiredTitlePrefix - requiredTitlePrefix Default value is ""

getRequiredTitlePrefix

public java.lang.String getRequiredTitlePrefix()
The string prepended to the title of every required item in this form if highlightRequiredFields is true.

Returns:
String

setRequiredRightTitlePrefix

public void setRequiredRightTitlePrefix(java.lang.String requiredRightTitlePrefix)
The string prepended to the title of every required item in this form if highlightRequiredFields is true and the titleOrientation property is set to "right".

Parameters:
requiredRightTitlePrefix - requiredRightTitlePrefix Default value is ": "

getRequiredRightTitlePrefix

public java.lang.String getRequiredRightTitlePrefix()
The string prepended to the title of every required item in this form if highlightRequiredFields is true and the titleOrientation property is set to "right".

Returns:
String

setRequiredTitleSuffix

public void setRequiredTitleSuffix(java.lang.String requiredTitleSuffix)
The string appended to the title of every required item in this form if highlightRequiredFields is true.

Parameters:
requiredTitleSuffix - requiredTitleSuffix Default value is " :"

getRequiredTitleSuffix

public java.lang.String getRequiredTitleSuffix()
The string appended to the title of every required item in this form if highlightRequiredFields is true.

Returns:
String

setRequiredRightTitleSuffix

public void setRequiredRightTitleSuffix(java.lang.String requiredRightTitleSuffix)
The string appended to the title of every required item in this form if highlightRequiredFields is true and the titleOrientation property is set to "right".

Parameters:
requiredRightTitleSuffix - requiredRightTitleSuffix Default value is ""

getRequiredRightTitleSuffix

public java.lang.String getRequiredRightTitleSuffix()
The string appended to the title of every required item in this form if highlightRequiredFields is true and the titleOrientation property is set to "right".

Returns:
String

setItemHoverDelay

public void setItemHoverDelay(int itemHoverDelay)
If the user rolls over an item, how long a delay before we fire any hover action / show a hover for that item?

Parameters:
itemHoverDelay - itemHoverDelay Default value is 500

getItemHoverDelay

public int getItemHoverDelay()
If the user rolls over an item, how long a delay before we fire any hover action / show a hover for that item?

Returns:
int

setItemHoverWidth

public void setItemHoverWidth(java.lang.Integer itemHoverWidth)
A default width for hovers shown for items

Parameters:
itemHoverWidth - itemHoverWidth Default value is null

getItemHoverWidth

public java.lang.Integer getItemHoverWidth()
A default width for hovers shown for items

Returns:
Integer

setItemHoverHeight

public void setItemHoverHeight(java.lang.Integer itemHoverHeight)
A default height for hovers shown for items

Parameters:
itemHoverHeight - itemHoverHeight Default value is null

getItemHoverHeight

public java.lang.Integer getItemHoverHeight()
A default height for hovers shown for items

Returns:
Integer

setItemHoverAlign

public void setItemHoverAlign(Alignment itemHoverAlign)
Text alignment for hovers shown for items

Parameters:
itemHoverAlign - itemHoverAlign Default value is null

getItemHoverAlign

public Alignment getItemHoverAlign()
Text alignment for hovers shown for items

Returns:
Alignment

setItemHoverVAlign

public void setItemHoverVAlign(java.lang.Integer itemHoverVAlign)
Vertical text alignment for hovers shown for items

Parameters:
itemHoverVAlign - itemHoverVAlign Default value is null

getItemHoverVAlign

public java.lang.Integer getItemHoverVAlign()
Vertical text alignment for hovers shown for items

Returns:
Integer

setItemHoverStyle

public void setItemHoverStyle(java.lang.String itemHoverStyle)
CSS Style for hovers shown for items

Parameters:
itemHoverStyle - itemHoverStyle Default value is "formHover"

getItemHoverStyle

public java.lang.String getItemHoverStyle()
CSS Style for hovers shown for items

Returns:
String

setItemHoverOpacity

public void setItemHoverOpacity(java.lang.Integer itemHoverOpacity)
Opacity for hovers shown for items

Parameters:
itemHoverOpacity - itemHoverOpacity Default value is null

getItemHoverOpacity

public java.lang.Integer getItemHoverOpacity()
Opacity for hovers shown for items

Returns:
Integer

setValidateOnChange

public void setValidateOnChange(java.lang.Boolean validateOnChange)
If true, form fields will be validated when each item's "change" handler is fired as well as when the entire form is submitted or validated.
Note that this property can also be set at the item level to enable finer granularity validation in response to user interaction - if true at either level, validation will occur on change.

Parameters:
validateOnChange - validateOnChange Default value is false

getValidateOnChange

public java.lang.Boolean getValidateOnChange()
If true, form fields will be validated when each item's "change" handler is fired as well as when the entire form is submitted or validated.
Note that this property can also be set at the item level to enable finer granularity validation in response to user interaction - if true at either level, validation will occur on change.

Returns:
Boolean

setRejectInvalidValueOnChange

public void setRejectInvalidValueOnChange(java.lang.Boolean rejectInvalidValueOnChange)
If validateOnChange is true, and validation fails for an item on change, with no suggested value, should we revert to the previous value, or continue to display the bad value entered by the user. May be set at the item or form level.

Note : This is an advanced setting

Parameters:
rejectInvalidValueOnChange - rejectInvalidValueOnChange Default value is null

getRejectInvalidValueOnChange

public java.lang.Boolean getRejectInvalidValueOnChange()
If validateOnChange is true, and validation fails for an item on change, with no suggested value, should we revert to the previous value, or continue to display the bad value entered by the user. May be set at the item or form level.

Returns:
Boolean

setUnknownErrorMessage

public void setUnknownErrorMessage(java.lang.String unknownErrorMessage)
The error message for a failed validator that does not specify its own errorMessage.

Parameters:
unknownErrorMessage - unknownErrorMessage Default value is "Invalid value"

getUnknownErrorMessage

public java.lang.String getUnknownErrorMessage()
The error message for a failed validator that does not specify its own errorMessage.

Returns:
String

setAutoFocus

public void setAutoFocus(java.lang.Boolean autoFocus)
If true, when the form is drawn, focus will automatically be put into the first focusable element in the form.
Note that to put focus in a different item you can explicitly call dynamicForm.focusInItem(itemName)

Parameters:
autoFocus - autoFocus Default value is false

getAutoFocus

public java.lang.Boolean getAutoFocus()
If true, when the form is drawn, focus will automatically be put into the first focusable element in the form.
Note that to put focus in a different item you can explicitly call dynamicForm.focusInItem(itemName)

Returns:
Boolean

setSelectOnFocus

public void setSelectOnFocus(java.lang.Boolean selectOnFocus)
If this property is set to true, whenever a text-based field in this form (TextItem, TextAreaItem) is given focus programmatically (see focusInItem(int)), all text within the item will be selected.

Note that this flag affects only programmatic focus. It's the normal behavior of text fields to select all text if the user navigates into them via keyboard, or if the user navigates via mouse, to place the text insertion point at the mouse click, and SmartGWT preserves these behaviors. selectOnFocus if only needed for cases like a form within a pop-up dialog that should have the first field selected.

If selectOnFocus is false, the selection is not modified on focus - any previous selection within the item will be maintained.

May be overridden at the form item level via selectOnFocus.

Parameters:
selectOnFocus - selectOnFocus Default value is false

getSelectOnFocus

public java.lang.Boolean getSelectOnFocus()
If this property is set to true, whenever a text-based field in this form (TextItem, TextAreaItem) is given focus programmatically (see focusInItem(int)), all text within the item will be selected.

Note that this flag affects only programmatic focus. It's the normal behavior of text fields to select all text if the user navigates into them via keyboard, or if the user navigates via mouse, to place the text insertion point at the mouse click, and SmartGWT preserves these behaviors. selectOnFocus if only needed for cases like a form within a pop-up dialog that should have the first field selected.

If selectOnFocus is false, the selection is not modified on focus - any previous selection within the item will be maintained.

May be overridden at the form item level via selectOnFocus.

Returns:
Boolean

setCanFocus

public void setCanFocus(java.lang.Boolean canFocus)
DynamicForms are considered to have focus if any of their form items have focus. Note that setting dynamicForm.canFocus to false will have no effect on whether form items within the form may recieve focus. This property will only govern whether the form may recieve focus if the form contains no focusable items.

Note : This is an advanced setting

Overrides:
setCanFocus in class Canvas
Parameters:
canFocus - canFocus Default value is true

getCanFocus

public java.lang.Boolean getCanFocus()
DynamicForms are considered to have focus if any of their form items have focus. Note that setting dynamicForm.canFocus to false will have no effect on whether form items within the form may recieve focus. This property will only govern whether the form may recieve focus if the form contains no focusable items.

Overrides:
getCanFocus in class Canvas
Returns:
Boolean

setValidationURL

public void setValidationURL(java.lang.String validationURL)
validationURL can be set to do server-side validation against a different URL from where the form will ultimately save, as part of an incremental upgrade strategy for Struts and Struts-like applications.

If set, calling submit() causes an RPC to be sent to this URL to perform server-side validation of the form values. If the validation fails, the validation errors returned by the server are rendered in the form. If the validation succeeds, the form is submitted to the URL specified by action.

The form values are available on the server as request parameters (just like a normal form submit) and also as the values of a DSRequest sent as an RPC alongside the normal submit.

The expected response to this request is a DSResponse sent via the RPC mechanism. If validation is successful, an empty response with the STATUS_SUCCESS status code is sufficient. If there are validation errors, the DSResponse should have the status set to STATUS_VALIDATION_ERROR and the errors should be set on the response via the addError()/setErrorReport() API on DSResponse. See the javadoc for DSResponse for details.

See the Struts examples in [webroot]/examples/struts for usage examples.

Parameters:
validationURL - validationURL Default value is null

getValidationURL

public java.lang.String getValidationURL()
validationURL can be set to do server-side validation against a different URL from where the form will ultimately save, as part of an incremental upgrade strategy for Struts and Struts-like applications.

If set, calling submit() causes an RPC to be sent to this URL to perform server-side validation of the form values. If the validation fails, the validation errors returned by the server are rendered in the form. If the validation succeeds, the form is submitted to the URL specified by action.

The form values are available on the server as request parameters (just like a normal form submit) and also as the values of a DSRequest sent as an RPC alongside the normal submit.

The expected response to this request is a DSResponse sent via the RPC mechanism. If validation is successful, an empty response with the STATUS_SUCCESS status code is sufficient. If there are validation errors, the DSResponse should have the status set to STATUS_VALIDATION_ERROR and the errors should be set on the response via the addError()/setErrorReport() API on DSResponse. See the javadoc for DSResponse for details.

See the Struts examples in [webroot]/examples/struts for usage examples.

Returns:
String

setDisableValidation

public void setDisableValidation(java.lang.Boolean disableValidation)
If set to true, client-side validators will not run on the form when validate() is called. Server-side validatiors (if any) will still run on attempted save.

Parameters:
disableValidation - disableValidation Default value is null

getDisableValidation

public java.lang.Boolean getDisableValidation()
If set to true, client-side validators will not run on the form when validate() is called. Server-side validatiors (if any) will still run on attempted save.

Returns:
Boolean

setCancelParamName

public void setCancelParamName(java.lang.String cancelParamName)
The name of the special field sent to the server as part of cancel()

Parameters:
cancelParamName - cancelParamName Default value is "org.apache.struts.taglib.html.CANCEL"

getCancelParamName

public java.lang.String getCancelParamName()
The name of the special field sent to the server as part of cancel()

Returns:
String

setCancelParamValue

public void setCancelParamValue(java.lang.String cancelParamValue)
The value of the special field sent to the server as part of cancel()

Parameters:
cancelParamValue - cancelParamValue Default value is "cancel"

getCancelParamValue

public java.lang.String getCancelParamValue()
The value of the special field sent to the server as part of cancel()

Returns:
String

setAction

public void setAction(java.lang.String action)
The URL to which the form will submit its values.

NOTE: this is used only in the very rare case that a form is used to submit data directly to a URL. Normal server contact is through RPCManager.
See canSubmit for more on this. Sets the action for this form.

Parameters:
action - New action URL. Default value is "#"

getAction

public java.lang.String getAction()
The URL to which the form will submit its values.

NOTE: this is used only in the very rare case that a form is used to submit data directly to a URL. Normal server contact is through RPCManager.
See canSubmit for more on this.

Returns:
String

setTarget

public void setTarget(java.lang.String target)
The name of a window or frame that will receive the results returned by the form's action. The default null indicates to use the current frame.

NOTE: this is used only in the very rare case that a form is used to submit data directly to a URL. Normal server contact is through 'DataBound Component Methods'.

Note : This is an advanced setting

Parameters:
target - target Default value is null

getTarget

public java.lang.String getTarget()
The name of a window or frame that will receive the results returned by the form's action. The default null indicates to use the current frame.

NOTE: this is used only in the very rare case that a form is used to submit data directly to a URL. Normal server contact is through 'DataBound Component Methods'.

Returns:
String

setMethod

public void setMethod(FormMethod method)
The mechanism by which form data is sent to the action URL. See FormMethod type for details.

NOTE: this is used only in the very rare case that a form is used to submit data directly to a URL. Normal server contact is through 'DataBound Component Methods'.

Parameters:
method - method Default value is DynamicForm.POST

getMethod

public FormMethod getMethod()
The mechanism by which form data is sent to the action URL. See FormMethod type for details.

NOTE: this is used only in the very rare case that a form is used to submit data directly to a URL. Normal server contact is through 'DataBound Component Methods'.

Returns:
FormMethod

setEncoding

public void setEncoding(Encoding encoding)
encoding for the form, use MULTIPART_ENCODING for file upload forms

Note : This is an advanced setting

Parameters:
encoding - encoding Default value is DynamicForm.NORMAL

getEncoding

public Encoding getEncoding()
encoding for the form, use MULTIPART_ENCODING for file upload forms

Returns:
Encoding

setCanSubmit

public void setCanSubmit(java.lang.Boolean canSubmit)
Governs whether this form will be used to perform a standard HTML form submission. Note that if true, submit() will perform a native HTML submission to the specified action URL.
Wherever possible we strongly recommend using the 'DataBound Component Methods' to send data to the server as they provide a far more sophisticated interface, with built in options for server validation, required fields, etc.

Note : This is an advanced setting

Parameters:
canSubmit - canSubmit Default value is false

getCanSubmit

public java.lang.Boolean getCanSubmit()
Governs whether this form will be used to perform a standard HTML form submission. Note that if true, submit() will perform a native HTML submission to the specified action URL.
Wherever possible we strongly recommend using the 'DataBound Component Methods' to send data to the server as they provide a far more sophisticated interface, with built in options for server validation, required fields, etc.

Returns:
Boolean

setSaveOnEnter

public void setSaveOnEnter(java.lang.Boolean saveOnEnter)
If true, when the user hits the Enter key while focussed in a text-item in this form, we automatically submit the form to the server using the submit() method.

Parameters:
saveOnEnter - saveOnEnter Default value is false

getSaveOnEnter

public java.lang.Boolean getSaveOnEnter()
If true, when the user hits the Enter key while focussed in a text-item in this form, we automatically submit the form to the server using the submit() method.

Returns:
Boolean

setShowComplexFieldsRecursively

public void setShowComplexFieldsRecursively(java.lang.Boolean showComplexFieldsRecursively)
                                     throws java.lang.IllegalStateException
If set, this DynamicForm will set both showComplexFields and showComplexFieldsRecursively on any nested component used for showing/editing a complex field. Thus any of this form's items that handle complex fields will themselves also show complex fields. This allows for handling of field structures of any complexity.

If set, this value automatically sets showComplexFields as well.

Parameters:
showComplexFieldsRecursively - showComplexFieldsRecursively Default value is null
Throws:
java.lang.IllegalStateException - this property cannot be changed after the component has been created

getShowComplexFieldsRecursively

public java.lang.Boolean getShowComplexFieldsRecursively()
If set, this DynamicForm will set both showComplexFields and showComplexFieldsRecursively on any nested component used for showing/editing a complex field. Thus any of this form's items that handle complex fields will themselves also show complex fields. This allows for handling of field structures of any complexity.

If set, this value automatically sets showComplexFields as well.

Returns:
Boolean

validateData

public void validateData()
Perform validation on the client and the server.


reset

public void reset()
Resets values to the state it was the last time setValues() or rememberValues() was called. If neither of those methods has been called, values will be set back to their inital values at init time.


cancel

public void cancel()
This method exists for clean integration with existing server frameworks that have a 'cancel' feature which typically clears session state associated with the form. When this method is called, an RPC is sent to the server with a parameter named cancelParamName with the value cancelParamValue.

Note that no other form data is sent. By default the current top-level page is replaced with the reply. If you wish to ignore the server reply instead, call this method like this:

 dynamicFormInstance.cancel({ignoreTimeout: true, target: null});
 


cancel

public void cancel(DSRequest requestProperties)
This method exists for clean integration with existing server frameworks that have a 'cancel' feature which typically clears session state associated with the form. When this method is called, an RPC is sent to the server with a parameter named cancelParamName with the value cancelParamValue.

Note that no other form data is sent. By default the current top-level page is replaced with the reply. If you wish to ignore the server reply instead, call this method like this:

 dynamicFormInstance.cancel({ignoreTimeout: true, target: null});
 

Parameters:
requestProperties - additional properties to set on the RPCRequest that will be issued

isNewRecord

public java.lang.Boolean isNewRecord()
Returns true if saveOperationType is currently "add". See saveOperationType.

Returns:
whether this form will use an "add" operation when saving

resetValues

public void resetValues()
Same as reset().


clearValues

public void clearValues()
Reset to default form values and clear errors


valuesHaveChanged

public java.lang.Boolean valuesHaveChanged()
Compares the current set of values with the values stored by the call to the rememberValues() method. Returns true if the values have changed, and false otherwise.

Returns:
true if current values do not match remembered values

setValue

public void setValue(java.lang.String fieldName,
                     java.lang.String value)
Sets the value for some field

Parameters:
fieldName - Name of the field being updated
value - New value.

clearValue

public void clearValue(java.lang.String fieldName)
Clears the value for some field via a call to com.smartgwt.client.widgets.form.fields.FormItem#clearValue if appropriate. If there is no item associated with the field name, the field will just be cleared within our stored set of values.

Parameters:
fieldName - Name of the field being cleared

showItem

public void showItem(java.lang.String itemName)
Show a form item via FormItem.show()

Parameters:
itemName - Name of the item to show

hideItem

public void hideItem(java.lang.String itemName)
Hide a form item via FormItem.hide()

Parameters:
itemName - Name of the item to show

clearFieldErrors

public void clearFieldErrors(java.lang.String fieldName,
                             boolean show)
Clear any validation errors on the field passed in.

Parameters:
fieldName - field to clear errors from
show - If true this method will fall through to showFieldErrors(java.lang.String) to update the display

clearErrors

public void clearErrors(boolean show)
Clears all errors for this DynamicForm.

Parameters:
show - If true, redraw the form to clear any visible error messages.

hasErrors

public java.lang.Boolean hasErrors()
Return whether this form currently has any validation errors.
Validation errors are set up automatically by validation, or may be explicitly set via setErrors(java.util.Map, boolean) or setFieldErrors(java.lang.String, java.lang.String, boolean).

Returns:
true == form currently has validation errors.

hasFieldErrors

public java.lang.Boolean hasFieldErrors(java.lang.String fieldName)
Does this form currently h ave any validation errors on the field passed in?
Validation errors are set up automatically by validation, or may be explicitly set via setErrors(java.util.Map, boolean) or setFieldErrors(java.lang.String, java.lang.String, boolean).

Parameters:
fieldName - field to test for validation errors
Returns:
true if the form has outstanding errors for the field in question.

submitForm

public void submitForm()
Submits the form to the URL defined by action, identically to how a plain HTML <form> element would submit data, as either an HTTP GET or POST as specified by method.

Notes:


validate

public java.lang.Boolean validate(boolean validateHiddenFields)
Validates the form without submitting it, and redraws the form to display error messages if there are any validation errors. Returns true if validation succeeds, or false if validation fails.
For databound forms, any Datasource field validators will be run even if there is no associated item in the form.
Validators will also be run on hidden form items
In both these cases, validation failure can be handled via com.smartgwt.client.widgets.form.DynamicForm#handleHiddenValidationErrors

Parameters:
validateHiddenFields - Should validators be processed for non-visible fields such as dataSource fields with no associated item or fields with visibility set to "hidden"?
Returns:
true if validation succeeds, or false if validation fails.

showFieldErrors

public void showFieldErrors(java.lang.String fieldName)
If this form has any outstanding validation errors for the field passed in, show them now. Called when field errors are set directly via setFieldErrors(java.lang.String, java.lang.String, boolean) / com.smartgwt.client.widgets.form.DynamicForm#addFieldErrors / clearFieldErrors(java.lang.String, boolean).
Default implementation simply falls through to showErrors().

Parameters:
fieldName - field to show errors for

addItemChangedHandler

public HandlerRegistration addItemChangedHandler(ItemChangedHandler handler)
Add a itemChanged handler.

Handler fired when there is a changed() event fired on a FormItem within this form.

Fires after the change() handler on the FormItem itself, and only if the item did not cancel the change event and chooses to allow it to propagate to the form as a whole.

Specified by:
addItemChangedHandler in interface HasItemChangedHandlers
Parameters:
handler - the itemChanged handler
Returns:
HandlerRegistration used to remove this handler

addItemChangeHandler

public HandlerRegistration addItemChangeHandler(ItemChangeHandler handler)
Add a itemChange handler.

Handler fired when there is a change() event fired on a FormItem within this form.

Fires after the change() handler on the FormItem itself, and only if the item did not cancel the change event and chooses to allow it to propagate to the form as a whole.

Specified by:
addItemChangeHandler in interface HasItemChangeHandlers
Parameters:
handler - the itemChange handler
Returns:
HandlerRegistration used to remove this handler

addItemKeyPressHandler

public HandlerRegistration addItemKeyPressHandler(ItemKeyPressHandler handler)
Add a itemKeyPress handler.

Handler fired when a FormItem within this form receives a keypress event.

Fires after the keyPress handler on the FormItem itself, and only if the item did not cancel the event and chooses to allow it to propagate to the form as a whole.

Specified by:
addItemKeyPressHandler in interface HasItemKeyPressHandlers
Parameters:
handler - the itemKeyPress handler
Returns:
HandlerRegistration used to remove this handler

addSubmitValuesHandler

public HandlerRegistration addSubmitValuesHandler(SubmitValuesHandler handler)
Add a submitValues handler.

Triggered when a SubmitItem is included in the form is submitted and gets pressed.

Specified by:
addSubmitValuesHandler in interface HasSubmitValuesHandlers
Parameters:
handler - the submitValues handler
Returns:
HandlerRegistration used to remove this handler

onInit

protected void onInit()
Overrides:
onInit in class BaseWidget

showErrors

public void showErrors()
If this form has any outstanding validation errors, show them now.
This method is called when the set of errors are changed by setErrors(java.util.Map, boolean) or validate(boolean).
Default implementation will redraw the form to display error messages and call com.smartgwt.client.widgets.form.DynamicForm#handleHiddenValidationErrors to display errors with no visible field.


Note: This is an override point. This method may be overridden to perform custom display of validation errors.


setValuesManager

public void setValuesManager(ValuesManager valuesManager)
                      throws java.lang.IllegalStateException
If set at init time, this dynamicForm will be created as a member form for the specified valuesManager. To update the valuesManager to which a form belongs after init use valuesManager.addMember(form) and valuesManager.removeMember(form)

Note : This is an advanced setting

Parameters:
valuesManager - valuesManager Default value is null
Throws:
java.lang.IllegalStateException - this property cannot be changed after the component has been created

getValuesManager

public ValuesManager getValuesManager()
Return the ValuesManager for this form.

Returns:
the ValuesManager

setCellSpacing

public void setCellSpacing(int cellSpacing)
                    throws java.lang.IllegalStateException
Set the cellSpacing.

Parameters:
cellSpacing - the cellSpacing
Throws:
java.lang.IllegalStateException - this property cannot be changed after the component has been created

getCellSpacing

public int getCellSpacing()
Return the cellSpacing.

Returns:
the cellSpacing

setUseAllDataSourceFields

public void setUseAllDataSourceFields(boolean useAllDataSourceFields)
If true, the set of fields given by the "default binding" (see DataBoundComponent.fields) is used, with any fields specified in component.fields acting as overrides that can suppress or modify the display of individual fields, without having to list the entire set of fields that should be shown.

If component.fields contains fields that are not found in the DataSource, they will be shown after the most recently referred to DataSource field. If the new fields appear first, they will be shown first.

Parameters:
useAllDataSourceFields - useAllDataSourceFields

setValues

public void setValues(java.util.Map values)
et the values for this DynamicForm. Member forms will be updated as required by this change. Note that pre-existant values in other fields are cleared out by this. .

Parameters:
values - the values

getValues

public java.util.Map getValues()
Returns the current set of values where each propertyName is the name of a form item in the form, and each property value is the value held by that form item.

Returns:
the values

setValue

public void setValue(java.lang.String fieldName,
                     double value)
Set the value for some field.

Parameters:
fieldName - Name of the field being updated
value - New value.

setValue

public void setValue(java.lang.String fieldName,
                     boolean value)
Set the value for some field.

Parameters:
fieldName - Name of the field being updated
value - New value.

setValue

public void setValue(java.lang.String fieldName,
                     java.util.Map value)
Set the value for some field.

Parameters:
fieldName - Name of the field being updated
value - New value.

setValue

public void setValue(java.lang.String fieldName,
                     com.google.gwt.core.client.JavaScriptObject value)
Set the value for some field.

Parameters:
fieldName - Name of the field being updated
value - New value.

setValue

public void setValue(java.lang.String fieldName,
                     Record value)
Set the value for some field.

Parameters:
fieldName - Name of the field being updated
value - New value.

setValue

public void setValue(java.lang.String fieldName,
                     DataClass value)
Set the value for some field.

Parameters:
fieldName - Name of the field being updated
value - New value.

setValue

public void setValue(java.lang.String fieldName,
                     Record[] value)
Set the value for some field.

Parameters:
fieldName - Name of the field being updated
value - New value.

setValue

public void setValue(java.lang.String fieldName,
                     DataClass[] value)
Set the value for some field.

Parameters:
fieldName - Name of the field being updated
value - New value.

setItems

public void setItems(FormItem... items)
Synonym for setFields(com.smartgwt.client.widgets.form.fields.FormItem[]).

Parameters:
items - the items

setOperator

public void setOperator(OperatorId operator)
                 throws java.lang.IllegalStateException
When operator has been set for any FormItem in this form, what logical operator should be applied across the ${isc.DocUtils.linkForRef('object:Criterion','criteria')} produced by the form items? Only applicable to forms that have a dataSource.

Parameters:
operator - operator Default value is "and"
Throws:
java.lang.IllegalStateException - this property cannot be changed after the component has been created

getOperator

public OperatorId getOperator()
When operator has been set for any FormItem in this form, what logical operator should be applied across the ${isc.DocUtils.linkForRef('object:Criterion','criteria')} produced by the form items? Only applicable to forms that have a dataSource.

Returns:
OperationId

setFields

public void setFields(FormItem... fields)
An array of field objects, specifying the order, layout, and types of each field in the DynamicForm. When both fields and dataSource are set, fields acts as a set of overrides as explained in DataBoundComponent fields.

See Form Layout for information about how flags specified on the FormItems control how the form is laid out.

Parameters:
fields - form item fields

getFields

public FormItem[] getFields()
Return thhe form fields

Returns:
the form fields

getItem

public FormItem getItem(java.lang.String name)

getField

public FormItem getField(java.lang.String name)

getValueAsString

public java.lang.String getValueAsString(java.lang.String fieldName)

getValue

public java.lang.Object getValue(java.lang.String fieldName)

validate

public boolean validate()
Validates the form without submitting it, and redraws the form to display error messages if there are any validation errors. Returns true if validation succeeds, or false if validation fails.
For databound forms, any Datasource field validators will be run even if there is no associated item in the form.
Validators will also be run on hidden form items
In both these cases, validation failure can be handled via com.smartgwt.client.widgets.form.DynamicForm#handleHiddenValidationErrors

Returns:
true if validation succeeds, or false if validation fails.

editNewRecord

public void editNewRecord()
Prepare to edit a new record by clearing the current set of values (or replacing them with initialValues if specified). Subsequent calls to saveData() will use an add rather than an update operation.


editNewRecord

public void editNewRecord(java.util.Map initialValues)
Prepare to edit a new record by clearing the current set of values (or replacing them with initialValues if specified). Subsequent calls to saveData() will use an add rather than an update operation.

Parameters:
initialValues - initial set of values for the editor as a map of field names to their corresponding values

editSelectedData

public void editSelectedData(ListGrid selectionComponent)

editSelectedData

public void editSelectedData(java.lang.String listGridID)

getValuesAsCriteria

public Criteria getValuesAsCriteria()

setColWidths

public void setColWidths(java.lang.Object... colWidths)

setResizeFrom

public void setResizeFrom(java.lang.String... resizeFrom)
Overrides:
setResizeFrom in class Canvas

setTitleWidth

public void setTitleWidth(int titleWidth)

setTitleWidth

public void setTitleWidth(java.lang.String titleWidth)

setErrorOrientation

public void setErrorOrientation(FormErrorOrientation errorOrientation)

saveData

public void saveData()

saveData

public void saveData(DSCallback callback)

saveData

public void saveData(DSCallback callback,
                     DSRequest requestProperties)

submit

public void submit()
submit() is automatically called when a SubmitItem included in the form is clicked, or, if saveOnEnter is set, when the "Enter" key is pressed in a text input. Submit can also be manually called.

If com.smartgwt.client.widgets.form.DynamicForm#submitValues exists, it will be called, then immediately return.

Otherwise, default behavior varies based on canSubmit: if canSubmit is false, saveData() will be called to handle saving via SmartGWT databinding.

If canSubmit is true, the form will be submitted like an ordinary HTML form via submitForm().

The parameters to submit() apply only if submit() will be calling ValuesManager.saveData(). If you override submit(), you can safely ignore the parameters as SmartGWT framework code does not pass them.


submit

public void submit(DSCallback callback)
submit() is automatically called when a SubmitItem included in the form is clicked, or, if saveOnEnter is set, when the "Enter" key is pressed in a text input. Submit can also be manually called.

If com.smartgwt.client.widgets.form.DynamicForm#submitValues exists, it will be called, then immediately return.

Otherwise, default behavior varies based on canSubmit: if canSubmit is false, saveData() will be called to handle saving via SmartGWT databinding.

If canSubmit is true, the form will be submitted like an ordinary HTML form via submitForm().

The parameters to submit() apply only if submit() will be calling ValuesManager.saveData(). If you override submit(), you can safely ignore the parameters as SmartGWT framework code does not pass them.

Parameters:
callback - callback to invoke on completion. [Ignored if this.canSubmit is true]

submit

public void submit(DSCallback callback,
                   DSRequest requestProperties)
submit() is automatically called when a SubmitItem included in the form is clicked, or, if saveOnEnter is set, when the "Enter" key is pressed in a text input. Submit can also be manually called.

If com.smartgwt.client.widgets.form.DynamicForm#submitValues exists, it will be called, then immediately return.

Otherwise, default behavior varies based on canSubmit: if canSubmit is false, saveData() will be called to handle saving via SmartGWT databinding.

If canSubmit is true, the form will be submitted like an ordinary HTML form via submitForm().

The parameters to submit() apply only if submit() will be calling ValuesManager.saveData(). If you override submit(), you can safely ignore the parameters as SmartGWT framework code does not pass them.

Parameters:
callback - callback to invoke on completion. [Ignored if this.canSubmit is true]
requestProperties - additional properties to set on the DSRequest that will be issued [Ignored if this.canSubmit is true]

editRecord

public void editRecord(Record record)
Edit an existing record. Updates this editors values to match the values of the record passed in.

Subsequent calls to saveData() will use an update rather than an add operation.

Parameters:
record - the record to be edited as a map of field names to their corresponding values

focusInItem

public void focusInItem(int itemNumber)
Move the keyboard focus into a particular item.

Parameters:
itemNumber - the item number

focusInItem

public void focusInItem(java.lang.String itemName)
Move the keyboard focus into a particular item.

Parameters:
itemName - the item name

focusInItem

public void focusInItem(FormItem formItem)
Move the keyboard focus into a particular item.

Parameters:
formItem - the form item

setErrors

public void setErrors(java.util.Map errors,
                      boolean showErrors)
Setter for validation errors on this form. Errors passed in should be a Map in the format {fieldName1:errors, fieldName2:errors} Where the errors value may be either a string (single error message) or an array of strings (if multiple errors should be applied to the field in question).

Parameters:
errors - list of errors as a map with the field names as keys
showErrors - If true redraw form to display errors now. Otherwise errors can be displayed by calling showErrors() Note: When the errors are shown, handleHiddenValidationErrors() will be fired for errors on hidden fields, or with no associated formItem.

getErrors

public java.util.Map getErrors()
Returns the set of errors.

Returns:
errors. key is field name, value is error. Returns null if no errors are present

setFieldErrors

public void setFieldErrors(java.lang.String fieldName,
                           java.lang.String error,
                           boolean showErrors)
Set field validation error for some field. The showErrors parameter allows the errors to be displayed immediately. Alternatively, an explicit call to showFieldErrors(java.lang.String) will display the errors for this field.

Parameters:
fieldName - field to apply the new errors to
error - error to apply to the field in question
showErrors - If true this method will fall through to DynamicForm.showFieldErrors() to update the display

setFieldErrors

public void setFieldErrors(java.lang.String fieldName,
                           java.lang.String[] errors,
                           boolean showErrors)
Set field validation errors for some field. The showErrors parameter allows the errors to be displayed immediately. Alternatively, an explicit call to showFieldErrors(java.lang.String) will display the errors for this field.

Parameters:
fieldName - field to apply the new errors to
errors - errors to apply to the field in question
showErrors - If true this method will fall through to DynamicForm.showFieldErrors() to update the display

getFieldErrors

public java.lang.String[] getFieldErrors(java.lang.String fieldName)
Returns any validation errors for some field in this valuesManager. If no errors are present, will return null.

Parameters:
fieldName - the field name
Returns:
error messages for the field.

rememberValues

public com.google.gwt.core.client.JavaScriptObject rememberValues()
Make a snapshot of the current set of values, so we can reset to them later. Creates a new object, then adds all non-method properties of values to the new object. Use resetValues() to revert to these values. Note that this method is automatically called when the values for this form are set programmatically via a call to DynamicForm.setValues().

Returns:
copy of current form values

setItemHoverFormatter

public void setItemHoverFormatter(FormItemHoverFormatter hoverFormatter)
The FormItemHoverFormatter should return the HTML to display in a hover canvas when the user holds the mousepointer over this item. Return null to suppress the hover canvas altogether.

Parameters:
hoverFormatter - the hover formatter

setItemTitleHoverFormatter

public void setItemTitleHoverFormatter(FormItemHoverFormatter hoverFormatter)
The FormItemHoverFormatter should return the HTML to display in a hover canvas when the user holds the mousepointer over the item's title. Return null to suppress the hover canvas altogether.

Parameters:
hoverFormatter - the hover formatter

setDataPageSize

public void setDataPageSize(int dataPageSize)
Description copied from interface: DataBoundComponent
When using data paging, how many records to fetch at a time. The value of this attribute is passed on to the auto-constructed com.smartgwt.client.data.ResultSet object for this component. In effect, this gives you control over the resultSize attribute for this component.

Note that regardless of the dataPageSize setting, a component will always fetch all of data that it needs to draw. Settings such as showAllRecords, drawAllMaxCells and drawAheadRatio can cause more rows than the configured dataPageSize to be fetched.

Specified by:
setDataPageSize in interface DataBoundComponent
Parameters:
dataPageSize - dataPageSize Default value is 75

getDataPageSize

public int getDataPageSize()
Description copied from interface: DataBoundComponent
When using data paging, how many records to fetch at a time. The value of this attribute is passed on to the auto-constructed com.smartgwt.client.data.ResultSet object for this component. In effect, this gives you control over the resultSize attribute for this component.

Note that regardless of the dataPageSize setting, a component will always fetch all of data that it needs to draw. Settings such as showAllRecords, drawAllMaxCells and drawAheadRatio can cause more rows than the configured dataPageSize to be fetched.

Specified by:
getDataPageSize in interface DataBoundComponent
Returns:
int

setUseAllDataSourceFields

public void setUseAllDataSourceFields(java.lang.Boolean useAllDataSourceFields)
Description copied from interface: DataBoundComponent
If true, the set of fields given by the "default binding" (see fields) is used, with any fields specified in component.fields acting as overrides that can suppress or modify the display of individual fields, without having to list the entire set of fields that should be shown.

If component.fields contains fields that are not found in the DataSource, they will be shown after the most recently referred to DataSource field. If the new fields appear first, they will be shown first.

${isc.DocUtils.linkForExampleId('validationFieldBinding', 'This example')} shows a mixture of component fields and DataSource fields, and how they interact for validation.

Specified by:
setUseAllDataSourceFields in interface DataBoundComponent
Parameters:
useAllDataSourceFields - useAllDataSourceFields Default value is false

getUseAllDataSourceFields

public java.lang.Boolean getUseAllDataSourceFields()
Description copied from interface: DataBoundComponent
If true, the set of fields given by the "default binding" (see fields) is used, with any fields specified in component.fields acting as overrides that can suppress or modify the display of individual fields, without having to list the entire set of fields that should be shown.

If component.fields contains fields that are not found in the DataSource, they will be shown after the most recently referred to DataSource field. If the new fields appear first, they will be shown first.

${isc.DocUtils.linkForExampleId('validationFieldBinding', 'This example')} shows a mixture of component fields and DataSource fields, and how they interact for validation.

Specified by:
getUseAllDataSourceFields in interface DataBoundComponent
Returns:
Boolean

setShowHiddenFields

public void setShowHiddenFields(java.lang.Boolean showHiddenFields)
Description copied from interface: DataBoundComponent
Whether to show fields marked hidden:true when a DataBoundComponent is given a DataSource but no component.fields.

The hidden property is used on DataSource fields to mark fields that are never of meaning to an end user.

Specified by:
setShowHiddenFields in interface DataBoundComponent
Parameters:
showHiddenFields - showHiddenFields Default value is false

getShowHiddenFields

public java.lang.Boolean getShowHiddenFields()
Description copied from interface: DataBoundComponent
Whether to show fields marked hidden:true when a DataBoundComponent is given a DataSource but no component.fields.

The hidden property is used on DataSource fields to mark fields that are never of meaning to an end user.

Specified by:
getShowHiddenFields in interface DataBoundComponent
Returns:
Boolean

setShowDetailFields

public void setShowDetailFields(java.lang.Boolean showDetailFields)
Description copied from interface: DataBoundComponent
Whether to show fields marked detail:true when a DataBoundComponent is given a DataSource but no component.fields.

The detail property is used on DataSource fields to mark fields that shouldn't appear by default in a view that tries to show many records in a small space.

Specified by:
setShowDetailFields in interface DataBoundComponent
Parameters:
showDetailFields - showDetailFields Default value is false

getShowDetailFields

public java.lang.Boolean getShowDetailFields()
Description copied from interface: DataBoundComponent
Whether to show fields marked detail:true when a DataBoundComponent is given a DataSource but no component.fields.

The detail property is used on DataSource fields to mark fields that shouldn't appear by default in a view that tries to show many records in a small space.

Specified by:
getShowDetailFields in interface DataBoundComponent
Returns:
Boolean

setShowComplexFields

public void setShowComplexFields(java.lang.Boolean showComplexFields)
Description copied from interface: DataBoundComponent
Whether to show fields of non-atomic types when a DataBoundComponent is given a DataSource but no component.fields.

If true, the component will show fields that declare a complex type, for example, a field 'shippingAddress' that declares type 'Address', where 'Address' is the ID of a DataSource that declares the fields of a shipping address (city, street name, etc).

Such fields may need custom formatters or editors in order to create a usable interface, for example, an Address field in a ListGrid might use a custom formatter to combine the relevant fields of an address into one column, and might use a pop-up dialog for editing.

Note : This is an advanced setting

Specified by:
setShowComplexFields in interface DataBoundComponent
Parameters:
showComplexFields - showComplexFields Default value is true

getShowComplexFields

public java.lang.Boolean getShowComplexFields()
Description copied from interface: DataBoundComponent
Whether to show fields of non-atomic types when a DataBoundComponent is given a DataSource but no component.fields.

If true, the component will show fields that declare a complex type, for example, a field 'shippingAddress' that declares type 'Address', where 'Address' is the ID of a DataSource that declares the fields of a shipping address (city, street name, etc).

Such fields may need custom formatters or editors in order to create a usable interface, for example, an Address field in a ListGrid might use a custom formatter to combine the relevant fields of an address into one column, and might use a pop-up dialog for editing.

Specified by:
getShowComplexFields in interface DataBoundComponent
Returns:
Boolean

setFetchOperation

public void setFetchOperation(java.lang.String fetchOperation)
Description copied from interface: DataBoundComponent
Operation ID this component should use when performing fetch operations.

Specified by:
setFetchOperation in interface DataBoundComponent
Parameters:
fetchOperation - fetchOperation Default value is null

getFetchOperation

public java.lang.String getFetchOperation()
Description copied from interface: DataBoundComponent
Operation ID this component should use when performing fetch operations.

Specified by:
getFetchOperation in interface DataBoundComponent
Returns:
String

setUpdateOperation

public void setUpdateOperation(java.lang.String updateOperation)
Description copied from interface: DataBoundComponent
Operation ID this component should use when performing update operations.

Specified by:
setUpdateOperation in interface DataBoundComponent
Parameters:
updateOperation - updateOperation Default value is null

getUpdateOperation

public java.lang.String getUpdateOperation()
Description copied from interface: DataBoundComponent
Operation ID this component should use when performing update operations.

Specified by:
getUpdateOperation in interface DataBoundComponent
Returns:
String

setAddOperation

public void setAddOperation(java.lang.String addOperation)
Description copied from interface: DataBoundComponent
Operation ID this component should use when performing add operations.

Specified by:
setAddOperation in interface DataBoundComponent
Parameters:
addOperation - addOperation Default value is null

getAddOperation

public java.lang.String getAddOperation()
Description copied from interface: DataBoundComponent
Operation ID this component should use when performing add operations.

Specified by:
getAddOperation in interface DataBoundComponent
Returns:
String

setRemoveOperation

public void setRemoveOperation(java.lang.String removeOperation)
Description copied from interface: DataBoundComponent
Operation ID this component should use when performing remove operations.

Specified by:
setRemoveOperation in interface DataBoundComponent
Parameters:
removeOperation - removeOperation Default value is null

getRemoveOperation

public java.lang.String getRemoveOperation()
Description copied from interface: DataBoundComponent
Operation ID this component should use when performing remove operations.

Specified by:
getRemoveOperation in interface DataBoundComponent
Returns:
String

setExportFields

public void setExportFields(java.lang.String[] exportFields)
Description copied from interface: DataBoundComponent
The list of field-names to export. If provided, the field-list in the exported output is limited and sorted as per the list.

If exportFields is not provided, the exported output includes all visible fields from this component, sorted as they appear.

Specified by:
setExportFields in interface DataBoundComponent
Parameters:
exportFields - exportFields Default value is null

getExportFields

public java.lang.String[] getExportFields()
Description copied from interface: DataBoundComponent
The list of field-names to export. If provided, the field-list in the exported output is limited and sorted as per the list.

If exportFields is not provided, the exported output includes all visible fields from this component, sorted as they appear.

Specified by:
getExportFields in interface DataBoundComponent
Returns:
the list of field-names to export.

setExportAll

public void setExportAll(java.lang.Boolean exportAll)
Description copied from interface: DataBoundComponent
Setting exportAll to true prevents the component from passing it's list of fields to the export call. The result is the export of all visible fields from fields.

If exportAll is false, an export operation will first consider exportFields, if it's set, and fall back on all visible fields from fields otherwise.

Specified by:
setExportAll in interface DataBoundComponent
Parameters:
exportAll - exportAll Default value is false

getExportAll

public java.lang.Boolean getExportAll()
Description copied from interface: DataBoundComponent
Setting exportAll to true prevents the component from passing it's list of fields to the export call. The result is the export of all visible fields from fields.

If exportAll is false, an export operation will first consider exportFields, if it's set, and fall back on all visible fields from fields otherwise.

Specified by:
getExportAll in interface DataBoundComponent
Returns:
Boolean

setPreventDuplicates

public void setPreventDuplicates(java.lang.Boolean preventDuplicates)
                          throws java.lang.IllegalStateException
Description copied from interface: DataBoundComponent
If set, detect and prevent duplicate records from being transferred to this component, either via drag and drop or via DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent). When a duplicate transfer is detected, a dialog will appear showing the duplicateDragMessage.

If the component either does not have a DataSource or has a DataSource with no primaryKey declared, duplicate checking is off by default. If duplicate checking is enabled, it looks for an existing record in the dataset that has all of the properties of the dragged record, and considers that a duplicate.

For DragDataAction:"copy" where the target DataSource is related to the source DataSource by foreignKey, a duplicate means that the target list, as filtered by the current criteria, already has a record whose value for the foreignKey field matches the primaryKey of the record being transferred.

For example, consider dragging "employees" to "teams", where "teams" has a field "teams.employeeId" which is a foreignKey pointing to "employees.id", and the target grid has search criteria causing it to show all the members of one team. A duplicate - adding an employee to the same team twice - is when the target grid's dataset contains an record with "employeeId" matching the "id" field of the dropped employee.

Specified by:
setPreventDuplicates in interface DataBoundComponent
Parameters:
preventDuplicates - preventDuplicates Default value is null
Throws:
java.lang.IllegalStateException - this property cannot be changed after the component has been created

getPreventDuplicates

public java.lang.Boolean getPreventDuplicates()
Description copied from interface: DataBoundComponent
If set, detect and prevent duplicate records from being transferred to this component, either via drag and drop or via DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent). When a duplicate transfer is detected, a dialog will appear showing the duplicateDragMessage.

If the component either does not have a DataSource or has a DataSource with no primaryKey declared, duplicate checking is off by default. If duplicate checking is enabled, it looks for an existing record in the dataset that has all of the properties of the dragged record, and considers that a duplicate.

For DragDataAction:"copy" where the target DataSource is related to the source DataSource by foreignKey, a duplicate means that the target list, as filtered by the current criteria, already has a record whose value for the foreignKey field matches the primaryKey of the record being transferred.

For example, consider dragging "employees" to "teams", where "teams" has a field "teams.employeeId" which is a foreignKey pointing to "employees.id", and the target grid has search criteria causing it to show all the members of one team. A duplicate - adding an employee to the same team twice - is when the target grid's dataset contains an record with "employeeId" matching the "id" field of the dropped employee.

Specified by:
getPreventDuplicates in interface DataBoundComponent
Returns:
Boolean

setDuplicateDragMessage

public void setDuplicateDragMessage(java.lang.String duplicateDragMessage)
                             throws java.lang.IllegalStateException
Description copied from interface: DataBoundComponent
Message to show when a user attempts to transfer duplicate records into this component, and preventDuplicates is enabled.

Specified by:
setDuplicateDragMessage in interface DataBoundComponent
Parameters:
duplicateDragMessage - duplicateDragMessage Default value is "Duplicates not allowed"
Throws:
java.lang.IllegalStateException - this property cannot be changed after the component has been created

getDuplicateDragMessage

public java.lang.String getDuplicateDragMessage()
Description copied from interface: DataBoundComponent
Message to show when a user attempts to transfer duplicate records into this component, and preventDuplicates is enabled.

Specified by:
getDuplicateDragMessage in interface DataBoundComponent
Returns:
String

setAddDropValues

public void setAddDropValues(java.lang.Boolean addDropValues)
Description copied from interface: DataBoundComponent
Indicates whether to add "drop values" to items dropped on this component, if both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key. "Drop values" are properties of the dropped item that you wish to change (and persist) as a result of the item being dropped on this grid.

If this value is true and this component is databound, DataBoundComponent.getDropValues() will be called for every databound item dropped on this grid, and an update performed on the item

Specified by:
setAddDropValues in interface DataBoundComponent
Parameters:
addDropValues - addDropValues Default value is true

getAddDropValues

public java.lang.Boolean getAddDropValues()
Description copied from interface: DataBoundComponent
Indicates whether to add "drop values" to items dropped on this component, if both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key. "Drop values" are properties of the dropped item that you wish to change (and persist) as a result of the item being dropped on this grid.

If this value is true and this component is databound, DataBoundComponent.getDropValues() will be called for every databound item dropped on this grid, and an update performed on the item

Specified by:
getAddDropValues in interface DataBoundComponent
Returns:
Boolean

setDropValues

public void setDropValues(java.util.Map dropValues)
Description copied from interface: DataBoundComponent
When an item is dropped on this component, and addDropValues is true and both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key, this object provides the "drop values" that SmartGWT will apply to the dropped object before updating it.

If this property is not defined, SmartGWT defaults to returning the selection criteria currently in place for this component. Thus, any databound items (for example, rows from other grids bound to the same DataSource) dropped on the grid will, by default, be subjected to an update that makes them conform to the grid's current filter criteria.

Note : This is an advanced setting

Specified by:
setDropValues in interface DataBoundComponent
Parameters:
dropValues - dropValues Default value is null

getDropValues

public java.util.Map getDropValues()
Description copied from interface: DataBoundComponent
When an item is dropped on this component, and addDropValues is true and both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key, this object provides the "drop values" that SmartGWT will apply to the dropped object before updating it.

If this property is not defined, SmartGWT defaults to returning the selection criteria currently in place for this component. Thus, any databound items (for example, rows from other grids bound to the same DataSource) dropped on the grid will, by default, be subjected to an update that makes them conform to the grid's current filter criteria.

Specified by:
getDropValues in interface DataBoundComponent
Returns:
Returns the "drop values" to apply to a record dropped on this component prior to update. Only applicable to databound components - see dropValues for more details. If multiple records are being dropped, this method is called for each of them in turn.

This method returns the following:

  • Nothing, if addDropValues is false
  • dropValues, if that property is set. If the component's criteria object is applicable (as explained in the next item), it is merged into dropValues, with properties in dropValues taking precedence.
  • The component's criteria object, if the most recent textMatchStyle for the component was "exact" and it is simple criteria (ie, not an AdvancedCriteria object)
  • Otherwise nothing

You can override this method if you need more complex setting of drop values than can be provided by simply supplying a dropValues object.


setUseFlatFields

public void setUseFlatFields(java.lang.Boolean useFlatFields)
                      throws java.lang.IllegalStateException
Description copied from interface: DataBoundComponent
The useFlatFields flag causes all simple type fields anywhere in a nested set of DataSources to be exposed as a flat list for form binding.

useFlatFields is typically used with imported metadata, such as XMLTools.loadXMLSchema(java.lang.String, com.smartgwt.client.data.XSDLoadCallback) from a XMLTools.loadWSDL(java.lang.String, com.smartgwt.client.data.WSDLLoadCallback), as a means of eliminating levels of XML nesting that aren't meaningful in a user interface, without the cumbersome and fragile process of mapping form fields to XML structures.

For example, having called WebService.getInputDS(java.lang.String) to retrieve the input message schema for a web service operation whose input message looks like this:

 <FindServices>
     <searchFor>search text</searchFor>
     <Options>
         <caseSensitive>false</caseSensitive>
     </Options>
     <IncludeInSearch>
         <serviceName>true</serviceName>
         <documentation>true</documentation>
         <keywords>true</keywords>
     </IncludeInSearch>
 </FindServices>
 
Setting useFlatFields on a DynamicForm that is bound to this input message schema would result in 5 FormItem reflecting the 5 simple type fields in the message.

For this form, the result of getValues() might look like:

{
    searchFor: "search text",
    caseSensitive: false,
    serviceName: true,
    documentation : true,
    keywords : true
 }
When contacting a WebService, these values can be automatically mapped to the structure of the input message for a web service operation by setting useFlatFields (for use with WebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)) or by setting useFlatFields (for use with a DataSource that is 'bound to a WSDL web service' via wsOperation).

Using these two facilities in conjunction (component.useFlatFields and request.useFlatFields) allows gratuitous nesting to be consistently bypassed in both the user presentation and when providing the data for XML messages.

You can also set useFlatFields to automatically enable "flattened" XML serialization (request.useFlatFields) for all DataSource requests of a particular operationType.

Note that useFlatFields is not generally recommended for use with structures where multiple simple type fields exist with the same name, however if used with such a structure, the first field to use a given name wins. "first" means the first field encountered in a depth first search. "wins" means only the first field will be present as a field when data binding.

Specified by:
setUseFlatFields in interface DataBoundComponent
Parameters:
useFlatFields - useFlatFields Default value is null
Throws:
java.lang.IllegalStateException - this property cannot be changed after the component has been created

getUseFlatFields

public java.lang.Boolean getUseFlatFields()
Description copied from interface: DataBoundComponent
The useFlatFields flag causes all simple type fields anywhere in a nested set of DataSources to be exposed as a flat list for form binding.

useFlatFields is typically used with imported metadata, such as XMLTools.loadXMLSchema(java.lang.String, com.smartgwt.client.data.XSDLoadCallback) from a XMLTools.loadWSDL(java.lang.String, com.smartgwt.client.data.WSDLLoadCallback), as a means of eliminating levels of XML nesting that aren't meaningful in a user interface, without the cumbersome and fragile process of mapping form fields to XML structures.

For example, having called WebService.getInputDS(java.lang.String) to retrieve the input message schema for a web service operation whose input message looks like this:

 <FindServices>
     <searchFor>search text</searchFor>
     <Options>
         <caseSensitive>false</caseSensitive>
     </Options>
     <IncludeInSearch>
         <serviceName>true</serviceName>
         <documentation>true</documentation>
         <keywords>true</keywords>
     </IncludeInSearch>
 </FindServices>
 
Setting useFlatFields on a DynamicForm that is bound to this input message schema would result in 5 FormItem reflecting the 5 simple type fields in the message.

For this form, the result of getValues() might look like:

{
    searchFor: "search text",
    caseSensitive: false,
    serviceName: true,
    documentation : true,
    keywords : true
 }
When contacting a WebService, these values can be automatically mapped to the structure of the input message for a web service operation by setting useFlatFields (for use with WebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)) or by setting useFlatFields (for use with a DataSource that is 'bound to a WSDL web service' via wsOperation).

Using these two facilities in conjunction (component.useFlatFields and request.useFlatFields) allows gratuitous nesting to be consistently bypassed in both the user presentation and when providing the data for XML messages.

You can also set useFlatFields to automatically enable "flattened" XML serialization (request.useFlatFields) for all DataSource requests of a particular operationType.

Note that useFlatFields is not generally recommended for use with structures where multiple simple type fields exist with the same name, however if used with such a structure, the first field to use a given name wins. "first" means the first field encountered in a depth first search. "wins" means only the first field will be present as a field when data binding.

Specified by:
getUseFlatFields in interface DataBoundComponent
Returns:
Boolean

setHiliteProperty

public void setHiliteProperty(java.lang.String hiliteProperty)
Description copied from interface: DataBoundComponent
Marker that can be set on a record to flag that record as hilited. Should be set to a value that matches id for a hilite defined on this component.

Specified by:
setHiliteProperty in interface DataBoundComponent
Parameters:
hiliteProperty - hiliteProperty Default value is "_hilite"

getHiliteProperty

public java.lang.String getHiliteProperty()
Description copied from interface: DataBoundComponent
Marker that can be set on a record to flag that record as hilited. Should be set to a value that matches id for a hilite defined on this component.

Specified by:
getHiliteProperty in interface DataBoundComponent
Returns:
String

setDragDataAction

public void setDragDataAction(DragDataAction dragDataAction)
Description copied from interface: DataBoundComponent
Indicates what to do with data dragged into another DataBoundComponent. See DragDataAction type for details.

Specified by:
setDragDataAction in interface DataBoundComponent
Parameters:
dragDataAction - dragDataAction Default value is Canvas.MOVE

getDragDataAction

public DragDataAction getDragDataAction()
Description copied from interface: DataBoundComponent
Indicates what to do with data dragged into another DataBoundComponent. See DragDataAction type for details.

Specified by:
getDragDataAction in interface DataBoundComponent
Returns:
DragDataAction

setDragTrackerStyle

public void setDragTrackerStyle(java.lang.String dragTrackerStyle)
Description copied from interface: DataBoundComponent
CSS Style to apply to the drag tracker when dragging occurs on this component.

Specified by:
setDragTrackerStyle in interface DataBoundComponent
Parameters:
dragTrackerStyle - dragTrackerStyle Default value is "gridDragTracker"

getDragTrackerStyle

public java.lang.String getDragTrackerStyle()
Description copied from interface: DataBoundComponent
CSS Style to apply to the drag tracker when dragging occurs on this component.

Specified by:
getDragTrackerStyle in interface DataBoundComponent
Returns:
String

setCanAddFormulaFields

public void setCanAddFormulaFields(java.lang.Boolean canAddFormulaFields)
Description copied from interface: DataBoundComponent
Adds an item to the header context menu allowing users to launch a dialog to define a new field based on values present in other fields, using the com.smartgwt.client..FormulaBuilder.

User-added formula fields can be persisted via ListGrid.getFieldState() and ListGrid.setFieldState(java.lang.String).

Specified by:
setCanAddFormulaFields in interface DataBoundComponent
Parameters:
canAddFormulaFields - canAddFormulaFields Default value is false

addSummaryField

public void addSummaryField()
Description copied from interface: DataBoundComponent
Convenience method to display a com.smartgwt.client..SummaryBuilder to create a new Summary Field. This is equivalent to calling DataBoundComponentGen#editSummaryField with no paramater.

Specified by:
addSummaryField in interface DataBoundComponent

addFormulaField

public void addFormulaField()
Description copied from interface: DataBoundComponent
Convenience method to display a com.smartgwt.client..FormulaBuilder to create a new Formula Field. This is equivalent to calling DataBoundComponentGen#editFormulaField with no paramater.

Specified by:
addFormulaField in interface DataBoundComponent

getCanAddFormulaFields

public java.lang.Boolean getCanAddFormulaFields()
Description copied from interface: DataBoundComponent
Adds an item to the header context menu allowing users to launch a dialog to define a new field based on values present in other fields, using the com.smartgwt.client..FormulaBuilder.

User-added formula fields can be persisted via ListGrid.getFieldState() and ListGrid.setFieldState(java.lang.String).

Specified by:
getCanAddFormulaFields in interface DataBoundComponent
Returns:
Boolean

setAddFormulaFieldText

public void setAddFormulaFieldText(java.lang.String addFormulaFieldText)
Description copied from interface: DataBoundComponent
Text for a menu item allowing users to add a formula field

Specified by:
setAddFormulaFieldText in interface DataBoundComponent
Parameters:
addFormulaFieldText - addFormulaFieldText Default value is "Add formula column..."

getAddFormulaFieldText

public java.lang.String getAddFormulaFieldText()
Description copied from interface: DataBoundComponent
Text for a menu item allowing users to add a formula field

Specified by:
getAddFormulaFieldText in interface DataBoundComponent
Returns:
String

setEditFormulaFieldText

public void setEditFormulaFieldText(java.lang.String editFormulaFieldText)
Description copied from interface: DataBoundComponent
Text for a menu item allowing users to edit a formula field

Specified by:
setEditFormulaFieldText in interface DataBoundComponent
Parameters:
editFormulaFieldText - editFormulaFieldText Default value is "Edit formula..."

getEditFormulaFieldText

public java.lang.String getEditFormulaFieldText()
Description copied from interface: DataBoundComponent
Text for a menu item allowing users to edit a formula field

Specified by:
getEditFormulaFieldText in interface DataBoundComponent
Returns:
String

setCanAddSummaryFields

public void setCanAddSummaryFields(java.lang.Boolean canAddSummaryFields)
Description copied from interface: DataBoundComponent
Adds an item to the header context menu allowing users to launch a dialog to define a new text field that can contain both user-defined text and the formatted values present in other fields, using the com.smartgwt.client..SummaryBuilder.

User-added summary fields can be persisted via ListGrid.getFieldState() and ListGrid.setFieldState(java.lang.String).

Specified by:
setCanAddSummaryFields in interface DataBoundComponent
Parameters:
canAddSummaryFields - canAddSummaryFields Default value is false

getCanAddSummaryFields

public java.lang.Boolean getCanAddSummaryFields()
Description copied from interface: DataBoundComponent
Adds an item to the header context menu allowing users to launch a dialog to define a new text field that can contain both user-defined text and the formatted values present in other fields, using the com.smartgwt.client..SummaryBuilder.

User-added summary fields can be persisted via ListGrid.getFieldState() and ListGrid.setFieldState(java.lang.String).

Specified by:
getCanAddSummaryFields in interface DataBoundComponent
Returns:
Boolean

setAddSummaryFieldText

public void setAddSummaryFieldText(java.lang.String addSummaryFieldText)
Description copied from interface: DataBoundComponent
Text for a menu item allowing users to add a formula field

Specified by:
setAddSummaryFieldText in interface DataBoundComponent
Parameters:
addSummaryFieldText - addSummaryFieldText Default value is "Add summary column..."

getAddSummaryFieldText

public java.lang.String getAddSummaryFieldText()
Description copied from interface: DataBoundComponent
Text for a menu item allowing users to add a formula field

Specified by:
getAddSummaryFieldText in interface DataBoundComponent
Returns:
String

setEditSummaryFieldText

public void setEditSummaryFieldText(java.lang.String editSummaryFieldText)
Description copied from interface: DataBoundComponent
Text for a menu item allowing users to edit the formatter for a field

Specified by:
setEditSummaryFieldText in interface DataBoundComponent
Parameters:
editSummaryFieldText - editSummaryFieldText Default value is "Edit summary format..."

getEditSummaryFieldText

public java.lang.String getEditSummaryFieldText()
Description copied from interface: DataBoundComponent
Text for a menu item allowing users to edit the formatter for a field

Specified by:
getEditSummaryFieldText in interface DataBoundComponent
Returns:
String

selectRecord

public void selectRecord(Record record)
Description copied from interface: DataBoundComponent
Select/deselect a Record passed in explicitly, or by index.

Specified by:
selectRecord in interface DataBoundComponent
Parameters:
record - record (or row number) to select

selectRecord

public void selectRecord(int record)
Description copied from interface: DataBoundComponent
Select/deselect a Record passed in explicitly, or by index.

Specified by:
selectRecord in interface DataBoundComponent
Parameters:
record - record (or row number) to select

selectRecord

public void selectRecord(int record,
                         boolean newState)
Description copied from interface: DataBoundComponent
Select/deselect a Record passed in explicitly, or by index.

Specified by:
selectRecord in interface DataBoundComponent
Parameters:
record - record (or row number) to select
newState - new selection state (if null, defaults to true)

selectRecord

public void selectRecord(Record record,
                         boolean newState)
Description copied from interface: DataBoundComponent
Select/deselect a Record passed in explicitly, or by index.

Specified by:
selectRecord in interface DataBoundComponent
Parameters:
record - record (or row number) to select
newState - new selection state (if null, defaults to true)

selectRecords

public void selectRecords(int[] records)
Description copied from interface: DataBoundComponent
Select/deselect a list of Records passed in explicitly, or by index.

Specified by:
selectRecords in interface DataBoundComponent
Parameters:
records - records (or row numbers) to select

selectRecords

public void selectRecords(int[] records,
                          boolean newState)
Description copied from interface: DataBoundComponent
Select/deselect a list of Records passed in explicitly, or by index.

Specified by:
selectRecords in interface DataBoundComponent
Parameters:
records - records (or row numbers) to select
newState - new selection state

selectRecords

public void selectRecords(Record[] records)
Description copied from interface: DataBoundComponent
Select/deselect a list of Records passed in explicitly, or by index.

Specified by:
selectRecords in interface DataBoundComponent
Parameters:
records - records (or row numbers) to select

selectRecords

public void selectRecords(Record[] records,
                          boolean newState)
Description copied from interface: DataBoundComponent
Select/deselect a list of Records passed in explicitly, or by index.

Specified by:
selectRecords in interface DataBoundComponent
Parameters:
records - records (or row numbers) to select
newState - new selection state (if null, defaults to true)

deselectRecord

public void deselectRecord(Record record)
Description copied from interface: DataBoundComponent
Deselect a Record passed in explicitly, or by index.

Synonym for selectRecord(record, false)

Specified by:
deselectRecord in interface DataBoundComponent
Parameters:
record - record (or row number) to deselect

deselectRecord

public void deselectRecord(int record)
Description copied from interface: DataBoundComponent
Deselect a Record passed in explicitly, or by index.

Synonym for selectRecord(record, false)

Specified by:
deselectRecord in interface DataBoundComponent
Parameters:
record - record (or row number) to deselect

deselectRecords

public void deselectRecords(int[] records)
Description copied from interface: DataBoundComponent
Deselect a list of Records passed in explicitly, or by index.

Synonym for selectRecords(records, false)

Specified by:
deselectRecords in interface DataBoundComponent
Parameters:
records - records (or row numbers) to deselect

deselectRecords

public void deselectRecords(Record[] records)
Description copied from interface: DataBoundComponent
Deselect a list of Records passed in explicitly, or by index.

Synonym for selectRecords(records, false)

Specified by:
deselectRecords in interface DataBoundComponent
Parameters:
records - records (or row numbers) to deselect

selectAllRecords

public void selectAllRecords()
Description copied from interface: DataBoundComponent
Select all records

Specified by:
selectAllRecords in interface DataBoundComponent

deselectAllRecords

public void deselectAllRecords()
Description copied from interface: DataBoundComponent
Deselect all records

Specified by:
deselectAllRecords in interface DataBoundComponent

anySelected

public java.lang.Boolean anySelected()
Description copied from interface: DataBoundComponent
Whether at least one item is selected

Specified by:
anySelected in interface DataBoundComponent
Returns:
true == at least one item is selected false == nothing at all is selected

enableHilite

public void enableHilite(java.lang.String hiliteID)
Description copied from interface: DataBoundComponent
Enable / disable a hilites

Specified by:
enableHilite in interface DataBoundComponent
Parameters:
hiliteID - ID of hilite to enable

enableHilite

public void enableHilite(java.lang.String hiliteID,
                         boolean enable)
Description copied from interface: DataBoundComponent
Enable / disable a hilites

Specified by:
enableHilite in interface DataBoundComponent
Parameters:
hiliteID - ID of hilite to enable
enable - new enabled state to apply - if null, defaults to true

disableHilite

public void disableHilite(java.lang.String hiliteID)
Description copied from interface: DataBoundComponent
Disable a hilite

Specified by:
disableHilite in interface DataBoundComponent
Parameters:
hiliteID - ID of hilite to disable

enableHiliting

public void enableHiliting()
Description copied from interface: DataBoundComponent
Enable all hilites.

Specified by:
enableHiliting in interface DataBoundComponent

enableHiliting

public void enableHiliting(boolean enable)
Description copied from interface: DataBoundComponent
Enable all hilites.

Specified by:
enableHiliting in interface DataBoundComponent
Parameters:
enable - new enabled state to apply - if null, defaults to true

disableHiliting

public void disableHiliting()
Description copied from interface: DataBoundComponent
Disable all hilites.

Specified by:
disableHiliting in interface DataBoundComponent

getDragData

public Record[] getDragData()
Description copied from interface: DataBoundComponent
During a drag-and-drop interaction, this method returns the set of records being dragged out of the component. In the default implementation, this is the list of currently selected records.

This method is generally called by com.smartgwt.client.widgets.DataBoundComponent#transferDragData and is consulted by ListGrid.willAcceptDrop().

Specified by:
getDragData in interface DataBoundComponent
Returns:
Array of Records that are currently selected.

transferSelectedData

public void transferSelectedData(DataBoundComponent source)
Description copied from interface: DataBoundComponent
Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction. This method acts on the dropped records exactly as if they had been dropped in an actual drag / drop interaction, including any special databound behavior invoked by calling DataBoundComponent.getDropValues() for each dropped record.

To transfer all data in, for example, a ListGrid, call grid.selection.selectAll() first.

See the Dragging documentation for an overview of list grid drag/drop data transfer.

Specified by:
transferSelectedData in interface DataBoundComponent
Parameters:
source - source component from which the records will be tranferred

transferSelectedData

public void transferSelectedData(DataBoundComponent source,
                                 int index)
Description copied from interface: DataBoundComponent
Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction. This method acts on the dropped records exactly as if they had been dropped in an actual drag / drop interaction, including any special databound behavior invoked by calling DataBoundComponent.getDropValues() for each dropped record.

To transfer all data in, for example, a ListGrid, call grid.selection.selectAll() first.

See the Dragging documentation for an overview of list grid drag/drop data transfer.

Specified by:
transferSelectedData in interface DataBoundComponent
Parameters:
source - source component from which the records will be tranferred
index - target index (drop position) of the rows within this grid.

getRecordIndex

public int getRecordIndex(Record record)
Description copied from interface: DataBoundComponent
Get the index of the provided record.

Override in subclasses to provide more specific behaviour, for instance, when data holds a large number of records

Specified by:
getRecordIndex in interface DataBoundComponent
Parameters:
record - the record whose index is to be retrieved
Returns:
indexindex of the record, or -1 if not found

getTitleFieldValue

public java.lang.String getTitleFieldValue(Record record)
Description copied from interface: DataBoundComponent
Get the value of the titleField for the passed record

Override in subclasses

Specified by:
getTitleFieldValue in interface DataBoundComponent
Parameters:
record - the record whose index is to be retrieved
Returns:
valuethe value of the titleField for the passed record

setTitleField

public void setTitleField(java.lang.String titleField)
Specified by:
setTitleField in interface DataBoundComponent

getTitleField

public java.lang.String getTitleField()
Description copied from interface: DataBoundComponent
Method to return the fieldName which represents the "title" for records in this Component.
If this.titleField is explicitly specified it will always be used. Otherwise, default implementation will check titleField for databound compounds.
For non databound components returns the first defined field name of "title", "name", or "id". If we dont find any field-names that match these titles, the first field in the component will be used instead.

Specified by:
getTitleField in interface DataBoundComponent
Returns:
fieldName for title field for this component.

setDataSource

public void setDataSource(DataSource dataSource)
Description copied from interface: DataBoundComponent
The DataSource that this component should bind to for default fields and for performing DSRequest.

Can be specified as either a DataSource instance or the String ID of a DataSource. Bind to a new DataSource.

Like passing the "dataSource" property on creation, binding to a DataSource means that the component will use the DataSource to provide default data for its fields.

When binding to a new DataSource, if the component has any existing "fields" or has a dataset, these will be discarded by default, since it is assumed the new DataSource may represent a completely unrelated set of objects. If the old "fields" are still relevant, pass them to setDataSource().

Specified by:
setDataSource in interface DataBoundComponent
Parameters:
dataSource - DataSource to bind to. Default value is null

getDataSource

public DataSource getDataSource()
Description copied from interface: DataBoundComponent
The DataSource that this component should bind to for default fields and for performing DSRequest.

Can be specified as either a DataSource instance or the String ID of a DataSource.

Specified by:
getDataSource in interface DataBoundComponent
Returns:
DataSource

setAutoFetchData

public void setAutoFetchData(java.lang.Boolean autoFetchData)
                      throws java.lang.IllegalStateException
Description copied from interface: DataBoundComponent
If true, when this component is first drawn, automatically call DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on DataBoundComponent.getAutoFetchAsFilter() . Criteria for this fetch may be picked up from initialCriteria.

Specified by:
setAutoFetchData in interface DataBoundComponent
Parameters:
autoFetchData - autoFetchData
Throws:
java.lang.IllegalStateException

getAutoFetchData

public java.lang.Boolean getAutoFetchData()
Description copied from interface: DataBoundComponent
If true, when this component is first drawn, automatically call DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on DataBoundComponent.getAutoFetchAsFilter() . Criteria for this fetch may be picked up from initialCriteria.

Specified by:
getAutoFetchData in interface DataBoundComponent
Returns:
auto fetch data

setAutoFetchAsFilter

public void setAutoFetchAsFilter(java.lang.Boolean autoFetchAsFilter)
                          throws java.lang.IllegalStateException
Description copied from interface: DataBoundComponent
If DataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData()

Specified by:
setAutoFetchAsFilter in interface DataBoundComponent
Parameters:
autoFetchAsFilter - autoFetchAsFilter
Throws:
java.lang.IllegalStateException

getAutoFetchAsFilter

public java.lang.Boolean getAutoFetchAsFilter()
Description copied from interface: DataBoundComponent
If DataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData()

Specified by:
getAutoFetchAsFilter in interface DataBoundComponent
Returns:
auto fetch as filter

setInitialCriteria

public void setInitialCriteria(Criteria initialCriteria)
                        throws java.lang.IllegalStateException
Description copied from interface: DataBoundComponent
Criteria to use when DataBoundComponent.setAutoFetchData(Boolean) is used.

Specified by:
setInitialCriteria in interface DataBoundComponent
Parameters:
initialCriteria - the initial criteria
Throws:
java.lang.IllegalStateException - this property cannot be changed after the component has been created

getInitialCriteria

public Criteria getInitialCriteria()
Description copied from interface: DataBoundComponent
Criteria to use when DataBoundComponent.setAutoFetchData(Boolean) is used.

Specified by:
getInitialCriteria in interface DataBoundComponent
Returns:
the criteria

fetchData

public void fetchData()
Description copied from interface: DataBoundComponent
Uses a "fetch" operation on the current DataSource to retrieve data that matches the provided criteria, and displays the matching data in this component.

If there are a large number of matching records, paging will automatically be enabled, so that initially a smaller number of records will be retrieved and further records will be fetched as the user navigates the dataset.

When first called, this method will create a com.smartgwt.client.data.ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The ResultSet is then available as component.data.

Subsequent calls to fetchData() will simply call com.smartgwt.client.data.ResultSet#setCriteria on the created ResultSet with the passed criteria.

In some cases fetchData() will not need to context the server as the new criteria can be satisfied by performing a client-side filter against the currently cached set of data. You can determine whether criteria will cause a fetch by calling com.smartgwt.client.data.ResultSet#willFetchData.

If you need to force a server fetch, you can call com.smartgwt.client.data.ResultSet#invalidateCache via component.data.invalidateCache() to do so.

This method takes an optional callback parameter (set to a DSCallback) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary we recomment using com.smartgwt.client.data.ResultSet#willFetchData before calling this method to determine whether or not a server fetch will occur.

In addition to the callback parameter for this method, developers can use com.smartgwt.client.data.ResultSet#dataArrived to be notified every time ResultSet data is loaded. A dataArrived method can be installed in the automatically created ResultSet by adding it to dataProperties.

Specified by:
fetchData in interface DataBoundComponent

fetchData

public void fetchData(Criteria criteria)
Description copied from interface: DataBoundComponent
Uses a "fetch" operation on the current DataSource to retrieve data that matches the provided criteria, and displays the matching data in this component.

If there are a large number of matching records, paging will automatically be enabled, so that initially a smaller number of records will be retrieved and further records will be fetched as the user navigates the dataset.

When first called, this method will create a com.smartgwt.client.data.ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The ResultSet is then available as component.data.

Subsequent calls to fetchData() will simply call com.smartgwt.client.data.ResultSet#setCriteria on the created ResultSet with the passed criteria.

In some cases fetchData() will not need to context the server as the new criteria can be satisfied by performing a client-side filter against the currently cached set of data. You can determine whether criteria will cause a fetch by calling com.smartgwt.client.data.ResultSet#willFetchData.

If you need to force a server fetch, you can call com.smartgwt.client.data.ResultSet#invalidateCache via component.data.invalidateCache() to do so.

This method takes an optional callback parameter (set to a DSCallback) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary we recomment using com.smartgwt.client.data.ResultSet#willFetchData before calling this method to determine whether or not a server fetch will occur.

In addition to the callback parameter for this method, developers can use com.smartgwt.client.data.ResultSet#dataArrived to be notified every time ResultSet data is loaded. A dataArrived method can be installed in the automatically created ResultSet by adding it to dataProperties.

Specified by:
fetchData in interface DataBoundComponent
Parameters:
criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling getValuesAsCriteria()

fetchData

public void fetchData(Criteria criteria,
                      DSCallback callback)
Description copied from interface: DataBoundComponent
Uses a "fetch" operation on the current DataSource to retrieve data that matches the provided criteria, and displays the matching data in this component.

If there are a large number of matching records, paging will automatically be enabled, so that initially a smaller number of records will be retrieved and further records will be fetched as the user navigates the dataset.

When first called, this method will create a com.smartgwt.client.data.ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The ResultSet is then available as component.data.

Subsequent calls to fetchData() will simply call com.smartgwt.client.data.ResultSet#setCriteria on the created ResultSet with the passed criteria.

In some cases fetchData() will not need to context the server as the new criteria can be satisfied by performing a client-side filter against the currently cached set of data. You can determine whether criteria will cause a fetch by calling com.smartgwt.client.data.ResultSet#willFetchData.

If you need to force a server fetch, you can call com.smartgwt.client.data.ResultSet#invalidateCache via component.data.invalidateCache() to do so.

This method takes an optional callback parameter (set to a DSCallback) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary we recomment using com.smartgwt.client.data.ResultSet#willFetchData before calling this method to determine whether or not a server fetch will occur.

In addition to the callback parameter for this method, developers can use com.smartgwt.client.data.ResultSet#dataArrived to be notified every time ResultSet data is loaded. A dataArrived method can be installed in the automatically created ResultSet by adding it to dataProperties.

Specified by:
fetchData in interface DataBoundComponent
Parameters:
criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling getValuesAsCriteria()
callback - callback to invoke when a fetch is complete. Fires only if server contact was required

fetchData

public void fetchData(Criteria criteria,
                      DSCallback callback,
                      DSRequest requestProperties)
Description copied from interface: DataBoundComponent
Uses a "fetch" operation on the current DataSource to retrieve data that matches the provided criteria, and displays the matching data in this component.

If there are a large number of matching records, paging will automatically be enabled, so that initially a smaller number of records will be retrieved and further records will be fetched as the user navigates the dataset.

When first called, this method will create a com.smartgwt.client.data.ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The ResultSet is then available as component.data.

Subsequent calls to fetchData() will simply call com.smartgwt.client.data.ResultSet#setCriteria on the created ResultSet with the passed criteria.

In some cases fetchData() will not need to context the server as the new criteria can be satisfied by performing a client-side filter against the currently cached set of data. You can determine whether criteria will cause a fetch by calling com.smartgwt.client.data.ResultSet#willFetchData.

If you need to force a server fetch, you can call com.smartgwt.client.data.ResultSet#invalidateCache via component.data.invalidateCache() to do so.

This method takes an optional callback parameter (set to a DSCallback) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary we recomment using com.smartgwt.client.data.ResultSet#willFetchData before calling this method to determine whether or not a server fetch will occur.

In addition to the callback parameter for this method, developers can use com.smartgwt.client.data.ResultSet#dataArrived to be notified every time ResultSet data is loaded. A dataArrived method can be installed in the automatically created ResultSet by adding it to dataProperties.

Specified by:
fetchData in interface DataBoundComponent
Parameters:
criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling getValuesAsCriteria()
callback - callback to invoke when a fetch is complete. Fires only if server contact was required
requestProperties - additional properties to set on the DSRequest that will be issued

filterData

public void filterData()
Description copied from interface: DataBoundComponent
Retrieves data that matches the provided criteria and displays the matching data in this component.

This method behaves exactly like ListGrid.fetchData() except that textMatchStyle is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.

Specified by:
filterData in interface DataBoundComponent

filterData

public void filterData(Criteria criteria)
Description copied from interface: DataBoundComponent
Retrieves data that matches the provided criteria and displays the matching data in this component.

This method behaves exactly like ListGrid.fetchData() except that textMatchStyle is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.

Specified by:
filterData in interface DataBoundComponent
Parameters:
criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling getValuesAsCriteria()

filterData

public void filterData(Criteria criteria,
                       DSCallback callback)
Description copied from interface: DataBoundComponent
Retrieves data that matches the provided criteria and displays the matching data in this component.

This method behaves exactly like ListGrid.fetchData() except that textMatchStyle is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.

Specified by:
filterData in interface DataBoundComponent
Parameters:
criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling getValuesAsCriteria()
callback - callback to invoke when a fetch is complete. Fires only if server contact was required; see DataBoundComponent.fetchData() for details

filterData

public void filterData(Criteria criteria,
                       DSCallback callback,
                       DSRequest requestProperties)
Description copied from interface: DataBoundComponent
Retrieves data that matches the provided criteria and displays the matching data in this component.

This method behaves exactly like ListGrid.fetchData() except that textMatchStyle is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.

Specified by:
filterData in interface DataBoundComponent
Parameters:
criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling getValuesAsCriteria()
callback - callback to invoke when a fetch is complete. Fires only if server contact was required; see DataBoundComponent.fetchData() for details
requestProperties - for databound components only - optional additional properties to set on the DSRequest that will be issued

invalidateCache

public void invalidateCache()
Description copied from interface: DataBoundComponent
Invalidate the current data cache for this databound component via a call to this.data.invalidateCache(). If necessary, this will cause a new fetch to be performed with the current set of criteria for this component.

Has no effect if this component is not showing a set of filtered data.

Specified by:
invalidateCache in interface DataBoundComponent