Re: SessionAttribute and SessionState is null in onValidate method

2019-06-18 Thread Ric 2000
gt; Cezary > > > On Tue, Jun 18, 2019 at 8:23 PM Ric 2000 wrote: > > > Dear Tapestry users, > > > > I face the following problem: > > In a page I use a simple bean annotated as SessionState or > SessionAttribute > > (problem is the same on both).

Re: SessionAttribute and SessionState is null in onValidate method

2019-06-18 Thread Cezary Biernacki
Jun 18, 2019 at 8:23 PM Ric 2000 wrote: > Dear Tapestry users, > > I face the following problem: > In a page I use a simple bean annotated as SessionState or SessionAttribute > (problem is the same on both). > It is initialized in the SetupRender method of the page and in o

SessionAttribute and SessionState is null in onValidate method

2019-06-18 Thread Ric 2000
Dear Tapestry users, I face the following problem: In a page I use a simple bean annotated as SessionState or SessionAttribute (problem is the same on both). It is initialized in the SetupRender method of the page and in other methods, called from within the SetupRender method, the object is in

Re: [T.5.3] problem with sessionstate

2013-01-25 Thread Thiago H de Paula Figueiredo
Hi! Without code we cannot answer your question. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org

[T.5.3] problem with sessionstate

2013-01-25 Thread upgrading
ge is busy, due to there are lot of requests in it. What can I test to go to a solution? -- View this message in context: http://tapestry.1045711.n5.nabble.com/T-5-3-problem-with-sessionstate-tp5719515.html Sent from the Tapestry - User mailing list archive at

Re: SessionState

2012-11-26 Thread Thiago H de Paula Figueiredo
On Mon, 26 Nov 2012 19:17:45 -0200, Pillar wrote: I don't know if it's common practice to send thank you's in a mailing list, but screw it. Thanks! I'm pretty sure I'll be using much more of Tapestry in the future. We in the Tapestry mailing lists are very happy to help. :) Stick around

RE: SessionState

2012-11-26 Thread Pillar
el...@hotmail.com Subject: Re: SessionState On Mon, 26 Nov 2012 18:45:14 -0200, Pillar <[hidden email]> wrote: > Hi, Hi! > In the Tapestry User Guide for session storage > <http://tapestry.apache.org/session-storage.html> , it states "Any other > co

Re: SessionState

2012-11-26 Thread Thiago H de Paula Figueiredo
it with the SessionState annotation will share the same value." I have the following Page class: public class Page { @SessionState private User loggedInUser; @SessionState private User buddy; } Am I understanding correctly that both of these instances of User will be the same? Exact

SessionState

2012-11-26 Thread Pillar
Hi, In the Tapestry User Guide for session storage <http://tapestry.apache.org/session-storage.html> , it states "Any other component or page that declares a field of the same type, regardless of name, and marks it with the SessionState annotation will share the same value.&

Re: Shared @SessionState???

2012-07-26 Thread Taha Siddiqi
If you are using applicationStateManager then I don't think you need PerThread service On Jul 26, 2012, at 9:41 PM, Matías Blasi wrote: > Thank all of you! > > That was the problem. > It worked by asking for my SessionState object to the > AplicationStateManager and s

Re: Shared @SessionState???

2012-07-26 Thread Matías Blasi
Thank all of you! That was the problem. It worked by asking for my SessionState object to the AplicationStateManager and setting my service as Threaded. Thank you very much. Regards! Matias. On Thu, Jul 26, 2012 at 10:10 AM, Matías Blasi wrote: > Hi all, > > I'm facing the f

Re: Shared @SessionState???

2012-07-26 Thread Taha Siddiqi
Hi Matias @SessionState works for pages/mixins/components and not for service injection. If you want to use session object in a service, you can use ApplicationStateManager(get and set) regards Taha On Jul 26, 2012, at 6:40 PM, Matías Blasi wrote: > Hi all, > > I'm facing

Re: Shared @SessionState???

