Hey,

So this is interesting. The Compiler decided not to compile one of my
classes. So at runtime I get the wonderful ClassNotFound exception.
There are no errors, everything succeeds. No idea how to fix it, and
it's very weird. Here's the setup...

@Singleton
public class LandingPagePresenterImpl implements LandingPagePresenter
{

  LandingPageDisplayProvider landingPageDisplayProvider;
  ...
  @Inject
  public LandingPagePresenterImpl(LandingPageDisplayProvider
landingPageDisplayProvider, ... ){
    this.landingPageDisplayProvider = landingPageDisplayProvider;
    ...
  }

  ...

  @Override
  public void onAtLandingPage(AtLandingPage place) {
    ...
    // setup child presenters
    setLoginPresenter(loginPresenterProvider.get());

    ...
    setDisplay(constructDisplay());
    ...
  }

  public LandingPageDisplay constructDisplay() {
    LoginDisplay loginDisplay = (LoginDisplay) getLoginPresenter
().display();
    return landingPagedisplayProvider.get(loginDisplay);
<<<<<-------   CODE FAILS HERE! (ClassNotFound)
  }

}

The provider looks like so...

@Singleton
public class LandingPageDisplayProvider implements
Provider<LandingPageDisplay> {

  /* dependencies */
  private LandingPageBinder binder;

  @Inject
  public LandingPageDisplayProvider(LandingPageBinder binder) {
    this.binder = binder;
  }

  @Override
  public LandingPageDisplay get() {
    return null;
  }

  public LandingPageDisplay get(LoginDisplay loginDisplay) {
    return new LandingPageDisplayImpl(binder, loginDisplay);
  }

}

within my Module I have

bind(LandingPageDisplay.class).toProvider
(LandingPageDisplayProvider.class);

For good measure here is the display impl

public class LandingPageDisplayImpl extends Composite implements
    LandingPageDisplay {

  public interface LandingPageBinder extends
      UiBinder<DockLayoutPanel, LandingPageDisplayImpl> {
  }

  private LandingPageBinder binder;
  @UiField(provided = true)
  LoginDisplayImpl loginDisplay;

  public LandingPageDisplayImpl(LandingPageBinder binder, LoginDisplay
loginDisplay) {
    this.binder = binder;
    this.loginDisplay = (LoginDisplayImpl) loginDisplay;
    initWidget(this.binder.createAndBindUi(this));
  }

}

So, one, I think its an MVP compatible way of using UiBinder and GIN.
And two, it's not working :).  I should mention that LoginDisplay
doesn't have any issues as it is just a Label, so it doesn't have any
UiField annotations.

When I compile.. I look at SOYC and LandingPageDisplayImpl is
there!!
In SOYC my compiled display package looks like this:
package.LandingPageDisplayImpl
package.LoginDisplayImpl
package.LoginDisplayImpl_LoginDisplayBinderImpl  (the binder
implementation that GIN automatically injects by calling GWT.create)

So, from SOYC it seems that LandingPageDisplayBinderImpl is missing.
But when I step through Debug code it says LandingPageDisplayImpl is
missing (ClassNotFound exception).

Does anyone have an idea where to start???

-Tristan

--

You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to