[Cppcms-users] working with http::context.
Brought to you by:
artyom-beilis
From: augustin <aug...@ov...> - 2010-08-24 09:52:51
|
Hello, I've been trying to work with http::context but with no success. I am working with forms. During the validation process, I want to set some messages to display to the user. I have seen widgets::base_widget::error_message() but this is not what I need. I want to: 1) be able to set errors for the *whole* form, not a specific widget. 2) be able to set various messages that are valid only within a specific context (http get/post request). If I understand well, I cannot set those message within my cppcms::application namespace, since it is shared between all processes, regardless of user or sessions (?). Thus a message intended for one user might be displayed for another user. I could use the user session, but a message intended for one page (form submission() might appear on another tab, as the user browses other pages within the site (race condition?). It appeared to me that the http::context might be the best place to store temporary messages that I could retrieve and display at the end of the request. But I have tried and failed. I am not too sure if it's possible and how to go about it. I have tried to add members to the context object. If it's possible to do so, I did it the wrong way. Thanks, Augustin. -- Friends: http://www.reuniting.info/ http://activistsolutions.org/ My projects: http://astralcity.org/ http://3enjeux.overshoot.tv/ http://linux.overshoot.tv/ http://overshoot.tv/ http://charityware.info/ http://masquilier.org/ http://openteacher.info/ http://minguo.info/ http://www.wechange.org/ http://searching911.info/ . |