Hi guys,

I have a query about how to capture data from a tml page and pass it back
into it's corresponding java file so that it can be processed and displayed
on another new page (or even on the same page after redrawing the same
page).

I have 2 pages currently, Page1.java and Page2.java where Page1 sets up
some information and passes it to Page2 by way of a service that I've
created for an external application in the AppModule.  Page1 simply has an
onActionFromStart method with a link that returns Page2 and on Page2 I
display an authentication dialog (username/password) inside an iFrame in
the page2.tml created by the service created in AppModule.

Now what I want to know how to do is to capture the users' 'username' so
that I can store it in a field on Page2.java and then pass it to a new page
(Page3.java) to indicate to the user that they have successfully
authenticated by displaying the username they entered and their sessionid.

On my Page2 do I make use of RequestGlobals (can I get such information
from this) or do I make use of any other classes in the Tapestry library
that I'm not aware of.  I'm still relatively new to how it all works and
I've managed to pass data to my tml pages (thanks to Thiago for earlier
assistance) but now I need a return ticket so to speak :-).

So my questions are:

1 - Can I capture data input (a username) from a tml page and pass it back
into the .java file bearing in mind I don't know the name of the field into
which the username is being entered, only that it is inside an iFrame
object.
2 - How do I extract this information along with any other that I may want
and display it on a new page (Page3.java).  Since I have no links to click
how would this captured data result in the creating of Page3.java?  Could I
use :

public class Page2{

@InjectPage private Page3 page3

@SessionAttribute
private String userName

Object onSomeMethodName(){ //how would this be called, should I use
onPassivate()?
page3.initialise(userName, sessionid); //for example
return page3;
}
}

I've asked many question so I'm grateful for any assistance from Tapestry
users.

Regards

Az

Reply via email to