Re: [T5] overriding persistence strategy of all fields to conversation strategy

2007-12-21 Thread Kristian Marinkovic
its getting really interesting

Josh+Davor: your're right flash should as well be part of the 
conversation context.

a small summary of my implementation so far:
if a conversation is started a ConversationContext is created and stored 
in 
a ConversationTracker and the created conversation id is appended to the 
URL. The ConversationTracker itself is then stored as an ASO using the 
ApplicationStateManager. In implicit mode every field with an @Persist 
annotation is stored in the ConversationContext (if a conversation is 
active). 
ASOs are not part of the conversation because they are considered global,
application-wide data objects. I did not replace the Session because it 
seemed 
to invasive to me. 

What do you think about this approach? is it viable? Should some ASOs be 
marked as part of the conversation?

I hope i can make my source available in 3 weeks when i get approval from
my superior.


btw. i could solve my originally stated question by providing a Decorator
for the PersistentFieldManager that intercepts postChange method calls
and rerout every persistent field to the ConversationFieldStrategy 
implementation.

just a sidenote... my conversation implementation will then be used for 
pageflows :)




Josh Canfield [EMAIL PROTECTED] 
Gesendet von: [EMAIL PROTECTED]
21.12.2007 00:43
Bitte antworten an
Tapestry users users@tapestry.apache.org


An
Tapestry users users@tapestry.apache.org
Kopie

Thema
Re: [T5] overriding persistence strategy of all fields to conversation 
strategy






Yeah, I'm not convinced either. Also, ApplicationState for instance should
probably be stored outside of the context of a conversation as well...

Josh

On Dec 20, 2007 2:03 PM, Davor Hrg [EMAIL PROTECTED] wrote:

 you are right, that is more usefull.

 instead introducing conversation to field level,
 it should be set at page/component level.

 flash is I suppose already session specific and should be
 also conversation specific,
 but I'm still not convinced that something should be done to
 those that explicitly state @Persist(session)

 Davor Hrg

 On Dec 20, 2007 7:03 PM, Josh Canfield [EMAIL PROTECTED] wrote:
  Hello,
 
  I think Flash persistence would also want to be in the context of the
  conversation, otherwise couldn't messages show up in the second window
 that
  were intended for the first (perhaps with a slow connection to the
 server?)
 
  Without having spent much time thinking about this (and never having
 used
  Seam), it feels like a promising direction would be to redefine what a
  session means for your application.
 
  Tapestry already wraps the javax.servlet.http.HttpSession when it's
 created
  in the Request object. Would it make sense to replace that
 implementation
  with a ConversationSession that implements the Session interface but
  compartmentalizes the session by whatever it is that you are using for
  context?
 
  So in
 
 
http://tapestry.formos.com/nightly/tapestry5/apidocs/src-html/org/apache/tapestry/internal/services/SessionImpl.html

 
 
http://tapestry.formos.com/nightly/tapestry5/apidocs/src-html/org/apache/tapestry/internal/services/SessionImpl.html#line.29

 
   038public Object getAttribute(String name)
  039{
  040return _session.getAttribute(name);
  041}
  becomes
  038public Object getAttribute(String name)
  039{
  040return _session.getAttribute(_myContextId).get(name);
  041}
  where _myContextId results in a map of context specific attributes...
 
  Admittedly I haven't coded anything around this idea so there could be
 some
  fatal flaws, I just thought I'd throw it out there.
 
  Josh
 
 
  On Dec 20, 2007 12:25 AM, Davor Hrg [EMAIL PROTECTED] wrote:
 
   It seems you are trying too hard to fix user mistakes,
  
   a developer using the conversation persistence strategy must be 
aware
 of
   it
   and code accordingly. Forcing a specific persistence strategy can 
also
   cause
   undesired behaviours (for example error messages that use
   @Persist(flash))
  
   these are just my thoughts on the subject, I haven't really looked
 deeper
   into
   persistence strategies...
  
   Davor Hrg
  
   On Dec 20, 2007 9:20 AM, Kristian Marinkovic
[EMAIL PROTECTED] wrote:
hi filip,
   
@Meta(tapestry.persistence-strategy=conversation) only works if
 the
@Persist annotation does not specify a strategy. I want to 
override
 the
strategy even if
the developer has set it to a specific strategy so whenever a
conversation is started
the values of all persistent fields will be saved in the
 conversation.
   And
i want to be able
to switch it on or off during runtime because it should be able to
 use
   the
same page with
or without a conversation context.
   
I think i've too look harder :) ... If i succeed i'll put my
 solution
