Samet Dağ
Samet Dağ

Reputation: 113

Update Specific Row field in Primefaces Sheet

I want to update single row not whole sheet upon any changes. I want something like

PrimeFaces.current().ajax().update(
                sheet.getClientId(FacesContext.getCurrentInstance()) + ":" + updates.get(0).getRowKey()+ ":idoffield" );

But as you know even if i give id to sheetcolumn i cant get that because its disappearing. How can i update single row even single field of single row which changed within primefaces sheet ?

I dont want to refresh whole sheet like p:Ajax event="change" update="sheet" i want to refresh if possible from backing bean like current row id etc

My JSF VERSION : 2.2.1 PRİMEFACES 12.0.0 PRIMEFACES EXTENSION VERSION : 12.0.5

Upvotes: 1

Views: 99

Answers (1)

Melloware
Melloware

Reputation: 11994

As you know the sheet is not a standard JSF component where the rows and cells are JSF components like in the PF Datatable. So you proabbly need to do it with Javascript using HandsonTable code to update the cell you want to update by doing something like...

PrimeFaces.current().executeScript("PF('yourwidget').ht.updateCell(..)");

The above is just psuedocode you will have to look up how to do it with HandsonTable but that gives you the idea.

Upvotes: 2

Related Questions