I have a custom grid control, which opens an overlay. The issue I have at the moment, is that the overlay itself works fine and I can see it's recording the data I enter in the text boxes. I click submit int he overlay, the view updates great. That is until I click publish, which then wipes the data I've just added.
Just tried replacing all instances of control.value and it does work now. What I don't quite understand is that we have other controls that use control.value as part of the overlay and these seem to work fine, also, does saving to scope.model have any impact on Courier and transferring pages. I sort of remember having an issue with this previously hence the idea to use $scope.control.
Happy to hear that you managed to get it working - I don't have that much experience using Courier so I don't know what potential issues you could be facing and if it's related or caused by something else.
Well I'm fairly certain that unless you use $scope.model in order to have Umbraco save the values. Not sure how you have used $scope.control in other extensions but perhaps the values they store are somehow mapped to $scope.model? Or maybe there is something I don't know about, which can certainly also be the case :)
$scope.control.value gets wiped on publish
Hello,
I have a custom grid control, which opens an overlay. The issue I have at the moment, is that the overlay itself works fine and I can see it's recording the data I enter in the text boxes. I click submit int he overlay, the view updates great. That is until I click publish, which then wipes the data I've just added.
Here's my code:-
Can anyone see any obvious reason, why the $scope.control.value would get wiped when you publish the page?
Thanks
Paul
Hi Paul
Maybe there is something that I don't fully know or understand but I would say that you should use
$scope.model.value
instead of$scope.control.value
/Jan
Hi Jan,
Thanks for the quick response, should I then replace every instance of $scope.control.value with $scope.model.value?
Thanks
Paul
Hi Jan,
Just tried replacing all instances of control.value and it does work now. What I don't quite understand is that we have other controls that use control.value as part of the overlay and these seem to work fine, also, does saving to scope.model have any impact on Courier and transferring pages. I sort of remember having an issue with this previously hence the idea to use $scope.control.
Thanks Paul
Hi Paul
Happy to hear that you managed to get it working - I don't have that much experience using Courier so I don't know what potential issues you could be facing and if it's related or caused by something else.
Well I'm fairly certain that unless you use $scope.model in order to have Umbraco save the values. Not sure how you have used $scope.control in other extensions but perhaps the values they store are somehow mapped to $scope.model? Or maybe there is something I don't know about, which can certainly also be the case :)
/Jan
is working on a reply...