+ Reply to Thread
Results 11 to 15 of 15
-
04-29-2008 06:02 PM #11toolbox Guest
I have been using the sample website, but have noticed that the save feature isn't working quite right. When I click the save button, the page says that answers have been successfully updated, but when I leave and then come back to the survey, or view the results in the checkbox app, the answers have not been changed.
Any idea what I need to update/change in the same app to get that to update correctly?
Thanks
-
05-02-2008 12:04 PM #12toolbox Guest
Here is the code in the app for saving the new results:
//Reload the current response, which is necessary because the response object does not have a lifecycle
// beyond the a single postback in the application. This will eventually change, but for now the
// response must be reloaded to prevent item IsValid states from getting confused.
LoadCurrentResponse();
bool valid = true;
if (_itemRenderers != null)
{
foreach (ItemRenderer renderer in _itemRenderers)
{
//Update the model
renderer.UpdateModel();
if (renderer.Model is ResponseItem)
{
valid = valid & ((ResponseItem)renderer.Model).Valid;
}
//Rebind the renderer to the model to cause the validation errors to show
// current state of the Model.
renderer.BindModel();
}
_answersUpdatedLbl.Visible = valid;
_validationErrorLbl.Visible = !_answersUpdatedLbl.Visible;
//Save the response state
CurrentResponse.SaveCurrentState();
}
After trying several things, I found that if I commented out the LoadCurrentResponse(); the new answers were saved correctly, and everything else still appears to work.
-
04-20-2009 02:02 PM #13
Junior Member
- Join Date
- Jan 2009
- Posts
- 11
Dusting off this thread...
- the fix above of commenting out LoadCurrentResponse() also worked for me.
- I find some settings in the config folder's XML files confusing, they conflict with settings in our running version of Checkbox Server.
- in particular, I wonder if the settings in Cache.XML where the security, text, response and template cache managers are set to 'true' (in our live system they're false) are causing some behavior I can't understand:
* if I change the template style to use numbered questions, CurrentSurvey in the OnePage application still shows the setting as false.
* if I change the template style's title or next/back labels to anything else, they never change in the OnePage app.
Suggestions?
Thanks,
Per
-
05-04-2009 07:29 PM #14
Administrator
- Join Date
- Mar 2007
- Location
- Prezza Technologies
- Posts
- 227
I'm pretty sure the one-page app replicates the functionality of the ViewResponseDetails screen, which does not use a survey's style template or style settings for rendering the page. You would have to modify the application if you wanted it to use those settings.
Settings that control display of page numbers and the like are properties of the ResponseTemplate object, and the actual style definitions are part of the StyleTemplate object associated with the survey. The StyleTemplateManager class can be used to load a style given it's database id.
-
05-05-2009 11:10 AM #15
Junior Member
- Join Date
- Jan 2009
- Posts
- 11
I'll take another look at the Style stuff.
But I don't think that the app replicates the ViewResponseDetails page because it shows the response in edit mode , not view mode. E.g. all the HTML controls are shown, not the values of the answers.
Per


LinkBack URL
About LinkBacks
Reply With Quote
