|
|
(One intermediate revision by one other user not shown) |
Line 1: |
Line 1: |
− | {{ScoutPage|cat=Client}}
| + | The Scout documentation has been moved to https://eclipsescout.github.io/. |
− | | + | |
− | Search Form is special kind of {{ScoutLink|Concepts|Form|form}} where the user will enter some values to formulate a query to load the content of a {{ScoutLink|Concepts|TablePage|table page}}.
| + | |
− | | + | |
− | * implements: {{ScoutJavadoc|ISearchForm|I}}
| + | |
− | * extends: {{ScoutJavadoc|AbstractForm|C}}
| + | |
− | | + | |
− | == Description ==
| + | |
− | {{note|TODO|Add a description}}
| + | |
− | TODO:
| + | |
− | * To be used with a {{ScoutLink|Concepts|TablePage|Table Page}}.
| + | |
− | * {{ScoutLink|Concepts|SearchFilter|SearchFilter}}: contains the {{ScoutLink|Concepts|FormData|FormData}} corresponding to the SearchForm.
| + | |
− | * {{ScoutEvent|LoadTableData}} event of the TablePage uses the searchFilter and send it to the {{ScoutLink|Concepts|Outline_Service|OutlineService}} .
| + | |
− | | + | |
− | == Screenshot ==
| + | |
− | [[Image:Scout_TablePage_SearchForm.png]]
| + | |
− | | + | |
− | | + | |
− | == 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 {{ScoutLink|Concepts|SearchFilter|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|TablePage|Table Page}}
| + | |
− | * {{ScoutLink|Concepts|FormData|FormData}}
| + | |
− | * {{ScoutLink|Concepts|Client Plug-In|Client Plug-In}}
| + | |