Requirement-In Oracle ADF we use af:query along with resulting table in advance mode.When use af:query in advance mode the UI is displayed as something like below. Usually clients dont want add fields option in advance search as it has all fields that doesn't makes sense to user.
Unfortunately there is no attribute in af:query components that allows us to remove this button.
Screenshot with add field option .
Now to hide this add fields button do below steps
1.Take the Id of Add field button using inspect element in browser .In my case id was "pt1:r2:0:qryId2:adFlds".It will vary based on id of query component and page you are using.
2.At the end of jsff file create a output text that has no next and creating component binding in backing bean as below.
Please note this need to be at the end of jsff file so that it is rendered at the last in lifecycle.
In Getter method of above created binding right code to get the add fields button component using java script by component id we got in step 1 .Once you find the component set display =none to hide the add fields button.
Backing bean code,as shown below i have written hideAddFieldSection method.
No comments:
Post a Comment