2012 Jul 02 10:33 AM
Hello all,
I have a small html window in my dialog screen and i show some values in this.
But after some input, i need to refresh this html.
But i couldnt succeed.
How can i refresh it when i trigger PAI every time?
This is the method i call.
METHOD main.
DATA oref_lcl TYPE REF TO lcl_class.
DATA html TYPE w3htmltab.
DATA url TYPE c LENGTH 255.
DATA go_custom_cont TYPE REF TO cl_gui_custom_container.
CLEAR go_custom_cont.
CREATE OBJECT: go_custom_cont
EXPORTING container_name = 'CC1'.
CLEAR oref.
CREATE OBJECT oref
EXPORTING
parent = go_custom_cont.
DATA events TYPE cntl_simple_events.
DATA event TYPE cntl_simple_event.
event-eventid = oref->m_id_sapevent.
event-appl_event = 'X'.
APPEND event TO events.
CALL METHOD oref->set_registered_events
EXPORTING
events = events.
SET HANDLER me->on_html_event FOR oref.
APPEND '<html>' TO html.
APPEND '<body bgcolor="#EAF1F6">' TO html.
APPEND '<center>' TO html.
APPEND '<font face="verdana" color= "red" size="6" >' TO html.
APPEND gv_maktx TO html.
APPEND '</font>' TO html.
APPEND '</center>' TO html.
APPEND '</body>' TO html.
APPEND '<center>' TO html.
APPEND '<font face="arial" size="100" >' TO html.
APPEND gv_char TO html.
APPEND '</font>' TO html.
APPEND '</center>' TO html.
APPEND '</html>' TO html.
DATA m_result TYPE i.
oref->load_data( IMPORTING assigned_url = url
CHANGING data_table = html ).
oref->show_url( url = url ).
CALL METHOD oref->do_refresh
EXCEPTIONS
cntl_error = 1.
2012 Jul 02 10:54 AM
2012 Jul 02 11:11 AM
i used the same method for refreshing but it just doesnt work.
When i first run the program for the first time, it brings the initial value to screen.
But after i enter input, the html page doesnt change. I cleared all of the objects and values but it just doesnt refresh.
2012 Jul 02 12:50 PM
Did you use this method CALL METHOD cl_gui_cfw=>dispatch.(Use this method to dispatch application events to the event handlers registered for the events. If you do not call the method within the PAI event of your application program, it is called automatically by the system after the PAI has been processed.)If not try using this method.