Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Scout/Concepts/SearchForm"

(New page: {{ScoutPage|cat=Concepts}} A SearchForm is a special kind of {{ScoutLink|Concepts|Form|form}} that enables the user to enter some parameters to reduce the number of entities displayed in ...)
 
(redirection)
 
Line 1: Line 1:
{{ScoutPage|cat=Concepts}}
+
#REDIRECT [[Scout/Concepts/Search Form]]
 
+
A SearchForm is a special kind of {{ScoutLink|Concepts|Form|form}} that enables the user to enter some parameters to reduce the number of entities displayed in a {{ScoutLink|Concepts|TablePage|TablePage}}.
+
 
+
* implements: {{ScoutJavadoc|ISearchForm|I}}
+
* extends: {{ScoutJavadoc|AbstractForm|C}}
+
 
+
== Description ==
+
{{note|TODO|Add a description}}
+
TODO:
+
* To be used with a TablePage
+
* SearchFilter: contains the FormData corresponding to the SearchForm.
+
* Server: {{ScoutLink|Concepts|Process_Service|ProcessService}} using {{ScoutLink|Concepts|FormDataStatementBuilder|FormDataStatementBuilder}}
+
 
+
== Screenshot ==
+
{{note|TODO|Add a screenshot: Example of a Search form. TablePage of an application}}
+
 
+
== SDK ==
+
{{note|TODO|Where in the SDK (with screenshot)...}}
+
 
+
== Properties ==
+
''Defined with {{ScoutLink|Concepts|GetConfigured Methods|getConfiguredXxxxxx()}} methods''.
+
 
+
All properties of {{ScoutLink|Concepts|Form|Form}} are available. SearchForm does just change some of the default parameters:
+
* {{ScoutProp|MinimizeEnabled}} is '''true'''
+
* {{ScoutProp|AskIfNeedSave}} is '''true'''
+
 
+
== Events ==
+
''Defined with {{ScoutLink|Concepts|Exec_Methods|execXxxxxx()}} methods''. All events are defined in the {{ScoutLink|Concepts|Form|Form}} class.
+
 
+
=== execResetSearchFilter(..) ===
+
The Form is responsible to produce the SearchFilter that is used in the {{ScoutLink|Concepts|TablePage|TablePage}} in the {{ScoutEvent|LoadTableData}} event.
+
 
+
This is an example of how the {{ScoutEvent|ResetSearchFilter}} event can be implemented:
+
<source lang="java">
+
  @Override
+
  protected void execResetSearchFilter(SearchFilter searchFilter) throws ProcessingException{
+
    super.execResetSearchFilter(searchFilter);
+
    PersonSearchFormData formData = new PersonSearchFormData();
+
    exportFormData(formData);
+
    searchFilter.setFormData(formData);
+
  }
+
</source>
+
 
+
== Remarks ==
+
=== startSearch() ===
+
All SearchForm needs to implement a <code>startSearch()</code> function. In most of the case, the SearchForm contains a {{ScoutLink|Concepts|Form_Handler|FormHandler}} named <code>SearchHandler</code>. The function starts the Form with this handler:
+
 
+
<source lang="java">
+
  public void startSearch()throws ProcessingException {
+
    startInternal(new SearchHandler());
+
  }
+
</source>
+
 
+
 
+
== See Also ==
+
* {{ScoutLink|Concepts|Form|Form}}
+
* {{ScoutLink|Concepts|FormData|FormData}}
+
* {{ScoutLink|Concepts|Process_Service|ProcessService}}
+
* {{ScoutLink|Concepts|FormDataStatementBuilder|FormDataStatementBuilder}}
+

Latest revision as of 13:22, 18 March 2011

Back to the top