I am still having problems loading a valuesManager. I am working with the guidance given under Canvas.dataPath:
Below is a comparison.
First the values from the example, then the dataPath structure I believe the example uses. At the end of each canvas line is an expression that shows the full dataPath to reach its items. -> [path] / fields
Below are my values and structure (just the very top to keep it manageable.)
This is not working. I get errors in the developer console. I get one for each formitem I am trying to set a value for. I am only showing the first one below.
I note that the correct form (AgendaOptionsForm) has been found from the "Agenda/Options" in the path. So far, so good (Yahoo!). However, the item is not found. But, it should be. Here is the form and field in question.
My claim is that this is the same structure used in the example: -> [parentCompany/address] / street, city, state. parentCompany is a top level object. Its member 'address' has that as specified as a dataPath. And, it would find the 'street' field, if this was a true example that runs.
Absent any specifications, I will continue different dataPath schemes. The examples all show dataPath names on all intervening canvases. So, I am in uncharted territory. If I happen upon the solution the error will dissappear.
Any help in the meantime would be appreciated.
Thanks,
Rick
P.S. I am running SmartClient_v8.2p_2013-12-27/EVAL on Mozilla Firefox 20.0 with Firebug using Windows 7 Premium 64 bit.
Code:
isc.ValuesManager.create({ ID:'vm', values: { companyName:"Some Company", address:{ street:"123 Main Street", city:"New York", state:"NY" } parentCompany:{ companyName:"Some Corporation", address:{ street:"1 High Street", city:"New York", state:"NY" } } } }); isc.Layout.create({ valuesManager:"vm", members:[ isc.DynamicForm.create({ dataPath:"/", items:[{name:"companyName"}] }), isc.DynamicForm.create({ dataPath:"address", items:[{name:"street"}, {name:"city"}, {name:"state"}] }), isc.Layout.create({ dataPath:"parentCompany", members:[ isc.DynamicForm.create({ dataPath:"/", items:[{name:"companyName", type:"staticText"}] }), isc.DetailViewer.create({ dataPath:"address", fields:[{name:"street", name:"city", name:"state"}] }) ] }) ] });
First the values from the example, then the dataPath structure I believe the example uses. At the end of each canvas line is an expression that shows the full dataPath to reach its items. -> [path] / fields
Code:
values: { companyName:"Some Company", address:{ street:"123 Main Street", city:"New York", state:"NY" } parentCompany:{ companyName:"Some Corporation", address:{ street:"1 High Street", city:"New York", state:"NY" } } } Layout:MeetingWindow with valuesManager:"vm" +---DynamicForm: (dataPath:"/") -> companyName [/] +---DynamicForm: (dataPath:"address") -> [address] / street, city, state +---Layout: (dataPath:"parentCompany") +---DynamicForm: (dataPath:"/") -> companyName [parentCompany/] +---DetailViewer: (dataPath:"address") -> [parentCompany/address] / street, city, state
Code:
values: { "Agenda": { "Options": { "MeetingDetails": true, Window:MeetingWindow with valuesManager:"meetingTypeVM" +---DynamicForm: MeetingForm +---HLayout: MeetingBottomHalf +---HLayout: MeetingContentOptions +---TabSet: MeetingContentTabs +---VLayout: AgendaOptionsLayout (dataPath:"Agenda") | +---DynamicForm: AgendaOptionsForm (dataPath:"Options") -> [Agenda/Options] / MeetingDetails | +---TabSet: AgendaOptionsTabs | +---DynamicForm: AgendaOptionsTopicForm (dataPath:"Topic") -> [Agenda/Topic] | +---DynamicForm: AgendaOptionsIssueForm (dataPath:"Issue") | +---DynamicForm: AgendaOptionsTaskForm (dataPath:"Task") | +---DynamicForm: AgendaOptionsSpecialForm (dataPath:"Special") | +---VLayout: MinutesOptionsLayout (dataPath:"Minutes") +---DynamicForm: MinutesOptionsForm (dataPath:"/Options") +---TabSet: MinutesOptionsTabs (dataPath:"/") +---DynamicForm: MinutesOptionsTopicForm (dataPath:"Topic") +---DynamicForm: MinutesOptionsIssueForm (dataPath:"Issue") +---DynamicForm: MinutesOptionsTaskForm (dataPath:"Task") +---DynamicForm: MinutesOptionsSpecialForm (dataPath:"Special")
14:30:28.755:MUP1:DEBUG:Log:*************** MeetingForm.visibilityChanged
14:30:28.755:MUP1:DEBUG:Log:*** starting meetingTypeVM: {}
14:30:28.756:MUP1:WARN:ValuesManager:meetingTypeVM:Member Form: [DynamicForm ID:AgendaOptionsForm] has explicitly specified value for field[s] 'Agenda/Options/MeetingDetails', but has no item associated with this fieldName. Ignoring this value. Values may be set for fields with no associated form item directly on the valuesManager via valuesManager.setValues(), but not on member forms. See ValuesManager documentation for more info.
14:30:28.755:MUP1:DEBUG:Log:*** starting meetingTypeVM: {}
14:30:28.756:MUP1:WARN:ValuesManager:meetingTypeVM:Member Form: [DynamicForm ID:AgendaOptionsForm] has explicitly specified value for field[s] 'Agenda/Options/MeetingDetails', but has no item associated with this fieldName. Ignoring this value. Values may be set for fields with no associated form item directly on the valuesManager via valuesManager.setValues(), but not on member forms. See ValuesManager documentation for more info.
Code:
isc.DynamicForm.create({ ID:"AgendaOptionsForm", autoDraw:false, numCols:5, overflow:"visible", dataPath:"Options", fields:[ { name:"MeetingDetails", title:"Meeting Details", disabled:false, _constructor:"CheckboxItem" },
Absent any specifications, I will continue different dataPath schemes. The examples all show dataPath names on all intervening canvases. So, I am in uncharted territory. If I happen upon the solution the error will dissappear.
Any help in the meantime would be appreciated.
Thanks,
Rick
P.S. I am running SmartClient_v8.2p_2013-12-27/EVAL on Mozilla Firefox 20.0 with Firebug using Windows 7 Premium 64 bit.
Comment