2009 Jan 14 9:33 AM
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
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
2009 Jan 14 10:45 AM
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?
2009 Jan 14 12:56 PM
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
2009 Jan 14 1:12 PM
I must admit I've never actually done this. But have you tried using the controller method INSTANTIATE_PARAMETER?
2009 Jan 14 1:58 PM
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
2009 Jan 15 10:16 AM
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.
2009 Jan 15 10:35 AM
Hi Christine,
you are right, I opened a new thread in the BSP forum: ...
Thanks for your help,
Frank