Hi,
        I am not getting what I need to add in my hivemodule.xml file for
the create-instance class element value.
The content in my hivemodule.xml is:
<?xml version="1.0"?>
<module id="xxx" version="1.1.0" package="xxx.yyy.pages">
        <contribution configuration-id="tapestry.state.ApplicationObjects">
                <state-object name="zzz" scope="session">
                        <create-instance class="(DON'T KNOW WHETHER I NEED
TO CREATE A NEW CALSS FOR THIS OR NOT)"/>
                </state-object> 
        </contribution>
</module>

Actually I have a login page where in I have 2 fields, ie username and
password, if the login is successful I need to create a session and store
the username and password in that object.
For the login page, I have Login.java file where I have put this code:
@InjectState("zzz ")
    public abstract (don't know)  getzzz();

My Doubt here is:
Is that I need to create a new java class which should have getter's and
setter's methods for username and password and that class need to be put in
the hivmodule.xml " create-instance class" element?????

And also is that the username and password values gets set automatically
into that java class which I mention in hivemodule.xml or not????

And also how I need to retrieve those values in my Login.java files or any
other java files???

Please need help regarding this as soon as possible,

Thanks in advance,

Regards,
Anjali

-----Original Message-----
From: Nils Zonneveld [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 02, 2005 2:37 PM
To: Tapestry users
Subject: Re: Need help in creating session object

Anjali Abraham wrote:

>Hi All,
>            How to create session objects in tapestry4.0v, i.e. What code
>need to be added into .page and .java file for the same?
> 
>Thanks in Advance,
> 
>Regards,
>Anjali
> 
>
>  
>
I use Tapestry 3.0.3. With "Session object", I assume you mean a 
HttpSession object.

Tapestry uses a Visit object for HttpSession like storage.

put

    <property name="org.apache.tapestry.visit-class"
      value="com.foo.bar.system.Visit" />

in your .application file. The Visit class is just a POJO that 
implements Serializable.


HTH,

Nils Zonneveld

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

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

Reply via email to