0

How to define three or more models for use within a MVVM Tree?

asked 2012-10-01 10:26:28 +0800

davout gravatar image davout
1435 3 18

updated 2012-10-01 14:49:18 +0800

How do I define a MVVM driven tree where there are three or more models that could be used to display a tree node?

The standard @template example only allows for two options, like:


<tree model="@load(hierarchyModel) @template(each.titleOnly ? 'titleOnly' : 'twoPart' )">



Any suggestions?

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2012-10-10 08:45:10 +0800

khcyt gravatar image khcyt
216 1 1

Hello davout, sorry, for the late reply. I would write it as follows

<tree model="@load(hierarchyModel) @template(each.titleOnly ? 'titleOnly' : (each.whatever ? 'twoPart' : 'nextPart'))">


Hope this helps.

Kai

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-10-01 10:26:28 +0800

Seen: 70 times

Last updated: Oct 10 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More