on 11-17-2005 8:26 PM
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).
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).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
But pls be sure what are the consequences when you make your application stateful. Go through this thread for your information:
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.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.