<af:table value="#{viewScope.ScheduleActivityBean.rows}"
autoHeightRows="0" varStatus="rwst" var="row" rendered="true"
id="t1" width="100%">
<af:forEach items="#{viewScope.ScheduleActivityBean.columnNames}"
varStatus="colIndex" var="name">
<af:column align="left" headerText="#{name}" width="250px" id="col1"
rendered="#{colIndex.index eq 0}">
<af:inputText id="i7" readOnly="true"
contentStyle="width:170px;font-weight:bold;color:rgb(49,49,49);"
value="#{row.activity}"/>
<af:column align="center" headerText="#{name}" width="120px"
id="co1_${rwst.index}" >
<af:inputText id="it27" readOnly="true"
value="#{row.scheduleName}"
/>
表数据取自 viewScope.ScheduleActivityBean.rows 列名取自 viewScope.ScheduleActivityBean.columnNames 输入文本值引用为 row.scheduleName 和 row.activity 其中 row 是 ScheduleActivityBean.rows arraylist(table data) 的元素或对象.
您可以为您的要求编写类似的逻辑。