• Outline control

    By Howard Greenberg 1 decade ago

    How would you use the RepeatTreeNode in the Outline control?  I assume the value property is what will get repeated and should be an array of strings?  Or something else?

    thanks,

    Howard

     

    • See Core_Outline.xsp in Extlib demo app

      By Andrejus Chaliapinas 1 decade ago

      You could use it this way:

       

      <xe:outline id="outline4">

      <xe:this.treeNodes>

      <xe:repeatTreeNode var="val">

      <xe:this.children>

      <xe:basicLeafNode>

      <xe:this.submitValue>#{javascript:return val[1]}]]>xe:this.submitValue>

      <xe:this.label>#{javascript:return val[0]}]]>xe:this.label>

      xe:basicLeafNode>

      xe:this.children>

      <xe:this.value>#{javascript:return [

      ["Home","home"],

      ["Domino","domino"],

      ["OneUI","oneui"]

      ];}]]>xe:this.value>

      xe:repeatTreeNode>

      xe:this.treeNodes>

      <xp:eventHandler event="onItemClick" submit="true"

      refreshMode="partial" refreshId="panel5">

      <xp:this.action>#{javascript:viewScope.dynamicValue = context.getSubmittedValue()}]]>xp:this.action>

      xp:eventHandler>

      xe:outline>

      • thanks,that helps,but,a question

        By Howard Greenberg 1 decade ago

        What kind of data can the repeat handle?  A document collection?  A Domino view?

        Howard

        • Anything that is iterable

          By Philippe Riand 1 decade ago

          List, Collections, Arrays (JS/Java...). In fact, anything that can be wrapped by a JSF datamodel, similarly to the regular Repeat control

      • Another point,outlines and repeattreenode

        By Howard Greenberg 1 decade ago

        If I move your code inside a mobile page than the click event stops working.  Here is my code.

        Howard

         


            xmlns:xp="http://www.ibm.com/xsp/core"
            xmlns:xe="http://www.ibm.com/xsp/coreex">

                     id="singlePageApp1"
                selectedPageName="home">
                             id="appPage1"
                    pageName="home">
                                     escape="true"
                        id="computedField1"
                        value="#{viewScope.dynamicValue}">
                    
                    

                        

                            

                                

                                    

                                        

                                        

                                    


                                


                                
        ["Home","home"],

        ["Domino","domino"],

        ["OneUI","oneui"]

        ];}]]>


                            


                        


                        
                            
                        

                                             event="onItemClick"
                            submit="true"
                            refreshMode="partial"
                            refreshId="computedField1">