on 12-16-2004 11:41 AM
Hello,
I try the weblog OF Brian McKellar corresponding to the HTMLB TableView Iterator and as like certain people, the Dropdownlist of the column 'CURRENCY' is empty. This is cetainely due of how in the constructor the table is declared. So, for those which succeeded in replir the Dropdownlist of the column 'CURRENCY' can they give me the code of your constructor.
Thanks a lot.
Farid BERRA
Farid,
In the iterator class declare a new Attribute with TYPE TIHTTPNVP.
For Example:
TABLE_TYPE Instance Attribute Public Type TIHTTPNVP
Then in the constructor code something like this:
method CONSTRUCTOR .
DATA: wa TYPE LINE OF TIHTTPNVP,
wa_tipo TYPE zmtvetipo.
-- TIPOS DE VIVIENDA
SELECT * FROM zmtvtipo INTO wa_tipo
WHERE tipcu = '1'.
MOVE wa_tipo-tipcu TO wa-name.
MOVE wa_tipo-zztipo TO wa-value.
APPEND wa TO table_type.
ENDSELECT.
endmethod.
Best regards
Ariel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ariel,
Thanks to your councils, i succeeded to get data in the DROPDOWNLISTBOX.
In the method RENDER_CELL_START, for CURRENCY, i have:
WHEN 'CURRENCY'.
IF P_EDIT_MODE IS NOT INITIAL.
DATA: DROP_DOWN TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX.
DROP_DOWN = CL_HTMLB_DROPDOWNLISTBOX=>FACTORY(
ID = P_CELL_ID
SELECTION = M_ROW_REF->CURRENCY
TABLE = ME->M_CURRENCIES_REF
NAMEOFKEYCOLUMN = 'NAME'
NAMEOFVALUECOLUMN = 'VALUE' ).
GET REFERENCE OF TT_CURR INTO DROP_DOWN->TABLE.
P_REPLACEMENT_BEE = DROP_DOWN.
ENDIF.
And in the constructor:
DATA: LS_TCURT TYPE TCURT,
WA_LINE TYPE LINE OF TIHTTPNVP.
SELECT WAERS LTEXT
INTO (LS_TCURT-WAERS, LS_TCURT-LTEXT)
FROM TCURT.
CLEAR WA_LINE.
MOVE LS_TCURT-LTEXT TO WA_LINE-NAME.
MOVE LS_TCURT-WAERS TO WA_LINE-VALUE.
APPEND WA_LINE TO TT_CURR.
ENDSELECT.
And finally, I declared in the Instance Attribut:
TT_CURR TYPE REF TO TIHTTPNVP.
Farid,
What you have to do is to catch the event that is triggered when the user changes the data on this cell. (Just put a breakpoint on the "onInputProcessing" event and analize the EVENT )
Then change the new selected value into the corresponding column / row of internal table (the one which was used to fill the table)..
And thats all when the server refresh the page your value will be changed magically!
PD: today is Saturday, if you dont understand something tell me and on Monday I will show you how to do it with some code.
Cheers
Ariel
Message was edited by: Ariel Ferreiro
Ok Farid...
1) change your code to this:
DROP_DOWN = CL_HTMLB_DROPDOWNLISTBOX=>FACTORY(
ID = P_CELL_ID
SELECTION = M_ROW_REF->CURRENCY
TABLE = ME->M_CURRENCIES_REF
NAMEOFKEYCOLUMN = 'NAME'
NAMEOFVALUECOLUMN = 'VALUE'
ONSELECT = 'DRPDWN_EVENT' ).
Note I have added the "ONSELECT" event.
2) Then put a breakpoint on the OnInputProcessing and check what happend when the user selects a new value on your table. Look that your dropdownlistbox has an ID that is the CELL_ID this id has the column position and the row position.
3) Capture the new value with something like this:
DATA: myDropDown TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX.
myDropDown ?= CL_HTMLB_MANAGER=>GET_DATA(
request = request
id = '<HERE PUT THE CELL ID!!!!!>'
name = 'dropdownListBox' ).
4) Finally change your internal table using de CELL_ID attributes and the recovered data (myDropDown->SELECTION)..
Cheers,
Ariel
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.