| Author |
Message |
Stefan [MSFT]
Guest
|
Posted:
Wed Nov 09, 2005 5:51 pm Post subject:
Re: Question about CmsHttpContext.RollBackAll() |
|
|
Hi Charly,
between postbacks the context is not persisted.
The livetime of a CmsContext is exactly one request.
I assume that the CmsEndModule will do a CommitAll before it disposes the
context.
With other words: it is not possible to preserve changes between postbacks.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------
"Charly" <cbretana@areteind.com> wrote in message
news:1131548835.300922.16100@g44g2000cwa.googlegroups.com...
| Quote: | Stefan,
Hi, Kenneth is researching this for a project we are working on
together. We know it is not being rolled back because when we close
the template (this is a Postback in which we call
CmsHttpContext.RollBackALl() And reload the same posting into the
template again, the changes made in the previous seesion are still
visible.
I have noticed something else. If we make some changes, and
immediately close the template form, (calling RollbackAll() on the
close ), the changes are not persisted.... But we have some
functionality on the template form that does a postback, and if we use
that functionality, and then on a subsequent postback close the form,
the changes are persisted... could the postbacl be afecting this ?
Regards,
Charly
|
|
|
| Back to top |
|
 |
Stefan [MSFT]
Guest
|
Posted:
Wed Nov 09, 2005 5:51 pm Post subject:
Re: Question about CmsHttpContext.RollBackAll() |
|
|
Hi Charly,
no. Only a Commit will write to the database.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------
"Charly" <cbretana@areteind.com> wrote in message
news:1131551582.765456.175460@g44g2000cwa.googlegroups.com...
| Quote: | Stefan,
Isn't the placeholder writing to the DB, on each postback, simply
because it's "bound" to a placeholder definition? In a vanilla
implementation, where you just put a placeholer on a template, and do
not call any PAPI functions,, how else does content get into DB ? I
assumed that the rollbackALl or COmmitAll()) was to either "undo" or
"finalize" the automatic database write that had already happened...
|
|
|
| Back to top |
|
 |
Charly
Guest
|
Posted:
Wed Nov 09, 2005 5:51 pm Post subject:
Re: Question about CmsHttpContext.RollBackAll() |
|
|
Stefan,
SOmething else you mentioned... "I assume that the CmsEndModule will
do a CommitAll before it disposes the
context"
What does this mean ? and How can I check this? If something is
automatically calling CommitAll() on our postbacks, that would explain
the behavior we are seeing... |
|
| Back to top |
|
 |
Charly
Guest
|
Posted:
Wed Nov 09, 2005 5:51 pm Post subject:
Re: Question about CmsHttpContext.RollBackAll() |
|
|
Stefan,
Isn't the placeholder writing to the DB, on each postback, simply
because it's "bound" to a placeholder definition? In a vanilla
implementation, where you just put a placeholer on a template, and do
not call any PAPI functions,, how else does content get into DB ? I
assumed that the rollbackALl or COmmitAll()) was to either "undo" or
"finalize" the automatic database write that had already happened... |
|
| Back to top |
|
 |
Charly
Guest
|
Posted:
Wed Nov 09, 2005 5:51 pm Post subject:
Re: Question about CmsHttpContext.RollBackAll() |
|
|
No I was not calling RollbackAll in same request... But I was not
calling CommitAll either,
OOPS, Found It !!!
I Just needed to set CmsHttpContext.RollbackOnSessionEnd = true;
The default is false, and this implicitly calls CommitAll on sesion
end...
(And I need to persist the changes between requests into Viewstate or
something else.. )
Again, Thanks much for your help!
Charly |
|
| Back to top |
|
 |
Stefan [MSFT]
Guest
|
Posted:
Wed Nov 09, 2005 5:51 pm Post subject:
Re: Question about CmsHttpContext.RollBackAll() |
|
|
Hi Charly,
that's what I assumed - but I did not know that it is configurable!
Interesting!
Nice to learn something new every day!
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------
"Charly" <cbretana@areteind.com> wrote in message
news:1131556115.544340.235310@o13g2000cwo.googlegroups.com...
| Quote: | No I was not calling RollbackAll in same request... But I was not
calling CommitAll either,
OOPS, Found It !!!
I Just needed to set CmsHttpContext.RollbackOnSessionEnd = true;
The default is false, and this implicitly calls CommitAll on sesion
end...
(And I need to persist the changes between requests into Viewstate or
something else.. )
Again, Thanks much for your help!
Charly
|
|
|
| Back to top |
|
 |
|
|
|
|