2012-07-26 Thread Christian Riedel
ssue: > > I have a @SessionState object for a custom type. > > As far as I understand that would be handled individually for each "user > session", but I am seeing that the value is shared across all my user > sessions... It shouldn't be possible, in fact, if it works li

Shared @SessionState???

2012-07-26 Thread Matías Blasi
Hi all, I'm facing the following issue: I have a @SessionState object for a custom type. As far as I understand that would be handled individually for each "user session", but I am seeing that the value is shared across all my user sessions... It shouldn't be possible, in fa

Re: @SessionState and Translator

2012-03-30 Thread Thiago H. de Paula Figueiredo
On Fri, 30 Mar 2012 03:44:33 -0300, resign wrote: hi, Hi! is it possible to add an translator to textfield depends on logged user? For example i want to translate Date object depends on logged user. Use the translate parameter of TextField. -- Thiago H. de Paula Figueiredo Independent Ja

@SessionState and Translator

2012-03-29 Thread resign
hi, is it possible to add an translator to textfield depends on logged user? For example i want to translate Date object depends on logged user. greetings, resign -- View this message in context: http://tapestry.1045711.n5.nabble.com/SessionState-and-Translator-tp5605827p5605827.html Sent from

Re: How to get a SessionState object in AppModule.contributeTypeCoercer ?

2011-11-09 Thread Igor Drobiazko
Yep On Wed, Nov 9, 2011 at 9:10 PM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > On Wed, 09 Nov 2011 17:49:07 -0200, Igor Drobiazko < > igor.drobia...@gmail.com> wrote: > > Just inject ApplicationStateManager into the contribution method. The >> service provides access to SSOs. N

Re: How to get a SessionState object in AppModule.contributeTypeCoercer ?

2011-11-09 Thread Thiago H. de Paula Figueiredo
On Wed, 09 Nov 2011 17:49:07 -0200, Igor Drobiazko wrote: Just inject ApplicationStateManager into the contribution method. The service provides access to SSOs. Note that injecting into TypeCoercer's contribute method is special; you need to use @InjectService annotation. Is this for avoidi

Re: How to get a SessionState object in AppModule.contributeTypeCoercer ?

2011-11-09 Thread trsvax
Get the ApplicationStateManager in the appmodule method call and from there you can get any session state. -- View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-get-a-SessionState-object-in-AppModule-contributeTypeCoercer-tp4978877p4978897.html Sent from the Tapestry

Re: How to get a SessionState object in AppModule.contributeTypeCoercer ?

2011-11-09 Thread Igor Drobiazko
the activation context. That part works well. > > However, to personalize the search, I really need more of the user's > details, which I keep in a SessionState object conveniently called > UserDetails. It would be really handy for me to get the UserDetails > session state inside

How to get a SessionState object in AppModule.contributeTypeCoercer ?

2011-11-09 Thread Tim
te. It is the activation context. That part works well. However, to personalize the search, I really need more of the user's details, which I keep in a SessionState object conveniently called UserDetails. It would be really handy for me to get the UserDetails session s

Re: SessionState problem

2011-10-05 Thread leothelion
gt; > Hi! > > > " If a field isn't @SessionState, it is completely thread-safe, not > > being shared between users." > > Yeah, that was what I thought about. But it did share the object > between > > users even though I remove everything and keep s

Re: SessionState problem

2011-10-05 Thread Thiago H. de Paula Figueiredo
On Wed, 05 Oct 2011 19:00:05 -0300, okramlee wrote: Hi Thiago, Hi! " If a field isn't @SessionState, it is completely thread-safe, not being shared between users." Yeah, that was what I thought about. But it did share the object between users even though I remove ever

Re: SessionState problem

2011-10-05 Thread Lenny Primak
Tapestry objects's instance variables will never leak from user to user.. You have to try pretty hard to make that work. Whether its' @Persist, @SessionState, @SessinoAttribute, or just plain field, it will never leak. On Oct 5, 2011, at 5:22 PM, leothelion wrote: > Hi Thiago, &g

Re: SessionState problem

