myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wesley Hales" <wesleyha...@gmail.com>
Subject Re: How To Workaround dynamic ID for datatable's etc...
Date Fri, 06 Oct 2006 14:31:39 GMT
I created the datatables dyniamically and am still getting a combined
sort on the sub tables. I can see through logging:

UIComponent uic = (UIComponent)dynamicTable.getChildren().get(j);
uic.getClientId(FacesContext.getCurrentInstance()) =
_idJsp0:_idJsp109:wesTable8024
uic.getFamily() = javax.faces.Column

uic.getClientId(FacesContext.getCurrentInstance()) =
_idJsp0:_idJsp109:wesCol4071
uic.getFamily() = javax.faces.Data

...After setting...

dynamicSubTable = new HtmlDataTable();
dynamicSubTable.setId("wesTable" + carDao.genRand());

The component tree has been built with a combination of JSF tags and
dynamically populating/building the table through my managed bean.

The only thing that is giving me any hope at this point is that the
built in sortable="true" (on the columns) will sort in the context of
the parent table. So if I have 2 datatables with sub tables in the
detailStamp, they WILL sort independently. But for some reason, even
though I am setting the id dynamically at this point, I still can't
get a independent sort of the child tables.

My only idea for a workaround at this point is to create a 1 row
datatable for each row in the table. Or wrap the sub table with
another datatable.

Mime
View raw message