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]

Reply via email to