2013-06-15 2 views
0

데이터 테이블의 일부 데이터를 대화 상자로 전달한 다음 일부 동작을 확인하려고했습니다. 내 문제는 대화 상자에 속성을 전달하면 작동하지 않는다는 것입니다. 데이터없이 대화 상자가 나타납니다!primefaces - 대화 상자에 속성 전달

코드 :

<p:dataTable id="dt" var="cm" value="#{afficherUs.tdata}" paginator="true" rows="6"> 
      .... 

     <p:column style="width:32px" > 
      <p:commandLink update="display" oncomplete="ChefDialog.show()" > 
       <img src="images/edit.jpg"></img> 
     <f:setPropertyActionListener value="#{cm}" target="#{afficherUs.selectedc}" /> 
      </p:commandLink> 
     </p:column> 

    </p:dataTable> 

하고 대화 :

<p:dialog header="Detail Compte " widgetVar="ChefDialog" resizable="false" 
       width="350" showEffect="explode" hideEffect="explode"> 
     <p:messages></p:messages> 
     <br></br> 
     <h:panelGrid id="display" columns="2" cellpadding="2"> 

      <h:outputText value="Nom:" /> 
      <p:inplace editor="true" > 
       <p:inputText value="#{afficherUs.selectedc.nom}" required="true" label="text"></p:inputText> 
      </p:inplace> 


      <h:outputText value="Prenom:" /> 
      <p:inplace editor="true" > 
       <p:inputText value="#{afficherUs.selectedc.prenom}" required="true" label="text"></p:inputText> 
      </p:inplace> 
      <h:outputText value="Mot de passe:" /> 
      <p:inplace editor="true" > 
       <p:inputText value="#{afficherUs.selectedc.psw}" required="true" label="text"></p:inputText> 
      </p:inplace> 
      <h:outputText value="Role :" /> <p:inplace editor="true" > 
       <p:inputText value="#{afficherUs.selectedc.role}" required="true" label="text"></p:inputText> 
              </p:inplace> 

      <h:outputText value=""></h:outputText> <p:panel style="border:none;"> <p:commandButton value="Valider" action="#{afficherUs.editU}" update="dt msgs" ajax="true"></p:commandButton><p:commandButton value="Annuler" oncomplete="ChefDialog.hide()"></p:commandButton></p:panel> 

     </h:panelGrid> 
    </p:dialog> 

감사

+0

콩의 범위는 무엇입니까? –

답변

0

과 같이 업데이트 문장에서 디스플레이의 전체 ID를 넣어보십시오 :

<p:commandLink update=":form:display" oncomplete="ChefDialog.show()" > 
    ... 
</p:commandLink> 

게재 : 양식 :이 포함 된 form의 ID로 구성됩니다.

중요 : 양식 외에도 다른 NamingContainer 내에 구성 요소가있는 경우 해당 ID를 연결해야합니다. 여기에 예제가 있습니다 Naming Container in JSF2/PrimeFaces

+0

아무 것도 변경하지 않고 ChefDialog가 데이터를 표시하지 않고 양식을 표시합니다. – user2420469

+0

누구나 데이터가 대화 상자에 전송되지 않는 이유를 설명 할 수 있습니다. 그러나 문제가있는 곳은 어디입니까? 왜 대화 상자에 나타나지 않습니까? – user2420469

관련 문제