Seaside.WATree expand and element position

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Seaside.WATree expand and element position

dtrussardi@tiscali.it
Hi,
 
I work with VW 7.4 and i'am new to seaside.
 
I'm interested to work with WATree but i found two problem.
 
A) First problem : WATree expanded
    is possibol to work with WATree not expanded all on the page, but in a "treeView list " with horizontal and vertical  scroll bar ?

  By Lukas  suggestion i think to resolved it with :

        "html div
       style: 'height: 200px; overflow: scroll' ;
          with: tree  "
For test it i'have  change WAExampleBrowser renderContentOn: method  to:
 
renderContentOn: html
 html
  cssId: 'test-forms';
  table:
    [html tableRowWith:
      [html form:
        [html
         selectFromList: self allClasses
         selected: class
         callback: [:c | self class: c].
        html submitButtonWithText: 'OK']]
     with:
      [html form:
        [html
         selectFromList: self allSelectors
         selected: selector
         callback: [:s | self selector: s].
        html submitButtonWithText: 'OK']]].
 html horizontalRule.

 (component isKindOf: WATree)
  ifTrue:
   [html div
    style: 'height: 200px; width: 200px;  overflow: scroll';
    with: ( component renderTreeOn: html  )]
  ifFalse: [html render: component].

 hasAnswer
  ifTrue:
   [html horizontalRule.
   html
    bold: 'Answer ';
    text: answer printString]
 
Now then i work with WATree the div work fine;
     but under it there is another WATree used by      WATree   selectBlock: [ :class |   component call: (WABrowser fullOnClass: class) ];
 
What do i do to remove it from interface ?
     ( with new reference for  call :                           WATree   selectBlock: [ :class |  myComponent call: (WABrowser fullOnClass: class) ];
                                                                           
   


 
 
 
B) Second problem : tree position
 
    Now then rendering one WATree it start  always to root of the tree ;
            or to one specific node with lose of upper hierrarchy.

    My question is :
        is possibol display the WATree positioned on one specific node with upper and under hierarchy ?
        or render WATree to the last position node select with upper an under hierarchy ?


Thanks & Regards,

 Dario Trussardi Romano

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside.WATree expand and element position

Lukas Renggli
>  (component isKindOf: WATree)
>   ifTrue:
>    [html div
>     style: 'height: 200px; width: 200px;  overflow: scroll';
>     with: ( component renderTreeOn: html  )]
>   ifFalse: [html render: component].

Remove "renderTreeOn: html", you should never all render methods of
other components. And since this method returns the component, it is
displayed twice.

> B) Second problem : tree position
>
>     Now then rendering one WATree it start  always to root of the tree ;
>             or to one specific node with lose of upper hierrarchy.
>
>     My question is :
>         is possibol display the WATree positioned on one specific node with
> upper and under hierarchy ?
>         or render WATree to the last position node select with upper an
> under hierarchy ?

Yes, but it is probably not simple and certainly involves changing the
implementation of WATree. You could do it using JavaScript, e.g. with
script.aculo.us and a scroll-to effect.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside