On 10/29/06, Stefan Petre <[EMAIL PROTECTED]> wrote:
> I will use 4 days then release the plugin based on your feedback. Sure
> later I can add more versions for serialization, but will be nice to
> have them at the first release.


Maybe you could add explicit informations :

item[1]['parent']=1        - parent id
item[1]['level']=1        - level
item[1]['left_id']=1        - left id
item[1]['right_id']=6        - right id
item[21]['parent']=1    - parent id
item[21]['level']=2    - level
item[21]['left_id']=2    - left id
item[21]['right_id']=3    - right id
[...]

Altough I wonder if we can trust the client code to give reliable
left, right and level values. This would be very cool to have those
left and right values. It takes a lot of time to rebuild a big nested
set tree on the server side.

Will it be possible to serialize only a part of the tree?
Would it be possible to load tree nodes on demand ?

Another detail, if an implementation doesn't allow to have something
called 'root', it could be something like this :

<ul id="item_0">
   <li id="item_1">
       <ul>
           <li id="item_21"></li>
           <li id="item_34"></li>
       </ul>
   </li>
   <li id="item_4"></li>
   <li id="item_7"></li>
</ul>

with this as a result :
item[0]['parent']=false  (is false != 0? OTOH, the backend knows what
is the id of root)
item[1]['parent']=0
item[21]['parent']=1
item[34]['parent']=1
item[4]['parent']=0
item[7]['parent']=0

My 2 cents :-)



-- 
Philippe Jadin
Thinkedit, a flexible
data and content
management system :
http://www.thinkedit.org

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to