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:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsWidget, LogicalStructure, DataBoundComponent, HasClickHandlers, HasDoubleClickHandlers, HasDragCompleteHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropCompleteHandlers, HasDropHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFetchDataHandlers, HasFocusChangedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasMovedHandlers, HasParentMovedHandlers, HasResizedHandlers, HasRightMouseDownHandlers, HasScrolledHandlers, HasShowContextMenuHandlers, HasVisibilityChangedHandlers, HasAsyncValidationReplyHandlers, HasFormSubmitFailedHandlers, HasHiddenValidationErrorsHandlers, HasItemChangedHandlers, HasItemChangeHandlers, HasItemKeyPressHandlers, HasSubmitValuesHandlers
Direct Known Subclasses:
PropertySheet, SearchForm

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

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, create several FormItems and pass them to setItems. For example:

     DynamicForm form = new DynamicForm();
     TextItem textItem = new TextItem("userName");
     SelectItem selectItem = new SelectItem("usState");
     form.setItems(textItem, selectItem);
  
The item name is an identifier for the item that must be unique just within this form. It is used: FormItems can also be created by binding the form to a DataSource via setDataSource(). In this case, FormItems are chosen based on the data type of the field - see FormItemType. You can override the automatically chosen FormItem via editorType.

When using DataSource binding, you can also add additional FormItems not specified in the DataSource, or override any properties on the automatically generated FormItems, without having to re-declare any information that comes from the DataSource. See the QuickStart Guide chapter on Data Binding for an overview.

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 Toolstrip example.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.smartgwt.client.widgets.BaseWidget
config, configOnly, id, isElementSet, nativeObject, scClassName
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
DynamicForm()
           
DynamicForm(JavaScriptObject jsObj)
           
 
Method Summary
 HandlerRegistration addAsyncValidationReplyHandler(AsyncValidationReplyHandler handler)
          Add a asyncValidationReply handler.
 HandlerRegistration addDragCompleteHandler(DragCompleteHandler handler)
          Add a com.smartgwt.client.widgets.DragCompleteHandler.
 HandlerRegistration addDropCompleteHandler(DropCompleteHandler handler)
          Add a com.smartgwt.client.widgets.DropCompleteHandler.
 HandlerRegistration addFetchDataHandler(FetchDataHandler handler)
          Add a fetchData handler.
 HandlerRegistration addFormSubmitFailedHandler(FormSubmitFailedHandler handler)
          Add a formSubmitFailed handler.
 void addFormulaField()
          Convenience method to display a com.smartgwt.client..FormulaBuilder to create a new Formula Field.
 HandlerRegistration addHiddenValidationErrorsHandler(HiddenValidationErrorsHandler handler)
          Add a hiddenValidationErrors handler.
 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.
 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 cancelEditing()
          If the form or valuesManager has associated userTask workflow task than notify it about cancelling the changes.
 void clearErrors(boolean show)
          Clears all errors for this DynamicForm.
 void clearFieldErrors(String fieldName, boolean show)
          Clear any validation errors on the field passed in.
 void clearValue(String fieldName)
          Clears the value for some field via a call to FormItem.clearValue if appropriate.
 void clearValues()
          Reset to default form values and clear errors
 void completeEditing()
          Finish editing and store edited values in process state.
protected  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(String hiliteID)
          Disable a hilite
 void disableHiliting()
          Disable all hilites.
 void editHilites()
          Shows a HiliteEditor interface allowing end-users to edit the data-hilites currently in use by this DataBoundComponent.
 void editNewRecord()
          Prepare to edit a new record by clearing the current set of values (or replacing them with initialValues if specified).
 void editNewRecord(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)
          Edit the record selected in the specified ListGrid.
 void editSelectedData(String listGridID)
          Edit the record selected in the specified ListGrid.
 void enableHilite(String hiliteID)
          Enable / disable a hilites
 void enableHilite(String hiliteID, boolean enable)
          Enable / disable a hilites
 void enableHiliting()
          Enable all hilites.
 void enableHiliting(boolean enable)
          Enable all hilites.
 void exportClientData()
          Exports this component's data with client-side formatters applied, so is suitable for direct display to users.
 void exportClientData(DSRequest requestProperties)
          Exports this component's data with client-side formatters applied, so is suitable for direct display to users.
 void exportData()
          Uses a "fetch" operation on the current DataSource to retrieve data that matches the current filter and sort criteria for this component, then exports the resulting data to a file or window in the requested format.
 void exportData(DSRequest requestProperties)
          Uses a "fetch" operation on the current DataSource to retrieve data that matches the current filter and sort criteria for this component, then exports the resulting data to a file or window in the requested format.
 void fetchData()
          Retrieves data from the DataSource that matches the specified criteria.
 void fetchData(Criteria criteria)
          Retrieves data from the DataSource that matches the specified criteria.
 void fetchData(Criteria criteria, DSCallback callback)
          Retrieves data from the DataSource that matches the specified criteria.
 void fetchData(Criteria criteria, DSCallback callback, DSRequest requestProperties)
          Retrieves data from the DataSource that matches the specified criteria.
 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(String itemName)
          Move the keyboard focus into a particular item.
 String getAction()
          The URL to which the form will submit its values.
 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.
 String getAddFormulaFieldText()
          Text for a menu item allowing users to add a formula field
 String getAddOperation()
          Operation ID this component should use when performing add operations.
 String getAddSummaryFieldText()
          Text for a menu item allowing users to add a formula field
 Boolean getAllowExpressions()
          For a form that produces filter criteria (see form.getValuesAsCriteria()), allows the user to enter simple expressions in any field in this form that takes text input.
 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()
 Boolean getAutoFetchData()
          If true, when this component is first drawn, automatically call DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on DataBoundComponent.getAutoFetchAsFilter() .
 TextMatchStyle getAutoFetchTextMatchStyle()
          If autoFetchData is true, this attribute allows the developer to specify a textMatchStyle for the initial DataBoundComponent.fetchData() call.
 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)
 Boolean getBrowserSpellCheck()
          If this browser has a 'spellCheck' feature for text-based form item elements, should it be used for items in this form? Can be overridden at the item level via browserSpellCheck
 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.
 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.
 String getCancelParamName()
          The name of the special field sent to the server as part of DynamicForm.cancel
 String getCancelParamValue()
          The value of the special field sent to the server as part of DynamicForm.cancel
 Boolean getCanEdit()
          If set to false, the form will be marked read-only.
 String getCanEditFieldAttribute()
          If this component is bound to a dataSource, this attribute may be specified to customize what fields from the dataSource may be edited by default.
 Boolean getCanFocus()
          DynamicForms are considered to have focus if any of their form items have focus.
 Boolean getCanSubmit()
          Governs whether this form will be used to perform a standard HTML form submission.
 Boolean getCanTabToSectionHeaders()
          If true, the headers for any SectionItems will be included in the page's tab order for accessibility.
 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()
          Deprecated. use getCellPadding() instead
 Map getChangedValues()
          Returns all values within this DynamicForm that have changed since DynamicForm.rememberValues last ran.
 FetchMode getDataFetchMode()
          How to fetch and manage records retrieve from the server.
 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 DataSource requests.
 DateDisplayFormat getDateFormatter()
          Default DateDisplayFormat for Date type values displayed in this form.
 DateDisplayFormat getDatetimeFormatter()
          Default DateDisplayFormat for Date type values displayed in this form in fields of type datetime.
 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.
 String getDragTrackerStyle()
          CSS Style to apply to the drag tracker when dragging occurs on this component.
 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 Smart GWT will apply to the dropped object before updating it.
 String getDuplicateDragMessage()
          Message to show when a user attempts to transfer duplicate records into this component, and preventDuplicates is enabled.
 String getEditFormulaFieldText()
          Text for a menu item allowing users to edit a formula field
 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
 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.
 Map getErrors()
          Returns the set of errors.
 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.
 FormItem getEventItem()
          If the current mouse event occurred over an item in this dynamicForm, returns that item.
 FormItemEventInfo getEventItemInfo(String fieldName)
          If the current mouse event occurred over an item, or the title of an item in this dynamicForm, return details about where the event occurred.
 Boolean getExportAll()
          Setting exportAll to true prevents the component from passing its list of fields to the export call.
 String[] getExportFields()
          The list of field-names to export.
 String getFetchOperation()
          Operation ID this component should use when performing fetch operations.
 FormItem getField(String name)
           
 String[] getFieldErrors(String fieldName)
          Returns any validation errors for some field in this valuesManager.
 FormItem[] getFields()
          Return thhe form fields
 Boolean getFixedColWidths()
          If true, we ensure that column widths are at least as large as you specify them.
 FormItem getFocusItem()
          Return the current focus item for this form.
 String getFormSubmitFailedWarning()
          Warning to display to the user if an attempt to natively submit a form is unable to submit to the server.
 String getHiliteProperty()
          Marker that can be set on a record to flag that record as hilited.
 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.
 Hilite[] getHilites()
          Return the set of hilite-objects currently applied to this DataBoundComponent.
 String getHiliteState()
          Get the current hilites encoded as a String, for saving.
 Boolean getImplicitSave()
          When true, indicates that changes to items in this form will be automatically saved on a delay, as well as when the entire form is submitted.
 int getImplicitSaveDelay()
          When implicitSave is true, this attribute dictates the millisecond delay after which form items are automatically saved during editing.
 Boolean getImplicitSaveOnBlur()
          If true, form item values will be automatically saved when each item's "editorExit" handler is fired as well as on a delay and when the entire form is submitted.
 Criteria getInitialCriteria()
          Criteria to use when DataBoundComponent.setAutoFetchData(Boolean) is used.
 FormItem getItem(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?
 Integer getItemHoverHeight()
          A default height for hovers shown for items
 Integer getItemHoverOpacity()
          Opacity for hovers shown for items
 String getItemHoverStyle()
          CSS Style for hovers shown for items
 Integer getItemHoverVAlign()
          Vertical text alignment for hovers shown for items
 Integer getItemHoverWidth()
          A default width for hovers shown for items
 FormLayoutType getItemLayout()
          Layout style to use with this form.
 com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
           
 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.
 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.
 Map getOldValues()
          Returns the set of values last stored by DynamicForm.rememberValues.
 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(JavaScriptObject jsObj)
           
 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.
 RecordList getRecordList()
          Return the underlying data of this DataBoundComponent as a RecordList.
 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.
 String getRemoveOperation()
          Operation ID this component should use when performing remove operations.
 String getRequiredMessage()
          The required message for required field errors.
 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".
 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".
 String getRequiredTitlePrefix()
          The string prepended to the title of every required item in this form if highlightRequiredFields is true.
 String getRequiredTitleSuffix()
          The string appended to the title of every required item in this form if highlightRequiredFields is true.
 ResultSet getResultSet()
          Return the underlying data of this DataBoundComponent as a ResultSet.
 String getRightTitlePrefix()
          The string prepended to the title of an item in this form if its titleOrientation property is set to "right".
 String getRightTitleSuffix()
          The string appended to the title of an item in this form if its titleOrientation property is set to "right".
 Boolean getSaveOnEnter()
          If true, when the user hits the Enter key while focused in a text-item in this form, we automatically submit the form to the server using the DynamicForm.submit method.
 DSOperationType getSaveOperationType()
          Default DSOperationType to be performed when DynamicForm.saveData is called.
 DSOperationType getSaveOperationType(DSRequest requestProperties)
          Default DSOperationType to be performed when DynamicForm.saveData is called.
 VisibilityMode getSectionVisibilityMode()
          If the form has sections, [implemented as SectionItems], this attribute controls whether multiple sections can be expanded at once.
 Boolean getSelectOnFocus()
          If this property is set to true, whenever a text-based field in this form (TextItem, TextAreaItem) is given focus programmatically (see DynamicForm.focusInItem), all text within the item will be selected.
 Boolean getShowComplexFields()
          Whether to show fields of non-atomic types when a DataBoundComponent is given a DataSource but no component.fields.
 Boolean getShowComplexFieldsRecursively()
          If set, this DynamicForm will set both showComplexFields and showComplexFieldsRecursively on any nested component used for showing/editing a complex field.
 Boolean getShowDetailFields()
          For databound forms, whether to show fields marked as detail fields.
 Boolean getShowErrorIcons()
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).
 Boolean getShowErrorStyle()
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).
 Boolean getShowErrorText()
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).
 Boolean getShowHiddenFields()
          Whether to show fields marked hidden:true when a DataBoundComponent is given a DataSource but no component.fields.
 Boolean getShowInlineErrors()
          If true, field errors are written into the form next to the item(s) where the errors occurred.
 Boolean getShowTitlesWithErrorMessages()
          Indicates whether on validation failure, the error message displayed to the user should be prepended with the title for the item.
 Boolean getStopOnError()
          Indicates that if validation fails, the user should not be allowed to exit the field - focus will be forced back into the field until the error is corrected.
 Boolean getSuppressValidationErrorCallback()
          When calling DynamicForm.saveData on a form or valuesManager, by default if the server returns an error code, any callback passed into saveData() will not be fired.
 Boolean getSynchronousValidation()
          If enabled, whenever validation is triggered and a request to the server is required, user interactivity will be blocked until the request returns.
 String getTarget()
          The name of a window or frame that will receive the results returned by the form's action.
 TimeDisplayFormat getTimeFormatter()
          Default TimeDisplayFormat for type:"time" field values displayed in this form.
 Alignment getTitleAlign()
          Default alignment for item titles.
 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 components.