open-source somewhere... :)
   
g,
kris
   
   
   
   
Filip S. Adamsen [EMAIL PROTECTED

Re: [T5] overriding persistence strategy of all fields to conversation strategy

2007-12-21 Thread Davor Hrg
sound ok,

looking forward to trying it :)

Davor Hrg

On Dec 21, 2007 10:25 AM, Kristian Marinkovic
[EMAIL PROTECTED] wrote:
 its getting really interesting

 Josh+Davor: your're right flash should as well be part of the
 conversation context.

 a small summary of my implementation so far:
 if a conversation is started a ConversationContext is created and stored
 in
 a ConversationTracker and the created conversation id is appended to the
 URL. The ConversationTracker itself is then stored as an ASO using the
 ApplicationStateManager. In implicit mode every field with an @Persist
 annotation is stored in the ConversationContext (if a conversation is
 active).
 ASOs are not part of the conversation because they are considered global,
 application-wide data objects. I did not replace the Session because it
 seemed
 to invasive to me.

 What do you think about this approach? is it viable? Should some ASOs be
 marked as part of the conversation?

 I hope i can make my source available in 3 weeks when i get approval from
 my superior.


 btw. i could solve my originally stated question by providing a Decorator
 for the PersistentFieldManager that intercepts postChange method calls
 and rerout every persistent field to the ConversationFieldStrategy
 implementation.

 just a sidenote... my conversation implementation will then be used for
 pageflows :)




 Josh Canfield [EMAIL PROTECTED]
 Gesendet von: [EMAIL PROTECTED]
 21.12.2007 00:43

 Bitte antworten an
 Tapestry users users@tapestry.apache.org


 An
 Tapestry users users@tapestry.apache.org
 Kopie

 Thema
 Re: [T5] overriding persistence strategy of all fields to conversation
 strategy






 Yeah, I'm not convinced either. Also, ApplicationState for instance should
 probably be stored outside of the context of a conversation as well...

 Josh

 On Dec 20, 2007 2:03 PM, Davor Hrg [EMAIL PROTECTED] wrote:

  you are right, that is more usefull.
 
  instead introducing conversation to field level,
  it should be set at page/component level.
 
  flash is I suppose already session specific and should be
  also conversation specific,
  but I'm still not convinced that something should be done to
  those that explicitly state @Persist(session)
 
  Davor Hrg
 
  On Dec 20, 2007 7:03 PM, Josh Canfield [EMAIL PROTECTED] wrote:
   Hello,
  
   I think Flash persistence would also want to be in the context of the
   conversation, otherwise couldn't messages show up in the second window
  that
   were intended for the first (perhaps with a slow connection to the
  server?)
  
   Without having spent much time thinking about this (and never having
  used
   Seam), it feels like a promising direction would be to redefine what a
   session means for your application.
  
   Tapestry already wraps the javax.servlet.http.HttpSession when it's
  created
   in the Request object. Would it make sense to replace that
  implementation
   with a ConversationSession that implements the Session interface but
   compartmentalizes the session by whatever it is that you are using for
   context?
  
   So in
  
 
 http://tapestry.formos.com/nightly/tapestry5/apidocs/src-html/org/apache/tapestry/internal/services/SessionImpl.html

  
 
 http://tapestry.formos.com/nightly/tapestry5/apidocs/src-html/org/apache/tapestry/internal/services/SessionImpl.html#line.29

  
038public Object getAttribute(String name)
   039{
   040return _session.getAttribute(name);
   041}
   becomes
   038public Object getAttribute(String name)
   039{
   040return _session.getAttribute(_myContextId).get(name);
   041}
   where _myContextId results in a map of context specific attributes...
  
   Admittedly I haven't coded anything around this idea so there could be
  some
   fatal flaws, I just thought I'd throw it out there.
  
   Josh
  
  
   On Dec 20, 2007 12:25 AM, Davor Hrg [EMAIL PROTECTED] wrote:
  
It seems you are trying too hard to fix user mistakes,
   
a developer using the conversation persistence strategy must be
 aware
  of
it
and code accordingly. Forcing a specific persistence strategy can
 also
cause
undesired behaviours (for example error messages that use
@Persist(flash))
   
these are just my thoughts on the subject, I haven't really looked
  deeper
into
persistence strategies...
   
Davor Hrg
   
On Dec 20, 2007 9:20 AM, Kristian Marinkovic
 [EMAIL PROTECTED] wrote:
 hi filip,

 @Meta(tapestry.persistence-strategy=conversation) only works if
  the
 @Persist annotation does not specify a strategy. I want to
 override
  the
 strategy even if
 the developer has set it to a specific strategy so whenever a
 conversation is started
 the values of all persistent fields will be saved in the
  conversation.
