google-code-export / mvp4g

Automatically exported from code.google.com/p/mvp4g
1 stars 0 forks source link

child module of a child module has its fragment in leftover code #96

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
see http://groups.google.com/group/mvp4g/browse_thread/thread/1a9bf57bc27b1c81:

I tried to understand my problem on your own showcase example called 
Mvp4gModules. In this example you have Mvp4gModule(root), 
ProductModule(child) and CompanyModule(child). I created new 2nd child 
level module called SubModule (it's parent is CompanyModule). However, 
as soon as I added navigation event goToSub() to initiate the 
SubModule it fell in left over fragment. Check my steps bellow: 
1. I added new com.google.gwt.user.client.ui.Button subButton into 
CompanyListView as a navigation button to start SubModule 
2. In CompanyListPresenter I added following lines within bindView() 
method: 
                view.getSubButton().addClickHandler( new ClickHandler() { 
                        public void onClick( ClickEvent event ) { 
                                eventBus.goToSub(5, 10); 
                        } 
                } ); 
3. In CompanyEventBus I added following lines to be able to initiate 
SubModule 
3a) New child module annotation in CompanyEventBus 
@ChildModules( { @ChildModule( moduleClass = SubModule.class, async = 
true, autoDisplay = false ) } ) 
3b) Event that is initiated when user clicks on my new Button within 
CompanyListView 
        @Event( modulesToLoad = SubModule.class,  navigationEvent = true ) 
        void goToSub( int start, int end ); 
4. SubModule's SubEventBus has only one event 
@Events( startView = SubListView.class, module = SubModule.class ) 
public interface SubEventBus extends EventBus { 
        @Event( handlers = SubListPresenter.class) 
        void goToSub( int start, int end ); 
} 

5. SubListPresenter is empty 
        public void onGoToSub( int start, int end ) { 
            // Do nothing 
        } 
The SOYC says that Class: 
com.mvp4g.example.client.company.sub.SubModuleImpl$2 is in left over 
fragment due to following dependencies. 
Class: com.mvp4g.example.client.company.sub.SubModuleImpl$2     Size 
(bytes) 
com.mvp4g.example.client.company.sub.SubModuleImpl$2::$goToSub 
com.mvp4g.example.client.company.CompanyModuleImpl$3$4$1::$pass 
com.mvp4g.example.client.company.CompanyModuleImpl$3$4$1::pass 
com.mvp4g.example.client.company.CompanyModuleImpl$3$4::execute 
com.mvp4g.example.client.company.CompanyModuleImpl$3::$goToSub 
com.mvp4g.example.client.company.presenter.CompanyListPresenter 
$4::onClick 
com.mvp4g.example.client.company.presenter.CompanyListPresenter::bindView 
com.mvp4g.example.client.company.CompanyModuleImpl_com_mvp4g_example_client 
_company_CompanyModuleGinjectorImpl:: 
$create_Key$type$com$mvp4g$example$client$company$presenter 
$CompanyListPresenter$_annotation$$none$$ 
com.mvp4g.example.client.company.CompanyModuleImpl:: 
$createAndStartModule 
I really don't know what I'm doing wrong. I want to have this 
SubModule (2nd child level) in explicit fragment. 

Original issue reported on code.google.com by plcoir...@gmail.com on 20 Sep 2011 at 1:02

GoogleCodeExporter commented 9 years ago
I couldn't reproduce the issue. See attached example I created.

Original comment by plcoir...@gmail.com on 7 Dec 2011 at 1:54

Attachments:

GoogleCodeExporter commented 9 years ago
Marked as invalid since I couldn't reproduce it.

Original comment by plcoir...@gmail.com on 5 Sep 2013 at 4:32