sync
[roojs1] / docs / symbols / Roo.View.html
index 6cf51d1..8633553 100644 (file)
@@ -89,7 +89,7 @@
     
 <!-- ============================== class summary ========================== -->                       
     <div class="description">
-       Create a "View" for an element based on a data model or UpdateManager and the supplied DomHelper template. <br/>This class also supports single and multi selection modes. <br><br/>Create a data model bound view:<br/> <pre><code><br/> var store = new Roo.data.Store(...);<br/><br/> var view = new Roo.View("my-element",<br/> '&lt;div id="{0}"&gt;{2} - {1}&lt;/div&gt;', // auto create template<br/> {<br/> singleSelect: true,<br/> selectedClass: "ydataview-selected",<br/> store: store<br/> });<br/><br/> // listen for node click?<br/> view.on("click", function(vw, index, node, e){<br/> alert('Node "' + node.id + '" at index: ' + index + " was clicked.");<br/> });<br/><br/> // load XML data<br/> dataModel.load("foobar.xml");<br/> </code></pre><br/> For an example of creating a JSON/UpdateManager view, see {<b>link</b> Roo.JsonView}.<br/><br><br><br/><b>Note: The root of your template must be a single node. Table/row implementations may work but are not supported due to<br/>IE"s limited insertion support with tables and Opera"s faulty event bubbling.</b>
+       Create a "View" for an element based on a data model or UpdateManager and the supplied DomHelper template. <br/>This class also supports single and multi selection modes. <br><br/>Create a data model bound view:<br/> <pre><code><br/> var store = new Roo.data.Store(...);<br/><br/> var view = new Roo.View({<br/>    el : "my-element",<br/>    template : '&lt;div id="{0}"&gt;{2} - {1}&lt;/div&gt;', // auto create template<br/> <br/>    singleSelect: true,<br/>    selectedClass: "ydataview-selected",<br/>    store: store<br/> });<br/><br/> // listen for node click?<br/> view.on("click", function(vw, index, node, e){<br/> alert('Node "' + node.id + '" at index: ' + index + " was clicked.");<br/> });<br/><br/> // load XML data<br/> dataModel.load("foobar.xml");<br/> </code></pre><br/> For an example of creating a JSON/UpdateManager view, see {<b>link</b> Roo.JsonView}.<br/><br><br><br/><b>Note: The root of your template must be a single node. Table/row implementations may work but are not supported due to<br/>IE"s limited insertion support with tables and Opera"s faulty event bubbling.</b><br/><br/>Note: old style constructor is still suported (container, template, config)
     </div>
 
        
        
        
        
+               <tr class="config-row expandable config-row-alt0 notInherited">
+                  <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
+                   <td class="sig">
+
+                       <a id="Roo.View-cfg-el" name=".el"></a>
+                       <div class="fixedFont">
+                               <b  class="itemname">el</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>|<a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a>
+                               
+                               
+                       </div>
+                 
+                       <div class="mdesc">
+                           <div class="short">The container element.</div> 
+                       </div>
+                       
+                       <div class="mdesc">
+                           <div class="long">The container element.</div> 
+                       </div>
+                       
+                       
+
+                   </td>
+                   <td class="msource">
+                       
+                       Roo.View
+                               
+                   </td>
+               </tr>
+        
+       
+               <tr class="config-row expandable config-row-alt1 notInherited">
+                  <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
+                   <td class="sig">
+
+                       <a id="Roo.View-cfg-emptyText" name=".emptyText"></a>
+                       <div class="fixedFont">
+                               <b  class="itemname">emptyText</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
+                               
+                               
+                       </div>
+                 
+                       <div class="mdesc">
+                           <div class="short">The empty text to show when nothing is loaded.</div> 
+                       </div>
+                       
+                       <div class="mdesc">
+                           <div class="long">The empty text to show when nothing is loaded.</div> 
+                       </div>
+                       
+                       
+
+                   </td>
+                   <td class="msource">
+                       
+                       Roo.View
+                               
+                   </td>
+               </tr>
+        
+       
                <tr class="config-row expandable config-row-alt0">
                   <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
                    <td class="sig">
                    </td>
                </tr>
         
+       
+               <tr class="config-row expandable config-row-alt1 notInherited">
+                  <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
+                   <td class="sig">
+
+                       <a id="Roo.View-cfg-selectedClass" name=".selectedClass"></a>
+                       <div class="fixedFont">
+                               <b  class="itemname">selectedClass</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
+                               
+                               
+                       </div>
+                 
+                       <div class="mdesc">
+                           <div class="short">The css class to add to selected nodes</div> 
+                       </div>
+                       
+                       <div class="mdesc">
+                           <div class="long">The css class to add to selected nodes</div> 
+                       </div>
+                       
+                       
+
+                   </td>
+                   <td class="msource">
+                       
+                       Roo.View
+                               
+                   </td>
+               </tr>
+        
+       
+               <tr class="config-row expandable config-row-alt0 notInherited">
+                  <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
+                   <td class="sig">
+
+                       <a id="Roo.View-cfg-store" name=".store"></a>
+                       <div class="fixedFont">
+                               <b  class="itemname">store</b> : <a href="./Roo.data.Store.html#constructor" roo:cls="Roo.data.Store.html#constructor">Roo.data.Store</a>
+                               
+                               
+                       </div>
+                 
+                       <div class="mdesc">
+                           <div class="short">Data store to load data from.</div> 
+                       </div>
+                       
+                       <div class="mdesc">
+                           <div class="long">Data store to load data from.</div> 
+                       </div>
+                       
+                       
+
+                   </td>
+                   <td class="msource">
+                       
+                       Roo.View
+                               
+                   </td>
+               </tr>
+        
+       
+               <tr class="config-row expandable config-row-alt1 notInherited">
+                  <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
+                   <td class="sig">
+
+                       <a id="Roo.View-cfg-tpl" name=".tpl"></a>
+                       <div class="fixedFont">
+                               <b  class="itemname">tpl</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>|<a href="./Roo.Template.html#constructor" roo:cls="Roo.Template.html#constructor">Roo.Template</a>
+                               
+                               
+                       </div>
+                 
+                       <div class="mdesc">
+                           <div class="short">The template used by this View</div> 
+                       </div>
+                       
+                       <div class="mdesc">
+                           <div class="long">The template used by this View</div> 
+                       </div>
+                       
+                       
+
+                   </td>
+                   <td class="msource">
+                       
+                       Roo.View
+                               
+                   </td>
+               </tr>
+        
         
     </table>
                
                <div class="fixedFont">
                        <span class="attributes">new <B>Roo.</B></span><b class="itemname">View</b>
                                
-                                (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Element <B><i>container</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/DomHelper.Template <B><i>tpl</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>config</i></B>) 
+                                (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>config</i></B>) 
                        
                                
                        
                                <dl class="detailList">
                                <dt class="heading">Parameters:</dt>
                                
-                                       <dt>
-                                               <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Element</span>  <b>container</b>
-                                               
-                                       </dt>
-                                       <dd>The container element where the view is to be rendered.</dd>
-                               
-                                       <dt>
-                                               <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/DomHelper.Template</span>  <b>tpl</b>
-                                               
-                                       </dt>
-                                       <dd>The rendering template or a string to create a template with</dd>
-                               
                                        <dt>
                                                <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span>  <b>config</b>
                                                
 <!-- ============================== footer ================================= -->
                <div class="fineprint" style="clear:both">
                        
-                       Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a>  on Thu Jul 22 2010 10:38:33 GMT+0800 (HKT)
+                       Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a>  on Tue Jul 27 2010 11:05:07 GMT+0800 (HKT)
                        Based on 
                        <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>  
                </div>