And
 i want to be able
 to switch it on or off during runtime because it should be able to
  use

Re: [T5] overriding persistence strategy of all fields to conversation strategy

2007-12-21 Thread Richard Kirby
If you allow for nested conversations, then the session could just be a 
default conversation that lasts for as long as the session. Inherently 
then, all subsequent conversations will be encapsulated by this default 
conversation at the very least - a bit like all objects in Java are 
java.lang.Object.


Nested conversations are useful to allow for short diversions from a 
main conversation - for example popping up a dictionary dialog when 
filling in a form.


The default session persistence strategy can then be simply replaced 
with the conversation strategy and assumed to be a default top level 
conversation.


How does that sound?

Richard

Davor Hrg wrote:

sound ok,

looking forward to trying it :)

Davor Hrg

On Dec 21, 2007 10:25 AM, Kristian Marinkovic
[EMAIL PROTECTED] wrote:
  

its getting really interesting

Josh+Davor: your're right flash should as well be part of the
conversation context.

a small summary of my implementation so far:
if a conversation is started a ConversationContext is created and stored
in
a ConversationTracker and the created conversation id is appended to the
URL. The ConversationTracker itself is then stored as an ASO using the
ApplicationStateManager. In implicit mode every field with an @Persist
annotation is stored in the ConversationContext (if a conversation is
active).
ASOs are not part of the conversation because they are considered global,
application-wide data objects. I did not replace the Session because it
seemed
to invasive to me.

What do you think about this approach? is it viable? Should some ASOs be
marked as part of the conversation?

I hope i can make my source available in 3 weeks when i get approval from
my superior.


btw. i could solve my originally stated question by providing a Decorator
for the PersistentFieldManager that intercepts postChange method calls
and rerout every persistent field to the ConversationFieldStrategy
implementation.

just a sidenote... my conversation implementation will then be used for
pageflows :)




Josh Canfield [EMAIL PROTECTED]
Gesendet von: [EMAIL PROTECTED]
21.12.2007 00:43

Bitte antworten an
Tapestry users users@tapestry.apache.org


An
Tapestry users users@tapestry.apache.org
Kopie

Thema
Re: [T5] overriding persistence strategy of all fields to conversation
strategy






Yeah, I'm not convinced either. Also, ApplicationState for instance should
probably be stored outside of the context of a conversation as well...

Josh

On Dec 20, 2007 2:03 PM, Davor Hrg [EMAIL PROTECTED] wrote:



you are right, that is more usefull.

instead introducing conversation to field level,
it should be set at page/component level.

flash is I suppose already session specific and should be
also conversation specific,
but I'm still not convinced that something should be done to
those that explicitly state @Persist(session)

Davor Hrg

On Dec 20, 2007 7:03 PM, Josh Canfield [EMAIL PROTECTED] wrote:
  

Hello,

I think Flash persistence would also want to be in the context of the
conversation, otherwise couldn't messages show up in the second window


that
  

were intended for the first (perhaps with a slow connection to the


server?)
  

Without having spent much time thinking about this (and never having


used
  

Seam), it feels like a promising direction would be to redefine what a
session means for your application.

Tapestry already wraps the javax.servlet.http.HttpSession when it's


created
  

in the Request object. Would it make sense to replace that


implementation
  

with a ConversationSession that implements the Session interface but
compartmentalizes the session by whatever it is that you are using for
context?

So in



http://tapestry.formos.com/nightly/tapestry5/apidocs/src-html/org/apache/tapestry/internal/services/SessionImpl.html





  

http://tapestry.formos.com/nightly/tapestry5/apidocs/src-html/org/apache/tapestry/internal/services/SessionImpl.html#line.29



  038public Object getAttribute(String name)
  

039{
040return _session.getAttribute(name);
041}
becomes
038public Object getAttribute(String name)
039{
040return _session.getAttribute(_myContextId).get(name);
041}
where _myContextId results in a map of context specific attributes...

Admittedly I haven't coded anything around this idea so there could be


some
  

fatal flaws, I just thought I'd throw it out there.

Josh


On Dec 20, 2007 12:25 AM, Davor Hrg [EMAIL PROTECTED] wrote:



It seems you are trying too hard to fix user mistakes,

a developer using the conversation persistence strategy must be
  

aware


of
  

it
and code accordingly. Forcing a specific persistence strategy can
  

also


cause
undesired behaviours (for example error messages that use
@Persist(flash))

