Stateful class


Author
Message
Chan
Chan
Advanced StrataFrame User (609 reputation)Advanced StrataFrame User (609 reputation)Advanced StrataFrame User (609 reputation)Advanced StrataFrame User (609 reputation)Advanced StrataFrame User (609 reputation)Advanced StrataFrame User (609 reputation)Advanced StrataFrame User (609 reputation)Advanced StrataFrame User (609 reputation)Advanced StrataFrame User (609 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I have a class that act as bridge between two BusinessObjects. When BO1 add new row, BridgeClass will be notified (eventbinding). Then BridgeClass will call BO2 to add new row as well. BridgeClass able to "sync" CRUD actions.



This class is working fine in WinForm dev. When I use it in WebDev, it doesn't work because everytime postback, Bridge class will be re-created. All settings are gone.



How could I change it so that it is "stateful/persisted"?



Thank you
Trent Taylor
Trent Taylor
StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
You will want to create the bridge BO as a shared instance this way the postback will not continue to recreate the BO.  You can also do this as a defined BO in the ApplicationBasePage as these will be persisted as well.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search