InjectPage doesn't tell tapestry which html file to use for the component
template.  The component template for a given page doesn't change. 

-----Original Message-----
From: Mário Lopes [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 17, 2006 3:04 PM
To: Tapestry users
Subject: Re: Sharing data accross pages..

If I'm not mistaken, that differs with InjectPage?

On 4/17/06, James Carman <[EMAIL PROTECTED]> wrote:
> For more information about how Tapestry locates your page template files
> (the .html files) take a look at:
>
>
http://jakarta.apache.org/tapestry/UsersGuide/template.html#template.locatio
> ns
>
>
> -----Original Message-----
> From: Mário Lopes [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 17, 2006 2:59 PM
> To: Tapestry users
> Subject: Re: Sharing data accross pages..
>
> Here's the content of Page2.html
>
> <body jwcid="@Border" title="Home">
>
>     <h2>Resultados da Pesquisa</h2>
>
> </body>
>
> The question being: how does the .java knows to which .html it is
> attached? Without using InjectPage, it fetches .page to check for the
> .java. Using InjectPage you directly use the .java so how does
> Tapestry know which .html to use?
>
> -- Mário
>
> On 4/17/06, James Carman <[EMAIL PROTECTED]> wrote:
> > And you don't have an empty html file at /clients/Page2.html (off the
root
> > of the webapp)?
> >
> > -----Original Message-----
> > From: Mário Lopes [mailto:[EMAIL PROTECTED]
> > Sent: Monday, April 17, 2006 2:53 PM
> > To: Tapestry users
> > Subject: Re: Sharing data accross pages..
> >
> > Nop, I'm not redirecting. I just do a return Page2Instance on the
> > method that's invoked when submiting the form.
> >
> > Yes I get a blank page without any html!
> >
> > -- Mário
> >
> > On 4/17/06, James Carman <[EMAIL PROTECTED]> wrote:
> > > Are you saying that it shows just a blank page or it doesn't show the
> > values
> > > that were submitted on page1?  I saw something in your first email
that
> > > might give us a clue.  You said "redirect."  Are you actually doing a
> > > redirect?  From what you've said, you're just activating Page2, not
> > > redirecting to it.  If you were redirecting, I could see how you might
> > lose
> > > something.
> > >
> > > -----Original Message-----
> > > From: Mário Lopes [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, April 17, 2006 2:42 PM
> > > To: Tapestry users
> > > Subject: Re: Sharing data accross pages..
> > >
> > > I have .java on WEB-INF/classes/com.icom.feup.clients.Page2.java and
> > > .page on WEB-INF/clients/Page2.html
> > >
> > > This directory structure is working correctly on every other page
> > > except for this one. Here's how inject looks like
> > >
> > > @InjectPage("clients/Page2")
> > >
> > > -- Mário
> > >
> > > On 4/17/06, James Carman <[EMAIL PROTECTED]> wrote:
> > > > I do this sort of stuff all the time.  So, it must be that your HTML
> > isn't
> > > > being found.  Where do you have Page2.html?
> > > >
> > > > -----Original Message-----
> > > > From: Mário Lopes [mailto:[EMAIL PROTECTED]
> > > > Sent: Monday, April 17, 2006 2:36 PM
> > > > To: Tapestry users
> > > > Subject: Re: Sharing data accross pages..
> > > >
> > > > Precisely what I'm doing. Problem is that I have html inside Page2
> > > > that's not showing off. Where do link the Page2.java with
Page2.html?
> > > > Maybe it's not rendering anything because it can't find the .html!
> > > >
> > > > Regards,
> > > >
> > > > -- Mário
> > > >
> > > > On 4/17/06, Mike Snare <[EMAIL PROTECTED]> wrote:
> > > > > It's hard to know exactly what you're trying to do without seeing
> any
> > > > > code (I'm also not exactly sure what's not working), so I must
admit
> > > > > I'm not sure what your problem is, but here's how I typically use
> page
> > > > > injection.
> > > > >
> > > > > Page1 has some form or link that, when submitted (clicked) should
> take
> > > > > the user to Page2.  I therefore inject Page2 into Page1.
> > > > >
> > > > > In the listener method, I get the reference to Page2, set the
> > > > > appropriate attributes on it from the form if necessary, then
return
> > > > > the instance of Page2 from my listener.
> > > > >
> > > > > Tapestry makes Page2 the active page, and rendering happens there.
> If
> > > > > Page2 has a border, it will get rendered.  If it doesn't, it
won't.
> > > > > Same for anything else on the page.  Page1 is now 'gone' and will
no
> > > > > longer affect Page2.
> > > > >
> > > > > -Mike
> > > > >
> > > > > On 4/17/06, Mário Lopes <[EMAIL PROTECTED]> wrote:
> > > > > > On 4/17/06, Mike Snare <[EMAIL PROTECTED]> wrote:
> > > > > > > Inject page doesn't inject the page into the page you are
> looking
> > at
> > > > > > > from a view standpoint, rather it makes an instance of that
page
> a
> > > > > > > member of the page.
> > > > > > >
> > > > > > > In the form submission of page 1, get the instance of page 2
via
> > the
> > > > > > > accessor and set the appropriate attributes.
> > > > > > >
> > > > > > > The layout of page 2 (including borders/other components) is
> page
> > > 2's
> > > > > > > responsibility.  If you have a border on page 1 but not on
page
> 2,
> > > > > > > injecting page 2 into page 1 won't change that.  Page 2 needs
> it's
> > > own
> > > > > > > border.
> > > > > >
> > > > > > But that's I find quite odd, since Page2 has precisely the same
> > .html
> > > > > > and .page as the form but has zero html besides the one
belonging
> to
> > > > > > the form!
> > > > > >
> > > > > > Maybe I'm not linking Page2 java to the .html and .page? Where
> > should
> > > > > > I link them?
> > > > > >
> > > > > > Regards,
> > > > > >
> > > > > > -- Mário
> > > > > >
> > > > > > >
> > > > > > > I might be reading your email wrong, but if I'm not, you need
to
> > set
> > > > > > > up page 2 to work and display independently of page 1.  If all
> it
> > > > > > > needs is the form data from page 1, that's all that should be
> > needed
> > > > > > > for page 2 to be considered 'whole'.
> > > > > > >
> > > > > > > -Mike
> > > > > > >
> > > > > > > On 4/17/06, Mário Lopes <[EMAIL PROTECTED]> wrote:
> > > > > > > > Hello everyone!
> > > > > > > >
> > > > > > > > First off, I'm new to Tapestry so cheers everyone! :-)
> > > > > > > >
> > > > > > > > Well, I'm building an application and I need to share
> > information
> > > > > > > > accross different pages. For instance, page1 has a form
which
> > gets
> > > > > > > > several values and fetches others from the database, while
> page2
> > > > > > > > should be receiving those values and others, redirecting
from
> > > page1.
> > > > > > > >
> > > > > > > > It seems there's two ways of doing this: Application State
> > > Objects,
> > > > > > > > like Visit or Global, and the new @InjectPage from Tapestry
4.
> > > > > > > >
> > > > > > > > InjectPage worked but it only shows the attributes belonging
> to
> > > the
> > > > > > > > class that's associated with, ignoring Border and other
stuff
> > like
> > > > > > > > hivemind SiteMap component. Now, am I not properly using
> > > InjectPage,
> > > > > > > > since it should only be used as a scaffold for viewing forms
> (?)
> > > or
> > > > am
> > > > > > > > I missing something ?
> > > > > > > >
> > > > > > > > Some insight on the subject would be great!
> > > > > > > >
> > > > > > > > Thanks in advance.
> > > > > > > >
> > > > > > > > Kind regards,
> > > > > > > >
> > > > > > > > Mário Lopes
> > > > > > > >
> > > > > > > >
> > > >
---------------------------------------------------------------------
> > > > > > > > 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]
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > 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]
> > > > >
> > > > >
> > > >
> > > >
---------------------------------------------------------------------
> > > > 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]
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > 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]
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > 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]
> >
> >
>
> ---------------------------------------------------------------------
> 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]
>
>

---------------------------------------------------------------------
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