Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

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

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

TreeDropdownField in Popup


Go to End
Reply

9 Posts   5765 Views

Avatar
OzziNL

5 January 2008 at 3:43am Community Member, 37 Posts

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;
   }

Avatar
Ingo

5 January 2008 at 10:08pm Forum Moderator, 801 Posts

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?

Avatar
OzziNL

9 January 2008 at 12:01am (Last edited: 9 January 2008 1:15am), Community Member, 37 Posts

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)

Avatar
Ingo

9 January 2008 at 9:22am Forum Moderator, 801 Posts

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

Avatar
OzziNL

9 January 2008 at 11:58am Community Member, 37 Posts

Great! Thanks!

Avatar
schellmax

16 May 2008 at 8:45pm (Last edited: 16 May 2008 8:45pm), Community Member, 126 Posts

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?

Avatar
webair

27 October 2008 at 12:11am Community Member, 8 Posts

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

Avatar
Blues

4 November 2008 at 2:25am Community Member, 1 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?

Go to Top