these are just my thoughts on the subject, I

Re: [T5] overriding persistence strategy of all fields to conversation strategy

2007-12-21 Thread Geoff Callender

Hi Kristian,

In Seam their conversation solves the problem of multiple windows or  
tabs in the same browser.  When you say conversation are you  
addressing that too?  That would be sensational, because I have no  
idea how they achieve it.  If you are in a window and choose New  
Window with your settings set to open the same page in the new window,  
then I have no idea how they split to a new conversation.


For people unfamiliar with conversations, they discuss it here: 
http://labs.jboss.com/jbossseam/faq/#state

Cheers,

Geoff


On 19/12/2007, at 7:30 AM, Kristian Marinkovic wrote:



Hi all,
i'm currently implementing a conversation module (similar to seam)  
by defining an own persistence strategy. i thought of an explicit  
and an implicit mode for conversations. The explicit mode requires  
that every persistent field within a conversation is annotated with  
@Persist(conversation). the implicit mode would replace the given  
persistence strategy of any annotated field in a page with  
conversation.


Can someone help me how to solve this problem? The  
PersistentFieldManager sets default strategies (@Meta) but cannot be  
overriden on a per page base.


any suggestions? thanks

g,kris


- To 
 unsubscribe, e-mail: [EMAIL PROTECTED] For  
additional commands, e-mail: [EMAIL PROTECTED]




Re: [T5] overriding persistence strategy of all fields to conversation strategy

2007-12-20 Thread Kristian Marinkovic
hi filip,

@Meta(tapestry.persistence-strategy=conversation) only works if the
@Persist annotation does not specify a strategy. I want to override the 
strategy even if
the developer has set it to a specific strategy so whenever a 
conversation is started 
the values of all persistent fields will be saved in the conversation. And 
i want to be able
to switch it on or off during runtime because it should be able to use the 
same page with
or without a conversation context.

I think i've too look harder :) ... If i succeed i'll put my solution 
open-source somewhere... :)

g,
kris




Filip S. Adamsen [EMAIL PROTECTED] 
19.12.2007 18:29
Bitte antworten an
Tapestry users users@tapestry.apache.org


An
Tapestry users users@tapestry.apache.org
Kopie

Thema
Re: [T5] overriding persistence strategy of all fields to conversation 
strategy







Stick a @Meta(tapestry.persistence-strategy=conversation) annotation 
on your page class?

-Filip

Kristian Marinkovic skrev:
 
 Hi all,
 
 i'm currently implementing a conversation module (similar to seam) by 
 defining an own persistence strategy. i thought of an explicit and an 
 implicit mode for conversations. The explicit mode requires that every 
 persistent field within a conversation is annotated with 
 @Persist(conversation). the implicit mode would replace the given 
 persistence strategy of any annotated field in a page with 
conversation.
 
 Can someone help me how to solve this problem? The 
 PersistentFieldManager sets default strategies (@Meta) but cannot be 
 overriden on a per page base.
 
 any suggestions? thanks
 
 g,kris
 
 
 - 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]




Re: [T5] overriding persistence strategy of all fields to conversation strategy

2007-12-20 Thread Davor Hrg
It seems you are trying too hard to fix user mistakes,

a developer using the conversation persistence strategy must be aware of it
and code accordingly. Forcing a specific persistence strategy can also cause
undesired behaviours (for example error messages that use @Persist(flash))

these are just my thoughts on the subject, I haven't really looked deeper into
persistence strategies...

Davor Hrg

On Dec 20, 2007 9:20 AM, Kristian Marinkovic
[EMAIL PROTECTED] wrote:
 hi filip,

 @Meta(tapestry.persistence-strategy=conversation) only works if the
 @Persist annotation does not specify a strategy. I want to override the
 strategy even if
 the developer has set it to a specific strategy so whenever a
 conversation is started
 the values of all persistent fields will be saved in the conversation. And
 i want to be able
 to switch it on or off during runtime because it should be able to use the
 same page with
 or without a conversation context.

 I think i've too look harder :) ... If i succeed i'll put my solution
 open-source somewhere... :)

 g,
 kris




 Filip S. Adamsen [EMAIL PROTECTED]
 19.12.2007 18:29
 Bitte antworten an
 Tapestry users users@tapestry.apache.org


 An
 Tapestry users users@tapestry.apache.org
 Kopie

 Thema
 Re: [T5] overriding persistence strategy of all fields to conversation
 strategy








 Stick a @Meta(tapestry.persistence-strategy=conversation) annotation
 on your page class?

 -Filip

 Kristian Marinkovic skrev:
 
  Hi all,
 
  i'm currently implementing a conversation module (similar to seam) by
  defining an own persistence strategy. i thought of an explicit and an
  implicit mode for conversations. The explicit mode requires that every
  persistent field within a conversation is annotated with
  @Persist(conversation). the implicit mode would replace the given
  persistence strategy of any annotated field in a page with
 conversation.
 
  Can someone help me how to solve this problem? The
  PersistentFieldManager sets default strategies (@Meta) but cannot be
  overriden on a per page base.
 
  any suggestions? thanks
 
  g,kris
 
 
  - 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]



