zacheeye / vaadin-appfoundation

Automatically exported from code.google.com/p/vaadin-appfoundation
0 stars 0 forks source link

No DefaultViewFactory when not extending AbstractView #27

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Follow the code examples for the View Module
2. Don't extend AbstractView for any views, simply implement the View interface
3. Get NPE throw at line ViewItem:62

What is the expected output? 
  expected views to navigate (activate)

What do you see instead?
  blows up

What version of the product are you using?
  1.3.5

Please provide any additional information below.
  ViewItem:35:
    if (AbstractView.class.isAssignableFrom((Class<?>) viewId))

  - Above conditional fails causing no factory to be set
  - As a work around: In my Application class, I added "ViewHandler.setDefaultViewFactory(new DefaultViewFactory());"

Original issue reported on code.google.com by ljo...@innovativethinking-inc.com on 21 Oct 2011 at 5:08

GoogleCodeExporter commented 8 years ago
Assumption 1: I don't have to extend AbstractView
"You can use the AbstractView as a basis for your views or then you can 
directly implement the View interface in any way you like it."

Assumption 2: I don't _need_ to set a ViewFactory 
"By default, the ViewItem gets an implementation of the DefaultViewFactory, 
which calls on the view class's default constructor to instantiate the view 
object."

Original comment by ljo...@innovativethinking-inc.com on 21 Oct 2011 at 5:36