For non databound components returns the first defined field name of "title", "name", or "id".
 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.
 String getTitlePrefix()
          The string prepended to the title of every item in this form.
 String getTitleSuffix()
          The string appended to the title of every item in this form.
 String getUnknownErrorMessage()
          The error message for a failed validator that does not specify its own errorMessage.
 String getUpdateOperation()
          Operation ID this component should use when performing update operations.
 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.
 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.
 UserTask getUserTask()
          Associated userTask if current dynamic form used along with workflow.
 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.
 Boolean getValidateOnExit()
          If true, form items will be validated when each item's "editorExit" handler is fired as well as when the entire form is submitted or validated.
 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.
 Object getValue(String fieldName)
           
 String getValueAsString(String fieldName)
           
 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.
 AdvancedCriteria getValuesAsAdvancedCriteria()
          Return an AdvancedCriteria object based on the current set of values within this form.
 AdvancedCriteria getValuesAsAdvancedCriteria(TextMatchStyle textMatchStyle)
          Return an AdvancedCriteria object based on the current set of values within this form.
 Criteria getValuesAsCriteria()
          Return search criteria based on the current set of values within this form.
 Record getValuesAsRecord()
          Return the current set of values within this form as a Record.
 ValuesManager getValuesManager()
          Return the ValuesManager for this form.
 Boolean getWrapItemTitles()
          Whether titles for form items should wrap.
 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 DynamicForm.setErrors or DynamicForm.setFieldErrors.
 Boolean hasFieldErrors(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 DynamicForm.setErrors or DynamicForm.setFieldErrors.
 void hideItem(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().
 Boolean isNewRecord()
          Returns true if saveOperationType is currently "add".
 Boolean isPendingAsyncValidation()
          Is this component waiting for an asynchronous validation to complete? This method will return true after DynamicForm.validate is called on a component with server-side validators for some field(s), until the server responds.
protected  void onInit_DynamicForm()
           
protected  void onInit()
           
 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 DynamicForm.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(String action)
          The URL to which the form will submit its values.
 void setAddDropValues(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(String addFormulaFieldText)
          Text for a menu item allowing users to add a formula field
 void setAddOperation(String addOperation)
          Operation ID this component should use when performing add operations.
 void setAddSummaryFieldText(String addSummaryFieldText)
          Text for a menu item allowing users to add a formula field
 void setAllowExpressions(Boolean allowExpressions)
          For a form that produces filter criteria (see form.getValuesAsCriteria()), allows the user to enter simple expressions in any field in this form that takes text input.
 void setAutoFetchAsFilter(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(Boolean autoFetchData)
          If true, when this component is first drawn, automatically call DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on DataBoundComponent.getAutoFetchAsFilter() .
 void setAutoFetchTextMatchStyle(TextMatchStyle autoFetchTextMatchStyle)
          If autoFetchData is true, this attribute allows the developer to specify a textMatchStyle for the initial DataBoundComponent.fetchData() call.
 void setAutoFocus(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 setBrowserSpellCheck(Boolean browserSpellCheck)
          If this browser has a 'spellCheck' feature for text-based form item elements, should it be used for items in this form? Can be overridden at the item level via browserSpellCheck
 void setCanAddFormulaFields(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(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(String cancelParamName)
          The name of the special field sent to the server as part of DynamicForm.cancel
 void setCancelParamValue(String cancelParamValue)
          The value of the special field sent to the server as part of DynamicForm.cancel
 void setCanEdit(Boolean canEdit)
          If set to false, the form will be marked read-only.
 void setCanEditFieldAttribute(String canEditFieldAttribute)
          If this component is bound to a dataSource, this attribute may be specified to customize what fields from the dataSource may be edited by default.
 void setCanFocus(Boolean canFocus)
          DynamicForms are considered to have focus if any of their form items have focus.
 void setCanSubmit(Boolean canSubmit)
          Governs whether this form will be used to perform a standard HTML form submission.
 void setCanTabToSectionHeaders(Boolean canTabToSectionHeaders)
          If true, the headers for any SectionItems will be included in the page's tab order for accessibility.
 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)
          Deprecated. use setCellPadding(int) instead
 void setColWidths(Object... colWidths)
          An array of widths for the columns of items in this form's layout grid.
 void setDataFetchMode(FetchMode dataFetchMode)
          How to fetch and manage records retrieve from the server.
 void setDataPageSize(int dataPageSize)
          When using data paging, how many records to fetch at a time.
 void setDataSource(DataSource dataSource)
          Bind to a DataSource.
 void setDataSource(DataSource dataSource, FormItem... fields)
          Bind to a DataSource.
 void setDateFormatter(DateDisplayFormat dateFormatter)
          Default DateDisplayFormat for Date type values displayed in this form.
 void setDatetimeFormatter(DateDisplayFormat datetimeFormatter)
          Default DateDisplayFormat for Date type values displayed in this form in fields of type datetime.
static void setDefaultProperties(DynamicForm dynamicFormProperties)
          Class level method to set the default properties of this class.
 void setDisableValidation(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(String dragTrackerStyle)
          CSS Style to apply to the drag tracker when dragging occurs on this component.
 void setDropValues(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 Smart GWT will apply to the dropped object before updating it.
 void setDuplicateDragMessage(String duplicateDragMessage)
          Message to show when a user attempts to transfer duplicate records into this component, and preventDuplicates is enabled.
 void setEditFormulaFieldText(String editFormulaFieldText)
          Text for a menu item allowing users to edit a formula field
 void setEditSummaryFieldText(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(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)
          If DynamicForm.showInlineErrors is true, where should the error icon and text appear relative to form items? Valid options are "top", "bottom", "left" or "right".
 void setErrors(Map errors, boolean showErrors)
          Setter for validation errors on this form.
 void setErrorsPreamble(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(Boolean exportAll)
          Setting exportAll to true prevents the component from passing its list of fields to the export call.
 void setExportFields(String[] exportFields)
          The list of field-names to export.
 void setFetchOperation(String fetchOperation)
          Operation ID this component should use when performing fetch operations.
 void setFieldErrors(String fieldName, String[] errors, boolean showErrors)
          Set field validation errors for some field.
 void setFieldErrors(String fieldName, 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(Boolean fixedColWidths)
          If true, we ensure that column widths are at least as large as you specify them.
 void setFormSubmitFailedWarning(String formSubmitFailedWarning)
          Warning to display to the user if an attempt to natively submit a form is unable to submit to the server.
 void setHiliteProperty(String hiliteProperty)
          Marker that can be set on a record to flag that record as hilited.
 void setHiliteRequiredFields(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 setHilites(Hilite[] hilites)
          Accepts an array of hilite objects and applies them to this DataBoundComponent.
 void setHiliteState(String hiliteState)
          Set the current hilites based on a hiliteState String previously returned from getHilitesState.
 void setImplicitSave(Boolean implicitSave)
          When true, indicates that changes to items in this form will be automatically saved on a delay, as well as when the entire form is submitted.
 void setImplicitSaveDelay(int implicitSaveDelay)
          When implicitSave is true, this attribute dictates the millisecond delay after which form items are automatically saved during editing.
 void setImplicitSaveOnBlur(Boolean implicitSaveOnBlur)
          If true, form item values will be automatically saved when each item's "editorExit" handler is fired as well as on a delay and when the entire form is submitted.
 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(Integer itemHoverHeight)
          A default height for hovers shown for items
 void setItemHoverOpacity(Integer itemHoverOpacity)
          Opacity for hovers shown for items
 void setItemHoverStyle(String itemHoverStyle)
          CSS Style for hovers shown for items
 void setItemHoverVAlign(Integer itemHoverVAlign)
          Vertical text alignment for hovers shown for items
 void setItemHoverWidth(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 setJavaScriptObject(JavaScriptObject jsObj)
           
 com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.form.DynamicFormLogicalStructure s)
           
 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(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(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(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(String removeOperation)
          Operation ID this component should use when performing remove operations.
 void setRequiredMessage(String requiredMessage)
          The required message for required field errors.
 void setRequiredRightTitlePrefix(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(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(String requiredTitlePrefix)
          The string prepended to the title of every required item in this form if highlightRequiredFields is true.
 void setRequiredTitleSuffix(String requiredTitleSuffix)
          The string appended to the title of every required item in this form if highlightRequiredFields is true.
 void setRightTitlePrefix(String rightTitlePrefix)
          The string prepended to the title of an item in this form if its titleOrientation property is set to "right".
 void setRightTitleSuffix(String rightTitleSuffix)
          The string appended to the title of an item in this form if its titleOrientation property is set to "right".
 void setSaveOnEnter(Boolean saveOnEnter)
          If true, when the user hits the Enter key while focused in a text-item in this form, we automatically submit the form to the server using the DynamicForm.submit method.
 void setSaveOperationType(DSOperationType saveOperationType)
          Default DSOperationType to be performed when DynamicForm.saveData is called.
 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(Boolean selectOnFocus)
          If this property is set to true, whenever a text-based field in this form (TextItem, TextAreaItem) is given focus programmatically (see DynamicForm.focusInItem), all text within the item will be selected.
 void setShowComplexFields(Boolean showComplexFields)
          Whether to show fields of non-atomic types when a DataBoundComponent is given a DataSource but no component.fields.
 void setShowComplexFieldsRecursively(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(Boolean showDetailFields)
          For databound forms, whether to show fields marked as detail fields.
 void setShowErrorIcons(Boolean showErrorIcons)
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).
 void setShowErrorStyle(Boolean showErrorStyle)
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).
 void setShowErrorText(Boolean showErrorText)
          showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error).
 void setShowHiddenFields(Boolean showHiddenFields)
          Whether to show fields marked hidden:true when a DataBoundComponent is given a DataSource but no component.fields.
 void setShowInlineErrors(Boolean showInlineErrors)
          If true, field errors are written into the form next to the item(s) where the errors occurred.
 void setShowTitlesWithErrorMessages(Boolean showTitlesWithErrorMessages)
          Indicates whether on validation failure, the error message displayed to the user should be prepended with the title for the item.
 void setStopOnError(Boolean stopOnError)
          Indicates that if validation fails, the user should not be allowed to exit the field - focus will be forced back into the field until the error is corrected.
 void setSuppressValidationErrorCallback(Boolean suppressValidationErrorCallback)
          When calling DynamicForm.saveData on a form or valuesManager, by default if the server returns an error code, any callback passed into saveData() will not be fired.
 void setSynchronousValidation(Boolean synchronousValidation)
          If enabled, whenever validation is triggered and a request to the server is required, user interactivity will be blocked until the request returns.
 void setTarget(String target)
          The name of a window or frame that will receive the results returned by the form's action.
 void setTimeFormatter(TimeDisplayFormat timeFormatter)
          Default TimeDisplayFormat for type:"time" field values displayed in this form.
 void setTitleAlign(Alignment titleAlign)
          Default alignment for item titles.
 void setTitleField(String titleField)
          Sets the best field to use for a user-visible title for an individual record from this component.
 void setTitleOrientation(TitleOrientation titleOrientation)
          Default orientation for titles for items in this form.
 void setTitlePrefix(String titlePrefix)
          The string prepended to the title of every item in this form.
 void setTitleSuffix(String titleSuffix)
          The string appended to the title of every item in this form.
 void setTitleWidth(int titleWidth)
          The width in pixels allocated to the title of every item in this form.
 void setTitleWidth(String titleWidth)
          The width in pixels allocated to the title of every item in this form.
 void setUnknownErrorMessage(String unknownErrorMessage)
          The error message for a failed validator that does not specify its own errorMessage.
 void setUpdateOperation(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(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(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 setUserTask(UserTask userTask)
          Associated userTask if current dynamic form used along with workflow.
 void setValidateOnChange(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.
 void setValidateOnExit(Boolean validateOnExit)
          If true, form items will be validated when each item's "editorExit" handler is fired as well as when the entire form is submitted or validated.
 void setValidationURL(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(String fieldName, boolean value)
          Set the value for some field.
 void setValue(String fieldName, DataClass value)
          Set the value for some field.
 void setValue(String fieldName, DataClass[] value)
          Set the value for some field.
 void setValue(String fieldName, Date value)
          Set the value for some field.
 void setValue(String fieldName, double value)
          Set the value for some field.
 void setValue(String fieldName, int[] value)
          Set the value for some field.
 void setValue(String fieldName, JavaScriptObject value)
          Set the value for some field.
 void setValue(String fieldName, Map value)
          Set the value for some field.
 void setValue(String fieldName, Record value)
          Set the value for some field.
 void setValue(String fieldName, Record[] value)
          Set the value for some field.
 void setValue(String fieldName, RelativeDate value)
          Set the value for some field.
 void setValue(String fieldName, String value)
          Sets the value for some field
 void setValue(String fieldName, String[] value)
          Set the value for some field.
 void setValues(Map values)
          et the values for this DynamicForm.
 void setValuesAsCriteria(Criterion criteria)
          This method will display the specified criteria in this form for editing.
 void setValuesManager(ValuesManager valuesManager)
          If set at init time, this dynamicForm will be created as a member form for the specified valuesManager.
 void setWrapItemTitles(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(String fieldName)
          If this form has any outstanding validation errors for the field passed in, show them now.
 void showItem(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.
 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.
 boolean valuesAreValid(boolean validateHiddenFields)
          Method to determine whether the current form values would pass validation.
 Boolean valuesHaveChanged()
          Compares the current set of values with the values stored by the call to the DynamicForm.rememberValues method.
 
Methods inherited from class com.smartgwt.client.widgets.Canvas
addChild, 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, addMovedHandler, addParentMovedHandler, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addScrolledHandler, addShowContextMenuHandler, addStyleName, addVisibilityChangedHandler, 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, deparent, depeer, disable, enable, focus, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaRole, getAttribute, getAutoDraw, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getCanAcceptDrop, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanHover, getCanSelectText, getCanvasItem, getChildren, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getClassName, getContents, getContextMenu, getCursor, getDataPath, getDefaultHeight, getDefaultWidth, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragType, getDropTypes, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFullDataPath, getGroupTitle, getHeight, getHeightAsString, getHoverAlign, getHoverAutoDestroy, getHoverComponent, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlPosition, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getKeepInParentRect, getLayoutAlign, getLeft, getLeftAsString, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getMargin, getMasterElement, getMatchElement, getMaxHeight, getMaxWidth, getMenuConstructor, getMinHeight, getMinWidth, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOverflow, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getParentElement, getParentElements, getPeers, getPercentBox, getPercentSource, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintHTML, getPrompt, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowDepth, getShadowImage, getShadowOffset, getShadowSoftness, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowResizeBar, getShowShadow, getSkinImgDir, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapResizeToGrid, getSnapTo, getSnapToGrid, getSnapVDirection, getSnapVGap, getStyleName, getTabIndex, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getUseBackMask, getUseOpacityFilter, 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, onAttach, onDetach, parentResized, printComponents, redraw, redraw, removeChild, removeChild, removePeer, removePeer, resizeBy, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAlign, setAllowExternalFilters, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAutoDraw, setAutoHeight, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanHover, setCanSelectText, setCanvasItem, setChildren, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setContents, setContextMenu, setCursor, setDataPath, setDefaultHeight, setDefaultProperties, setDefaultWidth, setDisabled, setDisabledCursor, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setExtraSpace, setFacetId, setGroupTitle, setHeight, setHeight, setHeight100, setHoverAlign, setHoverAutoDestroy, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlPosition, setImage, setImage, setIsGroup, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeft, setLeft, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLogicalStructure, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMenuConstructor, setMinHeight, setMinWidth, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNeverUseFilters, setNoDoubleClicks, setOpacity, setOverflow, setPadding, setPageLeft, setPageTop, setParentElement, setPeers, setPercentBox, setPercentSource, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrompt, setRect, setRect, setRedrawOnResize, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setScrollbarSize, setShadowDepth, setShadowImage, setShadowOffset, setShadowSoftness, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowResizeBar, setShowShadow, setSkinImgDir, setSmoothFade, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToGrid, setSnapTo, setSnapToGrid, setSnapVDirection, setSnapVGap, setStyleName, setTabIndex, setTitle, setTooltip, setTop, setTop, setUseBackMask, setUseOpacityFilter, setVisibility, setVisible, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showClickMask, showNextTo, showNextTo, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, updateHover, updateHover, updateShadow, visibleAtPoint, willAcceptDrop
 
Methods inherited from class com.smartgwt.client.widgets.BaseWidget
addDrawHandler, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, fireEvent, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getElement, getElement, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hashCode, initNativeObject, isConfigOnly, isCreated, onDestroy, onDraw, setAttribute, 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, setLogicalStructure, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setScClassName, toString
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, 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
 

Constructor Detail

DynamicForm

public DynamicForm()

DynamicForm

public DynamicForm(JavaScriptObject jsObj)
Method Detail

getOrCreateRef

public static DynamicForm getOrCreateRef(JavaScriptObject jsObj)

setJavaScriptObject

public void setJavaScriptObject(JavaScriptObject jsObj)
Overrides:
setJavaScriptObject in class Canvas

create

protected JavaScriptObject create()
Overrides:
create in class Canvas

setAction

public void setAction(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.

If this method is called after the component has been drawn/initialized: Sets the action for this form.

Parameters:
action - New action URL. See String. Default value is "#"
See Also:
RPCManager, Submitting overview and related methods

getAction

public 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:
. See String
See Also:
RPCManager, Submitting overview and related methods

setAllowExpressions

public void setAllowExpressions(Boolean allowExpressions)
For a form that produces filter criteria (see form.getValuesAsCriteria()), allows the user to enter simple expressions in any field in this form that takes text input.

See allowExpressions for details.

Parameters:
allowExpressions - allowExpressions Default value is null

getAllowExpressions

public Boolean getAllowExpressions()
For a form that produces filter criteria (see form.getValuesAsCriteria()), allows the user to enter simple expressions in any field in this form that takes text input.

See allowExpressions for details.

Returns:
Boolean

setAutoFocus

public void setAutoFocus(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
See Also:
focusInItem(int), Focus overview and related methods

getAutoFocus

public 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
See Also:
focusInItem(int), Focus overview and related methods

setBrowserSpellCheck

public void setBrowserSpellCheck(Boolean browserSpellCheck)
If this browser has a 'spellCheck' feature for text-based form item elements, should it be used for items in this form? Can be overridden at the item level via browserSpellCheck

Notes:
- this property only applies to text based items such as TextItem and TextAreaItem.
- this property is not supported on all browsers.

Parameters:
browserSpellCheck - browserSpellCheck Default value is true
See Also:
FormItem.setBrowserSpellCheck(java.lang.Boolean)

getBrowserSpellCheck

public Boolean getBrowserSpellCheck()
If this browser has a 'spellCheck' feature for text-based form item elements, should it be used for items in this form? Can be overridden at the item level via browserSpellCheck

Notes:
- this property only applies to text based items such as TextItem and TextAreaItem.
- this property is not supported on all browsers.

Returns:
Boolean
See Also:
FormItem.getBrowserSpellCheck()

setCancelParamName

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

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

getCancelParamName

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

Returns:
. See String

setCancelParamValue

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

Parameters:
cancelParamValue - . See String. Default value is "cancel"

getCancelParamValue

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

Returns:
. See String

setCanEdit

public void setCanEdit(Boolean canEdit)
If set to false, the form will be marked read-only. A widget on the form is editable if either (1) beginning with the widget and continuing up the containment hierarchy, including the form, the first widget to have a non-null canEdit attribute has canEdit:true, or (2) neither the widget nor any parent has a non-null canEdit attribute. This setting allows you to enable or disable the default editability of the form's components at one time.

This setting differs from the enabled/disabled state in that most form items will allow copying of the contents while read-only but do not while disabled.

Note that a form is considered editable if canEdit is null (default) or true.

If this method is called after the component has been drawn/initialized: Is this form editable or read-only? Setting the form to non-editable causes all form items to render as read-only unless a form item is specifically marked as editable (the item's canEdit attribute is true).

Note : This is an advanced setting

Parameters:
canEdit - Can this form be edited?. Default value is null

getCanEdit

public Boolean getCanEdit()
If set to false, the form will be marked read-only. A widget on the form is editable if either (1) beginning with the widget and continuing up the containment hierarchy, including the form, the first widget to have a non-null canEdit attribute has canEdit:true, or (2) neither the widget nor any parent has a non-null canEdit attribute. This setting allows you to enable or disable the default editability of the form's components at one time.

This setting differs from the enabled/disabled state in that most form items will allow copying of the contents while read-only but do not while disabled.

Note that a form is considered editable if canEdit is null (default) or true.

Returns:
Boolean

setCanEditFieldAttribute

public void setCanEditFieldAttribute(String canEditFieldAttribute)
                              throws IllegalStateException
If this component is bound to a dataSource, this attribute may be specified to customize what fields from the dataSource may be edited by default. For example the SearchForm class has this attribute set to "canFilter" which allows search forms to edit dataSource fields marked as canEdit:false (but not those marked as canFilter:false).

Note that if canEdit is explicitly specified on a field in the fields array, that property will be respected in preference to the canEditAttribute value. (See canEdit, canEdit). Also note that individual dataBoundComponents may have additional logic around whether a field can be edited - for example ListGrid.canEditCell may be overridden.

Note : This is an advanced setting

Parameters:
canEditFieldAttribute - . See String. Default value is "canEdit"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getCanEditFieldAttribute

public String getCanEditFieldAttribute()
If this component is bound to a dataSource, this attribute may be specified to customize what fields from the dataSource may be edited by default. For example the SearchForm class has this attribute set to "canFilter" which allows search forms to edit dataSource fields marked as canEdit:false (but not those marked as canFilter:false).

Note that if canEdit is explicitly specified on a field in the fields array, that property will be respected in preference to the canEditAttribute value. (See canEdit, canEdit). Also note that individual dataBoundComponents may have additional logic around whether a field can be edited - for example ListGrid.canEditCell may be overridden.

Returns:
. See String

setCanFocus

public void setCanFocus(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 receive focus. This property will only govern whether the form may receive 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
See Also:
Focus overview and related methods

getCanFocus

public 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 receive focus. This property will only govern whether the form may receive focus if the form contains no focusable items.

Overrides:
getCanFocus in class Canvas
Returns:
Boolean
See Also:
Focus overview and related methods

setCanSubmit

public void setCanSubmit(Boolean canSubmit)
Governs whether this form will be used to perform a standard HTML form submission. Note that if true, DynamicForm.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
See Also:
Submitting overview and related methods

getCanSubmit

public Boolean getCanSubmit()
Governs whether this form will be used to perform a standard HTML form submission. Note that if true, DynamicForm.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
See Also:
Submitting overview and related methods

setCanTabToSectionHeaders

public void setCanTabToSectionHeaders(Boolean canTabToSectionHeaders)
                               throws IllegalStateException
If true, the headers for any SectionItems will be included in the page's tab order for accessibility. May also be set at the item level via canTabToHeader

If unset, section headers will be focusable if setScreenReaderMode has been called. See Accessibility.

Note : This is an advanced setting

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

getCanTabToSectionHeaders

public Boolean getCanTabToSectionHeaders()
If true, the headers for any SectionItems will be included in the page's tab order for accessibility. May also be set at the item level via canTabToHeader

If unset, section headers will be focusable if setScreenReaderMode has been called. See Accessibility.

Returns:
Boolean

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
See Also:
FormLayout overview and related methods

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
See Also:
FormLayout overview and related methods

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
See Also:
FormLayout overview and related methods

getCellPadding

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

Returns:
int
See Also:
FormLayout overview and related methods

setDataFetchMode

public void setDataFetchMode(FetchMode dataFetchMode)
How to fetch and manage records retrieve from the server. See FetchMode.

This setting only applies to the ResultSet automatically created by calling DynamicForm.fetchData. If a pre-existing ResultSet is passed to setData() instead, it's existing setting for fetchMode applies.

Specified by:
setDataFetchMode in interface DataBoundComponent
Parameters:
dataFetchMode - dataFetchMode Default value is "paged"
See Also:
Databinding overview and related methods

getDataFetchMode

public FetchMode getDataFetchMode()
How to fetch and manage records retrieve from the server. See FetchMode.

This setting only applies to the ResultSet automatically created by calling DynamicForm.fetchData. If a pre-existing ResultSet is passed to setData() instead, it's existing setting for fetchMode applies.

Specified by:
getDataFetchMode in interface DataBoundComponent
Returns:
FetchMode
See Also:
Databinding overview and related methods

setDateFormatter

public void setDateFormatter(DateDisplayFormat dateFormatter)
Default DateDisplayFormat for Date type values displayed in this form.

If some field's value is set to a native Date object, how should it be displayed to the user? If specified this is the default display format to use, and will apply to all fields except those specified as type:"time" (See timeFormatter).

May be overridden at the component level for fields of type datetime via datetimeFormatter.

Note that if specified, dateFormatter and timeFormatter take precedence over the format specified at the component level.

If no explicit formatter is specified at the field or component level, dates will be formatted according to the system-wide short date display format or short datetime display format depending on the specified field type.

Parameters:
dateFormatter - dateFormatter Default value is null

getDateFormatter

public DateDisplayFormat getDateFormatter()
Default DateDisplayFormat for Date type values displayed in this form.

If some field's value is set to a native Date object, how should it be displayed to the user? If specified this is the default display format to use, and will apply to all fields except those specified as type:"time" (See timeFormatter).

May be overridden at the component level for fields of type datetime via datetimeFormatter.

Note that if specified, dateFormatter and timeFormatter take precedence over the format specified at the component level.

If no explicit formatter is specified at the field or component level, dates will be formatted according to the system-wide short date display format or short datetime display format depending on the specified field type.

Returns:
DateDisplayFormat

setDatetimeFormatter

public void setDatetimeFormatter(DateDisplayFormat datetimeFormatter)
Default DateDisplayFormat for Date type values displayed in this form in fields of type datetime.

For datetime fields, this attribute will be used instead of dateFormatter when formatting Date values.

Note that if specified, dateFormatter and timeFormatter take precedence over the format specified at the component level.

If no explicit formatter is specified at the field or component level, datetime field values will be formatted according to the system-wide short datetime display format.

Parameters:
datetimeFormatter - datetimeFormatter Default value is null

getDatetimeFormatter

public DateDisplayFormat getDatetimeFormatter()
Default DateDisplayFormat for Date type values displayed in this form in fields of type datetime.

For datetime fields, this attribute will be used instead of dateFormatter when formatting Date values.

Note that if specified, dateFormatter and timeFormatter take precedence over the format specified at the component level.

If no explicit formatter is specified at the field or component level, datetime field values will be formatted according to the system-wide short datetime display format.

Returns:
DateDisplayFormat

setDisableValidation

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

Parameters:
disableValidation - disableValidation Default value is null
See Also:
saveData(), submit(), Validation overview and related methods

getDisableValidation

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

Returns:
Boolean
See Also:
saveData(), submit(), Validation overview and related methods

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
See Also:
Submitting overview and related methods

getEncoding

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

Returns:
Encoding
See Also:
Submitting overview and related methods

setErrorItemCellStyle

public void setErrorItemCellStyle(String errorItemCellStyle)
                           throws 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 - . See String. Default value is "formCellError"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Validation overview and related methods

getErrorItemCellStyle

public 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:
. See String
See Also:
Validation overview and related methods

setErrorsPreamble

public void setErrorsPreamble(String errorsPreamble)
                       throws 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 - . See HTMLString. Default value is "The following errors were found"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Validation overview and related methods

getErrorsPreamble

public 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:
. See HTMLString
See Also:
Validation overview and related methods

setFixedColWidths

public void setFixedColWidths(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
See Also:
FormLayout overview and related methods

getFixedColWidths

public 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
See Also:
FormLayout overview and related methods

setFormSubmitFailedWarning

public void setFormSubmitFailedWarning(String formSubmitFailedWarning)
Warning to display to the user if an attempt to natively submit a form is unable to submit to the server. The most common cause for this failure is that the user has typed an invalid file-path into an upload type field.

Note : This is an advanced setting

Parameters:
formSubmitFailedWarning - . See String. Default value is "Form was unable to be submitted. The most likely cause for this is an invalid value in an upload field."

getFormSubmitFailedWarning

public String getFormSubmitFailedWarning()
Warning to display to the user if an attempt to natively submit a form is unable to submit to the server. The most common cause for this failure is that the user has typed an invalid file-path into an upload type field.

Returns:
. See String

setHiliteRequiredFields

public void setHiliteRequiredFields(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
See Also:
FormTitles overview and related methods

getHiliteRequiredFields

public 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
See Also:
FormTitles overview and related methods

setImplicitSave

public void setImplicitSave(Boolean implicitSave)
When true, indicates that changes to items in this form will be automatically saved on a delay, as well as when the entire form is submitted. Unless form.implicitSaveOnBlur is set to false, changes will also be automatically saved on editorExit for each item. This attribute can also be set directly on FormItems.

Parameters:
implicitSave - implicitSave Default value is false

getImplicitSave

public Boolean getImplicitSave()
When true, indicates that changes to items in this form will be automatically saved on a delay, as well as when the entire form is submitted. Unless form.implicitSaveOnBlur is set to false, changes will also be automatically saved on editorExit for each item. This attribute can also be set directly on FormItems.

Returns:
Boolean

setImplicitSaveDelay

public void setImplicitSaveDelay(int implicitSaveDelay)
When implicitSave is true, this attribute dictates the millisecond delay after which form items are automatically saved during editing.

Parameters:
implicitSaveDelay - implicitSaveDelay Default value is 2000

getImplicitSaveDelay

public int getImplicitSaveDelay()
When implicitSave is true, this attribute dictates the millisecond delay after which form items are automatically saved during editing.

Returns:
int

setImplicitSaveOnBlur

public void setImplicitSaveOnBlur(Boolean implicitSaveOnBlur)
If true, form item values will be automatically saved when each item's "editorExit" handler is fired as well as on a delay and when the entire form is submitted. This attribute can also be set directly on FormItems.

Parameters:
implicitSaveOnBlur - implicitSaveOnBlur Default value is false

getImplicitSaveOnBlur

public Boolean getImplicitSaveOnBlur()
If true, form item values will be automatically saved when each item's "editorExit" handler is fired as well as on a delay and when the entire form is submitted. This attribute can also be set directly on FormItems.

Returns:
Boolean

setItemHoverAlign

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

Parameters:
itemHoverAlign - itemHoverAlign Default value is null
See Also:
FormItem.setHoverAlign(com.smartgwt.client.types.Alignment)

getItemHoverAlign

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

Returns:
Alignment
See Also:
FormItem.getHoverAlign()

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
See Also:
FormItem.setHoverDelay(java.lang.Integer)

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
See Also:
FormItem.getHoverDelay()

setItemHoverHeight

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

Parameters:
itemHoverHeight - itemHoverHeight Default value is null
See Also:
FormItem.setHoverHeight(java.lang.Integer)

getItemHoverHeight

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

Returns:
Integer
See Also:
FormItem.getHoverHeight()

setItemHoverOpacity

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

Parameters:
itemHoverOpacity - itemHoverOpacity Default value is null
See Also:
FormItem.setHoverOpacity(java.lang.Integer)

getItemHoverOpacity

public Integer getItemHoverOpacity()
Opacity for hovers shown for items

Returns:
Integer
See Also:
FormItem.getHoverOpacity()

setItemHoverStyle

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

Parameters:
itemHoverStyle - . See CSSStyleName. Default value is "formHover"
See Also:
FormItem.setHoverStyle(java.lang.String)

getItemHoverStyle

public String getItemHoverStyle()
CSS Style for hovers shown for items

Returns:
. See CSSStyleName
See Also:
FormItem.getHoverStyle()

setItemHoverVAlign

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

Parameters:
itemHoverVAlign - itemHoverVAlign Default value is null
See Also:
FormItem.setHoverVAlign(com.smartgwt.client.types.VerticalAlignment)

getItemHoverVAlign

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

Returns:
Integer
See Also:
FormItem.getHoverVAlign()

setItemHoverWidth

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

Parameters:
itemHoverWidth - itemHoverWidth Default value is null
See Also:
FormItem.setHoverWidth(java.lang.Integer), Hovers Example

getItemHoverWidth

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

Returns:
Integer
See Also:
FormItem.getHoverWidth(), Hovers Example

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"
See Also:
FormLayout overview and related methods

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
See Also:
FormLayout overview and related methods

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
See Also:
Appearance overview and related methods

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
See Also:
Appearance overview and related methods

setLongTextEditorType

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

Parameters:
longTextEditorType - . See String. Default value is "textArea"
See Also:
Appearance overview and related methods

getLongTextEditorType

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

Returns:
. See String
See Also:
Appearance overview and related methods

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.

If this method is called after the component has been drawn/initialized: Sets the method for this form.

Parameters:
method - html form submission method (get or post). Default value is DynamicForm.POST
See Also:
Submitting overview and related methods

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
See Also:
Submitting overview and related methods

setMinColWidth

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

Parameters:
minColWidth - minColWidth Default value is 20
See Also:
FormLayout overview and related methods

getMinColWidth

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

Returns:
int
See Also:
FormLayout overview and related methods

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
See Also:
FormLayout overview and related methods

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
See Also:
FormLayout overview and related methods

setRejectInvalidValueOnChange

public void setRejectInvalidValueOnChange(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 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

setRequiredMessage

public void setRequiredMessage(String requiredMessage)
The required message for required field errors.

Parameters:
requiredMessage - . See HTMLString. Default value is null
See Also:
FormTitles overview and related methods

getRequiredMessage

public String getRequiredMessage()
The required message for required field errors.

Returns:
. See HTMLString
See Also:
FormTitles overview and related methods

setRequiredRightTitlePrefix

public void setRequiredRightTitlePrefix(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 - . See HTMLString. Default value is ": "
See Also:
FormTitles overview and related methods

getRequiredRightTitlePrefix

public 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:
. See HTMLString
See Also:
FormTitles overview and related methods

setRequiredRightTitleSuffix

public void setRequiredRightTitleSuffix(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 - . See HTMLString. Default value is ""
See Also:
FormTitles overview and related methods

getRequiredRightTitleSuffix

public 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:
. See HTMLString
See Also:
FormTitles overview and related methods

setRequiredTitlePrefix

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

Parameters:
requiredTitlePrefix - . See HTMLString. Default value is ""
See Also:
FormTitles overview and related methods

getRequiredTitlePrefix

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

Returns:
. See HTMLString
See Also:
FormTitles overview and related methods

setRequiredTitleSuffix

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

Parameters:
requiredTitleSuffix - . See HTMLString. Default value is " :"
See Also:
FormTitles overview and related methods

getRequiredTitleSuffix

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

Returns:
. See HTMLString
See Also:
FormTitles overview and related methods

setRightTitlePrefix

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

Parameters:
rightTitlePrefix - . See HTMLString. Default value is ": "
See Also:
FormTitles overview and related methods

getRightTitlePrefix

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

Returns:
. See HTMLString
See Also:
FormTitles overview and related methods

setRightTitleSuffix

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

Parameters:
rightTitleSuffix - . See HTMLString. Default value is ""
See Also:
FormTitles overview and related methods

getRightTitleSuffix

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

Returns:
. See HTMLString
See Also:
FormTitles overview and related methods

setSaveOnEnter

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

Parameters:
saveOnEnter - saveOnEnter Default value is false
See Also:
Submitting overview and related methods

getSaveOnEnter

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

Returns:
Boolean
See Also:
Submitting overview and related methods

setSaveOperationType

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

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.

If this method is called after the component has been drawn/initialized: Setter for the default DSOperationType when DynamicForm.saveData is called. Note that this property can also be set by calling DynamicForm.editRecord or DynamicForm.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 DynamicForm.saveData is called. This property is automatically set on a call to DynamicForm.editRecord or DynamicForm.editNewRecord, or may be set directly via DynamicForm.setSaveOperationType.

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 DynamicForm.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. This attribute is automatically set via calls to data binding methods such as DynamicForm.editNewRecord, or it may be set explicitly.

If no explicit saveOperationType is specified for this form, the system will look at the current values for the form. If the form has no value for the primaryKey field, or that field is editable and has been modified we assume an add operation, otherwise an update. If the form is a member of a ValuesManager, the primary key field value will be derived from the valuesManager's values object.


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"
See Also:
VisibilityMode, SectionItem, FormLayout overview and related methods

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
See Also:
VisibilityMode, SectionItem, FormLayout overview and related methods

setSelectOnFocus

public void setSelectOnFocus(Boolean selectOnFocus)
If this property is set to true, whenever a text-based field in this form (TextItem, TextAreaItem) is given focus programmatically (see DynamicForm.focusInItem), 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 Smart GWT preserves these behaviors. selectOnFocus is 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
See Also:
Focus overview and related methods

getSelectOnFocus

public Boolean getSelectOnFocus()
If this property is set to true, whenever a text-based field in this form (TextItem, TextAreaItem) is given focus programmatically (see DynamicForm.focusInItem), 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 Smart GWT preserves these behaviors. selectOnFocus is 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
See Also:
Focus overview and related methods

setShowComplexFieldsRecursively

public void setShowComplexFieldsRecursively(Boolean showComplexFieldsRecursively)
                                     throws 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:
IllegalStateException - this property cannot be changed after the component has been created

getShowComplexFieldsRecursively

public 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

setShowDetailFields

public void setShowDetailFields(Boolean showDetailFields)
                         throws IllegalStateException
For databound forms, whether to show fields marked as detail fields.

Specified by:
setShowDetailFields in interface DataBoundComponent
Parameters:
showDetailFields - showDetailFields Default value is true
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getShowDetailFields

public Boolean getShowDetailFields()
For databound forms, whether to show fields marked as detail fields.

Specified by:
getShowDetailFields in interface DataBoundComponent
Returns:
Boolean

setShowErrorIcons

public void setShowErrorIcons(Boolean showErrorIcons)
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error). To instead display all errors at the top of the form, set showInlineErrors:false.

showErrorIcons, showErrorText and showErrorStyle are all boolean properties, 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 FormItem.getErrorHTML. The default implementation 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 FormItemBaseStyle for a discussion for how error styling is calculated.

Parameters:
showErrorIcons - showErrorIcons Default value is true
See Also:
Validation overview and related methods

getShowErrorIcons

public Boolean getShowErrorIcons()
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error). To instead display all errors at the top of the form, set showInlineErrors:false.

showErrorIcons, showErrorText and showErrorStyle are all boolean properties, 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 FormItem.getErrorHTML. The default implementation 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 FormItemBaseStyle for a discussion for how error styling is calculated.

Returns:
Boolean
See Also:
Validation overview and related methods

setShowErrorStyle

public void setShowErrorStyle(Boolean showErrorStyle)
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error). To instead display all errors at the top of the form, set showInlineErrors:false.

showErrorIcons, showErrorText and showErrorStyle are all boolean properties, 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 FormItem.getErrorHTML. The default implementation 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 FormItemBaseStyle for a discussion for how error styling is calculated.

Parameters:
showErrorStyle - showErrorStyle Default value is true
See Also:
Validation overview and related methods

getShowErrorStyle

public Boolean getShowErrorStyle()
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error). To instead display all errors at the top of the form, set showInlineErrors:false.

showErrorIcons, showErrorText and showErrorStyle are all boolean properties, 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 FormItem.getErrorHTML. The default implementation 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 FormItemBaseStyle for a discussion for how error styling is calculated.

Returns:
Boolean
See Also:
Validation overview and related methods

setShowErrorText

public void setShowErrorText(Boolean showErrorText)
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error). To instead display all errors at the top of the form, set showInlineErrors:false.

showErrorIcons, showErrorText and showErrorStyle are all boolean properties, 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 FormItem.getErrorHTML. The default implementation 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 FormItemBaseStyle for a discussion for how error styling is calculated.

Parameters:
showErrorText - showErrorText Default value is false
See Also:
Validation overview and related methods

getShowErrorText

public Boolean getShowErrorText()
showErrorIcons, showErrorText, and showErrorStyle control how validation errors are displayed when they are displayed inline in the form (next to the form item where there is a validation error). To instead display all errors at the top of the form, set showInlineErrors:false.

showErrorIcons, showErrorText and showErrorStyle are all boolean properties, 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 FormItem.getErrorHTML. The default implementation 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 FormItemBaseStyle for a discussion for how error styling is calculated.

Returns:
Boolean
See Also:
Validation overview and related methods

setShowInlineErrors

public void setShowInlineErrors(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 DynamicForm.showErrors.

Parameters:
showInlineErrors - showInlineErrors Default value is true
See Also:
Validation overview and related methods

getShowInlineErrors

public 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 DynamicForm.showErrors.

Returns:
Boolean
See Also:
Validation overview and related methods

setShowTitlesWithErrorMessages

public void setShowTitlesWithErrorMessages(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
See Also:
Validation overview and related methods

getShowTitlesWithErrorMessages

public 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
See Also:
Validation overview and related methods

setStopOnError

public void setStopOnError(Boolean stopOnError)
                    throws IllegalStateException
Indicates that if validation fails, the user should not be allowed to exit the field - focus will be forced back into the field until the error is corrected.

Enabling this property also implies validateOnExit is automatically enabled. If there are server-based validators on this item, setting this property also implies that synchronousValidation is forced on.

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

getStopOnError

public Boolean getStopOnError()
Indicates that if validation fails, the user should not be allowed to exit the field - focus will be forced back into the field until the error is corrected.

Enabling this property also implies validateOnExit is automatically enabled. If there are server-based validators on this item, setting this property also implies that synchronousValidation is forced on.

Returns:
Boolean

setSuppressValidationErrorCallback

public void setSuppressValidationErrorCallback(Boolean suppressValidationErrorCallback)
When calling DynamicForm.saveData on a form or valuesManager, by default if the server returns an error code, any callback passed into saveData() will not be fired. If the error code returned by the server indicates a validation error, it will be displayed to the user by updating the form items to show the error messages, and firing any specified hiddenValidationErrors handler, otherwise the standard RPCManager error handling logic would be invoked.

Developers who want to handle errors themselves can override this default by specifying willHandleError on the DSRequest. In this case the callback passed in will be fired even if the server returns an error status code.

If suppressValidationErrorCallback is set to true, if a save attempt returns a validation error code, the user-specified callback will not be fired even if willHandleError:true was specified on the dsRequest - though for other error codes, the callback would be fired if willHandle error is specified on the request. Note that this is the historical behavior for Smart GWT builds 8.0 and earlier SmartGWT builds 4.0 and earlier

Note : This is an advanced setting

Parameters:
suppressValidationErrorCallback - suppressValidationErrorCallback Default value is false

getSuppressValidationErrorCallback

public Boolean getSuppressValidationErrorCallback()
When calling DynamicForm.saveData on a form or valuesManager, by default if the server returns an error code, any callback passed into saveData() will not be fired. If the error code returned by the server indicates a validation error, it will be displayed to the user by updating the form items to show the error messages, and firing any specified hiddenValidationErrors handler, otherwise the standard RPCManager error handling logic would be invoked.

Developers who want to handle errors themselves can override this default by specifying willHandleError on the DSRequest. In this case the callback passed in will be fired even if the server returns an error status code.

If suppressValidationErrorCallback is set to true, if a save attempt returns a validation error code, the user-specified callback will not be fired even if willHandleError:true was specified on the dsRequest - though for other error codes, the callback would be fired if willHandle error is specified on the request. Note that this is the historical behavior for Smart GWT builds 8.0 and earlier SmartGWT builds 4.0 and earlier

Returns:
Boolean

setSynchronousValidation

public void setSynchronousValidation(Boolean synchronousValidation)
                              throws IllegalStateException
If enabled, whenever validation is triggered and a request to the server is required, user interactivity will be blocked until the request returns. Can be set for the entire form or individual FormItems.

If false, the form will try to avoid blocking user interaction until it is strictly required. That is until the user attempts to use a FormItem whose state could be affected by a server request that has not yet returned.

Parameters:
synchronousValidation - synchronousValidation Default value is false
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getSynchronousValidation

public Boolean getSynchronousValidation()
If enabled, whenever validation is triggered and a request to the server is required, user interactivity will be blocked until the request returns. Can be set for the entire form or individual FormItems.

If false, the form will try to avoid blocking user interaction until it is strictly required. That is until the user attempts to use a FormItem whose state could be affected by a server request that has not yet returned.

Returns:
Boolean

setTarget

public void setTarget(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.

If this method is called after the component has been drawn/initialized: Sets the target for this form.

Note : This is an advanced setting

Parameters:
target - New submission target. See String. Default value is null
See Also:
Submitting overview and related methods

getTarget

public 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:
. See String
See Also:
Submitting overview and related methods

setTimeFormatter

public void setTimeFormatter(TimeDisplayFormat timeFormatter)
Default TimeDisplayFormat for type:"time" field values displayed in this form.

Note that if specified, dateFormatter and timeFormatter take precedence over the format specified at the component level.

If no explicit formatter is specified at the field or component level, time values will be formatted according to the system-wide String. specified field type.

Parameters:
timeFormatter - timeFormatter Default value is null

getTimeFormatter

public TimeDisplayFormat getTimeFormatter()
Default TimeDisplayFormat for type:"time" field values displayed in this form.

Note that if specified, dateFormatter and timeFormatter take precedence over the format specified at the component level.

If no explicit formatter is specified at the field or component level, time values will be formatted according to the system-wide String. specified field type.

Returns:
TimeDisplayFormat

setTitleAlign

public void setTitleAlign(Alignment titleAlign)
Default alignment for item titles. If unset default alignment will be derived from text direction as described in DynamicForm.getTitleAlign

Parameters:
titleAlign - titleAlign Default value is null

getTitleAlign

public Alignment getTitleAlign()
Default alignment for item titles. If unset default alignment will be derived from text direction as described in DynamicForm.getTitleAlign

Returns:
Get the alignment for the title for some item. Default implementation is as follows:
  • If titleAlign is specified, it will be respected
  • Otherwise if this.titleAlign is set, it will be respected
  • Otherwise titles will be aligned according to text direction, with this method returning "right" if text direction is LTR, or "left" if text direction is RTL.

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.

If this method is called after the component has been drawn/initialized: Modify this form's TitleOrientation at runtime

Parameters:
titleOrientation - new default item titleOrientation. Default value is "left"
See Also:
FormTitles overview and related methods, Titles Example

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.
See Also:
FormTitles overview and related methods, Titles Example

setTitlePrefix

public void setTitlePrefix(String titlePrefix)
The string prepended to the title of every item in this form. See also +{requiredTitlePrefix} for fields that are required.

Parameters:
titlePrefix - . See HTMLString. Default value is ""
See Also:
FormTitles overview and related methods

getTitlePrefix

public String getTitlePrefix()
The string prepended to the title of every item in this form. See also +{requiredTitlePrefix} for fields that are required.

Returns:
. See HTMLString
See Also:
FormTitles overview and related methods

setTitleSuffix

public void setTitleSuffix(String titleSuffix)
The string appended to the title of every item in this form. See also +{requiredTitleSuffix} for fields that are required.

Parameters:
titleSuffix - . See HTMLString. Default value is " :"
See Also:
FormTitles overview and related methods

getTitleSuffix

public String getTitleSuffix()
The string appended to the title of every item in this form. See also +{requiredTitleSuffix} for fields that are required.

Returns:
. See HTMLString
See Also:
FormTitles overview and related methods

setUnknownErrorMessage

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

Parameters:
unknownErrorMessage - . See HTMLString. Default value is "Invalid value"
See Also:
Validation overview and related methods

getUnknownErrorMessage

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

Returns:
. See HTMLString
See Also:
Validation overview and related methods

setUserTask

public void setUserTask(UserTask userTask)
                 throws IllegalStateException
Associated userTask if current dynamic form used along with workflow. See userTask for more details.

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

getUserTask

public UserTask getUserTask()
Associated userTask if current dynamic form used along with workflow. See userTask for more details.

Returns:
UserTask

setValidateOnChange

public void setValidateOnChange(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 or on each validator to enable finer granularity validation in response to user interaction. If true at the form or field level, validators not explicitly set with validateOnChange:false will be fired on change - displaying errors and rejecting the change on validation failure.

Parameters:
validateOnChange - validateOnChange Default value is false
See Also:
FormItem.setValidateOnChange(java.lang.Boolean), Validation overview and related methods

getValidateOnChange

public 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 or on each validator to enable finer granularity validation in response to user interaction. If true at the form or field level, validators not explicitly set with validateOnChange:false will be fired on change - displaying errors and rejecting the change on validation failure.

Returns:
Boolean
See Also:
FormItem.getValidateOnChange(), Validation overview and related methods

setValidateOnExit

public void setValidateOnExit(Boolean validateOnExit)
If true, form items will be validated when each item's "editorExit" 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 editorExit.

Parameters:
validateOnExit - validateOnExit Default value is false
See Also:
FormItem.setValidateOnExit(java.lang.Boolean)

getValidateOnExit

public Boolean getValidateOnExit()
If true, form items will be validated when each item's "editorExit" 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 editorExit.

Returns:
Boolean
See Also:
FormItem.getValidateOnExit()

setValidationURL

public void setValidationURL(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 DynamicForm.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 - . See String. Default value is null
See Also:
saveData(), submit(), Validation overview and related methods

getValidationURL

public 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 DynamicForm.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:
. See String
See Also:
saveData(), submit(), Validation overview and related methods

setWrapItemTitles

public void setWrapItemTitles(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
See Also:
FormTitles overview and related methods

getWrapItemTitles

public 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
See Also:
FormTitles overview and related methods

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
See Also:
cancelEditing(), Submitting overview and related methods

cancelEditing

public void cancelEditing()
If the form or valuesManager has associated userTask workflow task than notify it about cancelling the changes.


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.

clearFieldErrors

public void clearFieldErrors(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 DynamicForm.showFieldErrors to update the display

clearValue

public void clearValue(String fieldName)
Clears the value for some field via a call to 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. A DataPath may be used for clearing details of nested data structures.

clearValues

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


completeEditing

public void completeEditing()
Finish editing and store edited values in process state.


addFormSubmitFailedHandler

public HandlerRegistration addFormSubmitFailedHandler(FormSubmitFailedHandler handler)
Add a formSubmitFailed handler.

Method called when an attempt to natively submit a form is unable to submit to the server. Default behavior is to display the formSubmitFailedWarning in a warning dialog. The most common cause for this failure is that the user has typed an invalid file-path into an upload type field.

Specified by:
addFormSubmitFailedHandler in interface HasFormSubmitFailedHandlers
Parameters:
handler - the formSubmitFailed handler
Returns:
HandlerRegistration used to remove this handler

getEventItem

public FormItem getEventItem()
If the current mouse event occurred over an item in this dynamicForm, returns that item.

Returns:
the current event target item

getFocusItem

public FormItem getFocusItem()
Return the current focus item for this form. If this form is drawn and has focus, this is the currently focused item. If the form does not have focus or is undrawn this is the item that last had focus, or would have focus if the item were drawn/given focus. Therefore note that this method can validly return an item which doesn't currently have focus.

May be null.

Returns:
returns the item that has the focus, or null if no item is currently focused
See Also:
Focus overview and related methods

getValuesAsAdvancedCriteria

public AdvancedCriteria getValuesAsAdvancedCriteria()
Return an AdvancedCriteria object based on the current set of values within this form.

Similar to DynamicForm.getValuesAsCriteria, except the returned criteria object is guaranteed to be an AdvancedCriteria object, even if none of the form's fields has a specified operator

Returns:
a AdvancedCriteria based on the form's current values
See Also:
CriteriaEditing overview and related methods

getValuesAsAdvancedCriteria

public AdvancedCriteria getValuesAsAdvancedCriteria(TextMatchStyle textMatchStyle)
Return an AdvancedCriteria object based on the current set of values within this form.

Similar to DynamicForm.getValuesAsCriteria, except the returned criteria object is guaranteed to be an AdvancedCriteria object, even if none of the form's fields has a specified operator

Parameters:
textMatchStyle - If specified the text match style will be used to generate the appropriate operator for per field criteria.
Returns:
a AdvancedCriteria based on the form's current values
See Also:
CriteriaEditing overview and related methods

addAsyncValidationReplyHandler

public HandlerRegistration addAsyncValidationReplyHandler(AsyncValidationReplyHandler handler)
Add a asyncValidationReply handler.

Notification fired when an asynchronous validation completes.

Specified by:
addAsyncValidationReplyHandler in interface HasAsyncValidationReplyHandlers
Parameters:
handler - the asyncValidationReply handler
Returns:
HandlerRegistration used to remove this handler

addHiddenValidationErrorsHandler

public HandlerRegistration addHiddenValidationErrorsHandler(HiddenValidationErrorsHandler handler)
Add a hiddenValidationErrors handler.

Method to display validation error messages for fields that are not currently visible in this form.
This will be called when validation fails for
- a hidden field in this form
- if this form is databound, a datasource field with specified validators, for which we have no specified form item.
Implement this to provide custom validation error handling for these fields.
By default hidden validation errors will be logged as warnings in the developerConsole. Call HiddenValidationErrorsEvent.cancel() from within HiddenValidationErrorsHandler#onHiddenValidationErrors from this method to suppress that behavior.

Specified by:
addHiddenValidationErrorsHandler in interface HasHiddenValidationErrorsHandlers
Parameters:
handler - the hiddenValidationErrors handler
Returns:
HandlerRegistration used to remove this handler

hasErrors

public 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 DynamicForm.setErrors or DynamicForm.setFieldErrors.

Returns:
true == form currently has validation errors.
See Also:
Errors overview and related methods

hasFieldErrors

public Boolean hasFieldErrors(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 DynamicForm.setErrors or DynamicForm.setFieldErrors.

Parameters:
fieldName - field to test for validation errors
Returns:
true if the form has outstanding errors for the field in question.
See Also:
Errors overview and related methods

hideItem

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

Parameters:
itemName - Name of the item to show

isNewRecord

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

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

isPendingAsyncValidation

public Boolean isPendingAsyncValidation()
Is this component waiting for an asynchronous validation to complete? This method will return true after DynamicForm.validate is called on a component with server-side validators for some field(s), until the server responds.

Note that the notification method DynamicForm.handleAsyncValidationReply will be fired when validation completes.

Returns:
true if this widget has pending asynchronous validations in process

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

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

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

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 initial values at init time.


resetValues

public void resetValues()
Same as DynamicForm.reset.


setValue

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

Parameters:
fieldName - Name of the field being updated. A DataPath may be passed to set nested values
value - New value.

setValuesAsCriteria

public void setValuesAsCriteria(Criterion criteria)
This method will display the specified criteria in this form for editing. The criteria parameter may be a simple Criterion object or an AdvancedCriteria object.

For simple criteria, the specified fieldName will be used to apply criteria to form items, as with a standard setValues() call.

For AdvancedCriteria, behavior is as follows:

Parameters:
criteria - criteria to edit.

showFieldErrors

public void showFieldErrors(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 DynamicForm.setFieldErrors / DynamicForm.addFieldErrors / DynamicForm.clearFieldErrors.
Default implementation simply falls through to DynamicForm.showErrors.

Parameters:
fieldName - field to show errors for

showItem

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

Parameters:
itemName - Name of the item to show

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:


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

validate

public 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 DynamicForm.handleHiddenValidationErrors

If this form has any fields which require server-side validation (see serverCondition) this will also be initialized. Such validation will occur asynchronously. Developers can use DynamicForm.isPendingAsyncValidation and DynamicForm.handleAsyncValidationReply to detect and respond to asynchronous validation.

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.
See Also:
Validation overview and related methods, Type Example

validateData

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


valuesHaveChanged

public Boolean valuesHaveChanged()
Compares the current set of values with the values stored by the call to the DynamicForm.rememberValues method. rememberValues() runs when the form is initialized and on every call to DynamicForm.setValues. Returns true if the values have changed, and false otherwise.

Returns:
true if current values do not match remembered values
See Also:
getChangedValues(), getOldValues()

setDefaultProperties

public static void setDefaultProperties(DynamicForm dynamicFormProperties)
Class level method to set the default properties of this class. If set, then all subsequent instances of this class will automatically have the default properties that were set when this method was called. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.

Note: This method is intended for setting default attributes only and will effect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead.

Parameters:
dynamicFormProperties - properties that should be used as new defaults when instances of this class are created

onInit

protected void onInit()
Overrides:
onInit in class Canvas

onInit_DynamicForm

protected void onInit_DynamicForm()

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 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

Overrides:
setValuesManager in class Canvas
Parameters:
valuesManager - valuesManager Default value is null
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getValuesManager

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

Overrides:
getValuesManager in class Canvas
Returns:
the ValuesManager

setCellSpacing

public void setCellSpacing(int cellSpacing)
                    throws IllegalStateException
Deprecated. use setCellPadding(int) instead

Set the cellSpacing.

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

getCellSpacing

public int getCellSpacing()
Deprecated. use getCellPadding() instead

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(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 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

getChangedValues

public Map getChangedValues()
Returns all values within this DynamicForm that have changed since DynamicForm.rememberValues last ran. Note that DynamicForm.rememberValues runs on dynamicForm initialization, and with every call to DynamicForm.setValues so this will typically contain all values the user has explicitly edited since then.

Returns:
the values

getOldValues

public Map getOldValues()
Returns the set of values last stored by DynamicForm.rememberValues. Note that rememberValues() is called automatically by DynamicForm.setValues, and on form initialization, so this typically contains all values as they were before the user edited them.

Returns:
the values

setValue

public void setValue(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(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(String fieldName,
                     int[] value)
Set the value for some field.

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

setValue

public void setValue(String fieldName,
                     Date value)
Set the value for some field.

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

setValue

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

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

setValue

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

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

setValue

public void setValue(String fieldName,
                     JavaScriptObject value)
Set the value for some field.

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

setValue

public void setValue(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(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(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(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(String fieldName,
                     RelativeDate 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 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:
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(String name)

getField

public FormItem getField(String name)

getValueAsString

public String getValueAsString(String fieldName)

getValue

public Object getValue(String fieldName)

getEventItemInfo

public FormItemEventInfo getEventItemInfo(String fieldName)
If the current mouse event occurred over an item, or the title of an item in this dynamicForm, return details about where the event occurred.

Parameters:
fieldName - the field name
Returns:
the form item event info

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

If this form has any fields which require server-side validation this will also be initialized. Such validation will occur asynchronously.
Developers can use isPendingAsyncValidation() and addAsyncValidationReplyHandler(com.smartgwt.client.widgets.form.events.AsyncValidationReplyHandler) to detect and respond to asynchronous validation.

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(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)
Edit the record selected in the specified ListGrid.

Updates the values of this editor to match the selected record's values.

If this form has a dataSource, then saving via saveData() will use the "update" operation type.

Parameters:
selectionComponent - the List Grid whose currently selected record(s) is/are to be edited
See Also:
Grid-Form Update Example

editSelectedData

public void editSelectedData(String listGridID)
Edit the record selected in the specified ListGrid.

Updates the values of this editor to match the selected record's values.

If this form has a dataSource, then saving via saveData() will use the "update" operation type.

Parameters:
listGridID - the List Grid ID whose currently selected record(s) is/are to be edited
See Also:
Grid-Form Update Example

getValuesAsCriteria

public Criteria getValuesAsCriteria()
Return search criteria based on the current set of values within this form. For simple criteria, each form item simply maps its value to it's fieldName.

See FormItem.getCriterion() for details on how form items generate advanced criteria. Note that any values or criteria specified via DynamicForm.setValues() or DynamicForm.setValuesAsCriteria() which do not correspond to an item within the form will be combined with the live item values when criteria are generated.

The returned criteria object can be used to filter data via methods such as ListGrid.fetchData(), DataSource.fetchData(), or, for more advanced usage, ResultSet.setCriteria().

Note that any form field which the user has left blank is omitted as criteria, that is, a blank field is assumed to mean "allow any value for this field" and not "this field must be blank". Examples of empty values include a blank text field or SelectItem with an empty selection.

Returns:
the criteria

getValuesAsRecord

public Record getValuesAsRecord()
Return the current set of values within this form as a Record.

Returns:
a Record object containing the form's current values

setColWidths

public void setColWidths(Object... colWidths)
An array of widths for the columns of items in this form's layout grid.

If specified, these widths should sum to the total width of the form (form.width). If not specified, we assume every other column will contain form item titles, and so should have form.titleWidth, and all other columns should share the remaining space.

Acceptable values for each element in the array are:

Parameters:
colWidths - the column widths

getSaveOperationType

public DSOperationType getSaveOperationType(DSRequest requestProperties)
Default DSOperationType to be performed when DynamicForm.saveData is called. This property is automatically set on a call to DynamicForm.editRecord or DynamicForm.editNewRecord, or may be set directly via DynamicForm.setSaveOperationType.

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.

Parameters:
requestProperties - Optional DSRequest config properties for the save operation
Returns:
Returns the DSOperationType to be performed when DynamicForm.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.


setTitleWidth

public void setTitleWidth(int titleWidth)
The width in pixels allocated to the title of every item in this form. If you don't specify explicit colWidths, you can set this value to the string "*" to divide the usable space evenly between titles and fields.

Parameters:
titleWidth - the title width

setTitleWidth

public void setTitleWidth(String titleWidth)
The width in pixels allocated to the title of every item in this form. If you don't specify explicit colWidths, you can set this value to the string "*" to divide the usable space evenly between titles and fields.

Parameters:
titleWidth - the title width

setErrorOrientation

public void setErrorOrientation(FormErrorOrientation errorOrientation)
If DynamicForm.showInlineErrors is true, where should the error icon and text appear relative to form items? Valid options are "top", "bottom", "left" or "right".

May be overridden at the item level via FormItem.setErrorOrientation(com.smartgwt.client.types.FormErrorOrientation).

Parameters:
errorOrientation - the error orientation

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 Smart GWT 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 Smart GWT 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 Smart GWT 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 Smart GWT framework code does not pass them.

Parameters:
callback - callback to invoke on completion. [Ignored if 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 Smart GWT 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 Smart GWT 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(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(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 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(String fieldName,
                           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(String fieldName,
                           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 String[] getFieldErrors(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 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

valuesAreValid

public boolean valuesAreValid(boolean validateHiddenFields)
Method to determine whether the current form values would pass validation. This method will run validators on the form's values and return a value indicating whether validation was successful.

Unlike DynamicForm.validate() this method will not store the errors on the DynamicForm or display them to the user.

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:
boolean value indicating success or failure of validation

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

setDataSource

public void setDataSource(DataSource dataSource,
                          FormItem... fields)
Bind to a DataSource.

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().

Parameters:
dataSource -
fields -

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 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 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(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.

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

getUseAllDataSourceFields

public 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.

Specified by:
getUseAllDataSourceFields in interface DataBoundComponent
Returns:
Boolean

setShowHiddenFields

public void setShowHiddenFields(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 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

setShowComplexFields

public void setShowComplexFields(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 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(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 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(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 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(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 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(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 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(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 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(Boolean exportAll)
Description copied from interface: DataBoundComponent
Setting exportAll to true prevents the component from passing its 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 Boolean getExportAll()
Description copied from interface: DataBoundComponent
Setting exportAll to true prevents the component from passing its 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(Boolean preventDuplicates)
                          throws 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:
IllegalStateException - this property cannot be changed after the component has been created

getPreventDuplicates

public 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(String duplicateDragMessage)
                             throws IllegalStateException
Description copied from interface: DataBoundComponent
Message to show when a user attempts to transfer duplicate records into this component, and preventDuplicates is enabled. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.

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

getDuplicateDragMessage

public 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. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.

Specified by:
getDuplicateDragMessage in interface DataBoundComponent
Returns:
String

setAddDropValues

public void setAddDropValues(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 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(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 Smart GWT will apply to the dropped object before updating it.

If this property is not defined, Smart GWT 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 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 Smart GWT will apply to the dropped object before updating it.

If this property is not defined, Smart GWT 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:
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(Boolean useFlatFields)
                      throws 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:
IllegalStateException - this property cannot be changed after the component has been created

getUseFlatFields

public 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(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 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

editHilites

public void editHilites()
Shows a HiliteEditor interface allowing end-users to edit the data-hilites currently in use by this DataBoundComponent.

Specified by:
editHilites in interface DataBoundComponent

getHiliteState

public String getHiliteState()
Get the current hilites encoded as a String, for saving.

Specified by:
getHiliteState in interface DataBoundComponent
Returns:
the hilite state

setHiliteState

public void setHiliteState(String hiliteState)
Set the current hilites based on a hiliteState String previously returned from getHilitesState.

Specified by:
setHiliteState in interface DataBoundComponent
Parameters:
hiliteState - hilites state encoded as a String

setHilites

public void setHilites(Hilite[] hilites)
Accepts an array of hilite objects and applies them to this DataBoundComponent. See also getHilites for a method of retrieving the hilite array for storage, including hilites manually added by the user.

Specified by:
setHilites in interface DataBoundComponent
Parameters:
hilites - array of hilite objects

getHilites

public Hilite[] getHilites()
Return the set of hilite-objects currently applied to this DataBoundComponent. These can be saved for storage and then restored to a component later via setHilites().

Specified by:
getHilites in interface DataBoundComponent
Returns:
array of hilite objects

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(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 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(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 parameter.

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 parameter.

Specified by:
addFormulaField in interface DataBoundComponent

getCanAddFormulaFields

public 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(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 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(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 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(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 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(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 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(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 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 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(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(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(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 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.

Note that drag/drop type transfers of records between components are asynchronous operations: Smart GWT may need to perform server turnarounds to establish whether dropped records already exist in the target component. Therefore, it is possible to issue a call to transferSelectedData() and/or the drop() method of a databound component whilst a transfer is still active. When this happens, Smart GWT adds the second and subsequent transfer requests to a queue and runs them one after the other. If you want to be notified when a transfer process has actually completed, use addDropCompleteHandler. 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.

Note that drag/drop type transfers of records between components are asynchronous operations: Smart GWT may need to perform server turnarounds to establish whether dropped records already exist in the target component. Therefore, it is possible to issue a call to transferSelectedData() and/or the drop() method of a databound component whilst a transfer is still active. When this happens, Smart GWT adds the second and subsequent transfer requests to a queue and runs them one after the other. If you want to be notified when a transfer process has actually completed, use addDropCompleteHandler. 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 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(String titleField)
Description copied from interface: DataBoundComponent
Sets the best field to use for a user-visible title for an individual record from this component.

Specified by:
setTitleField in interface DataBoundComponent

getTitleField

public 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 components.
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 the title field for this component.

setDataSource

public void setDataSource(DataSource dataSource)
Description copied from interface: DataBoundComponent
Bind to a DataSource. Binding to a DataSource means that the component will use the DataSource to provide default data for its fields.

When binding a previously-bound componenet 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, you may be able to refer to setDataSource(dataSource, fields) as an alternative method if the widget has an implementation of it.

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 DataSource requests.

Specified by:
getDataSource in interface DataBoundComponent
Returns:
DataSource

setAutoFetchData

public void setAutoFetchData(Boolean autoFetchData)
                      throws 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 and textMatchStyle may be specified via DataBoundComponent.getAutoFetchTextMatchStyle().

NOTE: If autoFetchData is set, calling ListGrid.fetchData() before draw will cause two requests to be issued, one from the manual call to fetchData() and one from the autoFetchData setting. The second request will use only initialCriteria and not any other criteria or settings from the first request. Generally, turn off autoFetchData if you are going to manually call fetchData() at any time.

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

getAutoFetchData

public 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 and textMatchStyle may be specified via DataBoundComponent.getAutoFetchTextMatchStyle().

NOTE: If autoFetchData is set, calling ListGrid.fetchData() before draw will cause two requests to be issued, one from the manual call to fetchData() and one from the autoFetchData setting. The second request will use only initialCriteria and not any other criteria or settings from the first request. Generally, turn off autoFetchData if you are going to manually call fetchData() at any time.

Specified by:
getAutoFetchData in interface DataBoundComponent
Returns:
autoFetchData autoFetchData

setAutoFetchTextMatchStyle

public void setAutoFetchTextMatchStyle(TextMatchStyle autoFetchTextMatchStyle)
                                throws IllegalStateException
Description copied from interface: DataBoundComponent
If autoFetchData is true, this attribute allows the developer to specify a textMatchStyle for the initial DataBoundComponent.fetchData() call.

Specified by:
setAutoFetchTextMatchStyle in interface DataBoundComponent
Throws:
IllegalStateException

getAutoFetchTextMatchStyle

public TextMatchStyle getAutoFetchTextMatchStyle()
Description copied from interface: DataBoundComponent
If autoFetchData is true, this attribute allows the developer to specify a textMatchStyle for the initial DataBoundComponent.fetchData() call.

Specified by:
getAutoFetchTextMatchStyle in interface DataBoundComponent
Returns:
autoFetchTextMatchStyle autoFetchTextMatchStyle

setAutoFetchAsFilter

public void setAutoFetchAsFilter(Boolean autoFetchAsFilter)
                          throws 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:
IllegalStateException

getAutoFetchAsFilter

public 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 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:
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
Retrieves data from the DataSource that matches the specified criteria.

When fetchData() is first called, if data has not already been provided via setData(), this method will create a ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.

NOTE: do not use both autoFetchData and a call to fetchData() - this may result in two DSRequests to fetch data. Use either autoFetchData and setAutoFetchCriteria() or a manual call to fetchData() passing criteria.

Whether a ResultSet was automatically created or provided via setData(), subsequent calls to fetchData() will simply call resultSet.setCriteria().

Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call willFetchData(criteria) to determine if new criteria will result in a server fetch.

If you need to force data to be re-fetched, you can call invalidateCache() and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when using invalidateCache() there is no need to also call fetchData() and in fact this could produce unexpected results.

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, you can use resultSet.willFetchData() to determine whether or not a server fetch will occur when fetchData() is called with new criteria.

In addition to the callback parameter for this method, developers can use resultSet.addDataArrivedHandler to be notified every time data is loaded.

Specified by:
fetchData in interface DataBoundComponent

fetchData

public void fetchData(Criteria criteria)
Description copied from interface: DataBoundComponent
Retrieves data from the DataSource that matches the specified criteria.

When fetchData() is first called, if data has not already been provided via setData(), this method will create a ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.

NOTE: do not use both autoFetchData and a call to fetchData() - this may result in two DSRequests to fetch data. Use either autoFetchData and setAutoFetchCriteria() or a manual call to fetchData() passing criteria.

Whether a ResultSet was automatically created or provided via setData(), subsequent calls to fetchData() will simply call resultSet.setCriteria().

Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call willFetchData(criteria) to determine if new criteria will result in a server fetch.

If you need to force data to be re-fetched, you can call invalidateCache() and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when using invalidateCache() there is no need to also call fetchData() and in fact this could produce unexpected results.

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, you can use resultSet.willFetchData() to determine whether or not a server fetch will occur when fetchData() is called with new criteria.

In addition to the callback parameter for this method, developers can use resultSet.addDataArrivedHandler to be notified every time data is loaded.

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
Retrieves data from the DataSource that matches the specified criteria.

When fetchData() is first called, if data has not already been provided via setData(), this method will create a ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.

NOTE: do not use both autoFetchData and a call to fetchData() - this may result in two DSRequests to fetch data. Use either autoFetchData and setAutoFetchCriteria() or a manual call to fetchData() passing criteria.

Whether a ResultSet was automatically created or provided via setData(), subsequent calls to fetchData() will simply call resultSet.setCriteria().

Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call willFetchData(criteria) to determine if new criteria will result in a server fetch.

If you need to force data to be re-fetched, you can call invalidateCache() and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when using invalidateCache() there is no need to also call fetchData() and in fact this could produce unexpected results.

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, you can use resultSet.willFetchData() to determine whether or not a server fetch will occur when fetchData() is called with new criteria.

In addition to the callback parameter for this method, developers can use resultSet.addDataArrivedHandler to be notified every time data is loaded.

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
Retrieves data from the DataSource that matches the specified criteria.

When fetchData() is first called, if data has not already been provided via setData(), this method will create a ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.

NOTE: do not use both autoFetchData and a call to fetchData() - this may result in two DSRequests to fetch data. Use either autoFetchData and setAutoFetchCriteria() or a manual call to fetchData() passing criteria.

Whether a ResultSet was automatically created or provided via setData(), subsequent calls to fetchData() will simply call resultSet.setCriteria().

Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call willFetchData(criteria) to determine if new criteria will result in a server fetch.

If you need to force data to be re-fetched, you can call invalidateCache() and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when using invalidateCache() there is no need to also call fetchData() and in fact this could produce unexpected results.

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, you can use resultSet.willFetchData() to determine whether or not a server fetch will occur when fetchData() is called with new criteria.

In addition to the callback parameter for this method, developers can use resultSet.addDataArrivedHandler to be notified every time data is loaded.

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

getResultSet

public ResultSet getResultSet()
Description copied from interface: DataBoundComponent
Return the underlying data of this DataBoundComponent as a ResultSet.

Note that this method should only be called after initial data has been fetched by this DataBoundComponent.

Specified by:
getResultSet in interface DataBoundComponent
Returns:
ResultSet, or null if the underlying data is not a ResultSet
See Also:
DataBoundComponent.fetchData()

getRecordList

public RecordList getRecordList()
Description copied from interface: DataBoundComponent
Return the underlying data of this DataBoundComponent as a RecordList.

Depending on the component configuration, the actual JavaScript instance of the returned RecordList may be one of several types:

The underlying type determines the structure of the returned data. An Array or ResultSet represents a list of records, but a Tree or ResultTree represents a list of open rows in the tree, including groups or other nodes which contain no records.

Specified by:
getRecordList in interface DataBoundComponent
Returns:
the RecordList

exportData

public void exportData()
Description copied from interface: DataBoundComponent
Uses a "fetch" operation on the current DataSource to retrieve data that matches the current filter and sort criteria for this component, then exports the resulting data to a file or window in the requested format.

A variety of DSRequest settings, such as exportAs and exportFilename, affect the exporting process: see exportResults for further detail.

Note that data exported via this method does not include any client-side formatting and relies on both the Smart GWT server and server-side DataSources. To export client-data with formatters applied, see exportClientData, which still requires the Smart GWT server but does not rely on server-side DataSources.

For more information on exporting data, see DataSource.exportData.

Specified by:
exportData in interface DataBoundComponent
See Also:
DataBoundComponentMethods overview and related methods

exportData

public void exportData(DSRequest requestProperties)
Description copied from interface: DataBoundComponent
Uses a "fetch" operation on the current DataSource to retrieve data that matches the current filter and sort criteria for this component, then exports the resulting data to a file or window in the requested format.

A variety of DSRequest settings, such as exportAs and exportFilename, affect the exporting process: see exportResults for further detail.

Note that data exported via this method does not include any client-side formatting and relies on both the Smart GWT server and server-side DataSources. To export client-data with formatters applied, see exportClientData, which still requires the Smart GWT server but does not rely on server-side DataSources.

For more information on exporting data, see DataSource.exportData.

Specified by:
exportData in interface DataBoundComponent
Parameters:
requestProperties - additional properties to set on the DSRequest that will be issued
See Also:
DataBoundComponentMethods overview and related methods

exportClientData

public void exportClientData()
Description copied from interface: DataBoundComponent
Exports this component's data with client-side formatters applied, so is suitable for direct display to users. This feature requires the SmartClient server, but does not rely on any server-side DataSources.

To export unformatted data from this component's dataSource, see exportData which does not include client-side formatters, but relies on both the SmartClient server and server-side DataSources.

Specified by:
exportClientData in interface DataBoundComponent
See Also:
DataSource.exportClientData(java.lang.Object[], com.smartgwt.client.data.DSRequest)

exportClientData

public void exportClientData(DSRequest requestProperties)
Description copied from interface: DataBoundComponent
Exports this component's data with client-side formatters applied, so is suitable for direct display to users. This feature requires the SmartClient server, but does not rely on any server-side DataSources.

To export unformatted data from this component's dataSource, see exportData which does not include client-side formatters, but relies on both the SmartClient server and server-side DataSources.

Specified by:
exportClientData in interface DataBoundComponent
Parameters:
requestProperties - Request properties for the export
See Also:
DataSource.exportClientData(java.lang.Object[], com.smartgwt.client.data.DSRequest)

addFetchDataHandler

public HandlerRegistration addFetchDataHandler(FetchDataHandler handler)
Add a fetchData handler.

Notification function fired on fetchData() or filterData()

Specified by:
addFetchDataHandler in interface HasFetchDataHandlers
Parameters:
handler - the filterData handler
Returns:
HandlerRegistration used to remove this handler

addDropCompleteHandler

public HandlerRegistration addDropCompleteHandler(DropCompleteHandler handler)
Add a com.smartgwt.client.widgets.DropCompleteHandler. See that class's documentation for a definition of "drop complete", and how it differs from "drag complete" (com.smartgwt.client.widgets.DragCompleteHandler).

Specified by:
addDropCompleteHandler in interface HasDropCompleteHandlers
Parameters:
handler - the DropCompleteHandler
Returns:
HandlerRegistration used to remove this handler

addDragCompleteHandler

public HandlerRegistration addDragCompleteHandler(DragCompleteHandler handler)
Add a com.smartgwt.client.widgets.DragCompleteHandler. See that class's documentation for a definition of "drag complete", and how it differs from "drop complete" (com.smartgwt.client.widgets.DropCompleteHandler).

Specified by:
addDragCompleteHandler in interface HasDragCompleteHandlers
Parameters:
handler - the DropCompleteHandler
Returns:
HandlerRegistration used to remove this handler

setLogicalStructure

public com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.form.DynamicFormLogicalStructure s)

getLogicalStructure

public com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
Specified by:
getLogicalStructure in interface LogicalStructure
Overrides:
getLogicalStructure in class Canvas