Skip to Content
author's profile photo Former Member
Former Member

Problem with navigation->set parameter

Hello!

It's me again with a second problem. I habe problem with a handing over of data. Maybe it's the best, if I post the code and then try to explain the problem:

Layout (only a part of it)

<tr>
<td class="bspTbvHdrAlt">Customer Nr<td>
<td class="bspTbvCellAlt">


<%
  page->write( cnr ).
%>

</td>
</tr>
<tr>
<td class="bspTbvHdrAlt">First Name</td>
<td class="bspTbvCellAlt">
<%
  page->write( cfname ).
%>
</td>
</tr>
<tr>
<td class="bspTbvHdrAlt">Lastname</td>
<td class="bspTbvCellAlt">
<%
  page->write( cname ).
%>
</td>
</tr>


</table>
</form>


<table>

<tr>
<p class="bspH2">

<td>
<form method="post" action="">
<input class="submit" type="submit" name="OnInputProcessing(nextpg)" value="Next page to continue">
</td>
</tr>
</form>

</table>

OnInitialization

SELECT CUNOMAX INTO CNUMBER FROM ZMGKDMAX.

ENDSELECT.


CNUMBER = CNUMBER + 1.
cnr = CNUMBER.

OnInputProcessing

CASE event_id.
When 'nextpg'.
 NAVIGATION->SET_PARAMETER( 'cnr' ).
 navigation->goto_page('page3.htm').
ENDCASE.

CNR is a counting number. The problem with cnr is, that there is no value on OnInutProcessing. But there is a value for cnr at OnInitialization and at the layout.

For example, cnr has a value of '123'. If I start the application I can read this number on the screen (and also if I use the debugger). But at that moment when I go to OnInputProcessing cnr has no value.

Do you have an idea what the problem may be?

(Sorry for my english! But I hope you understand the problem. If not, ask me and I try to explain again).

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 18, 2005 at 02:47 PM

    Thanks again, Ravikiran!

    First my problem was, that the value of 'cnr' was not submited to OnInputProcessing while it was possible with every other attribute like f.e. 'cname' or 'cfname'.

    Then I inserted the your code line (runtime->keep_context = 1.) to make it stateful (I didn't find an option for stateless/statefull in the preferences of the page!!! WAS 6.20) and I can see the value at OnInputProcessing of 'cnr' if I use the debugger.

    But now there is the problem that I am not sure if the value is really submited to page3.htm. Because I can't read 'cnr' in this page 😔

    Page attributes for cnr are in both pages the same (cnr type string).

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 18, 2005 at 04:55 AM

    Hi Michael,

    You need to make your application stateful to retain the value of an attribute from OnInitialization event. You can make your application stateful by checking stateful from the properties tab or using this code:

    runtime->keep_context = 1.

    Hope this helps,

    Regards,

    Ravikiran.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Michael,

      But pls be sure what are the consequences when you make your application stateful. Go through this thread for your information:

      Memory consumption of BSP-application

      And more thing, where are these parameters cname and cfname are initialized. Unless the page is stateful, the values of the attributes cannot be retained after successive requests. To remove the confusions between stateful and statelss mode you can refer to this link:

      /people/mark.finnern/blog/2003/09/24/bsp-in-depth-confusion-between-stateless-stateful-and-authentication

      Hope this helps you.

      Regards,

      Ravikiran.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.