2011-10-05 Thread leothelion
Hi Thiago, Thanks for your reply. I will try it. Just a question out of this topic. I use salesItem as SessionState is because I don't what it to be shared by the other users when they are loading the same page. That's why I came up with the idea of SessionState. I don't know i

Re: SessionState problem

2011-10-05 Thread Thiago H. de Paula Figueiredo
On Wed, 05 Oct 2011 17:56:44 -0300, leothelion wrote: If I erase the ' row="salesItem" ', then the adding problem is gone. But I cannot use a SessionState instance as a row in grid component? Yeah, but it's not a good idea, as you're using the same field f

Re: SessionState problem

2011-10-05 Thread leothelion
I think I found where causes the problem. Here is the tml file: ${salesItem.sku} ... ... If I erase the ' row="salesItem" ', then the adding problem is gone. But I cannot use a SessionState instance as a row in grid compon

SessionState problem

2011-10-05 Thread leothelion
Hi Guys, I have a problem in using SessionState. Here is the thing: @SessionState private Sales salesItem; @SessionState private SalesSessionInfo ssi; SalesSessionInfo contains a list of Sales objects. However, every time when I add the updated salesItem to ssi, it seems that the last element

Re: PageRenderLinkTransformer, SessionState and InjectPage

2011-09-18 Thread Dimitri
Thx you for you quick reply Thiago, very helpful to me ! -- View this message in context: http://tapestry.1045711.n5.nabble.com/PageRenderLinkTransformer-SessionState-and-InjectPage-tp4811846p4815693.html Sent from the Tapestry - User mailing list archive at Nabble.com

Re: PageRenderLinkTransformer, SessionState and InjectPage

2011-09-16 Thread Thiago H. de Paula Figueiredo
methods one those, or use a session state object. You could also set data in a per thread service and make your pages use it to read this data, avoiding using the session for something that is just for a request. That's what I'd do. Unfortunately, the SessionState object does always

PageRenderLinkTransformer, SessionState and InjectPage

2011-09-16 Thread Dimitri
SessionState object does always result as null in the next pages. Injected pages are not injected as well, and throw NPE when calling the appropriate method on those. Looks like i have to use the context, yes, that is why the EventContext stands for, but i don't understand why such a mechanis

Re: Is it possible to access @SessionState at the "listener" level

2011-07-16 Thread Thiago H. de Paula Figueiredo
On Fri, 15 Jul 2011 18:39:43 -0300, hese <1024h...@gmail.com> wrote: Which class do I cast it to? = (??) servletContext.getAttribute(TapestryFilter.REGISTRY_CONTEXT_NAME); Looks like tapestry IOC is a bunch of classes? Not sure which one to use. Every object-oriented package or program is a bu

Re: Is it possible to access @SessionState at the "listener" level

2011-07-15 Thread Taha Hafeez
s? Not sure which one to use. > > Thanks!! > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Is-it-possible-to-access-SessionState-at-the-listener-level-tp4591912p4592377.html > Sent from the

Re: Is it possible to access @SessionState at the "listener" level

2011-07-15 Thread hese
-SessionState-at-the-listener-level-tp4591912p4592377.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h

Re: Is it possible to access @SessionState at the "listener" level

2011-07-15 Thread Thiago H. de Paula Figueiredo
s I want to be able to set some values in @SessionState so that I can later use it across all pages. Get the Tapestry-IoC registry from the servlet context. Tapestry puts it in the TapestryFilter.REGISTRY_CONTEXT_NAME attribute. Then get the ApplicationStateManager service from it. -- T

Is it possible to access @SessionState at the "listener" level

2011-07-15 Thread hese
Hi All, I have a listener registered with my servlet container which adds users to the servlet context as they login (so i have a list of currently loged in active users). Depending on the user's settings I want to be able to set some values in @SessionState so that I can later use it a

Re: Is possible to use an spring bean to carry a SessionState object within a dispatcher?

2011-07-15 Thread Thiago H. de Paula Figueiredo
On Fri, 15 Jul 2011 12:03:03 -0300, Luana wrote: Hi again! Hi! We need some mechanism to know the previous page from any page. Therefore, we want to hide that the implementation is made with a sessionState object. So our idea was to save the sessionState object inside an spring bean

