cancel
Showing results for 
Search instead for 
Did you mean: 

use request->get_form_field in do_init ?

daniel_humberg
Contributor
0 Kudos

I have a bsp page (mcv) that I use in 2 modes. i want to specify the mode via a parameter that i set when i call the page:

navigation->next_page('nav_request').

navigation->set_parameter( name = 'mode' value = '1').

Now, I would like to initialize some values in do_init according to the mode, but unfortunately, the parameters are still empty in do_init and are only filled in do_request, right?

i tried to like this:

lv_mode = request->get_form_field('mode').

but lv_mode is still ' '.

Message was edited by: Daniel Humberg

Accepted Solutions (0)

Answers (1)

Answers (1)

maximilian_schaufler
Active Contributor
0 Kudos

Hi Daniel,

for parameters like a "mode" you are describing, I use an attribute in the application class. Instead of passing the mode variable on from one page to the next, I just set the application attribute and access this value from wherever I need it.

daniel_humberg
Contributor
0 Kudos

i found the solution.

if i call

navigation->set_parameter(..)

it won't work. But if i call

navigation->goto_page(bla.htm?param=value)

it work's.