cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Menu binding to collection

btrevaskis
5-Regular Member

Menu binding to collection

I am trying to bind a Menu object to a collection widget and am having some issues passing fields from the Menu's GetMenuItems service down to the mashup parameter of the sub-mashup.

 

Please see the images below:

Service is binding with All DataService is binding with All Data

Collection widget binding, showing connection to sub-mashupCollection widget binding, showing connection to sub-mashup

"title" to "title" mapping"title" to "title" mapping

Sub-mashup parameter configSub-mashup parameter config

 

Mashup parameter bound to labelMashup parameter bound to label

Rendered mashup. Shows two records returned from service, and one selected mashup below in the collection widget.Rendered mashup. Shows two records returned from service, and one selected mashup below in the collection widget.

Errors shown.Errors shown.

14:58:24 ERROR - exception executing binding {"Id":"22df3b4e-f5b6-4477-bec3-7ad102aa949d","SourceArea":"Mashup","SourceSection":"","SourceId":"mashup-root","TargetArea":"UI","TargetSection":"","TargetId":"label-3","PropertyMaps":[{"SourceProperty":"title","SourcePropertyBaseType":"STRING","TargetProperty":"Text","TargetPropertyBaseType":"STRING"}],"isBoundToSelectedRows":false,"SourceDetails":"AllData"}
Exception: Cannot read property 'getProperty' of undefined

 

3 REPLIES 3
PaiChung
22-Sapphire I
(To:btrevaskis)

Try using GetEffectiveMenu because potentially you are running into a permissions issue?

GetEffectiveMenu should show you what the user in actuality has available as menu items.

 

the getProperty from undefined seems to say that the entity is not visible.

I do not see you using this service though.

 

Also double check the datashape, I do believe 'title' lower case is correct, but perhaps in the datashape it is returning 'Title' instead. Not sure if title would be a 'reserved' word, you can always try changing the mashup parameter name to something like mashupTitle.

btrevaskis
5-Regular Member
(To:PaiChung)

Tried with GetEffectiveMenu, same error. I am also running as an administrator, and can see the data being bound in the grid above. I can also see that there are multiple cells in the collection widget, showing that the data IS actually bound to the collection.

 

I did confirm in the datashape that title is lower case. I did try with "Title" and didn't have any success. 

 

Changed the param to mashupTitle and had the same error as well. 

btrevaskis
5-Regular Member
(To:btrevaskis)

I also tried binding to a template.GetImplementingThings data source and have the same issue.

Top Tags