ADF : Change View Criteria Columns at Runtime


When creating view criteria related to view object, then all querable attributes are displayed in view criteria by default.
So I want to change the properties of this attributes at run time pragmatically to display or hide specific attributes in view criteria.

I developed the following method for this purpose, You can add this method to ViewObjectImpl class.

I pass attribute name and a Boolean value to determine display in view criteria or no.

 public void setQuerable(String attributeName, Boolean isQuerable) {  
   
     int indx = this.getAttributeIndexOf(attributeName);  
   
     ViewAttributeDefImpl attr = (ViewAttributeDefImpl)this.getAttributeDef(indx);  
   
     attr.setQueriable(isQuerable);  
   
   }  


Thanks

Popular posts from this blog

ADF : Get Current Logged User Name

OAF : Get Current Row in Table

ADF : Working with ViewCriteria