473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Session, MVC, Struts and Collection objects

I'm working on a Content Management Server project developing a MVC
based on a dynamic place holder control. One thing that I have some
questions about is session management. What I would like to do is mimic
the behaviour found in the helper bean in Stuts, BUT make it more
generic. I would like to create a class that stores mulitple
collections or strings based on a generic add method. Can generics do
this? This way I can add collections or single item strings, persist
this one helper object via ASP.NET session and allow the controls to
get their specific strings or collection on initialize via a get
accessor. So there would be an add method that accepts a object say a
collection or a string and maps it with a name. Then using the
get("name") it would automatically return the object with the type for
use. Thanks!

Nov 17 '05 #1
1 3056
Hi,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to compose a class that can
store multiple collections of object with different types. If there is any
misunderstanding, please feel free to let me know.

Could you let me know if the type of objects are the same in one
collection? If so, I don't think you need to use generic. HashTable will be
a good choice. You can add an object to the table and get its values with
key. If you need multiple collections, just make multiple HashTables.
Please check the following link for more information.

http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemcollectionshashtableclasstopic.asp

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: nc | last post by:
My iterator can find my collection when my Action class calls my jsp directly, however when my Action class calls an html file that is set up with IFrames (one of which is loading that same jsp), I...
6
by: Gonenc Ercan | last post by:
Hi, I ve ended up debugging a ASP.NET project (with about 380 files on the project .NET Framework 1.0 on IIS 5.0) which has a memory leak... The memory rises too fast. With about 25-30 active...
5
by: Frank | last post by:
Our system maintains session state using the ASP.NET State Server service. We expect some of our session state objects to be over 85K, which categorizes them to be VLO's (very large objects) in terms...
3
by: lzh_gladiator | last post by:
hello In ASp.net application,there are two created session object was attatched to one object,if I remove one of session object , does the other keeps normal or destoryed ? Thanks In advance!!...
5
by: Pross | last post by:
I've got an ASP.NET application and I need some information on every page like the user's name as well as a collection listing which sections of the application the user has access to. I could...
2
by: Markus Prediger | last post by:
Hi NG, I have an asp.net project that uses an vb6 com object for some database-manipulation (I cannot rewrite it in .net, sorry, its not my decision). I want it to be instanciated seperately...
7
by: Mr Newbie | last post by:
I have written a Custom Control Menu. Its fairly simple but it works well enough. In order to simplify things I decided to store the Menu1 custom control in Session. In the page load event below,...
0
by: swiss | last post by:
how can i code logout in a struts application.I have used session.invalidate but it is not accurately logging out from the session .please help me out to solve this problem.
3
by: Rob Nicholson | last post by:
I'm currently using InProc session which are working fine. In the app, I've got a master object called MyApp which has a fair number of properties, child classes etc. I find it easier to do this: ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.