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   5858 Views

Avatar
OzziNL

Community Member, 37 Posts

5 January 2008 at 3:43am

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

Forum Moderator, 801 Posts

5 January 2008 at 10:08pm

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

Community Member, 37 Posts

9 January 2008 at 12:01am

Edited: 09/01/2008 1:15am

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

Forum Moderator, 801 Posts

9 January 2008 at 9:22am

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

Community Member, 37 Posts

9 January 2008 at 11:58am

Great! Thanks!

Avatar
schellmax

Community Member, 126 Posts

16 May 2008 at 8:45pm

Edited: 16/05/2008 8:45pm

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

Community Member, 8 Posts

27 October 2008 at 12:11am

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

Community Member, 1 Post

4 November 2008 at 2:25am

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