cancel
Showing results for 
Search instead for 
Did you mean: 

BSP MVC - GET PAGE ATTRIBUTE ???

prabhu_s2
Active Contributor
0 Kudos

Hello!

I need some help on the below piece of code for retrieving and setting the value of a page attribute:

the view 'Report.htm'  is called from HTML page 'Follow.htm' (without a flow logic)...the below pice of code is implemented in the page layout of Follow.htm

    <bsp:call url="MAIN.do" comp_id = "view">

        <bsp:parameter name="view" value="Report.htm"/>

     </bsp:call>

once this code is executed the controler is triggered and from the the method DO_REQUEST the view Report.htm is called.

Now in the calling page Follow.htm I have a page attribute 'Lock' set which i want to be read inside the contoller method DO_REQUEST and hence it could be mapped to page attribute of the view Report.htm .


Any advice on how to read this attribute "lock"? I tried various ways but unable to get it.....I do not want to export/import nor use class attibute to read this value....


Code i currently have in the controller mehtod DO_REQUEST is:


   CALL METHOD get_attribute( EXPORTING name 'LOCK' IMPORTING value = val ).  "this triggers a short dump as LOCK not found


   page = create_view( view_name = view ).

   page->set_attribute( name 'LOCK' value = val ).

   call_view( page ).

Accepted Solutions (0)

Answers (1)

Answers (1)

prabhu_s2
Active Contributor
0 Kudos

Hi...any tips on this please?

prabhu_s2
Active Contributor
0 Kudos

fixed it by creating a attribute in the controller and calling it by

    <bsp:call url="MAIN.do" comp_id = "view">

        <bsp:parameter name="view" value="Report.htm"/>

        <bsp:parameter name="lock" value="<%=lock%>"/>

     </bsp:call>