Re: [T5] overriding persistence strategy of all fields to conversation strategy

2007-12-20 Thread Kristian Marinkovic
hi davor,

you're right... flash will be an excpetion :)... the problem is that if 
you use
components (libraries) of other teams or third party components that 
persist 
values in the session you still want to be able to use it in a 
conversation without 
changing the component. 

making it easy to use for developers is also a goal. for example if you 
have
fields with @Persist(conversation) and there is no active conversation 
context
it should default to session. 

my options as i see it right now are to replace the PersistentFieldManager
service mit my own implementation or to refactor the 
PersistentFieldManager
contribution to add injected PersistentFieldStrategy services instead of 
instantiating
them with new. This would give me the freedom to add some decorators

what do you think?

g,
kris





Davor Hrg [EMAIL PROTECTED] 
20.12.2007 09:25
Bitte antworten an
Tapestry users users@tapestry.apache.org


An
Tapestry users users@tapestry.apache.org
Kopie

Thema
Re: [T5] overriding persistence strategy of all fields to conversation 
strategy







It seems you are trying too hard to fix user mistakes,

a developer using the conversation persistence strategy must be aware of 
it
and code accordingly. Forcing a specific persistence strategy can also 
cause
undesired behaviours (for example error messages that use 
@Persist(flash))

these are just my thoughts on the subject, I haven't really looked deeper 
into
persistence strategies...

Davor Hrg

On Dec 20, 2007 9:20 AM, Kristian Marinkovic
[EMAIL PROTECTED] wrote:
 hi filip,

 @Meta(tapestry.persistence-strategy=conversation) only works if the
 @Persist annotation does not specify a strategy. I want to override the
 strategy even if
 the developer has set it to a specific strategy so whenever a
 conversation is started
 the values of all persistent fields will be saved in the conversation. 
And
 i want to be able
 to switch it on or off during runtime because it should be able to use 
the
 same page with
 or without a conversation context.

 I think i've too look harder :) ... If i succeed i'll put my solution
 open-source somewhere... :)

 g,
 kris




 Filip S. Adamsen [EMAIL PROTECTED]
 19.12.2007 18:29
 Bitte antworten an
 Tapestry users users@tapestry.apache.org


 An
 Tapestry users users@tapestry.apache.org
 Kopie

 Thema
 Re: [T5] overriding persistence strategy of all fields to conversation
 strategy








 Stick a @Meta(tapestry.persistence-strategy=conversation) annotation
 on your page class?

 -Filip

 Kristian Marinkovic skrev:
 
  Hi all,
 
  i'm currently implementing a conversation module (similar to seam) by
  defining an own persistence strategy. i thought of an explicit and an
  implicit mode for conversations. The explicit mode requires that every
  persistent field within a conversation is annotated with
  @Persist(conversation). the implicit mode would replace the given
  persistence strategy of any annotated field in a page with
 conversation.
 
  Can someone help me how to solve this problem? The
  PersistentFieldManager sets default strategies (@Meta) but cannot be
  overriden on a per page base.
 
  any suggestions? thanks
 
  g,kris
 
 
  - 
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]




Re: [T5] overriding persistence strategy of all fields to conversation strategy

2007-12-20 Thread Francois Armand

Kristian Marinkovic wrote:

hi davor,
  

Hi,
Sorry I jump in the thread,
you're right... flash will be an excpetion :)... the problem is that if 
you use components (libraries) of other teams or third party components that 
persist  values in the session you still want to be able to use it in a 
conversation without changing the component.
  
But in library, components just use the default persistence strategy. If 
a strategy is specified, it should be for a meaningful reason. Perhaps 
they have define there own strategy.
So I think that you should just give the possibility to change the 
default strategy, not impose it. Moreover, libraries may evolve to use 
your strategy with their constrains - nobody better that the dev of a 
component know what may break with a modification.


making it easy to use for developers is also a goal. 
  
That's a good goal :) (I'm a dev after all, and a lazy one ;) Just 
remember that there is no free lunch, and be careful if you attempt to 
interpret there will.


