This post explains the use of detailstamp facet of a table component to display the details of row along with a row . see below:-
Interesting fact is that the component renders as tree table , Copying the code snippets------
<af:table value="#{bindings.DepartmentsView1.collectionModel}"
var="row" rows="#{bindings.DepartmentsView1.rangeSize}"
emptyText="#{bindings.DepartmentsView1.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.DepartmentsView1.rangeSize}"
rowBandingInterval="0" id="t1">
<af:column sortProperty="DepartmentId" sortable="false"
headerText="#{bindings.DepartmentsView1.hints.DepartmentId.label}"
id="c1">
<af:outputText value="#{row.DepartmentId}" id="ot4">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.DepartmentsView1.hints.DepartmentId.format}"/>
</af:outputText>
</af:column>
<af:column sortProperty="DepartmentName" sortable="false"
headerText="#{bindings.DepartmentsView1.hints.DepartmentName.label}"
id="c4">
<af:outputText value="#{row.DepartmentName}" id="ot3"/>
</af:column>
<af:column sortProperty="ManagerId" sortable="false"
headerText="#{bindings.DepartmentsView1.hints.ManagerId.label}"
id="c2">
<af:outputText value="#{row.ManagerId}" id="ot2">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.DepartmentsView1.hints.ManagerId.format}"/>
</af:outputText>
</af:column>
<af:column sortProperty="LocationId" sortable="false"
headerText="#{bindings.DepartmentsView1.hints.LocationId.label}"
id="c3">
<af:outputText value="#{row.LocationId}" id="ot1">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.DepartmentsView1.hints.LocationId.format}"/>
</af:outputText>
</af:column>
<f:facet name="detailStamp">
<af:table value="#{bindings.EmployeesView3.collectionModel}"
var="row" rows="#{bindings.EmployeesView3.rangeSize}"
emptyText="#{bindings.EmployeesView3.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.EmployeesView3.rangeSize}"
rowBandingInterval="0" id="t2">
<af:column sortProperty="EmployeeId" sortable="false"
headerText="#{bindings.EmployeesView3.hints.EmployeeId.label}"
id="c6">
<af:outputText value="#{row.EmployeeId}" id="ot6">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.EmployeesView3.hints.EmployeeId.format}"/>
</af:outputText>
</af:column>
<af:column sortProperty="FirstName" sortable="false"
headerText="#{bindings.EmployeesView3.hints.FirstName.label}"
id="c5">
<af:outputText value="#{row.FirstName}" id="ot9"/>
</af:column>
<af:column sortProperty="LastName" sortable="false"
headerText="#{bindings.EmployeesView3.hints.LastName.label}"
id="c7">
<af:outputText value="#{row.LastName}" id="ot5"/>
</af:column>
<af:column sortProperty="Email" sortable="false"
headerText="#{bindings.EmployeesView3.hints.Email.label}"
id="c8">
<af:outputText value="#{row.Email}" id="ot7"/>
</af:column>
<af:column sortProperty="PhoneNumber" sortable="false"
headerText="#{bindings.EmployeesView3.hints.PhoneNumber.label}"
id="c9">
<af:outputText value="#{row.PhoneNumber}" id="ot8"/>
</af:column>
</af:table>
</f:facet>
</af:table>
Are you using ADF 12c or 11g ?? I trying to get similar thing. But in 12c its not allowing to insert table inside the table.
ReplyDeleteThis sample is in 11g , didnt try in 12 c !!
DeleteIs this can be used in af:listView ?
ReplyDeletehow I can do the same thing in 12c ?
ReplyDeleteI cannot thank you enough for the blog.Thanks Again. Keep writing.
ReplyDeleteonline trining for hadoop bigdata
hadoop online training in hyderabad