Before the version PF 6.2.19 I had the following code:
Code: Select all
<h:form id="frmAtendimento">
<p:poll .../>
<p:toolbar>
<f:facet name="right">
<p:commandButton ../>
<p:commandButton ..>
<p:dataExporter type="xls" .. pageOnly="true" />
</p:commandButton>
<p:tooltip for="timers" escape="false" ... position="top" />
<p:selectOneMenu id="timers" ... style="width:70px">
<p:ajax event="change" partialSubmit="true" ../>
<f:selectItem itemLabel="30''" itemValue="30" />
<f:selectItem itemLabel="2'" itemValue="120" />
<f:selectItem itemLabel="5'" itemValue="300" />
</p:selectOneMenu>
</f:facet>
<f:facet name="left">
<p:commandButton ../>
</f:facet>
</p:toolbar>
<p:dataTable id="dtAtendimentos" var="twebatendimentosTO" widgetVar="atendimentos">
<f:facet name="{Exporters}">
<p:outputPanel id="pnlGlobalFilter" style="float: left;">
<p:focus for="globalFilter"/>
<p:tooltip for="globalFilter" showEffect="clip" escape="false" position="top">
...
</p:tooltip>
<p:inputText id="globalFilter" placeholder="#{msg.pesquisar}..." class="hidden-xm-down"/>
<p:commandButton icon="fa fa-search" oncomplete="PF('atendimentos').filter()" style="margin-left: 10px" update="pnlGlobalFilter"/>
</p:outputPanel>
</f:facet>
<p:column ... visible="false">
<h:outputText .../>
</p:column>
.....
</h:form>
Code: Select all
public class CACBean {
....
@PostConstruct
public void init() {
...
listar();
}
public void listar() {
try {
lazyModelAtendimento = new LazyDataModel<TwebatendimentosTO>() {
List<TwebatendimentosTO> twebatendimentosTOs = new ArrayList<>();
@Override
public List<TwebatendimentosTO> load(int first, int pageSize,
String sortField, SortOrder sortOrder,
Map<String, Object> filters) {
...
return twebatendimentosTOs;
}
@Override
public TwebatendimentosTO getRowData(String rowKey) {
...
return null;
}
@Override
public Object getRowKey(..) {
..
}
};
primefacesScrollTo("body");
primefacesUpdate("frmAtendimento");
} catch (Exception ex) {
tratarExcecao(ex);
}
getFlash().put("lazyModelAtendimento", lazyModelAtendimento);
}
}
}
Code: Select all
[http-nio-8084-exec-9] org.primefaces.PrimeFaces$Ajax.update PrimeFaces.current().ajax().update() called but component can't be resolved!Expression will just be added to the renderIds.
org.primefaces.expression.ComponentNotFoundException: Cannot find component for expression "frmAtendimento" referenced from "j_id1".
I've noticed that the method call primefacesUpdate ("frmAtendimento"); is passing this exception:
Code: Select all
protected void primefacesUpdate(String idComponente) {
if (idComponente != null && !idComponente.isEmpty()) {
//getRequestContext().update(idComponente);
PrimeFaces.current().ajax().update(idComponente);
}
}
Mojarra 2.3.8
JEE 8