Is possible to use an spring bean to carry a SessionState object within a dispatcher?

2011-07-15 Thread Luana
Hi again! We are using tapestry 5.1.0.5, and by the moment, we can't change it. We need some mechanism to know the previous page from any page. Therefore, we want to hide that the implementation is made with a sessionState object. So our idea was to save the sessionState object inside an s

Re: SessionState problems with a String type

2011-06-29 Thread Thiago H. de Paula Figueiredo
On Wed, 29 Jun 2011 15:20:48 -0300, Josh Canfield wrote: Ha! Good catch, and annoying. For anyone who hasn't addressed this, when I'm in apache fronted tomcat I use a rewrite rule in apache to make sure everything goes to the www. url... I suppose you could also do the same thing in a Tapestr

Re: SessionState problems with a String type

2011-06-29 Thread Josh Canfield
at 9:35 AM, Tim Koop wrote: > I'm replying to this somewhat old thread just to say that I have found the > problem. > > The problem was that I had stored something as a SessionState Object (SSO), > then I forwarded the user to another website to do some authentication which > f

Re: SessionState problems with a String type

2011-06-29 Thread Tim Koop
I'm replying to this somewhat old thread just to say that I have found the problem. The problem was that I had stored something as a SessionState Object (SSO), then I forwarded the user to another website to do some authentication which forwarded the user back to my site. But when the

Re: exists variable false - but sessionstate variable not null?

2011-06-14 Thread Thiago H. de Paula Figueiredo
On Mon, 13 Jun 2011 20:30:54 -0300, David Rees wrote: Hmm, so you're saying don't use xxxExists fields and just check set "create=false" on the @SessionState instead like this? @SessionState(create=false) @Property private User user; Exactly! Makes more sense and is mo

Re: exists variable false - but sessionstate variable not null?

2011-06-13 Thread David Rees
On Mon, Jun 13, 2011 at 4:25 PM, Thiago H. de Paula Figueiredo wrote: > On Mon, 13 Jun 2011 19:58:36 -0300, David Rees wrote: > >> I've got a @SessionState variable used to track the logged in user >> declared along with an exists variable like this on multiple pag

Re: exists variable false - but sessionstate variable not null?

2011-06-13 Thread ael
Kindly check this how to use the sessionstate properly. http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/state/sharingacrossmultiplepages1 http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/state/sharingacrossmultiplepages1 -- View this message in context: http

Re: exists variable false - but sessionstate variable not null?

2011-06-13 Thread Thiago H. de Paula Figueiredo
On Mon, 13 Jun 2011 19:58:36 -0300, David Rees wrote: I've got a @SessionState variable used to track the logged in user declared along with an exists variable like this on multiple pages: @SessionState @Property private User user; private boolean userExists; Now, what I have se

exists variable false - but sessionstate variable not null?

2011-06-13 Thread David Rees
I've got a @SessionState variable used to track the logged in user declared along with an exists variable like this on multiple pages: @SessionState @Property private User user; private boolean userExists; Now, what I have seen on occasion is that userExists == false even when the user var

Re: Clearing @SessionState

2011-06-06 Thread Josh Canfield
c to the page you are on, @SessionState works between pages. If you leave the page then your isAdmin field for this page is still set, but it won't be transferred to some other page. You should definitely take Rich M's suggestion to refactor your code. It will make it much easier to read

Re: Clearing @SessionState

2011-06-06 Thread ael
Why not use TAPESTRY-SECURITY by Kalle :) this is more advanced... -- View this message in context: http://tapestry.1045711.n5.nabble.com/Clearing-SessionState-tp4458525p4460330.html Sent from the Tapestry - User mailing list archive at Nabble.com

Re: Clearing @SessionState

2011-06-06 Thread Rich M
s set. Having been using Tapestry since 5.0.5, almost four years ago, I'd say @SessionState works as it should. Your code uses too much side-effects for my taste. And I can't see the declarations of the username and password variables. I'd have to say there is too much going o

