on 09-21-2016 2:16 PM
Hi,
i have a Freestyle-UIBB which contains a UI-Element BUTTON for opening a FPM dialog box and a UI-Element HTML_ISLAND with a <DIV>-Tag in Static HTML (<div id="test"></div>) . The HTML_ISLAND contains a HTMLSCRIPT which appends a text to the <DIV>-Tag. The script is called in method WDDOMODIFYVIEW.
METHOD wddomodifyview.
IF first_time = abap_true.
DATA(lo_html_island) = CAST cl_wd_html_island( view->get_element( `HTML_ISLAND` ) ).
lo_html_island->add_script_call( cl_wd_html_script_call=>new_call( )->variable( 'MyHTMLIsland' )->function( 'test' ) ).
ENDIF.
ENDMETHOD.
After pressing the button Test the dialog box is opened.
After closing the dialog box the text Hallo disappears (the <DIV>-Tag is empty).
Does anybody have an idea how to prevent this?
Best regards
Thomas
Hello Thomas,
the javascript function 'test' is only executed when the view is rendered the first time. Therefore whenever the view get's re-rendered your text is lost. So you should avoid the re-rendering (by not touching the view, neither the view's context) or at least make sure that the script is re-executed on rerendering.
If you want to find out, why the view get's rerendered you can use the Webdynpro Trace tool (Transaction WD_TRACE_TOOL). There is a delta-rendering trace available, which shows what caused the new rendering.
Best regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
thanks for your reply. I didn't change anything in the view. The only action was pressing the button Test which opens a FPM dialog box ( cl_fpm_factory=>get_instance( )->open_dialog_box( EXPORTING iv_dialog_box_id = 'DIALOG_BOX_1' ).) and closing the dialog box through pressing the ESC key. The trace file DeltaRenderingChangeTracking.xml is empty for all roundtrips. Do you have another idea?
Best regards
Thomas
Edit:
The trace for delta rendering is shown in Internet Explorer (in Chrome it's empty) but my view is not affected.
Edit 2:
After closing the dialog box the flag HCP_CHANGED of structure MS_CHANGE_FLAGS_ROUNDTRIP in assistance class CL_FPM_OIF_ASSISTANCE is set to true. If i set this flag to false in debugger (WD-Component FPM_OIF_COMPONENT View CNR_VIEW Method WDDOMODIFYVIEW) the text Hallo will not disappear.
Edit 3:
If i use OVP floorplan the text will not disappear i am therefore asssuming it's a bug in OIF floorplan.
Message was edited by: Thomas Feirle
Message was edited by: Thomas Feirle
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.