on 02-14-2007 3:41 PM
Hi,
were are using a tableview with a filter.
View:
<htmlb:tableView id = "tbl_mkpmkbr"
table = "//model/mkpmkbr"
visibleRowCount = "6"
fillUpEmptyRows = "FALSE"
design = "ALTERNATING"
selectionMode = "SINGLESELECT"
selectedRowIndex = "<%= model->mkpmkbr_selection %>"
onRowSelection = "mkpmkbr_select"
headerVisible = "TRUE"
headerText = "XXXXX"
filter = "SERVER"
columnFilters = "<%= model->filter_mkpmkbr %>"
sort = "SERVER" >
After reading the data into the internal table, an initial filter is set:
Model -> read_mkpmkbr():
APPEND INITIAL LINE TO filter_mkpmkbr ASSIGNING <filter>.
<filter>-columnname = '/BIC/ZMKPMNID'.
<filter>-SELECTION = MNID.
When the user selects a different filter, we would like to remove the initial filter.
Controller -> do_handle_event():
IF htmlb_event_ex IS NOT INITIAL AND htmlb_event_ex->event_server_name = 'onFilter'.
CASE htmlb_event_ex->event_id.
WHEN 'tbl_mkpmkbr'.
REFRESH model->filter_mkpmkbr.
FIELD-SYMBOLS: <afilter> TYPE tableviewfilter.
LOOP AT model->filter_mkpmkbr ASSIGNING <afilter>.
clear <afilter>-selection.
ENDLOOP.
ENDCASE.
ENDIF.
The table contents is deleted. The filter in the page remains magically.
It looks like there is no way to get rid of the initial table filter.
Any hints?
Thanks
Volker Bohmer
Look at the Demo Example "sbspext_table", Page name:TableViewFilter.bsp
Raja T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here you go..
OnInputprocessing call method below..
Say i have set the Filter for 1st Column & my Tableview ID is tv1
CALL METHOD REQUEST->GET_FORM_FIELD
EXPORTING
NAME = 'tv1-filter_1'
RECEIVING
VALUE = v_user_filter1 .
Here you will get the filter value in v_user_filter1 which was set by user.
Use this value...if v_user_filter1 is initial then fill the default filter..
Raja T
Thanks for the quick answers.
None of the answers really solved the question: how to clear a predefined table filter. It seems that in the other threads regarding this topic is still open as well. Of course, the links and hints are helpful anyway. Here is my workaround:
Put a link in the page pointing on the same page (controller) with a parameter to clean the page:
<htmlb:link id = "MKPMK_NOFILTER"
target = "mkp_content"
reference = "?page=mkpmk_nofilter" >
<htmlb:textView text = "Complete Content"
design = "EMPHASIZED" />
</htmlb:link>
In the controller do_request() put
page = request->get_form_field( name = 'page' ).
IF page IS NOT INITIAL.
CASE page.
WHEN 'mkpmk_nofilter'.
REFRESH model->filter_mkpmkbr.
view = create_view( view_name = 'mkpmk.htm' ).
This way the cleaned up filter table is used to display the page.
Cheers
Volker
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.