Re: Clearing @SessionState

2011-06-06 Thread robnangle
Thiago H. de Paula Figueiredo wrote: > > I'm sorry, I overlooked the only place user is set. Having been using > Tapestry since 5.0.5, almost four years ago, I'd say @SessionState works > as it should. Your code uses too much side-effects for my taste. And I > can&

Re: Clearing @SessionState

2011-06-06 Thread Thiago H. de Paula Figueiredo
years ago, I'd say @SessionState works as it should. Your code uses too much side-effects for my taste. And I can't see the declarations of the username and password variables. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,

Re: Clearing @SessionState

2011-06-06 Thread robnangle
l: users-h...@tapestry.apache.org > Eh I dont understand what you mean here. Am i not setting the user when somebody logs in with a valid username and password? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Clearing-SessionState-tp4458525p4459326.html Sent from the

Re: Clearing @SessionState

2011-06-06 Thread Thiago H. de Paula Figueiredo
Have you noticed your page code doesn't set the user field anywhere? I guess you have a logic issue somewhere. Your JDBC usage is far from recommended. You're opening a connection in the constructor and reusing it. If you're using Tapestry 5.2+, you'll end up having two requests using the s

Re: Clearing @SessionState

2011-06-06 Thread robnangle
private Fixture temp; @Component private Form login; @Component private Form logout; @InjectPage private Index index; @InjectPage private EditUser edit; @InjectPage private Login loginPage; @SessionState(create=false)

Re: Clearing @SessionState

2011-06-06 Thread Rich M
On 06/06/2011 12:48 PM, robnangle wrote: Rich M wrote: Most likely your page is not loading and assigning the adminUser boolean like you are expecting, and after your initial login, it's not calling any of that code anymore and thus your privileges appear to regress to a normal user, when really

Re: Clearing @SessionState

2011-06-06 Thread robnangle
thod, as I have used it elsewhere. However it does not solve the issue. The user seems to be completely reverting to the previous logged in user after navigating through more than one page. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Clearing-SessionState-tp4458525p4

Re: Clearing @SessionState

2011-06-06 Thread Thiago H. de Paula Figueiredo
On Mon, 06 Jun 2011 13:35:01 -0300, Rich M wrote: Well does it have to be persisted? I call the adminUser() in every class where it is necessary. The updatePoints() is the constructor so it will be called when the page is loading? Absolutely no. You might want to refresh your knowledge of

Re: Clearing @SessionState

2011-06-06 Thread robnangle
ress. The logged in user display name reverts to the previous logged in user.. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Clearing-SessionState-tp4458525p4459203.html Sent from the Tapestry - User mailing list archive at Nabble.com. ---

Re: Clearing @SessionState

2011-06-06 Thread Richard Hill
e: > >> Rich M wrote: > >>> On 06/06/2011 12:04 PM, robnangle wrote: > >>>> No didn't seem to make a difference im afraid. I cant think of anything > >>>> that > >>>> would revert the user back to the previous logged in u

Re: Clearing @SessionState

2011-06-06 Thread robnangle
user back to the previous logged in user? >>>> >>>> My updated code now looks like: >>>> >>>> @SessionState(create=false) >>>>@Property >>>>private User user; >>>>@Property >>>>priva

Re: Clearing @SessionState

2011-06-06 Thread Rich M
On 06/06/2011 12:20 PM, robnangle wrote: Rich M wrote: On 06/06/2011 12:04 PM, robnangle wrote: No didn't seem to make a difference im afraid. I cant think of anything that would revert the user back to the previous logged in user? My updated code now looks like: @Session

Re: Clearing @SessionState

2011-06-06 Thread robnangle
Rich M wrote: > > On 06/06/2011 12:04 PM, robnangle wrote: >> No didn't seem to make a difference im afraid. I cant think of anything >> that >> would revert the user back to the previous logged in user? >> >> My updated code now looks like:

Re: Clearing @SessionState

