ValuesManager is awesome. It has saved me from writing code to go foraging for form item values. I think I had a configuration working a while ago. And, then had no reason to check if for some time. Now, I find that form item values changed on member forms are not picked up.
The situation is that the user is allowed to change 'print options' on member forms under a window before hitting a button to print. The button click event calls a macro that generates a PDF file just fine. The window has a valuesManager. If I don't make any changes, then I get the valuesManager values I get out are just fine. Any changes made to the underlying forms, however, are ignored. In my test I change a 'MeetingDetails' checkbox.
I know the change is registered because I have an itemChange event fire that shows it goes from 'true' to 'false'.
In all the diagnostics and results, it is clear the value being used for MeetingDetails is still 'true'.
I tried ValuesManager.synchronizeMembers() even though I understood that it only update the member form values. Not the other way around, like I need.
I note that the datapath on the member form is 'Agenda/Options'. This works for pulling the values out in the structure needed. But, it may mess up the synchronization
Here is the window.
And, the form in question.
So, I am trying to understand this morning why the two structures depicted below do not behave the same (i.e. Agenda vs. Minutes). It may have to do with the meaning of dataPath:"/". I can load and retrieve data into Minutes. setValues cannot find the fields under Agenda.
The data being loaded into the VM:
I wonder if it related to another problem for which I have a workaround. The values I get out for each VM member form have an 'Agenda' object tacked onto the end. The workaround is a test for it and then a simple deletion.
I am not sure how I broke it, if it ever worked. Any help would be appreciated.
I may be overthinking this. The 'Agena' dataPath scheme was intended to get around my real problem which was to get the DynamicForm field changes to propogate to the valuseManager for access using getValues. My theory was that the nested 'a/b' datapaths were the source. And, that removing them with an equivalent scheme would be the fix.
Thanks. And, I hope you are having a Happy New Year.
Rick
P.S. I am running SmartClient_v8.2p_2013-11-07/EVAL Development Only on Mozilla Firefox 20.0 with Firebug
using Windows 7 Premium 64 bit.
The situation is that the user is allowed to change 'print options' on member forms under a window before hitting a button to print. The button click event calls a macro that generates a PDF file just fine. The window has a valuesManager. If I don't make any changes, then I get the valuesManager values I get out are just fine. Any changes made to the underlying forms, however, are ignored. In my test I change a 'MeetingDetails' checkbox.
I know the change is registered because I have an itemChange event fire that shows it goes from 'true' to 'false'.
In all the diagnostics and results, it is clear the value being used for MeetingDetails is still 'true'.
I tried ValuesManager.synchronizeMembers() even though I understood that it only update the member form values. Not the other way around, like I need.
I note that the datapath on the member form is 'Agenda/Options'. This works for pulling the values out in the structure needed. But, it may mess up the synchronization
Here is the window.
Code:
isc.Window.create({ ID:"MeetingWindow", autoDraw:false, overflow:"hidden", isModal:true, visibility:"hidden", title:"Meeting Window", showMinimizeButton:false, showMaximizeButton:true, showStatusBar:false, showResizer:false, items:[ MeetingForm, MeetingBottomHalf ], showModalMask:true, modalMaskOpacity:10, width:"100%", height:665, top:84, canDragReposition:false, canDragResize:false, valuesManager:isc.ValuesManager.create({ ID:"meetingTypeVM" }), showShadow:false })
Code:
isc.DynamicForm.create({ ID:"AgendaOptionsForm", autoDraw:false, numCols:5, overflow:"visible", fields:[ { dataPath:"MeetingDetails", name:"MeetingDetails", title:"Meeting Details", disabled:false, _constructor:"CheckboxItem" }, { dataPath:"IncludeParticipants", name:"IncludeParticipants", title:"Include Participants", disabled:false, _constructor:"CheckboxItem" }, { dataPath:"TopicDetails", name:"TopicDetails", title:"Topic Details", disabled:false, _constructor:"CheckboxItem" }, { dataPath:"TopicIssues", name:"TopicIssues", title:"Topic Issues", disabled:false, _constructor:"CheckboxItem" }, { dataPath:"IssueDetails", name:"IssueDetails", title:"Issue Details", disabled:false, _constructor:"CheckboxItem" }, { dataPath:"IssueTasks", name:"IssueTasks", title:"Issue Tasks", disabled:false, _constructor:"CheckboxItem" }, { dataPath:"TaskDetails", name:"TaskDetails", title:"Task Details", disabled:false, _constructor:"CheckboxItem" }, { dataPath:"CompletedTasks", name:"CompletedTasks", title:"Completed Tasks", disabled:false, _constructor:"CheckboxItem" } ], width:"100%", height:100, extraSpace:10, dataPath:"Agenda/Options", itemChange:"AgendaOptionsForm_itemChange(item, newValue, oldValue, MeetingForm)" })
Code:
Window:MeetingWindow +---DynamicForm: MeetingForm +---DynamicForm: MeetingBottomHalf +---HLayout: MeetingContentOptions +---TabSet: MeetingContentTabs +---VLayout: AgendaOptionsLayout (dataPath:"Agenda") | +---DynamicForm: AgendaOptionsForm (dataPath:"Options") | +---TabSet: AgendaOptionsTabs | +---DynamicForm: AgendaOptionsTopicForm (dataPath:"Topic") | +---DynamicForm: AgendaOptionsIssueForm (dataPath:"Issue") | +---DynamicForm: AgendaOptionsTaskForm (dataPath:"Task") | +---DynamicForm: AgendaOptionsSpecialForm (dataPath:"Special") | +---VLayout: MinutesOptionsLayout +---DynamicForm: MinutesOptionsForm (dataPath:"Minutes/Options") +---TabSet: MinutesOptionsTabs +---DynamicForm: MinutesOptionsTopicForm (dataPath:"Minutes/Topic") +---DynamicForm: MinutesOptionsIssueForm (dataPath:"Minutes/Issue") +---DynamicForm: MinutesOptionsTaskForm (dataPath:"Minutes/Task") +---DynamicForm: MinutesOptionsSpecialForm (dataPath:"Minutes/Special")
AgendaPrintOptions:
'{"Options": { "MeetingDetails": true, "TopicDetails": true, "IncludeParticipants": true, "TopicIssues": true, "IssueTasks": true, "CompletedTasks": false, "IssueDetails": true, "TaskDetails": true }, "Topic": { "Leader": true, "TopicTime": true, "SessionType": true, "ExpectedResults": true, "SearchEnabled": false, "ImpactFilter": false, "CategoryFilter": false, "IssueTypeFilter": false, }, "Issue": { "DueDate": true, "IssueType": true, "IssueStatus": true, "Category": true, "IssueDesc": true, "Impact": true, "Owner": true, "Originator": false, "Private": true, "Resolution": false, "ClosedDate": true, "OrigDueDate": false, "ModifiedDate": false, "CreatedDate": true, "IssueLog": true, "IssueLogCount": 3, "IssueLogUnit": "Entries", "IssueLogOrder": "Reverse" }, "Task": { "DueDate": true, "StartDate": true, "TaskStatus": true, "TaskDesc": false, "Owner": true, "CompletedDate": true, "OrigDueDate": false, "ModifiedDate": false, "CreatedDate": false, "TaskLog": false, "TaskLogCount": 3, "TaskLogUnit": "Entries", "TaskLogOrder": "Reverse" }, "Special": { "IssueLikelihood": false, "IssueImpactDesc": false, "SpecificDetails": false } }',
MinutesPrintOptions
'{"Options": { "MeetingDetails": true, "TopicDetails": true, "IncludeParticipants": true, "TopicIssues": true, "IssueTasks": true, "CompletedTasks": false, "IssueDetails": true, "TaskDetails": true }, "Topic": { "Leader": true, "TopicTime": true, "SessionType": true, "ExpectedResults": true, "SearchEnabled": false, "ImpactFilter": false, "CategoryFilter": false, "IssueTypeFilter": false, }, "Issue": { "DueDate": true, "IssueType": true, "IssueStatus": true, "Category": true, "IssueDesc": true, "Impact": true, "Owner": true, "Originator": false, "Private": true, "Resolution": false, "ClosedDate": true, "OrigDueDate": false, "ModifiedDate": false, "CreatedDate": true, "IssueLog": true, "IssueLogCount": 3, "IssueLogUnit": "Entries", "IssueLogOrder": "Reverse" }, "Task": { "DueDate": true, "StartDate": true, "TaskStatus": true, "TaskDesc": false, "Owner": true, "CompletedDate": true, "OrigDueDate": false, "ModifiedDate": false, "CreatedDate": false, "TaskLog": false, "TaskLogCount": 3, "TaskLogUnit": "Entries", "TaskLogOrder": "Reverse" }, "Special": { "IssueLikelihood": false, "IssueImpactDesc": false, "SpecificDetails": false } }');
'{"Options": { "MeetingDetails": true, "TopicDetails": true, "IncludeParticipants": true, "TopicIssues": true, "IssueTasks": true, "CompletedTasks": false, "IssueDetails": true, "TaskDetails": true }, "Topic": { "Leader": true, "TopicTime": true, "SessionType": true, "ExpectedResults": true, "SearchEnabled": false, "ImpactFilter": false, "CategoryFilter": false, "IssueTypeFilter": false, }, "Issue": { "DueDate": true, "IssueType": true, "IssueStatus": true, "Category": true, "IssueDesc": true, "Impact": true, "Owner": true, "Originator": false, "Private": true, "Resolution": false, "ClosedDate": true, "OrigDueDate": false, "ModifiedDate": false, "CreatedDate": true, "IssueLog": true, "IssueLogCount": 3, "IssueLogUnit": "Entries", "IssueLogOrder": "Reverse" }, "Task": { "DueDate": true, "StartDate": true, "TaskStatus": true, "TaskDesc": false, "Owner": true, "CompletedDate": true, "OrigDueDate": false, "ModifiedDate": false, "CreatedDate": false, "TaskLog": false, "TaskLogCount": 3, "TaskLogUnit": "Entries", "TaskLogOrder": "Reverse" }, "Special": { "IssueLikelihood": false, "IssueImpactDesc": false, "SpecificDetails": false } }',
MinutesPrintOptions
'{"Options": { "MeetingDetails": true, "TopicDetails": true, "IncludeParticipants": true, "TopicIssues": true, "IssueTasks": true, "CompletedTasks": false, "IssueDetails": true, "TaskDetails": true }, "Topic": { "Leader": true, "TopicTime": true, "SessionType": true, "ExpectedResults": true, "SearchEnabled": false, "ImpactFilter": false, "CategoryFilter": false, "IssueTypeFilter": false, }, "Issue": { "DueDate": true, "IssueType": true, "IssueStatus": true, "Category": true, "IssueDesc": true, "Impact": true, "Owner": true, "Originator": false, "Private": true, "Resolution": false, "ClosedDate": true, "OrigDueDate": false, "ModifiedDate": false, "CreatedDate": true, "IssueLog": true, "IssueLogCount": 3, "IssueLogUnit": "Entries", "IssueLogOrder": "Reverse" }, "Task": { "DueDate": true, "StartDate": true, "TaskStatus": true, "TaskDesc": false, "Owner": true, "CompletedDate": true, "OrigDueDate": false, "ModifiedDate": false, "CreatedDate": false, "TaskLog": false, "TaskLogCount": 3, "TaskLogUnit": "Entries", "TaskLogOrder": "Reverse" }, "Special": { "IssueLikelihood": false, "IssueImpactDesc": false, "SpecificDetails": false } }');
I am not sure how I broke it, if it ever worked. Any help would be appreciated.
I may be overthinking this. The 'Agena' dataPath scheme was intended to get around my real problem which was to get the DynamicForm field changes to propogate to the valuseManager for access using getValues. My theory was that the nested 'a/b' datapaths were the source. And, that removing them with an equivalent scheme would be the fix.
Thanks. And, I hope you are having a Happy New Year.
Rick
P.S. I am running SmartClient_v8.2p_2013-11-07/EVAL Development Only on Mozilla Firefox 20.0 with Firebug
using Windows 7 Premium 64 bit.
Comment