Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » TreeDropdownField in Popup

Our old forums are still available as a read-only archive.

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

Page: 1 2
Go to End
Author Topic: 5583 Views
  • OzziNL
    Avatar
    Community Member
    37 Posts

    TreeDropdownField in Popup Link to this post

    Hi,
    I want on a complextablefield a TreeDropdownField ( used it when it was a page ) but it's gives a Javascript error when loading the tree.

    Should this work or is it a bug?

       function getCMSFields_forPopup() {
    $fields = new FieldSet();
    $fields->push( new TextField( 'Label' ) );
    $fields->push( new DropdownField( 'Style', 'Banner style', array('mooi' => 'mooi', 'lelijk' => 'lelijk' ) ) );
    // $fields->push( new TextField( 'Link' ) );
    $fields->push( new TreeDropdownField('Link','Link','SiteTree') );

    return $fields;
       }

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: TreeDropdownField in Popup Link to this post

    this is a pretty complex piece of code, we can't get much mileage out of the provided error-message. can you please install the IE script debugger (http://blogs.msdn.com/ie/archive/2004/10/26/247912.aspx) and post the specific error you're getting?

  • OzziNL
    Avatar
    Community Member
    37 Posts

    Re: TreeDropdownField in Popup Link to this post

    Okay, installed the script debugger. The messages I get are then:

    First click on '(Choose)': row 496 'null' is empty or not an object (see line496.jpg)

    Second click on '(Choose)': row 1803 Type does not match (I hope good translated from dutch) (see line1803.jpg)

    I hope you can use this information, I'm not very familiar with script debugging but otherwise I can give you the url of my development site. (and the admin/passwd)

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: TreeDropdownField in Popup Link to this post

    that helps a lot, thanks! i don't have time to debug this now (its pretty much a border-case), but created a ticket: http://open.silverstripe.com/ticket/2106

  • OzziNL
    Avatar
    Community Member
    37 Posts

    Re: TreeDropdownField in Popup Link to this post

    Great! Thanks!

  • schellmax
    Avatar
    Community Member
    126 Posts

    Re: TreeDropdownField in Popup Link to this post

    i have the same problem, the ticket has now been open for 4 month...
    ist there a workaround how to get a link choose in the popup?

  • webair
    Avatar
    Community Member
    8 Posts

    Re: TreeDropdownField in Popup Link to this post

    Hi,

    i've got the same Problem too. Is there any other way to implement a field, wich holds a page id for a link?

    thanks alot

    webair

  • Blues
    Avatar
    Community Member
    1 Post

    Re: TreeDropdownField in Popup Link to this post

    TreeSelectorField.js dynamically adds fieldName=foo to the javascriptcall (line 39). However, in a complextablefieldpopup the querystring already has a fieldname=idofcomplextablefield... Perhaps that has something to do with it?

    5583 Views
Page: 1 2
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.