2011-06-06 Thread Rich M
On 06/06/2011 12:04 PM, robnangle wrote: No didn't seem to make a difference im afraid. I cant think of anything that would revert the user back to the previous logged in user? My updated code now looks like: @SessionState(create=false) @Property private User

Re: Clearing @SessionState

2011-06-06 Thread robnangle
unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> > For additional commands, e-mail: users-h...@tapestry.apache.org > No didn't seem to make a difference im afraid. I cant think of anything that would revert the user back to the previous logged in user?

Re: Clearing @SessionState

2011-06-06 Thread Richard Hill
t page will load but after this > it seems to revert back to the previous user and you will then be unable to > view admin pages (even though I just logged in as an admin user). > > It seems to be setting itself to the previous user for some reason? > > > -- > View th

Re: Clearing @SessionState

2011-06-06 Thread robnangle
e will load but after this it seems to revert back to the previous user and you will then be unable to view admin pages (even though I just logged in as an admin user). It seems to be setting itself to the previous user for some reason? -- View this message in context: http://tapestry.1045711.

Re: Clearing @SessionState

2011-06-06 Thread Thiago H. de Paula Figueiredo
On Mon, 06 Jun 2011 10:18:20 -0300, robnangle wrote: However it still does not seem to be working. The problem is that it still does not seem to be clearing. I have admin pages that only an admin user can view. The code behind that is working as when i login at first it determines that it is

Re: Clearing @SessionState

2011-06-06 Thread robnangle
Thiago H. de Paula Figueiredo wrote: > > On Mon, 06 Jun 2011 09:26:26 -0300, robnangle <robnan...@gmail.com> > wrote: > >> Hi All, > > Hi! > >> I create have a @SessionState on my user but when I try logout it is not >> fully clearing the sess

Re: Clearing @SessionState

2011-06-06 Thread Thiago H. de Paula Figueiredo
On Mon, 06 Jun 2011 09:26:26 -0300, robnangle wrote: Hi All, Hi! I create have a @SessionState on my user but when I try logout it is not fully clearing the session. @SessionState private User user; Setting a @SessionState field to null will remove it from the session, but just it

Re: Clearing @SessionState

2011-06-06 Thread robnangle
Essentially i want to destroy the session.. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Clearing-SessionState-tp4458525p4458598.html Sent from the Tapestry - User mailing list archive at Nabble.com

Re: Clearing @SessionState

2011-06-06 Thread robnangle
.1045711.n5.nabble.com/Clearing-SessionState-tp4458525p4458593.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h

Re: Clearing @SessionState

2011-06-06 Thread Taha Tapestry
Also if you just want to clear the User object use ApplicationStateManager.set(User.class, null); Sent from my iPhone On Jun 6, 2011, at 5:56 PM, robnangle wrote: > Hi All, > > I create have a @SessionState on my user but when I try logout it is not > fully clearing

Re: Clearing @SessionState

2011-06-06 Thread Taha Tapestry
Use session.invalidate() Sent from my iPhone On Jun 6, 2011, at 5:56 PM, robnangle wrote: > Hi All, > > I create have a @SessionState on my user but when I try logout it is not > fully clearing the session. > > @SessionState > private User user; > > onSubmit

Re: Clearing @SessionState

2011-06-06 Thread Richard Hill
What do you mean exactly "not clearing the session" ? Al you are doing below is setting the user to null, the session is not being destroyed and nothing else in the session will be affected. On Mon, 2011-06-06 at 05:26 -0700, robnangle wrote: > Hi All, > > I create have a

Clearing @SessionState

2011-06-06 Thread robnangle
Hi All, I create have a @SessionState on my user but when I try logout it is not fully clearing the session. @SessionState private User user; onSubmitFromLogout(){ user = null; return index; } Is there a specific way to do it? Cheers -- View this message in context: http://tapestry.1045711

Re: SessionState problems with a String type

2011-05-11 Thread Tim Koop
Well, I just tried checking the session id like this, and it is in fact the same after coming back. And the SessionState objects started working too! So then I took out this session id code, and the SessionState objects are still working. So now it's all working fine, and I am

Re: SessionState problems with a String type

