Я загружаю StreamedContent в средство просмотра документов, как это.
xhtml:
<h:body>
<h:form>
<p:commandButton value="Content A" action="#{viewer.selectContentA()}" update="viewerForm" />
<p:commandButton value="Content B" action="#{viewer.selectContentB()}" update="viewerForm" />
</h:form>
<h:form id="viewerForm">
<pe:documentViewer value="#{viewer.content}" download="demo.pdf" height="500"/>
</h:form>
</h:body>
xhtml:
public void selectContentA() {
content = contentA;
}
public void selectContentB() {
content = contentB;
}
public StreamedContent getContent() {
return content;
}
Вопрос: Есть ли способ изменить документ в средстве просмотра без обновления всего компонента?