About ChildBlockSize

The large record set navigation functionality of the hGrid component enables you to break up the display of large record sets into scrollable views. The size of a scrollable view is determined by the childBlockSize attribute. By setting this attribute to an integer value greater than zero, any set of nodes with child nodes numbering more than the childBlockSize are rendered in scrollable views of that size.

Scroll links (such as Scroll link (Previous) ) are rendered in new navigation rows above and below the view. The navigation links are disabled if there is no more data to display. An enabled navigation link will display an optional type text, the row number range of the next (or previous) view, and the total number of rows in the rowset. The type text is provided by the client using the special childTypeText attribute on the node data.

HGrid with enabled scrollable views

The childBlockSize attribute can also be set directly on a data node to control the display of that node's children and all of its sub-nodes' children. This provides a fully scoped view size setting. In summary, a node's children will be displayed in sets. The size of these sets is determined by the first childBlockSize attribute found by traversing nodes from the current node up to the root.

The hGrid component generates two events, next and previous, for which you have to provide an event handler. Both events can be handled by the same event handler. The constructor doHGridWindowEvent in ClientStateHGridDataProxy enables you to handle large record set navigation in hGrid.

Example (UIX XML)


Example: Copyright (c) Oracle Corporation 2003. All Rights Reserved.

<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright (c) Oracle Corporation 2003. All Rights Reserved. -->
<!-- 67890123456789012345678901234567890123456789012345678901234567890123456-->
<!-- hGridLRS.uix -->
<!-- @version $Name: $ ($Revision: 1.9 $) $Date: 2003/11/04 04:13:04 $ -->
<!-- This file is a demo of the Large Record Set navigation capabilities of -->
<!-- the UIX hGrid element. -->
<page xmlns="http://xmlns.oracle.com/uix/controller"
      xmlns:ui="http://xmlns.oracle.com/uix/ui"
      xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
      xmlns:lrs="http://www.example.org/HGrid_LRS"
      expressionLanguage="el">
  <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
      <contents>
        <document>
          <metaContainer>
            <head title="HGrid Large Data Set demo"/>
          </metaContainer>
          <contents>
            <body>
              <contents>
                <header text="Demo">
                  <contents>
                    <flowLayout>
                      <contents>
                        <form name="radForm" destination="${ctrl:eventUrl(uix, 'size')}">
                          <contents>
                            <styledText styleClass="${uix.data.styles.types.largePrompt}"
                                        text="${uix.data.attrNames.childView.nameText} set to:"/>
                            <flowLayout>
                              <!-- Build radio buttons for selecting the view size -->
                              <contents childData="${uix.data.sizeChoices.opt}">
                                <radioSet name="sizeSelect"
                                          selectedValue="${ui:defaulting(uix.pageProp.vsiz,
                                                           uix.data.sizeChoices.default.val)}">
                                  <contents>
                                    <option text="${uix.current.txt}"
                                            value="${uix.current.val}"/>
                                  </contents>
                                  <primaryClientAction>
                                    <firePartialAction formSubmitted="true"
                                                       event="size"
                                                       targets="demoHGrid"/>
                                  </primaryClientAction>
                                </radioSet>
                              </contents>
                            </flowLayout>
                          </contents>
                        </form>
                        <spacer height="5"/>
                        <form name="f1">
                          <contents>
                            <!-- The interesting thing here is the childBlockSize attr -->
                            <hGrid id="demoHGrid"
                                   childBlockSize="${ui:defaulting(uix.pageProp.vsiz,
                                                     uix.data.sizeChoices.default.val)}"
                                   alternateText="No Data"
                                   proxy="${uix.data.proxy.hgrid}"
                                   treeData="${uix.data.tree.nodes}"
                                   partialRenderMode="self">
                              <nodeStamp>
                                <column>
                                  <columnFormat width="100%"/>
                                  <columnHeader>Node Name</columnHeader>
                                  <contents>
                                    <text text="${uix.current.text}"/>
                                  </contents>
                                </column>
                              </nodeStamp>
                              <columnFormats>
                                <columnFormat columnDataFormat="numberFormat"/>
                              </columnFormats>
                              <columnHeaderStamp>
                                <text text="${uix.current.text}"/>
                              </columnHeaderStamp>
                              <columnHeaderData>
                                <col text="Number"/>
                              </columnHeaderData>
                              <contents>
                                <text text="${uix.current.num}"/>
                              </contents>
                            </hGrid>
                          </contents>
                        </form>
                      </contents>
                    </flowLayout>
                  </contents>
                </header>
              </contents>
            </body>
          </contents>
        </document>
      </contents>
      <provider>
        <data name="attrNames">
          <inline>
            <childView nameText="childBlockSize"/>
            <childText nameText="childTypeText"/>
            <previousEvent nameText="previous"/>
            <nextEvent nameText="next"/>
            <proxyName nameText="ClientStateHGridDataProxy"/>
            <eventMethod nameText="doHGridWindowEvent"/>
            <demoClass nameText="oracle.cabo.servlet.demo.table.HGrid"/>
          </inline>
        </data>
        <data name="styles">
          <inline>
            <types default="OraInstructionText" code="OraTipText"
                   largePrompt="OraHeaderSubSub"/>
          </inline>
        </data>
        <data name="sizeChoices">
          <inline>
            <default val="5"/>
              <opt txt="Zero" val="0"/>
              <opt txt="Five" val="5"/>
              <opt txt="Ten" val="10"/>
          </inline>
        </data>
        <data name="tree">
          <method class="oracle.cabo.servlet.demo.table.HGridLargeRecordSetData"
                  method="getDataSet"/>
        /data>
        <data name="proxy">
          <method class="oracle.cabo.servlet.demo.table.HGrid"
                  method="getTreeProxy"/>
        </data>
      </provider>
    </dataScope>
  </content>
  <handlers>
    <event name="expand">
      <method class="oracle.cabo.servlet.demo.table.HGrid"
              method="doHGridExpandEvent"/>
    </event>
    <event name="focus collapseAll expandAll">
      <method class="oracle.cabo.servlet.demo.table.HGrid"
              method="doHGridFocusEvent"/>
    </event>
    <event name="next previous">
      <method class="oracle.cabo.servlet.demo.table.HGrid"
              method="doHGridWindowEvent"/>
    </event>
    <event name="size">
      <go>
        <property name="vsiz">
          <parameter name="sizeSelect"/>
        </property>
      </go>
    </event>
  </handlers>
</page>    

About HGrid and its Named Children
About HGridDataProxy

Creating an HGrid
Working with Table Components

 

Copyright © 1997, 2004, Oracle. All rights reserved.