on 06-03-2005 8:45 AM
Hello,
I have the following button defined in a view:
<htmlb:gridLayoutCell id = "Basic_Functions_1-1-1"
columnIndex = "1"
rowIndex = "1" >
<bsp:call url="upwb.do">
<bsp:parameter name="view_name" value="Button.view" />
<bsp:parameter name="view_component_id" value="SaveButton5" />
</bsp:call>
</htmlb:gridLayoutCell>
And in <b>Button.view</b> to build this button:
<htmlb:button id ="<%= r_button->get_id( ) %>"
text ="<%= label %>"
tooltip ="<%= title %>"
onClick ="<%= onclick %>"
onClientClick = "<%= onclientclick %>"
Finally, in the view I call another BSP:
CALL METHOD
cl_bsp_runtime=>construct_bsp_url
EXPORTING
IN_APPLICATION = 'BSP2'
IN_PAGE = 'index.htm'
IN_PARAMETERS = params
IMPORTING
OUT_LOCAL_URL = url.
How can I make this call to <b>BSP2</b> <i>ONLY</i> when the button (defined above) is pressed??
Thanks,
Timothy
hi timothy,
for that u have to write code in OnInputProcessing event of EventHandler.
Try this,
DATA: event TYPE REF TO CL_HTMLB_EVENT.
CLASS cl_htmlb_manager DEFINITION LOAD.
event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
case event->ID.
DATA: event TYPE REF TO CL_HTMLB_EVENT,
CLASS cl_htmlb_manager DEFINITION LOAD.
event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
case event->ID.
when <!-- here ur button id will come --!>
here code will come which u like to perform when u click on that button.
like,
navigation->set_parameter(here whatever page attribute u like to set)= value for that attribute .
navigation->goto_page('index.htm').-> it will call index.htm with the page attributes u defined in that page using query string.
endcase.
regards,
kamaljeet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Kamaljeet,
I have implemented your solution and it is ok except that in my case statement, I call a separate BSP using a CALL METHOD. It never calls though!
The following is inside the event: <b>OnInputProcessing</b>:
-
...
...
DATA: event TYPE REF TO CL_HTMLB_EVENT.
CLASS cl_htmlb_manager DEFINITION LOAD.
event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
case event->ID.
WHEN 'SaveButton5'.
...
<!-- I fill in params -->
...
CALL METHOD
cl_bsp_runtime=>construct_bsp_url
EXPORTING
IN_APPLICATION = 'ZEPCTESTMCG'
IN_PAGE = 'update.htm'
IN_PARAMETERS = params
IMPORTING
OUT_LOCAL_URL = url.
endcase.
-
When I debug, when it arrives at the above CALL METHOD, it skips over it and never executes it! Why?
Thanks,
Timothy
in oninputprocessing collect the values into an internal table and use statement
<b>modify <dbtable> from table <itab>.</b>
modify <your Z table> FROM TABLE <internal table where you have the values> .
Please note that the structure of the itab has to be same as the structure of the DBtable.
Regards
Raja
Hi Timothy,
if you click a button you fire an event to the server. This event can be handled in the method do_handle_event of the controller of your view (normally in the main controller). So don't use the coding to create a new URL inside your view. Move it to the do_handle event method and put it inside an if-clause where you chack that the correct button was pressed.
Regards,
Rainer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
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.