0

I have a problem referencing a component inside an ajax update so it can get updated. Here`s the scenario.

System View

I have a p:tabView that has a dynamic creation of tabs. Inside that tabView I have a p:panel and a p:dataTable 1. In the panel I have a text field that needs to be updated called cached-articles-text. When I check its id using firebug I see that it is "tabs:0:cached-articles-text".

I need it to be updated on dataTable pagination. So inside the dataTable I have the following code:

<p:ajax event="page" update="something_goes_here"/>

That should update the text field.

How could I update that textField or the panel that contains the textField? The problem is that when I change the tab the id also changes:

"tabs:0:cached-articles-text"

"tabs:1:cached-articles-text"

"tabs:2:cached-articles-text"

de.la.ru
  • 2,994
  • 1
  • 27
  • 32

1 Answers1

0

Interesting... I`ve put the following in update and it worked.

<p:ajax event="page" update=":tab-form:abas:cached-articles-text"/>

But now I have another problem. The correct number of cached articles only shows when I make another request. Why is that?

de.la.ru
  • 2,994
  • 1
  • 27
  • 32
  • I know this is old, but I am using PF5.3 and I get similar problems on updating a p:dataTable inside a p:tab inside a p:accordionView when I perform an update from a rowEdit. If I update the top-level accordion, it mangles the nested p:dataTable. – Webel IT Australia - upvoter Feb 17 '16 at 04:59