Yii Framework Forum: [EXTENSION] EJNestedTreeActions - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] EJNestedTreeActions Take the request from the jstree and save them to database. Rate Topic: -----

#21 User is offline   tydeas_dr 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 158
  • Joined: 16-April 10
  • Location:Greece

Posted 25 October 2010 - 07:37 AM

Sorry once again for the delay? Have you resolved your issue?
Follow me on twitter @dmtrsslvdr
Check my *new* blog @ tumblr
0

#22 User is offline   luc 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 211
  • Joined: 22-June 10
  • Location:france

Posted 28 October 2010 - 10:01 AM

Hi there,

I think I've set up everything as recommended, but an error raise while calling the "render" action:
Property "TreeController.classname" is not defined.

in Render.php line 31 (if I call render with the existing id=1) or line 29 (with id=0).

Same error when calling the "createroot" action.

I've declared the beavior in my Tree.php model:
		'EJNestedTreeActions'=>array(
		    'class'=>'ext.EJNestedTreeActions.EBehavior',
		    'classname'=>'Tree',
		    'identity'=>'id',
		    'text'=>'name',
		),


Confusing ...
Hey Ho !
Let's go !
0

#23 User is offline   Junior - df9 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 416
  • Joined: 24-May 09
  • Location:Brazil

Posted 28 October 2010 - 10:16 AM

View Posttydeas_dr, on 25 October 2010 - 07:37 AM, said:

Sorry once again for the delay? Have you resolved your issue?


no problem, thanks for replying

well, I have changed my categories (created a child node with the same name of the root node that was supposed to be moved and moved all the other children into it), the issue of moving a root directly into another root seems to be persistent

tks

regards!

:)
______________________________________
Junior
df9.com.br
Linux Registered User #364954
GNU/Linux: together we're ready!
0

#24 User is offline   Junior - df9 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 416
  • Joined: 24-May 09
  • Location:Brazil

Posted 29 October 2010 - 07:47 PM

hey, guys,

Could somebody give me a hint, please?

I'm not sure if i'm doing something wrong, but I cannot delete any root node. Neither move them.

Message is "has not be deleted."

It's weird because children nodes can be deleted with no problems.

Would the extension get confused if I deleted an empty root node in a multi-root tree directly in the db?

Any help would be very appreciated.

thanks
______________________________________
Junior
df9.com.br
Linux Registered User #364954
GNU/Linux: together we're ready!
0

#25 User is offline   tydeas_dr 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 158
  • Joined: 16-April 10
  • Location:Greece

Posted 16 November 2010 - 01:13 PM

