|
Kris, are you using JSF-RI? I have similar ‘id‘-problems
when testing h:selectBooleanCheckbox inside x:datatable and using JSF-RI+MyFaces
extensions. Id of selectBooleanCheckbox is same on
each table row. I don’t get this problems using MyFaces
environment – and that’s also how the examples are configured. ---Vli--- From: Kris Verhoye
[mailto:[EMAIL PROTECTED] Hi! I know that there have been a lot of questions
regarding the dataTable, but I still can't get mine to work. I have a table which looks like this:
<x:dataTable id="pubTable" The table is rendered to this: <table id="pubForm:pubTable"
class="publicationTable"> <tr><th
class="publicationTable_SortHeader"></th><th
class="publicationTable_SortHeader"><a href=""
false;"
id="pubForm:pubTable:_id11">Code</a></th><th
class="publicationTable_SortHeader"><a href=""
false;" id="pubForm:pubTable:_id16">Name↓</a></th></tr></thead> The publicationsBean backing bean has the following
setters/getters: public DataModel getPublicationModel() private List loadPublications() public String getSort() public void setSort(String sort) public boolean isAscending() public void setAscending(boolean ascending) The sorting works, as it is I'm already quite happy
with the output ;-) Yet! I can't get the id of selected Publication once
the commandLink is pressed as there seems to be a problem with the generated
ids of each row! As far as I know, each id should be something like
pubForm:pubTable_0:_id13, pubForm:pubTable_1:_id13, etc...?! As all my rows have the same id (see the rendered
table), the DataModel's getDataRow() method always returns the last item from
the row (after having iterated over the whole column it seems). Does anyone know what my problem could be? The master/detail example from the myfaces examples
does get an id per row so I'm reckoning it's still possible. I tried using <x:updateActionListener
property="#{publicationsBean.selectedPublication}"
value="#{publication}" />, but the problem remains as the system
can't differentiate between the rows... Many thanks in advance for any help!! Greetings,
|
Title: Message

