You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Becky Norum <bn...@coe.neu.edu> on 2003/02/24 13:14:35 UTC

dynamically rename form-bean?

I have an ActionForm in session scope.  I cannot open two separate
browser windows at the same time to do edits, because they will share
the session form bean declared in struts-config.xml .

The easiest solution I can think of is to be able to dynamically alter
the form-bean name property from a static treeForm, to treeForm41,
treeForm43, for example.

I don't think this is possible with struts - can anyone confirm this
before I spend a lot of time implementing a new solution?  I cannot put
the ActionForm in request scope because I have to share bean properties
and this particular bean cannot *easily* be passed using a String
conversion to form parameters.

Another solution I've considered is wrapping the bean properties in an
XML format, passing that as a form variable, and reassigning to the bean
in the Action class.

Any thoughts or comments are much appreciated.

-- 
Becky Norum * bnorum@coe.neu.edu


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: dynamically rename form-bean?

Posted by awc <aw...@drytel.net>.
I have the same problem and I am thinking about setting session variables in a
Lists. and add the
index of the list to the form.


.anil

Becky Norum wrote:

> Michael,
>
> Thanks for your response.  I recognize the browser/session issue - which
> is why I'm having trouble coming up with a good solution for this
> particular issue.  =)
>
> Users *will* open up multiple browser windows - and they won't read
> documentation saying this is a bad idea.  (Just being realistic.)  So,
> all of my beans are request scope except this particular one and a user
> tracking bean.  The bean in question has too many parameters (the
> numbers change) to make request scope really possible without a great
> deal of work, I think.  :(
>
> I had posted a while ago asking how people handled session level objects
> and multiple windows, but didn't receive feedback.  Makes me wonder if
> this is a really *simple* issue or a really *tough* one.
>
> --
> Becky Norum * bnorum@coe.neu.edu
> Database Administrator
> CenSSIS (Center for Subsurface Sensing and Imaging Systems)
> http://www.censsis.neu.edu
>
> On Mon, 2003-02-24 at 09:56, Michael C. Lee Jr. wrote:
> > I hate to throw a wrench into things but...
> > In IE if you open up a window from your current browser you do share the
> > session scope.
> > In Netscape, if you open up a whole new browser from the OS, they still
> > share session scope. Not sure how this impacts your app but you need to
> > consier this too possibly.
> > Michael Lee
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: dynamically rename form-bean?

Posted by Becky Norum <bn...@coe.neu.edu>.
Michael,

Thanks for your response.  I recognize the browser/session issue - which
is why I'm having trouble coming up with a good solution for this
particular issue.  =)

Users *will* open up multiple browser windows - and they won't read
documentation saying this is a bad idea.  (Just being realistic.)  So,
all of my beans are request scope except this particular one and a user
tracking bean.  The bean in question has too many parameters (the
numbers change) to make request scope really possible without a great
deal of work, I think.  :(

I had posted a while ago asking how people handled session level objects
and multiple windows, but didn't receive feedback.  Makes me wonder if
this is a really *simple* issue or a really *tough* one.  

-- 
Becky Norum * bnorum@coe.neu.edu
Database Administrator
CenSSIS (Center for Subsurface Sensing and Imaging Systems)
http://www.censsis.neu.edu


On Mon, 2003-02-24 at 09:56, Michael C. Lee Jr. wrote:
> I hate to throw a wrench into things but...
> In IE if you open up a window from your current browser you do share the
> session scope.
> In Netscape, if you open up a whole new browser from the OS, they still
> share session scope. Not sure how this impacts your app but you need to
> consier this too possibly.
> Michael Lee


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: dynamically rename form-bean?

Posted by "Michael C. Lee Jr." <ml...@hotmail.com>.
I hate to throw a wrench into things but...
In IE if you open up a window from your current browser you do share the
session scope.
In Netscape, if you open up a whole new browser from the OS, they still
share session scope. Not sure how this impacts your app but you need to
consier this too possibly.
Michael Lee

----- Original Message -----
From: "Becky Norum" <bn...@coe.neu.edu>
To: <st...@jakarta.apache.org>
Sent: Monday, February 24, 2003 7:14 AM
Subject: dynamically rename form-bean?


> I have an ActionForm in session scope.  I cannot open two separate
> browser windows at the same time to do edits, because they will share
> the session form bean declared in struts-config.xml .
>
> The easiest solution I can think of is to be able to dynamically alter
> the form-bean name property from a static treeForm, to treeForm41,
> treeForm43, for example.
>
> I don't think this is possible with struts - can anyone confirm this
> before I spend a lot of time implementing a new solution?  I cannot put
> the ActionForm in request scope because I have to share bean properties
> and this particular bean cannot *easily* be passed using a String
> conversion to form parameters.
>
> Another solution I've considered is wrapping the bean properties in an
> XML format, passing that as a form variable, and reassigning to the bean
> in the Action class.
>
> Any thoughts or comments are much appreciated.
>
> --
> Becky Norum * bnorum@coe.neu.edu
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.456 / Virus Database: 256 - Release Date: 2/18/2003

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org