Its working fine now. My code was correct -- but i somehow forgot i declared the following in a superclass which caused the runtime error...
public abstract ApplicationStateManager getApplicationStateManager(); Thanks for the help! -Yves- On 6/25/06, Shing Hing Man <[EMAIL PROTECTED]> wrote:
> <property name="org.apache.tapestry.visit-class" > value="org.xxx.MyVisit"/> Instead of above, please try : <meta key="org.apache.tapestry.visit-class" value="org.xxx.MyVisit"/> Shing --- Yves Sy <[EMAIL PROTECTED]> wrote: > Thanks for the reply. > > Since I prefer to use non-deprecated methods, I'm > trying to do it the latter > way: > > @InjectState("visit") > public abstract MyVisit getMyVisit(); > > ..but this ends up with a runtime error" > > Unable to add field _$applicationStateManager to > class > $ProflightOptionsLink_106: duplicate field: > _$applicationStateManager > > By the way my class is a component class (extends > BaseComponent). > > Note that the ASO is the default ASO and is > configured like this in the > .application file: > > <property name="org.apache.tapestry.visit-class" > value="org.xxx.MyVisit"/> > > Any ideas how to make this work? > > -Yves- > > On 6/25/06, Kevin Menard <[EMAIL PROTECTED]> > wrote: > > > > On Sat, 24 Jun 2006 12:50:48 -0400, Yves Sy > <[EMAIL PROTECTED]> wrote: > > > > > I have an old Tapestry app which I began to > slowly port to Tapestry 4. > > > How > > > do I get a hold of the old visit object > configured Tapestry-3 style in a > > > Tapestry 4 page? > > > > The easiest thing to do is access it the same way > you would it T3. So, > > you'd add a meta value to your .application file. > E.g., > > > > <meta key="org.apache.tapestry.visit-class" > > value="com.servprise.www.Visit"/> > > > > Then from your page you can just call getVisit(). > You will get > > deprecation warnings, however. > > > > > > > > I tried > > > > > > MyVisit visit = (MyVisit) > getApplicationStateManager().get("visit"); > > > > > > but this doesn't work > > > > If you really want to go this route, I recommend > just injecting the visit > > property into one of your pages. Just be sure you > don't call your own > > method getVisit(). > > > > -- > > Kevin > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > -- > A bus station is where a bus stops. A train station > is where a train stops. > On my desk I have a work station... > Home page : http://uk.geocities.com/matmsh/index.html ___________________________________________________________ Yahoo! Messenger - with free PC-PC calling and photo sharing. http://uk.messenger.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- A bus station is where a bus stops. A train station is where a train stops. On my desk I have a work station...