--
Francois Armand
Etudes  Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
---
InterLDAP - http://interldap.org 
FederID - http://www.federid.org/

Open Source identities management and federation


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T5] overriding persistence strategy of all fields to conversation strategy

2007-12-20 Thread Josh Canfield
Hello,

I think Flash persistence would also want to be in the context of the
conversation, otherwise couldn't messages show up in the second window that
were intended for the first (perhaps with a slow connection to the server?)

Without having spent much time thinking about this (and never having used
Seam), it feels like a promising direction would be to redefine what a
session means for your application.

Tapestry already wraps the javax.servlet.http.HttpSession when it's created
in the Request object. Would it make sense to replace that implementation
with a ConversationSession that implements the Session interface but
compartmentalizes the session by whatever it is that you are using for
context?

So in
http://tapestry.formos.com/nightly/tapestry5/apidocs/src-html/org/apache/tapestry/internal/services/SessionImpl.htmlhttp://tapestry.formos.com/nightly/tapestry5/apidocs/src-html/org/apache/tapestry/internal/services/SessionImpl.html#line.29
038public Object getAttribute(String name)
039{
040return _session.getAttribute(name);
041}
becomes
038public Object getAttribute(String name)
039{
040return _session.getAttribute(_myContextId).get(name);
041}
where _myContextId results in a map of context specific attributes...

Admittedly I haven't coded anything around this idea so there could be some
fatal flaws, I just thought I'd throw it out there.

Josh

On Dec 20, 2007 12:25 AM, Davor Hrg [EMAIL PROTECTED] wrote:

 It seems you are trying too hard to fix user mistakes,

 a developer using the conversation persistence strategy must be aware of
 it
 and code accordingly. Forcing a specific persistence strategy can also
 cause
 undesired behaviours (for example error messages that use
 @Persist(flash))

 these are just my thoughts on the subject, I haven't really looked deeper
 into
 persistence strategies...

 Davor Hrg

 On Dec 20, 2007 9:20 AM, Kristian Marinkovic
  [EMAIL PROTECTED] wrote:
  hi filip,
 
  @Meta(tapestry.persistence-strategy=conversation) only works if the
  @Persist annotation does not specify a strategy. I want to override the
  strategy even if
  the developer has set it to a specific strategy so whenever a
  conversation is started
  the values of all persistent fields will be saved in the conversation.
 And
  i want to be able
  to switch it on or off during runtime because it should be able to use
 the
  same page with
  or without a conversation context.
 
  I think i've too look harder :) ... If i succeed i'll put my solution
  open-source somewhere... :)
 
  g,
  kris
 
 
 
 
  Filip S. Adamsen [EMAIL PROTECTED]
  19.12.2007 18:29
  Bitte antworten an
  Tapestry users users@tapestry.apache.org
 
 
  An
  Tapestry users users@tapestry.apache.org
  Kopie
 
  Thema
  Re: [T5] overriding persistence strategy of all fields to conversation
  strategy
 
 
 
 
 
 
 
 
  Stick a @Meta(tapestry.persistence-strategy=conversation) annotation
  on your page class?
 
  -Filip
 
  Kristian Marinkovic skrev:
  
   Hi all,
  
   i'm currently implementing a conversation module (similar to seam) by
   defining an own persistence strategy. i thought of an explicit and an
   implicit mode for conversations. The explicit mode requires that every
   persistent field within a conversation is annotated with
   @Persist(conversation). the implicit mode would replace the given
   persistence strategy of any annotated field in a page with
  conversation.
  
   Can someone help me how to solve this problem? The
   PersistentFieldManager sets default strategies (@Meta) but cannot be
   overriden on a per page base.
  
   any suggestions? thanks
  
   g,kris
  
  
   -
 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]




-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.


Re: [T5] overriding persistence strategy of all fields to conversation strategy

2007-12-20 Thread Davor Hrg
you are right, that is more usefull.

instead introducing conversation to field level,
it should be set at page/component level.

flash is I suppose already session specific and should be
also conversation specific,
but I'm still not convinced that something should be done to
those that explicitly state @Persist(session)

Davor Hrg

