Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session inconsistencies

 
Martin Vanyavchich
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

how can we control session consistency in a multitabed browsers? I face a problem where my clients work on same JSP page in different tabs, on different data sets. For example they are editing two or more item description pages. Since there is validation of input, forms current data is held in a bean in session until such form is properly filled. There is only one bean per session, so the data between tabs that are submitted multiple times and fail to validate gets all mixed up, inconsistent and one data set fills all tabs of the browser. A lot of input can get lost that way.

Is there something that can be done to that regard?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34837
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Martin,
Why does the user need to be able to fill out the same form in multiple tabs?

I suppose you could use a map to give each tab a key and control things yourself. It seems awkward though. I think it is easier to enforce that the user doesn't use multiple tabs - you could do this with a unique token to make sure all requests come from the generated HTML.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seam can handle multiple conversations; I assume it's via an embedded key or something (never looked; keep meaning to).
 
Martin Vanyavchich
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@David
I've looked it up, and it seems promising, though I don't think we will be changing/adding new framewrosk to pur project.

@Jeanne
Users actualy don't need to be able to fill out multiple forms. That's why we will probably go with a variation of your proposal, using some kind of flag witch form is currently in edit mode and the rest of forms will be in a kind of read only mode.

Thank you both for your thoughts.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wasn't suggested you *use* Seam, I was suggesting you use its technique for managing multiple conversations.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic