Two BO in one Form


Author
Message
Robin J Giltner
Robin J Giltner
StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)
Group: Forum Members
Posts: 105, Visits: 650
Yeah SetActivePage.  Also, on our main form that has around 13 BusinessObjects I have a Case statement that switches the Form's PrimaryBusinessObject depending on which node type the user has clicked on (around 25 node types) so that the MaintenanceFormToolStrip buttons work properly with whichever record in whichever BusinessObject they want to work on.  I put the code to choose which BO is the PrimaryBO in the MaintenanceFormToolStrip ClickEvent. Not sure if that is the best place for it, but it works for out app.

Hope this helps.

Robin Giltner

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
SetActivePage()...OK, I wasn't hallucinating Crazy. I've used that too! Tongue
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Or call the SetActivePage method Smile  Yeah, I missed that on your previous post.  Good call.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I think the method is ActivatePage() on the PanelManager itself.




I was wrong...did this last Friday after posting this and the above mentioned method is wrong (way wrong :blushSmile. You actually use the .CurrentPage property. Just set it to the page that you want to show.
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yup, Greg nailed it Smile
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
You would use the PanelManager (a SF control) to host the two panels. You could then simply activate the desired panel based on the node clicked in the tree. I think the method is ActivatePage() on the PanelManager itself. The PanelManager greatly simplifies the design experience so you don't have to muck around with moving panels all over the place to design them or to building the panel in code.



I had never thought to switch the PrimaryBO of the form to get the maintenanceformtoolstrip to work with two BOs...let us know how that works. It sounds promising. BigGrin



If it doesn't, you could pretty easily just roll you own toolstrip that would save to the correct BO based on the node selected.
Alex Bibiano González
Alex Bibiano González
StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)
Group: Forum Members
Posts: 31, Visits: 125
Ok, I have already created the basic maintenance forms from my first StrataFrame application, but now I have a different one and want to ask the best solution for creating it.

My new form, has a treelist (already populated with a BO). This treelist has 2 type of nodes (categories and accounts).

When the user click on an account, I want to display a panel with the fields from the Account BO and when he clicks on a category, I hide the account panel and display the category panel with the categories BO fields.

I have also an MaintenanceFormToolStrip.

What's the best approach to manager this two panels with his BO?

I think that changing the primarybussinesobject from the from every time the users clicks on an treelist item and retrieving the selected item in the business object can be the solution, but I'm not sure?

Thanks,

Alex B.

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