On Dec 20, 2007 7:03 PM, Josh Canfield [EMAIL PROTECTED] wrote:
 Hello,

 I think Flash persistence would also want to be in the context of the
 conversation, otherwise couldn't messages show up in the second window that
 were intended for the first (perhaps with a slow connection to the server?)

 Without having spent much time thinking about this (and never having used
 Seam), it feels like a promising direction would be to redefine what a
 session means for your application.

 Tapestry already wraps the javax.servlet.http.HttpSession when it's created
 in the Request object. Would it make sense to replace that implementation
 with a ConversationSession that implements the Session interface but
 compartmentalizes the session by whatever it is that you are using for
 context?

 So in
 http://tapestry.formos.com/nightly/tapestry5/apidocs/src-html/org/apache/tapestry/internal/services/SessionImpl.htmlhttp://tapestry.formos.com/nightly/tapestry5/apidocs/src-html/org/apache/tapestry/internal/services/SessionImpl.html#line.29
 038public Object getAttribute(String name)
 039{
 040return _session.getAttribute(name);
 041}
 becomes
 038public Object getAttribute(String name)
 039{
 040return _session.getAttribute(_myContextId).get(name);
 041}
 where _myContextId results in a map of context specific attributes...

 Admittedly I haven't coded anything around this idea so there could be some
 fatal flaws, I just thought I'd throw it out there.

 Josh


 On Dec 20, 2007 12:25 AM, Davor Hrg [EMAIL PROTECTED] wrote:

  It seems you are trying too hard to fix user mistakes,
 
  a developer using the conversation persistence strategy must be aware of
  it
  and code accordingly. Forcing a specific persistence strategy can also
  cause
  undesired behaviours (for example error messages that use
  @Persist(flash))
 
  these are just my thoughts on the subject, I haven't really looked deeper
  into
  persistence strategies...
 
  Davor Hrg
 
  On Dec 20, 2007 9:20 AM, Kristian Marinkovic
   [EMAIL PROTECTED] wrote:
   hi filip,
  
   @Meta(tapestry.persistence-strategy=conversation) only works if the
   @Persist annotation does not specify a strategy. I want to override the
   strategy even if
   the developer has set it to a specific strategy so whenever a
   conversation is started
   the values of all persistent fields will be saved in the conversation.
  And
   i want to be able
   to switch it on or off during runtime because it should be able to use
  the
   same page with
   or without a conversation context.
  
   I think i've too look harder :) ... If i succeed i'll put my solution
   open-source somewhere... :)
  
   g,
   kris
  
  
  
  
   Filip S. Adamsen [EMAIL PROTECTED]
   19.12.2007 18:29
   Bitte antworten an
   Tapestry users users@tapestry.apache.org
  
  
   An
   Tapestry users users@tapestry.apache.org
   Kopie
  
   Thema
   Re: [T5] overriding persistence strategy of all fields to conversation
   strategy
  
  
  
  
  
  
  
  
   Stick a @Meta(tapestry.persistence-strategy=conversation) annotation
   on your page class?
  
   -Filip
  
   Kristian Marinkovic skrev:
   
Hi all,
   
i'm currently implementing a conversation module (similar to seam) by
defining an own persistence strategy. i thought of an explicit and an
implicit mode for conversations. The explicit mode requires that every
persistent field within a conversation is annotated with
@Persist(conversation). the implicit mode would replace the given
persistence strategy of any annotated field in a page with
   conversation.
   
Can someone help me how to solve this problem? The
PersistentFieldManager sets default strategies (@Meta) but cannot be
overriden on a per page base.
   
any suggestions? thanks
   
g,kris
   
   
-
  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]
 
 


 --
 --
 TheDailyTube.com. Sign up and get the best new videos on the internet
 delivered fresh to your inbox.


