Jump to:

23487 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » ComplexTableField shows all objects of a class.

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1356 Views
  • micahsheets
    Community Member
    164 Posts

    ComplexTableField shows all objects of a class. Link to this post

    I have a DataObject that has a $many_many relationship to other DataObjects. I want to just show a list of the objects but if I use a ComplexTableField I get a list of all the Objects of the second class instead of just the ones in that are related to the first object. I would use a ManyManyComplexTableField but I don't want to display any checkboxes as this table is not for editing the relations just displaying a list of the objects that are already related. I know that I can remove the edit permissions from the ManyManyComplexTableField

    What kind of TableField should I use to just display a nice list of related objects.


    I found a solution. I can use setCustomeSourceItems to give the ComplexTableField a DataObjectSet or ComponentSet.

  • Martin Pales
    Community Member
    19 Posts

    Re: ComplexTableField shows all objects of a class. Link to this post

    Hi Micah,

    I am dealing with the same problem here.

    Can you please tell me how did you create that dataobjectset for setCustomSourceItems() ?



Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.