Jump to:

23377 Posts in 18296 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Force refresh of ComplexTableField in CMS

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: 935 Views
  • PapaBear
    Community Member
    26 Posts

    Force refresh of ComplexTableField in CMS Link to this post

    Hi all,

    IN a particular page of my current project I have two tabs that display ManyManyComplexTableFields. What I want to do is the following:

    If the many-many relationship controlled by the first tab has data selected (ie it's not an empty set) then the second many-many relationship is auto populated with some related data from the first dataset (but only if the second dataset is empty. If it has any data in it at all then leave it alone).

    I have the logic correct in my function to perform the populatio0n and this is tested and working correctly. However, in order for the second manymanycomplextablefield to reflect the updated dataset I have to move off the page in the CMS and then back onto it then select the appropriate tab.

    I have tried to use the onBeforeWrite function but this doesn't trigger a refresh of the CTF in the second tab.

    How can I trigger a refresh of a CTF programatically?


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.