Hi Team,
I took the create page of cover designer. On page load, data is taken from database and assigned to projectdetail variable. (refer code below)
When I click “load my info” button, the data from projectdetail variable is assigned to the text layers.
I changed the values and clicked save which saves the new values in database.
Now I took the saved file and loaded to canvas
loadProduct(“<GUID of saved file (state)>”);
The state file is loaded with correct data.
But if I click the load my info button again, I am getting the previous cached values.
//on page load the following executes.
var projectDetail;
getProjectDetails(); //get user info from database.
configuration = {
widgets: { FinishButton: { mode: "Disabled" } }, canvas: { color: "white" },
userInfo: {
"Front Cover Title": projectDetail.Title,
"Front Cover Subtitle": projectDetail.SubTitle,
"Spine Pen Name": projectDetail.PenName,
"Spine Title": projectDetail.Title,
"Front Cover Pen Name": projectDetail.PenName,
"About the Book": projectDetail.AboutTheBook,
"About the Author": projectDetail.AboutTheAuthor
}
};
One solution I tried
After the following line
this._onChangeContentButtonClickDelegate = this._onChangeContentButtonClick.bind(this);
if (product != null) {
Modify to this.setProduct(product,app.configuration.userInfo);
Modify to ProductHandler.prototype.setProduct = function (product, userInfo) {
After the following line
this._product = this._originalProduct.clone();
this._useRestoredProduct = false;
Add this._product.userInfo = userInfo;
That means app.configuration.userInfo is gibving the correct values.
Any help is much appreciated.
Thanks
Rohith