Changing default Navigation Model in Webcenter portal

Requirement- In your webcenter Portal application , if you dont want to use seeded navigation model and you create your own navigation model and you want to make your navigation model
as default navigation model.

Implementation – When you create an Webcenter portal application using create new application and selection Webenter Portal application then seeded navigation model, default-navigation-model.xml, is set as the application’s default navigation model. Now if create your own navigation model to use for the main navigation path through your application, rather than having to explicitly reference this navigation model whenever you want to use it, you can set it as the default.
You can set the default navigation model for a Portal Framework application by editing the oracle.webcenter.portalapp.navigation.model preference in the adf-config.xml file.

-> Open the adf-config.xml file

-> Click the Source tab.Locate the ADF preference with the following id:


-> Set the value attribute to the path of the navigation model that you want to use as the default for the application, for example:


Below is adf-config.xml will look like

<preference id="oracle.webcenter.portalapp.navigation.model"
            desc="Default Navigation Model"
            resourceType="navigation" display="true"/>

-> Save the adf-config.xml file.

Happy learning with Vinay Kumar in techartifact

Dynamically changing query in view object in Oracle ADF

I have also written in my past post that how can you change the query my old post to change query . Here is another way.

Sometime requirements can be dynamically change SQL query where clause in View Object. I found on internet .so for the reference, i am sharing.

To use this functionality, you need to override buildWhereClause(StringBuffer sqlBuffer, int noBindVars) method in view object implementation. You use sqlBuffer parameter in this method (which contains SQL query where in StringBuffer) to change SQL in correlation to you needs. Just replace, remove, add string in this parameter. Just remember to use same bind variables names which will be use in VO SQL call (generic bind variables names are named like :vc_temp_1, :vc_temp_2,…).

        protected boolean buildWhereClause(StringBuffer sqlBuffer, int noBindVars) {  
            //call super and see if there is where clause.  
            boolean hasWhereClause = super.buildWhereClause(sqlBuffer, noBindVars);  
            if (hasWhereClause) {   
                //modify existing where query.  
            else {   
                //or if you add where clause then return true;  
                hasWhereClause = false;   
            return hasWhereClause;