getting inputText on only the first row of a (Primefaces) dataTable, with dynamic columns and rows

前端 未结 2 1184
你的背包
你的背包 2021-01-25 18:39

I have a Primefaces (5.0) Datatable with dynamic columns as well as dynamic rows. In brief, my problem is how do I set it up so that the cells of the first row are a series of i

2条回答
  •  失恋的感觉
    2021-01-25 19:28

    Thank you again to Unknown: This is effectively your answer (I don't know if there is a more formal way of attributing it to you, but I am happy to do so ). Much appreciated. xhtml code as follows:

    
                
                                            #{rowMap[columnName]}
                                        
                
                    #{columnName}
                    
                    
                
              
    

    So it is as you described it for the rows, plus I have added an extra p:columns block just to differentiate the first column, and placed a columnIndexVar with rendered="#{col!=0}" conditional on the main p:Columns block so that the first column does not have the inputTextarea that the other cells of the first row do.

提交回复
热议问题