|
|
|
Supreme Being
      
Group: Forum Members
Last Login: Yesterday @ 15:41:11
Posts: 190,
Visits: 7 533
|
|
| Hi, I have a class to create dinamically a comboBox: ASComboBox - OclExpression: String - display: String - value: ??? (Transient) In the value attribute I want to save temporary (transient) an object from the model i.e. Order, Orderline, Customer, Invoice ... I don't want to save in the database in order not to have problems with the PersistenceMapper.
Which attribute's type should I put? Thanks, José María Sanmartín
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: 2010-11-30 12:17:13
Posts: 1 230,
Visits: 1 382
|
|
If you need the attribute to be ocl-navigable, you probably need to use a string and store the ExternalId (and then use something like "Person.objectFromExternalId(anId)" to get the object back. If you don't need to have it OCL-navigable, you can just add a custom (non-eco) property to your class and store an IObject or IObjectProvider.
/Jonas Hogstrom [CapableObjects]
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: Yesterday @ 15:41:11
Posts: 190,
Visits: 7 533
|
|
| Given the following class: ASComboBox - OclExpression: String - display: String - value: string I want to create dinamically: - an ExpressionHandle with Expression = ASComboBox.oclExpression - an ComboBox with DataSource = the expressionHandle created earlier, DisplayName = ASComboBox.display and databind the selectedItem with the value attribute For instance if I have an expressionHandle with Person.AllInstances I would like to save in the value attribute the person selected in the combobox. I don't know how to do it, so I followed your suggestion and I used the ComboBox.SelectedIndexChanged event to save in the value attribute the IDForObject. Thanks for your help, José María Sanmartín
|
|
|
|