On Thu, Jan 6, 2011 at 10:14 AM, Thiago H. de Paula Figueiredo
<thiag...@gmail.com> wrote:
> On Thu, 06 Jan 2011 13:09:43 -0200, Michael Gentry <mgen...@masslight.net>
>> Thanks for the explanation, but the types might be a red herring.  I'm
>> less concerned about that than the fact that Tapestry seems to be
>> assigning one of my variables to a different variable.  It doesn't
>> matter if the types are the same or different.  I could've had:
>
> You're not correct. All @SessionState fields of a given type are mapped to
> the same HttpSession attribute, so the behaviour you're experiencing is
> exactly the expected, documented one.

Hi Thiago,

How does this even begin to make sense?  If I have:

@Property
private List<String> list1;
@Property
private List<String> list2;

Are they going to be the same lists, too?  (They shouldn't -- I know
I've had multiple ValueEncoders in the same page class and they
persisted separately).  I know I have variables like:

private boolean cancelClicked;
private boolean saveClicked;

Java keeps those two separate.  Why would @SessionState operate in an
completely different manner?  (OK, so maybe it is documented somewhere
-- I did look, but didn't find it.)

What if you have this?

public class Page1
{
  @SessionState(create=false)
  private List<String> strings;
}

public class Page2
{
  @SessionState(create=false)
  private List<String> strings;
}

Are those two lists in two different pages going to be the same, too?
This seems pretty confusing.  :-)

It seems like I just need a global HashMap somewhere and manage things by key.

Thanks again,

mrg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to