cancel
Showing results for 
Search instead for 
Did you mean: 

attributes page are empty using bsp:parameter

Former Member
0 Kudos

Hi,

I have small question about how to set parameters of a bsp page:

I have created 2 views: view1 and view2

In view2, I add 2 page attributes (var1 type as string and var2 as string)

Inside the view1 I added the following code:

<bsp:call comp_id="View2" url="View2.do" >

<bsp:parameter name="var1" value="AAA"/>

<bsp:parameter name="var2" value="BBB"/>

</bsp:call>

The problem is: I can display the content of view2 but the paramters var1 and var2 are always empty.

Can someone tell me what I am missing in my code.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

shiva_suvarna
Participant
0 Kudos

hi ziani.

I think by using <bsp:parameter> you can set the values of controller attributes not page attributes.

in your case the var1,var2 sholud be the variables of controller class of view2.do .

Former Member
0 Kudos

Thank you for your help, but do you know what is the way to set the page attribute page?

Djamal

norbertk
Participant
0 Kudos

hi djamal,

as shiva said, you can also set public attributes of controller-classes with <bsp:parameter>, see also http://help.sap.com/saphelp_nw04s/helpdata/en/d7/5a693c114bf147e10000000a11402f/frameset.htm.

you could then hand this attribute over to the view you call from the controller, like here:

method DO_REQUEST .

data: view type ref to if_bsp_page.

view = create_view( view_name = 'test.htm' ).

view->set_attribute( name = 'page_attribute' value = public_controller_attribute ).

call_view( view ).

endmethod.

regards,

norbert