-
To unsubscribe, e-mail: [EMAIL PROTECTED

Re: [T5] overriding persistence strategy of all fields to conversation strategy

2007-12-20 Thread Josh Canfield
Yeah, I'm not convinced either. Also, ApplicationState for instance should
probably be stored outside of the context of a conversation as well...

Josh

On Dec 20, 2007 2:03 PM, Davor Hrg [EMAIL PROTECTED] wrote:

 you are right, that is more usefull.

 instead introducing conversation to field level,
 it should be set at page/component level.

 flash is I suppose already session specific and should be
 also conversation specific,
 but I'm still not convinced that something should be done to
 those that explicitly state @Persist(session)

 Davor Hrg

 On Dec 20, 2007 7:03 PM, Josh Canfield [EMAIL PROTECTED] wrote:
  Hello,
 
  I think Flash persistence would also want to be in the context of the
  conversation, otherwise couldn't messages show up in the second window
 that
  were intended for the first (perhaps with a slow connection to the
 server?)
 
  Without having spent much time thinking about this (and never having
 used
  Seam), it feels like a promising direction would be to redefine what a
  session means for your application.
 
  Tapestry already wraps the javax.servlet.http.HttpSession when it's
 created
  in the Request object. Would it make sense to replace that
 implementation
  with a ConversationSession that implements the Session interface but
  compartmentalizes the session by whatever it is that you are using for
  context?
 
  So in
 
 http://tapestry.formos.com/nightly/tapestry5/apidocs/src-html/org/apache/tapestry/internal/services/SessionImpl.html
 
 http://tapestry.formos.com/nightly/tapestry5/apidocs/src-html/org/apache/tapestry/internal/services/SessionImpl.html#line.29
 
   038public Object getAttribute(String name)
  039{
  040return _session.getAttribute(name);
  041}
  becomes
  038public Object getAttribute(String name)
  039{
  040return _session.getAttribute(_myContextId).get(name);
  041}
  where _myContextId results in a map of context specific attributes...
 
  Admittedly I haven't coded anything around this idea so there could be
 some
  fatal flaws, I just thought I'd throw it out there.
 
  Josh
 
 
  On Dec 20, 2007 12:25 AM, Davor Hrg [EMAIL PROTECTED] wrote:
 
   It seems you are trying too hard to fix user mistakes,
  
   a developer using the conversation persistence strategy must be aware
 of
   it
   and code accordingly. Forcing a specific persistence strategy can also
   cause
   undesired behaviours (for example error messages that use
   @Persist(flash))
  
   these are just my thoughts on the subject, I haven't really looked
 deeper
   into
   persistence strategies...
  
   Davor Hrg
  
   On Dec 20, 2007 9:20 AM, Kristian Marinkovic
[EMAIL PROTECTED] wrote:
hi filip,
   
@Meta(tapestry.persistence-strategy=conversation) only works if
 the
@Persist annotation does not specify a strategy. I want to override
 the
strategy even if
the developer has set it to a specific strategy so whenever a
conversation is started
the values of all persistent fields will be saved in the
 conversation.
   And
i want to be able
to switch it on or off during runtime because it should be able to
 use
   the
same page with
or without a conversation context.
   
I think i've too look harder :) ... If i succeed i'll put my
 solution
open-source somewhere... :)
   
g,
kris
   
   
   
   
Filip S. Adamsen [EMAIL PROTECTED]
19.12.2007 18:29
Bitte antworten an
Tapestry users users@tapestry.apache.org
   
   
An
Tapestry users users@tapestry.apache.org
Kopie
   
Thema
Re: [T5] overriding persistence strategy of all fields to
 conversation
strategy
   
   
   
   
   
   
   
   
Stick a @Meta(tapestry.persistence-strategy=conversation)
 annotation
on your page class?
   
-Filip
   
Kristian Marinkovic skrev:

 Hi all,

 i'm currently implementing a conversation module (similar to seam)
 by
 defining an own persistence strategy. i thought of an explicit and
 an
 implicit mode for conversations. The explicit mode requires that
 every
 persistent field within a conversation is annotated with
 @Persist(conversation). the implicit mode would replace the
 given
 persistence strategy of any annotated field in a page with
conversation.

 Can someone help me how to solve this problem? The
 PersistentFieldManager sets default strategies (@Meta) but cannot
 be
 overriden on a per page base.

 any suggestions? thanks

 g,kris



 -
   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

Re: [T5] overriding persistence strategy of all fields to conversation strategy

2007-12-19 Thread Filip S. Adamsen
Stick a @Meta(tapestry.persistence-strategy=conversation) annotation 
on your page class?


-Filip

Kristian Marinkovic skrev:


Hi all,

i'm currently implementing a conversation module (similar to seam) by 
defining an own persistence strategy. i thought of an explicit and an 
implicit mode for conversations. The explicit mode requires that every 
persistent field within a conversation is annotated with 
@Persist(conversation). the implicit mode would replace the given 
persistence strategy of any annotated field in a page with conversation.


Can someone help me how to solve this problem? The 
PersistentFieldManager sets default strategies (@Meta) but cannot be 
overriden on a per page base.


any suggestions? thanks

g,kris

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



[T5] overriding persistence strategy of all fields to conversation strategy

2007-12-18 Thread Kristian Marinkovic
Hi all,i'm currently implementing a conversation module (similar to seam) by defining an own persistence strategy. i thought of an explicit and an implicit mode for conversations. The explicit mode requires that every persistent field within a conversation is annotated with @Persist("conversation"). the implicit mode would replace the given persistence strategy of any annotated field in a page with "conversation". Can someone help me how to solve this problem? The PersistentFieldManager sets default strategies (@Meta) but cannot be overriden on a per page base.any suggestions? thanksg,kris
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]