0

ZK6 - MVVM valid for grid with variable/dynamically changing set of columns?

asked 2012-04-23 06:05:25 +0800

davout gravatar image davout
1435 3 18

I'm designing a complex ZK6 grid that will have a variable set of grid columns, and where the number of columns can change whilst it is displayed.

Is it possible to cover such a scenario using MVVM? How would I create a loop to programmatically create columns and rows inside a template?

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2012-04-24 02:36:28 +0800

iantsai gravatar image iantsai
2755 1

I'll suggest you use programmatic way first.

When things go dynamic, it's better to use Java code to control your UI rather than using template technology.
You might works well at the beginning, but end up with a mess when some requirements ask you to do work around.

link publish delete flag offensive edit

answered 2012-04-24 04:49:17 +0800

rdgrimes gravatar image rdgrimes
735 7

Are you aware of the menupopup attribute on the columns node? The functionality you want to is already built in without binding to anything either through GenericForwardComposer, SelectorComposer, or MVVM's BindComposer.

Ron

link publish delete flag offensive edit

answered 2012-04-24 07:05:30 +0800

davout gravatar image davout
1435 3 18

updated 2012-04-24 07:11:30 +0800

Sorry, don't understand this last comment.

I sort of assumed that I would have to fall back to using a composer, since the number and type of grid columns are not known in advance and can change during the user session.

I was just wondering whether the MVVM/template approach allows templates to be used for dynamically building multiple grid columns.

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-04-23 06:05:25 +0800

Seen: 217 times

Last updated: Apr 24 '12

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