2011-05-11 Thread Thiago H. de Paula Figueiredo
On Wed, 11 May 2011 15:35:15 -0300, Tim Koop wrote: I'm trying to authenticate on my website with OpenID, using Java code from the openid4java library. After the user specifies his OpenID provider, the server (Tapestry) is supposed to forward him to the appropriate web page (like Google) to

Re: SessionState problems with a String type

2011-05-11 Thread Tim Koop
ge to the log saying I was there), or it isn't being retrieved correctly, because it is null when I want to read it. That's strange. I've never seen this kind of bug. Are you sure you haven't any other @SessionState field with type String? If yes and it's set to null some

Re: SessionState problems with a String type

2011-05-11 Thread Josh Canfield
I set the session object, that > page returns a java.net.URL object, redirecting the browser to another page. >  Perhaps this is preventing the session object from being stored correctly? > > And no, I don't plan to actually use a String as a SessionState Object.  I'm > just

Re: SessionState problems with a String type

2011-05-11 Thread Thiago H. de Paula Figueiredo
re it gets set, and I even write a message to the log saying I was there), or it isn't being retrieved correctly, because it is null when I want to read it. That's strange. I've never seen this kind of bug. Are you sure you haven't any other @SessionState field with type St

Re: SessionState problems with a String type

2011-05-11 Thread Tim Koop
tored correctly? And no, I don't plan to actually use a String as a SessionState Object. I'm just testing with it. Thanks. Tim Koop t...@timkoop.com <mailto:t...@timkoop.com> www.timkoop.com <http://www.timkoop.com> On 11/05/2011 12:39 PM, Josh Canfield wrote: http://ta

Re: SessionState problems with a String type

2011-05-11 Thread Josh Canfield
, it will only allow access to it if it already exists. Default: true This thread might be helpful. http://tapestry.1045711.n5.nabble.com/SessionState-for-simple-types-td2839381.html or this one http://tapestry.1045711.n5.nabble.com/SessionState-error-td2432233.html Josh On Wed, May 11, 2011 at

Re: SessionState problems with a String type

2011-05-11 Thread Thiago H. de Paula Figueiredo
On Wed, 11 May 2011 14:01:01 -0300, Tim Koop wrote: I'm having a little problem with even a simple SessionState String object. Try @SessionState(create = false). Better yet, create a class to represent your user session state and put this userColour field there, as a @Session

SessionState problems with a String type

2011-05-11 Thread Tim Koop
I'm having a little problem with even a simple SessionState String object. On one page I have this: @SessionState private String userColour; ... userColour = "red"; Then on a subsequent page I have this: @SessionState private St

Re: @SessionState Bug?

2011-01-08 Thread Bob Harner
Hi everybody, To partially address the concerns raised, and following Pierce's suggestion (and using many of his words), I have updated this page in the User Guide to help make it clearer what the pitfalls and decision points are for using @SessionState and @SessionAttribute:

Re: @SessionState Bug?

2011-01-06 Thread Pierce Wetter
> > I'd like to suggest that @SessionState be deprecated in favor of > @SessionAttribute in the future. > > Thoughts? This is ultimately a _documentation_ error. (If we ignore the problem with generics for the moment.) That is, the real problem is that the doc

Re: Re: @SessionState Bug?

2011-01-06 Thread Thiago H. de Paula Figueiredo
On Thu, 06 Jan 2011 21:38:15 -0200, Josh Canfield wrote: Perhaps you could build a CYASessionStateWorker that looks at @SessionState annotated fields and pukes if the type is outside of some package you specify. For instance, all of my @SessionState objects generally go in a "state&quo

Re: Re: @SessionState Bug?

2011-01-06 Thread Josh Canfield
I'm also opposed to deprecating @SessionState, for many of the reasons below. Perhaps you could build a CYASessionStateWorker that looks at @SessionState annotated fields and pukes if the type is outside of some package you specify. For instance, all of my @SessionState objects generally go

Re: Re: @SessionState Bug?

