See attachment.
public class Sale : XPObject {
private XPCollection<Product> products;
public Sale(Session session) : base(session) { }
// This list is invisible
public XPCollection<Product> Products {
get {
if(products == null) {
products = new XPCollection<Product>(Session);
}
return products;
}
}
// This list is visible in the popup menu.
[Association("A-A")]
public XPCollection<Attachment> Attachments {
get { return GetCollection<Attachment>("Attachments"); }
}
Only the Attachments collection is in the submenu, but the Products is not accessible.
We have closed this ticket because another page addresses its subject:
Weak associations as member collections
Aleks,
Can you suggest a solution for accomplishing this task? We cannot figure out how to implement this feature so far.
Thank you,
Nick
For instance I have a class A, which has a collection of objects of class B. But I do not have sources for the class B, so I do not have the possibility to add the association attribute for the collection. As a result such collection is not visible in reports.
Up to now, if a collection property did not have the Association attribute applied, the collection was not available in the report designer. This was a real drawback as it effectively prohibited the use of non-persistent object collections in reports. It was also an issue for persistent object collections, since adding unnecessary associations could impact performance of an application. So, in v2010 vol2, we have resolved the issue, and now all collection properties are available in the report designer.
The attached screenshot is taken from the MainDemo application, which is shipped with XAF. The ChangeHistory Detail Report represents a collection of object changes tracked by the Audit Trail module. This collection is not decorated with the Association attribute and, prior to v2010 vol2, it will be simply unavailable in the report designer.
See Also:
XAF - Improvements to The Printing and Reporting Modules (coming in V2010 V2)