0

I have a commandilnk, that when clicked, update the page. But i cannot update the ui:repeat childs value. Here is my command link:

<p:commandLink value="#{bibliotecaDettaglioView.libro.titolo}"
                                       action="#{bibliotecaDettaglioView.refresh}"
                                       process="myX"
                                       update="olProprietario olTitle csValutazione giCopertina olTrama olGenere olAutore olAnno
                                               olIsbn myXXX:itaRecensione myXXX:csVoto myX">


</p:commandLink>

Here is the component that i wanna update:

<div class="book-state">
<h:form id="myX">
    <h:panelGroup id="panel">
        <ui:repeat id="repeat" value="#{libro.copieLibro}" var="copia">
            <p:outputLabel value="#{copia.formatoLibro}"/>
            <p:outputLabel value="#{copia.idstatoLibro}"/>
            <p:outputLabel styleClass="#{copia.idstatoLibro eq 'd'? 'available' :'unavailable'}" value="#{copia.statoLibro}"/>
        </ui:repeat>
    </h:panelGroup>
</h:form>

The strange thing is that when i look at the AJAX response in the chrome developer tools, the ajax request returns the html code but with te not updated values.. Here is what i get:

<?xml version="1.0" encoding="UTF-8"?>
<form id="myX" name="myX" method="post" action="/biblioteca-dettaglio.xhtml" enctype="application/x-www-form-urlencoded">
 <input type="hidden" name="myX" value="myX" />
 <span id="myX:panel">
  <label id="myX:repeat:0:j_idt67" class="ui-outputlabel ui-widget">Cartaceo</label>
  <label id="myX:repeat:0:j_idt116" class="ui-outputlabel ui-widget">d</label>
  <label id="myX:repeat:0:j_idt68" class="ui-outputlabel ui-widget available">Disponibile</label>
  <label id="myX:repeat:1:j_idt67" class="ui-outputlabel ui-widget">PDF</label>
  <label id="myX:repeat:1:j_idt116" class="ui-outputlabel ui-widget">d</label>
  <label id="myX:repeat:1:j_idt68" class="ui-outputlabel ui-widget available">Disponibile</label>
 </span>
</form>

I get the updated values only after a refresh

Fabio Piunti
  • 1,054
  • 2
  • 9
  • 24

0 Answers0