2011-01-06 Thread Thiago H. de Paula Figueiredo
On Thu, 06 Jan 2011 19:40:31 -0200, Michael Gentry wrote: Hi Thiago, Hi, Michael! I meant to mention that I don't consider "@SessionState has been used as it is since Tapetry 5 exists." to be a very good reason/excuse because @IncludeJavaScriptLibrary and @IncludeSty

Re: Re: @SessionState Bug?

2011-01-06 Thread Igor Drobiazko
On Thu, Jan 6, 2011 at 9:13 PM, Michael Gentry wrote: > Hi Igor, > > This does everything that @SessionState does, but gives you more > control. Plus you can easily use a data type more than once. > > > Nope, with @SessionState you have auto-building of SSOs and co-calle

Re: Re: @SessionState Bug?

2011-01-06 Thread Michael Gentry
Hi Thiago, I meant to mention that I don't consider "@SessionState has been used as it is since Tapetry 5 exists." to be a very good reason/excuse because @IncludeJavaScriptLibrary and @IncludeStylesheet are now deprecated. Things sometimes change (and hopefully for the bette

Re: Re: @SessionState Bug?

2011-01-06 Thread Thiago H. de Paula Figueiredo
Hi! As I said, in this case, what you consider dangerous I consider safe and vice-versa. Just different opinions. :) I agree that there's no completely safe option. Both have their pros and cons. And I don't consider @SessionState data-dangerous at all. I'd never use non-

Re: @SessionState Bug?

2011-01-06 Thread Robert Zeigler
I'm with Igor. :) I've never used @SessionState for "simple" object types (List, Boolean, String, and the like). I've only ever used it for composite object types that will only ever have a single object per session ("Visit", "ShoppingCart", "U

Re: Re: @SessionState Bug?

2011-01-06 Thread Michael Gentry
Hi Thiago, You argue that @SessionState is type-safe, but it is data-dangerous. Is that a good trade-off? I personally want my data to be safe, too. :-) Also, If I do: @SessionAttribute("user") private String user; On something that was already set to be a User record (instead o

Re: Re: @SessionState Bug?

2011-01-06 Thread Michael Gentry
Hi Igor, How am I missing the use case of doing something like: @SessionAttribute(value=Constants.USER) private User user; or @SessionAttribute(value=Constants.SHOPPING_CART) private List shoppingCartItems; This does everything that @SessionState does, but gives you more control. Plus you

Re: Re: @SessionState Bug?

2011-01-06 Thread Michael Gentry
> >> On Thu, Jan 6, 2011 at 11:56 AM, Josh Canfield >> wrote: >> > In 5.2 there is SessionAttribute which pulls the value from the >> > session by name, defaulting to the name of the field... >> >> Hi Josh, >> >> @SessionAttribute is wo

Re: Re: @SessionState Bug?

2011-01-06 Thread Thiago H. de Paula Figueiredo
On Thu, 06 Jan 2011 17:21:32 -0200, Michael Gentry wrote: I'd like to suggest that @SessionState be deprecated in favor of @SessionAttribute in the future. I'm completely against. @SessionState has been used as it is since Tapetry 5 exists. I think @SessionAttribute is dan

Re: Re: @SessionState Bug?

2011-01-06 Thread Igor Drobiazko
Michael, @SessionState will not be deprecated. I guess you are missing the use case for this very useful annotation. Some examples are a logged in user or a shopping basket. Usually you have only one instance of such an object in your app, so it is absolutely fine to same only one instance per

Re: Re: @SessionState Bug?

2011-01-06 Thread Donny Nadolny
h, > > @SessionAttribute is working great so far. Thanks again for the tip. > > For discussion by others (if desired): > > I'm going to banish @SessionState from our application soon -- it is > far too dangerous. Imagine you have a large application and you don't &g

Re: Re: @SessionState Bug?

2011-01-06 Thread Michael Gentry
esired): I'm going to banish @SessionState from our application soon -- it is far too dangerous. Imagine you have a large application and you don't know every single detail on every page/component/mixin/service. The fact that it it stores things by type instead of a more unique key m

  1   2   >