:( I am really sad ppl are facing problems with this extension.

Quote

Would the extension get confused if I deleted an empty root node in a multi-root tree directly in the db?


No i don't this will be an issue. If i remember correct the entry of an EMPTY root in a mutli-root tree has nothing that changes the hall structure.

@scoob.junior: Because I see you persist using this extension please send my a pm so i would know about your issue. I check this thread rarely. I will try to contact you as well.
Follow me on twitter @dmtrsslvdr
Check my *new* blog @ tumblr
0

#26 User is offline   tydeas_dr 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 158
  • Joined: 16-April 10
  • Location:Greece

Posted 16 November 2010 - 01:17 PM

@luc:
As you can notice
 Property "TreeController.classname" is not defined.
The render page looks for the property classname in the TreeController.
The error you have is because as i can see from your post

Quote

I've declared the beavior in my Tree.php model:
                'EJNestedTreeActions'=>array(
                    'class'=>'ext.EJNestedTreeActions.EBehavior',
                    'classname'=>'Tree',
                    'identity'=>'id',
                    'text'=>'name',
                ),

You have defined the behavior in a wrong place.
  • EJNestedTreeActions goes to the CONTROLLER.
  • NesteSet Behavior goes to MODEL.


Hope you have resolved it by now.

This post has been edited by tydeas_dr: 16 November 2010 - 01:22 PM

Follow me on twitter @dmtrsslvdr
Check my *new* blog @ tumblr
0

#27 User is offline   luc 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 211
  • Joined: 22-June 10
  • Location:france

Posted 19 November 2010 - 06:30 AM

View Posttydeas_dr, on 16 November 2010 - 01:17 PM, said:

@luc:
As you can notice
 Property "TreeController.classname" is not defined.
The render page looks for the property classname in the TreeController.
The error you have is because as i can see from your post


You have defined the behavior in a wrong place.
  • EJNestedTreeActions goes to the CONTROLLER.
  • NesteSet Behavior goes to MODEL.


Hope you have resolved it by now.


Thanks, tydeas_dr

I've allready started to play again with nested sets.
And I'm getting somme results ;-) ... But I've had to fix some issues:
First of all my tree model is "Category".

- in createroot.php: the model name is hardcoded as "Tree" so change $modelClass = 'Tree'; to $modelClass = CActiveRecord::model($this->getController()->classname);
- same problem in render.php,
- using the ability to move node or to rename node in the tree view (using your example.php view file) these two actions are complaining that:
You should not use CActiveRecord::save() method when ENestedSetBehavior attached.

So in movenode.php line 44, change $current->save(); to $current->saveNode();
And in renamenode.php line 62 change if($node->save()) to if($node->saveNode())
Hey Ho !
Let's go !
0

#28 User is offline   tydeas_dr 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 158
  • Joined: 16-April 10
  • Location:Greece

Posted 20 November 2010 - 08:11 AM

Do you use the late version from the http://www.github.com/dmtrs or another?
Follow me on twitter @dmtrsslvdr
Check my *new* blog @ tumblr
0

#29 User is offline   luc 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 211
  • Joined: 22-June 10
  • Location:france

Posted 20 November 2010 - 01:15 PM

View Posttydeas_dr, on 20 November 2010 - 08:11 AM, said:

Do you use the late version from the http://www.github.com/dmtrs or another?

No, I'm using the latest version from extension repository.
Hey Ho !
Let's go !
0

#30 User is offline   BStep 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 43
  • Joined: 07-January 11

Posted 01 February 2011 - 04:15 PM

For compatibility with the latest version of ENestedSetBehavior:

In Movenode.php and Renamenode.php change calls of the "parent()" function to "getParent()".

Edit:

Just found another call of the parent() function on line 160 of EBehavior.php. Change that to getParent() also.
1

#31 User is offline   Zorba 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 09-June 10

Posted 28 February 2011 - 06:34 AM

Hi,

I have a problem which is more related to jsTree script than to extension, however maybe somebody can help me. It is about links in items tree doesn't follow its href when cliked, it just selects item. I know I can do it by callbacks (href.location) but can't it be simple done by html <a> functionality?

Any help appreciated.
0

#32 User is offline   Zorba 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 09-June 10

Posted 30 March 2011 - 01:03 PM

I'm refreshing my question..
0

#33 User is offline   hav3fun 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 27-May 11
  • Location:Madrid

Posted 08 June 2011 - 05:26 AM

View Postsamdark, on 29 May 2010 - 03:34 AM, said:

Yes, I am. I've already tested with 1.0rc and latest CJstree seems to work without any changes.
I need to build taxonomy manager for my current project so if I'll find any difficulties, I'll report/fix them.


Hi Samdark,

I´m trying to use EJNestedTreeActions with ENestedBehavior and CJstree but I´m finding some troubles. With jstree 0.9.9a the tree displays but checkbox plugin is not working (cannot check/uncheck anything).

This is the jstree version I would like to use but in order to get it to work now I´m trying with 1.0rc but the folder structure, files names, etc seem to be different in this version. How did you do it without any changes?

After changing some configuration in "init" method of CjsTree.php this is what I get in the browser when displaying the tree:

{"type":"json","async":true,"opts":{"method":"GET","async":true,"url":"\/maptalent\/index.php\/site\/render"}}

Any hint on this?

Thanks in advance
0

#34 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 30 August 2011 - 10:22 AM

View PostBStep, on 01 February 2011 - 04:15 PM, said:

For compatibility with the latest version of ENestedSetBehavior:

In Movenode.php and Renamenode.php change calls of the "parent()" function to "getParent()".

Edit:

Just found another call of the parent() function on line 160 of EBehavior.php. Change that to getParent() also.


You just saved my life/sanity/whatever! :lol:
It all works now.
I'll probably fork it and issue a pull request.
"Less noise - more signal"
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users