af:table component structure in ADF

<af:table value="#{bindings.treename.collectionModel}"  var="row"
<af:column headerText = "#{bindings.treename.hints.FirstName.label}"
sortable="true" filterable="true"
sortproperty = "#{}"
Editable tab- <af:inputText value = "#{row.bindings.FirstName.inputValue}" />
Readonly tab- <af:outputText value = "#{row.FirstName}" />

<af:column headerText = "#{bindings.treename.hints.departmentId.label}"
sortable="true" filterable="true"
sortproperty = #{}
<f:facet name="filter">
<af:inputDate value="#{vs.filterCriteria.HireDate}"/>
Editable tab- <af:inputDate value="#{row.bindings.HireDate.inputValue}" />
Read only tab-  <af:outputText value="#{row.HireDate}" >

<af:column headerText = "#{bindings.treename.hints.departmentId.label}"
sortable="true" filterable="true"
sortproperty = #{}
<f:facet name="filter">
<af:selectOneChoice value="#{vs.filterCriteria.DepartmentId}"
inlineStyle="width:100px" autoSubmit="true">
<af:forEach items="#{bindings.DepartmentsView1.rangeSet}"
<f:selectItem itemValue="#{listRow.DepartmentId}"
Editable tab- <af:inputText value="#{row.bindings.DepartmentId.inputValue}">
Read only tab- <af:outputText value="#{row.DepartmentId}">


Result: This code displayes the updatable/read only table. In the top input text as default filter for all columns and date or LOV or customized component for the columns which use <f:facet name =”filter” />. The default implementation of the table filter cell renderer is an af:inputText field.

Front end display will be like below:


Note: If you want to add a filter like we have done it here for Department Id column you need place the filter component in the filter facet of a column. Here we have added LOV filter (SelectOneChoice) and inside that we have placed foreach to which bindings we’ve given for DepartmentsVO . There is no need to be any relationship between employees and departments to create in adf. Just Department Id should present in both VOs that is enough. And your page should contain both the VOs tree bindings. No need to do any child relationship like that just drag two VOs datacontrols as tree bindings to the page.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s