I think I just misunderstood your question.
By now I really think you should consider doing as Thiago suggested and
move the whole thing into an Application State Object. It'll take a bit
of work - you'll have to keep track of which messages to display on
which pages etc. - but it will probably be a cleaner, better solution in
the end.
-Filip
On 2008-05-23 23:13, zack1403 wrote:
Isnt that basically the same as having the attribute as part of the Layout
class? It just seems unnecessary to have to pass my message list to the
layout when it belongs in the layout component anyways. Is this a
workaround to some issue?
Thanks,
Zack
Filip S. Adamsen-2 wrote:
Hi again,
You just need to pass it from your page to your layout.
Page class:
@Property
private MessageHolder messages;
Page template:
<t:layout t:messages="messages">...</t:layout>
Layout class:
@Property
@Parameter
private MessageHolder messages;
Layout template:
<t:loop t:source="messages" t:value="message">...</t:loop>
Etc. etc.
-Filip
On 2008-05-23 17:20, zack1403 wrote:
Hey guys thanks a lot for you help so far. Josh, I have tried adding
@Persist("flash") to many different parts with no apparent luck. Filip,
is
there a way I can utilize my list of messages from my template component
when the list is an attribute of the page? I obviously get the Could not
convert 'messages' into a component parameter binding because the message
display is part of the component tml. I could see moving my messages
into
my generic page but I get that error. How do you see that working without
having a list attribute in my component?
Thanks again,
Zack
Filip S. Adamsen-2 wrote:
No luck? That sucks. =/
I thought occured to me just before I fell asleep last night, though.
Perhaps you should store the messages directly in your pages instead and
pass them on to your layout? That's how I would do it, anyhow.
You could wrap the add functions in a MessageHolder class that you can
easily pass to your layout. Maybe that will work...
-Filip
zack1403 skrev:
Yea I've tried multiple different combinations of @Persist to get
something
to work on my pages and component with no luck. Thanks anyways for
your
help Filip.
Zack
Filip S. Adamsen-2 wrote:
You say you added @Persist("flash") to your pages, but the information
you're storing doesn't go into the page, but into the component. I
think
you'll have to put @Persist("flash") on your list of messages in your
Layout component.
If that doesn't solve it, I'm afraid I don't know what the problem is.
Hopefully someone else will be able to help you, then.
-Filip
On 2008-05-23 01:20, zack1403 wrote:
Filip,
One of the first things I added was @Persist("flash") to my pages
with
no
luck. Still the same behavior. Even with the pages pooled should
they
share attribute values across sessions?
Filip S. Adamsen-2 wrote:
Working as intended. Tapestry uses a page pool which means that you
have
to use some sort of persistence to make this work:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/persist.html
-Filip
On 2008-05-23 00:45, zack1403 wrote:
No. Not using any persist. I really dont have anything else
besides
a
title
and this list of messages. When I move from page to page I might
inject
my
layout and add a message to this list for display. They get
persisted
without any sort of persist.
---------------------------------------------------------------------
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]