You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Kołoszko Paweł <pa...@atena.pl> on 2005/06/13 19:41:11 UTC
Problem with actionListener invoked from DataTable
I have a DataTable. This datatable references property "cases" of backing
bean called listCases (session scoped). There is a commandlink in one of the
column of the datatable. This commandLink invokes actionListener called
"caseSelect" from backing bean called case (session scoped). And everything
works fine. But when I have changed scope of listCases to request,
caseSelect actionListener is not invoked anymore. Only current page is
refreshed. There are no error messages, messages tag is also empty. I also
checked in debug that caseSelect was not invoked.
Is it bug? Or maybe I did something wrong?
Here is the listing:
<x:dataTable id="listsprawAttach" value="#{listCases.cases}" var="spr"
border="0"
styleClass="standardTable"
headerClass="standardTable_SortHeader"
rowClasses="standardTable_Row1,standardTable_Row2"
footerClass="standardTable_Footer"
sortColumn="#{listSprawyBezUzytkownika.sort}"
sortAscending="#{listSprawyBezUzytkownika.ascending}"
preserveDataModel="true"
preserveSort="true"
rows="24">
<!-- here few h:column tags -->
<h:column >
<h:commandLink id="caseSelect" action="case"
actionListener="#{case.caseSelect}">
<f:param id="editId" name="sprawaId" value="#{spr.id}" />
</h:commandLink>
</h:column>
</x:dataTable>
Re: Problem with actionListener invoked from DataTable
Posted by Martin Marinschek <ma...@gmail.com>.
That is exactly how I use the dataTable in my projects.
Strange that it shouldn't work in your case!
Do you use client-side state saving or server-side?
Are your dataTables embedded in a form, exactly one?
Can you try to deploy the examples, there are cases like yours in there as well?
regards,
Martin
On 6/13/05, Kołoszko Paweł <pa...@atena.pl> wrote:
> I have a DataTable. This datatable references property "cases" of backing
> bean called listCases (session scoped). There is a commandlink in one of the
> column of the datatable. This commandLink invokes actionListener called
> "caseSelect" from backing bean called case (session scoped). And everything
> works fine. But when I have changed scope of listCases to request,
> caseSelect actionListener is not invoked anymore. Only current page is
> refreshed. There are no error messages, messages tag is also empty. I also
> checked in debug that caseSelect was not invoked.
> Is it bug? Or maybe I did something wrong?
>
> Here is the listing:
>
> <x:dataTable id="listsprawAttach" value="#{listCases.cases}" var="spr"
> border="0"
> styleClass="standardTable"
> headerClass="standardTable_SortHeader"
>
> rowClasses="standardTable_Row1,standardTable_Row2"
> footerClass="standardTable_Footer"
>
> sortColumn="#{listSprawyBezUzytkownika.sort}"
>
> sortAscending="#{listSprawyBezUzytkownika.ascending}"
> preserveDataModel="true"
> preserveSort="true"
> rows="24">
>
>
> <!-- here few h:column tags -->
>
> <h:column >
> <h:commandLink id="caseSelect" action="case"
> actionListener="#{case.caseSelect}">
> <f:param id="editId" name="sprawaId" value="#{spr.id}" />
> </h:commandLink>
> </h:column>
>
> </x:dataTable>
>