Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BSP: clear URL parameter

Former Member
0 Kudos

Hi,

in my BSP application I want to give a value from one controller to the following one. To do so, I set a parameter to the navigation object, and read it in the subsequent controller.


* Controller A, do_handle_event
navigation->set_parameter( name = 'key' value = model->guid ).
navigation->next_page( co_exit_show ).
* Controller B, do_request
guid = request->get_form_field( 'key' ).

This part works fine. The problem is that the parameter once set to the navigation object in controller A will be part of all subsequent requests to controller B. So, how do I get rid of the parameter, so that it is only part of the first request to controller B, similar to Java's request.setParameter()?

Thanks in advance,

Frank

6 REPLIES 6

christine_evans
Active Contributor
0 Kudos

In all types of screens, once I've received a parameter into a variable I usually reset it to SPACE. Is this what you mean?

0 Kudos

Hi Christine,

in a way, yes, this is want I want to do. However, doing so seems to be quite complicated. I've already tried the following:


* Controller B
navigation->set_parameter( NAME = CO_PARAM_GUID value = space ).
request->set_form_field( NAME = CO_PARAM_GUID value = space ).
response->set_form_field( NAME = CO_PARAM_GUID value = space ).

None of them solved the problem. When the controller is called again, request->get_form_field( CO_PARAM_GUID ) contains the originally provided value.

Any ideas?

Best regards,

Frank

0 Kudos

I must admit I've never actually done this. But have you tried using the controller method INSTANTIATE_PARAMETER?

0 Kudos

Hi Christine,

this doesn't seem to be the right place to do this. If I understand the comment in INSTANTIATE_PARAMETERS right, this method should be used to deserialize complex data. In fact, the comment says

Strings should not be instantiated by this method

.

Best regards,

Frank

0 Kudos

It was just a shot in the dark really. I think you might be better off posting in the BSP forum which you will find in the list of forums under Application Server.

0 Kudos

Hi Christine,

you are right, I opened a new thread in the BSP forum: ...

Thanks for your help,

Frank