myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glauco P. Gomes" <glaucopgo...@yahoo.com.br>
Subject Re: [Trinidad] [RESOLVED] Problem in Table "Select All / Select None" links and PPR
Date Fri, 13 Feb 2009 10:53:45 GMT
I resolved this issue putting a selection listener in the table and 
adding the table component to partial targets in the RequestContext.

In tr:table:
  selectionListener="#{myBackingBean.tableSelectionListener}"

In myBackingBean:
  public void tableSelectionListener(SelectionEvent event) {
    RequestContext.getCurrentInstance().addPartialTarget(this.getTable());
  }

Glauco P. Gomes

Glauco P. Gomes escreveu:
> Just to inform, I'm using Trinidad 1.0.10
>
> Glauco P. Gomes
>
> Glauco P. Gomes escreveu:
>> See this code snippet:
>>
>> ...
>> <tr:table autoSubmit="true" rowSelection="multiple" id="table"
>>  value="#{myBackingBean.dataModel}" var="row"
>>  binding="#{myBackingBean.table}" partialTriggers="releaseBtn 
>> deleteBtn">
>>
>>  <f:facet name="actions">
>>    <tr:commandButton text="Release" id="releaseBtn" partialSubmit="true"
>>      action="#{myBackingBean.releaseAction}"
>>      disabled="#{empty myBackingBean.table.selectedRowKeys}" />
>>
>>    <tr:commandButton text="Delete" id="deleteBtn" partialSubmit="true"
>>      action="#{myBackingBean.deleteAction}"
>>      disabled="#{empty myBackingBean.table.selectedRowKeys}" />
>>  </f:facet>
>>
>>  ... some columns ...
>>
>> </tr:table>
>> ...
>>
>> When I click in the selection boxes in the rows, the buttons are 
>> refreshed and their state changes, this is the desired behavior, but 
>> when I click in the "Select All" or "Select None" links, nothing 
>> happens.
>>
>> How can I refresh the buttons clicking on the "Select *" links?
>>
>> I already tried putting partialTriggers="table" in the buttons, but 
>> nothing changed.
>>
>> Glauco P. Gomes
>>
>
>


Mime
View raw message