on 02-05-2007 1:37 PM
Hi all,
I have a requirement wherein i should get a popup while closing a webpage of BSP application that "Do you want to save". If user clicks "yes" then automatically the records changed in the page should save or if user clicks "no" the records should be unsaved.
Can anyone suggest any code?
Thanks and Regards,
Sneha.
Hi,
Pls check this web log
/people/eddy.declercq/blog/2006/03/20/wake-me-up-before-you-go-go
Eddy
-
Pimp up the S(D)N site and earn points. Check this <a href="/people/eddy.declercq/blog/2007/02/01/pimp-up-the-jam log</a> for details. Deadline Feb 15th!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The web log is very helpful, its working, thanks for the wonderful web log, but i need one more clarification, here my page has tableview and in my page there are no specific input fields. all the inputs are in tableview, in this case where should i mention onchange attribute.
Thanks and Regards,
Sneha.
Hi,
Do I need to enable for all rows also? but here my no of rows will vary depending on new rows created.
Can i enable this script when i select a row for editing and close without saving?
And where shall i write this script? in layout only? i define these cells in my iterator. Can i use this script in iterator?
Thanks and Regards,
Sneha.
<i>Do I need to enable for all rows also? but here my no of rows will vary depending on new rows created.</i>
-->Not requreid..select the rows which you wanted.
<i>And where shall i write this script? in layout only? i define these cells in my iterator. Can i use this script in iterator?</i>
--> You can write it in layout.
Raja T
Hi Raja,
Here it is a dynamic thing. User can modify any row and if he closes the page he shoud get warning message. Here How can i select the rows and enable?
Im displaying the tableview using iterator. Can you suggest how to write this code in layout, if possible with sample code.
Thanks and Regards,
Sneha.
To make the Row selectable & editable, use the below code..
<htmlb:tableView id = "tv"
width = "200"
headerVisible = "true"
design = "alternating"
visibleRowCount = "5"
fillUpEmptyRows = "true"
selectedRowIndexTable = "<%= selected_ind %>"
selectionMode = "MULTILINEEDIT"
tabIndexCell = "false"
showNoMatchText = "true"
filter = "server"
sort = "server"
onHeaderClick = "MyEventHeaderClick"
table = "<%= itab %>"
iterator = "<%= iterator %>" >
<b>Page attribute:</b>
selected_ind TYPE INT4_TABLE
<b>To capture the selected Rows:</b>
<b>OnInputprocessing:</b>
DATA: TV TYPE REF TO CL_HTMLB_TABLEVIEW,
EVENT TYPE REF TO CL_HTMLB_EVENT,
TABLE_EVENT TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.
FIELD-SYMBOLS <I> LIKE LINE OF SELECTED_IND.
TV ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST = REQUEST
NAME = 'tableView'
ID = 'tv' ).
IF TV IS NOT INITIAL.
TABLE_EVENT = TV->DATA.
CLEAR SELECTED_IND.
SELECTED_IND = TABLE_EVENT->PREVSELECTEDROWINDEXTABLE.
IF TABLE_EVENT->EVENT_TYPE EQ CL_HTMLB_EVENT_TABLEVIEW=>CO_ROW_SELECTION.
READ TABLE SELECTED_IND WITH KEY TABLE_LINE = TABLE_EVENT->ROW_INDEX
TRANSPORTING NO FIELDS.
IF SY-SUBRC EQ 0.
DELETE SELECTED_IND INDEX SY-TABIX.
ELSE.
APPEND INITIAL LINE TO SELECTED_IND ASSIGNING <I>.
<I> = TABLE_EVENT->ROW_INDEX.
ENDIF.
ENDIF.
ENDIF.
<b>SELECTED_IND will have the selected row index.</b>
Hope this will be helpful.
Raja T
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.