View Full Version : MVC View interface

28 Feb 2009, 5:04 AM
I'm not used to the MVC pattern, so this might possibly be a stupid question. But why can LayoutContainer objects not be a View? Why can't I create a ContentPanel that is a View?

I know its because I can't extend both ContentPanel and View, but why isn't it possible to implement a View interface instead of extending it?

I think it would be a lot more intuitive if views where graphical objects that could be added directly to the user interface.

18 Mar 2009, 12:23 PM

Take a look at http://christianposta.com/blog/?p=6 -- this article really helped me a lot. Be sure you understand the concept of MVC. There is a link to http://en.wikipedia.org/wiki/Model-view-controller that may help you a bit. If you follow along with the sample mail application as you read the article, it may help.

Specific to your question, check out MailView.java in com.extjs.gxt.samples.mail.client.mvc.