Closed GoogleCodeExporter closed 8 years ago
If you look at the Mvp4gModules example, when you display a company, the
history
name is stored (you have something like
#company/goToDisplay?id=2&name=Company%202).
When you display a product, the history name is also stored (you have something
like
#product/goToDisplay?id=0&name=Product%200).
However events fired by the RootModule (like goToCompany & goToProduct), there
is no
history name (you have something like #goToCompany and #goToProduct) because
they're
fired by the RootModule.
Is it the reason why you don't have the history name in your browser URL?
Original comment by plcoir...@gmail.com
on 30 Mar 2010 at 11:43
Yes that's exactly the case.
Since @HistoryName is attached to the module interface and by the example in
your
documentation (#module/submodule/event1), I thought that name would be like an
alias
used when the submodule is loaded.
I see now that it is not the case.
It would be a nice feature though.
Original comment by david.c....@gmail.com
on 30 Mar 2010 at 2:48
What you would like is to have the child module name automatically stored in the
token when a child module is loaded?
I wouldn't be for such feature because developers should have the choice to
store or
not an event in the history even if it loads a child module. Also, what happens
if an
event loads several children, which one do you store?
Now maybe you can configure your event bus another way to have the behavior you
want:
-either associate an history converter with the event of the child module and
not the
parent. Like that instead of #goToCompany, you would have #company/goToCompany
-or have the name of the event that loads the child module be the same as the
history
name of the child module. In the example, rename goToCompany to company so that
#company will be stored in the URL.
Hope this help.
Original comment by plcoir...@gmail.com
on 31 Mar 2010 at 2:35
It did help.
Thanks for your quick replies and your tips.
Original comment by david.c....@gmail.com
on 31 Mar 2010 at 10:15
Original comment by plcoir...@gmail.com
on 25 Apr 2010 at 10:36
I am unable to create a child Module from another child Module. How to solve
it? Has
anybody done this? I extended the child Module(B) from another child Module(A)
and
mention the child Module(B) name in the child Module(A) event bus. The history
converter works (convertToToken) works fine but the child Module (B) Impl fails
to
instantiate due to being abstract class. I guess the inheritance from the child
Module(A) is not being implemented for the child Module(B). ..... Any
Suggestions!!!!
Original comment by jiunara...@gmail.com
on 21 May 2010 at 11:43
Original issue reported on code.google.com by
david.c....@gmail.com
on 30 Mar 2010 at 9:22