0

I have component hierarchy such as this

    Form>P:DataList
    >DataTable1
    >DataTable2

When I see the generated html code or developers tool in ie, I found the client id generated for the datatables are

    form:datalist:0:DataTable
    form:datalist:1:DataTable

However when I invoke ViewRoot.findComponent with the above client Id, it return null.When I removed the "rowIndex" value i.e 0/1 it then only returns the first datatable. How to make it work so that I can find both the data tables from backend using their Ids?

AC_1985
  • 183
  • 9
  • 22
  • See the answer here http://stackoverflow.com/questions/16043218/refer-to-jsf-dynamically-generated-ids-based-on-iteration-index. – rdcrng Aug 14 '13 at 15:02
  • I tried something similar.Instead of c:foreach I tried with p:dataList.But when I was trying to add dynamic ids to the data tables, the "#{rowIndexvar}" was evaluating to null.So what am I missing here? – AC_1985 Aug 14 '13 at 17:51
  • That server side, there is only one component instance that renders all of indexed ids. – rdcrng Aug 14 '13 at 17:56

0 Answers0