In this post I write some functions you can use those functions in your ADF application.
Set Focus to component
If you want to set focus to component( as set cursor to inputText) just send component id to this function (if inputText id =it1 and you use page template with id=pt1 so the id which you have to send to this function is pt1:it1)
Expand Table DetailStamp Programmatically
Get Viewobject attribute datatype
programmatic
This function accept 2 parameters (iterator name, attribute name) and will return the data type of this attribute
Get Viewobject attribute Database Column
Name
This function accept 2 parameters (iterator name, attribute name) and will return the database column name which map to the viewobject attribute
Clear Table Filters
If you want to clear table filters programmatically sent table component to this function
Reset af:query fields
If you want to reset af:query sent query component to this function
Invoke af:query Search Action programmatically
1- Bind the af:query in the back bean like:
2- Add af:commandButton and in it's action write this code
Show error message on adf component
1- Bind the af:query in the back bean like:
Show error message on adf component
Sometime you need to remove required property from af:inputText because it may cause some problems and in the same time you need to display error message on the inputText component so you can use the following function just send the error message and the adf component
Sort
Table Column Programmatically
If you want to sort column programmatic you can use the following function just send table component and attribute which you would like to sort and the boolean parameter (true for ascending sort and false for descending sort)
Reset Table Sort
After sorting in column and need to reset the sorting you can use the following function just send table component and the iterator name (which the table point to)
Call
database sequence
When you want to get next value from database sequence you can use the following function just send database sequence name and it will return the next value of the sequence
Set Focus to component
If you want to set focus to component( as set cursor to inputText) just send component id to this function (if inputText id =it1 and you use page template with id=pt1 so the id which you have to send to this function is pt1:it1)
Expand Table DetailStamp Programmatically
No comments:
Post a Comment