You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by 孙立伟 <da...@gmail.com> on 2009/03/02 03:51:26 UTC

AppModule just won't work

I'm following the book "Tapestry 5: Building Web Applications" to
start my first journey on Tapestrt,but it fails me. The way of inject
a interface of IDataSource by adding
"contributeApplicationStateManager(MappedConfiguration<class,ApplicationStateContribution>)"
to "AppModule.java" won't work. Where am I missing here? Is there a
way to diagnose this problem? I
 traced into TapestryAppInitializer and found that AppModule.class was
added to Registry successfully,but the breakpoints I set in AppModule
won't break at all. I am stucking here....

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: AppModule just won't work

Posted by dhning <ni...@gmail.com>.
It is not called when in appmodule initialization. Instead, it is called when initializing an applicationstatemanager.

Have test like this:
1. Add an ASO In one page, 
@ApplicationState(create=false)
 private User user;
2. Access the page.

Then your code will be called.

Thanks

DH


----- Original Message ----- 
From: "孙立伟" <da...@gmail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Monday, March 02, 2009 10:51 AM
Subject: AppModule just won't work


> I'm following the book "Tapestry 5: Building Web Applications" to
> start my first journey on Tapestrt,but it fails me. The way of inject
> a interface of IDataSource by adding
> "contributeApplicationStateManager(MappedConfiguration<class,ApplicationStateContribution>)"
> to "AppModule.java" won't work. Where am I missing here? Is there a
> way to diagnose this problem? I
> traced into TapestryAppInitializer and found that AppModule.class was
> added to Registry successfully,but the breakpoints I set in AppModule
> won't break at all. I am stucking here....
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
>