Thursday 24 October 2013

ADF : ViewCriteria : Persisting Query Criteria Results Across Sessions with Oracle MDS

ViewCriteria : Persisting Query Criteria Results Across Sessions with Oracle MDS

Three setups explained in this:
Setup1: store viewcriteria saved search in MDS
Setup2: store <af:table - column change in MDS
Setup3: override <af:table - column persistant change not to store in MDS for particular column.

Setup1:store viewcriteria saved search in MDS

Note :
From the above link we will be able to store all searched criteria in to MDS and it will be retrived next time when the same user logs in.

Setup2: store <af:table - column change in MDS

Enabling Implicit Personalization Across Session


But: If we want to persist (store) the ADF table column changes also in to MDS, we have to add the below code into adf-config.xml file. (For more info refer -> http://blog.us.oracle.com/lift/?97408963)

############################################################################

<adf-faces-config xmlns="http://xmlns.oracle.com/adf/faces/config">
    <persistent-change-manager>
      <persistent-change-manager-class>oracle.adf.view.rich.change.MDSDocumentChangeManager</persistent-change-manager-class>
    </persistent-change-manager>
    <taglib-config>
       <taglib uri="http://xmlns.oracle.com/adf/faces/customizable">
        <tag name="showDetailFrame">
          <attribute name="expansionMode">
            <persist-changes>
              true
            </persist-changes>
          </attribute>
          <attribute name="contentStyle">
            <persist-changes>
              true
            </persist-changes>
          </attribute>
        </tag>
        <tag name="panelCustomizable">
          <persist-operations>
            all
          </persist-operations>
        </tag>
      </taglib>
      <taglib uri="http://xmlns.oracle.com/adf/pageeditor">
        <tag name="layoutCustomizable">
          <persist-operations>
            all
          </persist-operations>
          <attribute name="type">
            <persist-changes>
              true
            </persist-changes>
          </attribute>
        </tag>
      </taglib>
      <taglib uri="http://xmlns.oracle.com/adf/faces/portlet">
        <tag name="portlet">
          <attribute name="expansionMode">
            <persist-changes>
              true
            </persist-changes>
          </attribute>
        </tag>
      </taglib>
      <taglib uri="http://xmlns.oracle.com/adf/faces/rich">
        <tag name="column">
          <attribute name="displayIndex">
            <persist-changes>
              true
            </persist-changes>
          </attribute>
          <attribute name="frozen">
            <persist-changes>
              true
            </persist-changes>
          </attribute>
          <attribute name="noWrap">
            <persist-changes>
              true
            </persist-changes>
          </attribute>
          <attribute name="visible">
            <persist-changes>
              true
            </persist-changes>
          </attribute>
          <attribute name="width">
            <persist-changes>
              true
            </persist-changes>
          </attribute>
        </tag>
      </taglib>
    </taglib-config>

  </adf-faces-config>
#########################################################################


This above setup is applied for all the adf:table -> column -> visible attribute.

Setup3: override <af:table - column persistant change not to store in MDS for particular column.

Some times we may have requirement not to persist particular table-> column, In that case you can go with the below setup.


1. Select af:table -> column component -> go to Property inspector -> expand Advanced tab -> DontPersist select All.
(then all attributes will not be persisted for that particular column, actually this overrides the above adf-config.xml setup only for this particular column)

For More Info : http://fmwdocs.us.oracle.com/doclibs/fmw/E10285_01/web.1111/b31974/ad_persist.htm#CIHDEBFJ




No comments:

Post a Comment