StrataFrame Forum

Setting BOTranslation property of UserControl

http://forum.strataframe.net/Topic2779.aspx

By Scott - 9/12/2006

I have a ussercontrol based on the sf usercontrol, that control contains another custom usercontrol based on the sf usercontrol.  When I try and set the botranslations property of the contained control I get "This property can only be set on an instance of this control and not on the control designer itself".  Any recommendations on how to work around this.
By Scott - 9/12/2006

Well I got it to kind of work,  I added the relationship manually and everything works except the line

CType(SourceContainer, BaseForm).RemoveObjectFromInitOnFormLoad(loDestBO)

in BusinessObjectTranslator.vb TranslateBusinessObject becuase the container is not a BaseForm.

By StrataFrame Team - 9/13/2006

It looks like our test to determine whether the user control is dropped on a form or if you're in the control designer is failing in that scenario.  I'll check that, and also change that line in the BusinessObjectTranslator.vb file.
By Scott - 9/13/2006

Great,  Thanks Ben
By Scott - 9/21/2006

Hi Ben,

Just wondering if in the update tomorrow the BOTranslation property will be working when you have SFUserControls embeded in other SFUserControls?

Looking forward to the Update, can't wait.

Thanks

By StrataFrame Team - 9/21/2006

Yes, that was on the list of fixes.
By Scott - 9/21/2006

Very cool,  Thanks
By Scott - 9/23/2006

Just installed the update and tried to use the BOTranslation property on an embeded SFUser contrl,  same message: "This property can only be set on an instance of this control and not on the control designer itself."
By Scott - 9/23/2006

Reading thru the whats new I found: "BO repository implemented to replace BO translation" is that why the BOTranslation was not changed?  I will keep looking in the help file on how to use this new feature.

Thanks

By Scott - 9/25/2006

Is there a sample on using the BO repository?  I can't seem to find anything in the docs.

Scott

By Trent L. Taylor - 9/25/2006

It is not actually called BO Repository and we need to adjust the help documentation.  It is actually a shared data source which allows the same data source to be shared accross multiple business objects.  To use this, you can set a business object's SharedDataTableKey property to something other than empty.  If you have two business objects and set their SharedDataTableKey property to the same name they will use database as their internal table.  To play with this, create a test form and place two business objects with the same name on the form.  Set both of their SharedDatatableKey properties to the same name (may need to do this in code) and the populate one and reference the other.  You will see that they both have the same data be exposed through two different instances of the BO.
By Scott - 9/25/2006

Will do.  Thanks for the info.
By Trent L. Taylor - 9/26/2006

Sure.  Wink
By Scott - 9/26/2006

Works Great.  Great new feature.  Thanks
By Trent L. Taylor - 9/26/2006

Thanks!  Smile  Glad you got it working.
By Scott - 10/23/2006

Scott (09/21/2006)
Hi Ben,

Just wondering if in the update tomorrow the BOTranslation property will be working when you have SFUserControls embeded in other SFUserControls?

Looking forward to the Update, can't wait.

Thanks

Ben Chase (09/21/2006)
Yes, that was on the list of fixes.

I am trying to use the BOTranslation property on my embeded user control and it is not working?  Am I missing something?

Scott

By Richard Keller - 2/22/2007

This looks like the same problem I am getting.

Richard

By StrataFrame Team - 2/23/2007

Yes, the type editor is configured to only allow you to set the BOTranslations if the UserControl is dropped on a form... otherwise all sorts of errors would be thrown if you tried to set it within the component designer for the user control.  We'll have to come up with a different way to test on the current state of he designer host within the type editor to fix this...
By Scott - 3/28/2007

Ben,

Has this issues been resolved?

By StrataFrame Team - 3/28/2007

No, it hasn't been resolved... let me take a look at it and see if I can figure something out.
By Scott - 3/28/2007

Cool.  I will watch the board for more info.
By Andria Jensen - 7/13/2007

Was anything ever figured out on this one?  I'm trying to use BOTranslations on a UserControl and have run into a lot of issues as well.  It would be great if we could do this easily.