<page xmlns="http://bali.us.oracle.com/cabo/baja" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:marlin="http://bali.us.oracle.com/cabo/marlin" xmlns:data="http://bali.us.oracle.com/cabo/marlin" xmlns:uix="http://bali.us.oracle.com/cabo/marlin" xmlns:baja="http://bali.us.oracle.com/cabo/baja">
  <baja:head xmlns="http://www.w3.org/TR/REC-html40">
  </baja:head>
  <content>
    <dataScope xmlns="http://bali.us.oracle.com/cabo/marlin">
      <contents>
        <html:title>
          <text>
            <boundAttribute name="text">
              <concat>
                <dataObject select="comm_win_title" source="win_title"/>
                <dataObject select="rules" source="SLBBundle"/>
              </concat>
            </boundAttribute>
          </text>
        </html:title>
	<html:noScript> "JavaScript is not supported by your browser. Oracle requires JavaScript support in order to completely render this page." </html:noScript>
        <form name="rule_list_form" method="POST">
          <contents>
            <pageLayout>
              <mediumAdvertisement>
                <include baja:node="../../../oemBanner"/>
              </mediumAdvertisement>
              <globalButtons>
                <include baja:node="../../../globalButtonBar"/>
              </globalButtons>
              <tabs>
                <include baja:node="../../../globalTabs"/>
              </tabs>
              <pageHeader>
                <include baja:node="../../../globalHeader"/>
              </pageHeader>
              <copyright>
                <include baja:node="../../../copyright"/>
              </copyright>
              <privacy/>
              <location>
                <include baja:node="../../../breadCrumbs"/>
              </location>
              <contents>
                <spacer height="15"/>
              </contents>
              <!-- Body Section -->
              <contents>
                <spacer height="5"/>
                <header data:text="rules@SLBBundle">
                  <contents>
                    <spacer height="5"/>
                        <switcher data:childName="hasError@RuleList" defaultCase="defCase">
                          <case name="true">
                            <messageBox messageType="error" data:message="errorMessage@RuleList"/>
                          </case>
                         <case name="defCase">
			
                    <stackLayout width="100%">
                      <contents>
                        <tableLayout width="100%">
                          <contents>
                            <rowLayout>
                              <contents>
                                <cellFormat>
                                  <contents>
                                    <rowLayout hAlign="right">
                                      <contents>
                                        <include baja:node="timestamp"/>
                                        <spacer width="8"/>
                                        <image data:source="refreshIcon@refreshButtonData"
                                               data:destination="refreshUrl@refreshButtonData"
                                               data:shortDesc="REFRESH_ICON_BUBBLE@SLBBundle"/>
                                        <spacer width="8"/>
                                        <button data:text="showButtonText@RuleList"
                                                      baja:event="show"
                                                      data:rendered="rendered@RuleList"/>
                                      </contents>
                                    </rowLayout>
                                  </contents>
                                </cellFormat>
                              </contents>
                            </rowLayout>
                          </contents>
                        </tableLayout>

                        <tableLayout width="100%">
                          <contents>
                            <rowLayout hAlign="right">
                              <contents>
                                <switcher data:childName="hasMgmtPriv@user_target_priv">
                                   <case name="true">
                                    <button data:text="Create@SLBBundle" baja:event="add"/>
                                   </case>
                                 </switcher>
                              </contents>
                            </rowLayout>
                          </contents>
                        </tableLayout>
                        <spacer height="5"/>
                        <table data:summary="Rules_Content_Table_Summary@SLBBundle" name="rulelist" data:blockSize="blockSize@RuleList"
                          data:maxValue="maxValue@RuleList" data:value="value@RuleList"
                          data:columnHeaderData="column@RuleList" width="100%"
                          data:tableData="row@RuleList"
                          data:columnFormats="colformat@columnFormatData"
                          data:alternateText="EMPTY_RULES_TABLE@SLBBundle">                          
                        <tableFormat tableBanding="rowBanding" bandingInterval="1"/>
                          <columnHeaderStamp>
                            <sortableHeader data:text="text" data:sortable="sortable"/>
                          </columnHeaderStamp>
                          <boundAttribute name="columnHeaderData">
                            <dataObject select="column" source="RuleList"/>
                          </boundAttribute>
                          <!-- Add a selection column -->
                          <tableSelection>
                            <singleSelection selectedIndex="0" data:rendered="hasMgmtPriv@user_target_priv">
                              <contents>
                                <switcher data:childName="hasMgmtPriv@user_target_priv">
                                   <case name="true">
                                      <submitButton data:text="Edit@SLBBundle" baja:event="edit"/>
                                   </case>
                                 </switcher>
                                <switcher data:childName="hasMgmtPriv@user_target_priv">
                                   <case name="true">
                                    <submitButton data:text="Delete@SLBBundle" baja:event="delete"/>
                                   </case>
                                 </switcher>
                              </contents>
                            </singleSelection>
                          </tableSelection>
                          <!-- Creating the columns as rowLayouts -->
                          <contents>
                            <rowLayout vAlign="top" hAlign="left">
                              <contents>
                                <cellFormat width="80%" vAlign="top" hAlign="left">
                                  <contents>
                                    <styledText uix:text="ruleName"/>
                                  </contents>
                                </cellFormat>
                              </contents>
                            </rowLayout>
                            <rowLayout vAlign="top" hAlign="left">
                              <contents>
                                <cellFormat width="20%" vAlign="top" hAlign="left">
                                  <contents>
                                    <html:pre>
                                      <text data:text="ruleDesc"/>
                                    </html:pre>
                                  </contents>
                                </cellFormat>
                              </contents>
                            </rowLayout>
                            <formValue name="ruleName" data:value="ruleName"/>
                            <formValue name="ruleDesc" data:value="ruleDesc"/>
                          </contents>
                        </table>
                        <spacer height="10"/>
                      </contents>
                    </stackLayout>
			</case>
			</switcher>
                  </contents>
                </header>
              </contents>
            </pageLayout>
          </contents>
        </form>
      </contents>
      <provider>
        <data name="SLBBundle">
          <bundle class="oracle.sysman.eml.rsc.target.slb.SLBBundle"/>
        </data>
        <data name="RuleList">
          <method class="oracle.sysman.eml.target.slb.mgmt.RulePage" method="getRuleList"/>
        </data>
        <data name="user_target_priv">
          <method class="oracle.sysman.eml.target.slb.mgmt.RoleBasedMgmt" method="getUserTargetPriv"/>
        </data>
        <data name="win_title">
          <method class="oracle.sysman.eml.target.slb.common.SLB" method="getCommonWinTitle"/>
        </data>
        <data name="refreshButtonData">
          <method class="oracle.sysman.eml.target.slb.common.SLBCommonUIX" method="getRefreshButtonData"/>
        </data>
      </provider>
    </dataScope>
  </content>
  <handlers>
    <event name="edit">
      <method class="oracle.sysman.eml.target.slb.mgmt.RulePage" method="doEdit"/>
    </event>
    <event name="delete">
      <method class="oracle.sysman.eml.target.slb.mgmt.RulePage" method="doDelete"/>
    </event>
    <event name="add">
      <method class="oracle.sysman.eml.target.slb.mgmt.RulePage" method="doAdd"/>
    </event>
    <event name="sort">
      <method class="oracle.sysman.eml.target.slb.common.SLBCommonUIX" method="doSort"/>
    </event>
    <event name="goto">
      <method class="oracle.sysman.eml.target.slb.common.SLBCommonUIX" method="doGoto"/>
    </event>
    <event name="refresh">
      <method class="oracle.sysman.eml.target.slb.common.SLBCommonUIX" method="doRefresh"/>
    </event>
    <event name="show">
      <method class="oracle.sysman.eml.target.slb.common.SLBCommonUIX" method="doShow"/>
    </event>
    <event name="null">
      <method class="oracle.sysman.eml.target.slb.common.SLBOnlineHelp" method="setHelpPage"/>
    </event>
  </handlers>
</page>

