Jsf 从嵌套(子数据表)数据表获取行数据 在托管bean中,doSomething()方法中parentDataTable和childDataTable的行索引值都是-1。在我看来,您想要实现什么还不是很清楚。根据您发布的代码,您确定javascript变量“

Jsf 从嵌套(子数据表)数据表获取行数据 在托管bean中,doSomething()方法中parentDataTable和childDataTable的行索引值都是-1。在我看来,您想要实现什么还不是很清楚。根据您发布的代码,您确定javascript变量“,jsf,datatable,jsf-1.2,Jsf,Datatable,Jsf 1.2,从嵌套(子数据表)数据表获取行数据 在托管bean中,doSomething()方法中parentDataTable和childDataTable的行索引值都是-1。在我看来,您想要实现什么还不是很清楚。根据您发布的代码,您确定javascript变量“id”有值吗? <h:dataTable width="100%" cellspacing="0" cellpadding="3" value="#{managedBean.parentViewList}"

从嵌套(子数据表)数据表获取行数据


在托管bean中,doSomething()方法中parentDataTable和childDataTable的行索引值都是-1。在我看来,您想要实现什么还不是很清楚。根据您发布的代码,您确定javascript变量“id”有值吗?
    <h:dataTable width="100%" cellspacing="0" cellpadding="3" 
        value="#{managedBean.parentViewList}"
        binding="#{managedBean.parentDataTable}"
        var="parent">
        <h:column>
            <h:dataTable width="100%" cellspacing="0" cellpadding="3" 
                    binding="#{managedBean.childDataTable}"
                    value="#{parent.childViewList"}"
                    var="child">
                   <h:column>#{child.value1"}<h:column> 
                   <h:column>
                      <h:selectOneMenu id ="histActionsId"  
                       value="#{child.actionClicked}" 
                       onchange="return clickOnMyLink(this, id);">
                           <f:selectItems value="#{child.applicableActionList}"/>
                     </h:selectOneMenu>
                   <h:column>   
            </h:dataTable>
       </h:column>
     </h:dataTable>