Are BO's not available during the Init event?


Author
Message
Justin Buist
Justin Buist
StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)
Group: Forum Members
Posts: 17, Visits: 81
I'm looking to smack some controls onto my web form dynamically, and I'd like to do it within the Init event.



Problem is, the BO declared in ApplicationBasePage is Nothing when my code executes. It becomes a valid reference later on, but not during Init.



Did I do something wrong or is this just part of the SF design? I can see in the documentation that the BO's are populated on the Form Load event, but I think that's just talking about the WinForms side of things; I'm not sure if the same applies to the WebForms.
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yes, the business objects are created in the Load event as well.  What SF does is cycle through all of the business objects declared within the ApplicationBasePage class and either create the objects or pull them from the session variables.  So, if you need the business object within the Init event, you can either pull it from the session variable with the same name if this is not the first page in the session or if this is the first page in the session, you can do the work for the ApplicationBasePage and go ahead and create the business object and stuff it in the session variable.
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