displaying current session value requires 2nd postback

  • Thread starter Thread starter Jon Paal
  • Start date Start date
J

Jon Paal

I captured an arraylist into a session value but to display the current values, the page requires a postback or else it displays the
prior version of the value.

how do I force a post back automatically so I can always get the current value stored in the session object ?
 
I would rather investigate the first problem. There is no reason for which
you shouldn't get the current value stored in your session.

It looks like to me that you have some kind of ordering problem. You likely
have the rendering taking place (or you copy a value for later rendering)
before updating the value causing the displayed values to be outdated.
Reordering those steps should fix the problem.
 
The session value is populated on the postback.
it comes from a server side custom control.

I don't know how to reordering any sequence within the postback.

any other thoughts ?
 
I woud start by tracing events to diagnose the problem. In particular my
first move would be to check that the variable affectation is done in an
event that is earlier the one used to render the updated value.

Or do you mean they are in the same procedure one after the other ? Seeing
some code narrowed down to just what shows the problem could help (and
possibly could lead you to find out the problem as you go with simplified
code).
 
thanks for helping.

I have found a way to get the arraylist without the session object.
I created a second instance of the control and was able to retrieve the information via a function.

i now get the current values in the postback :)


Patrice said:
I woud start by tracing events to diagnose the problem. In particular my first move would be to check that the variable affectation
is done in an event that is earlier the one used to render the updated value.

Or do you mean they are in the same procedure one after the other ? Seeing some code narrowed down to just what shows the problem
could help (and possibly could lead you to find out the problem as you go with simplified code).

--
Patrice

Jon Paal said:
The session value is populated on the postback.
it comes from a server side custom control.

I don't know how to reordering any sequence within the postback.

any other thoughts ?


Patrice said:
I would rather investigate the first problem. There is no reason for which you shouldn't get the current value stored in your
session.

It looks like to me that you have some kind of ordering problem. You likely have the rendering taking place (or you copy a value
for later rendering) before updating the value causing the displayed values to be outdated. Reordering those steps should fix
the problem.

--
Patrice

"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> a écrit dans le message de news: (e-mail address removed)...
I captured an arraylist into a session value but to display the current values, the page requires a postback or else it displays
the prior version of the value.

how do I force a post back automatically so I can always get the current value stored in the session object ?
 
Back
Top