Hi,

I'm (new to tapestry) using tapestry 4.0.2 and JBoss 4.0.5, and having
problems with @InjectStateFlag.

I have an Application Object "user-data" which contains a "user" among other
objects (specified in hivemodule), this is used in a BaseComponent (login),
and its state flag accessed in the pageValidate( PageEvent event ) method of
"private page":

<!-- hivemodule.xml -->
<contribution configuration-id="tapestry.state.ApplicationObjects">
 <state-object name="user-data" scope="session">
   <create-instance class="com.cs.web.tapestry.domain.UserData"/>
 </state-object>

<!-- login component -->
@InjectState("user-data")
public abstract UserData getUserData();
public abstract void setUserData( UserData ud );

<!-- private page -->
@InjectStateFlag("user-data")
public abstract boolean getUserDataExists();

I know that if I use the following, the test getUserData().getUser() will
return the correct value (e.g. null if not logged in), yet why is
getUserData() already instantiated:
@InjectState("user-data")
public abstract UserData getUserData ();

Am I doing anything wrong?

Thanks
Cinzia

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to