2013-06-05 41 views
2

我想用行編輯實現一個表。java.lang.IllegalArgumentException:找不到屬性類的Setter

我在櫥窗中發現this exemple,但我得到這個錯誤埃夫裏的時間:

  • javax.servlet.ServletException:二傳手找不到財產類
  • java.lang.IllegalArgumentException異常:二傳手未找到物業 類

我XHTML

  <a4j:status onstart="#{rich:component('statPane')}.show()" 
       onstop="#{rich:component('statPane')}.hide()" /> 

      <h:form id="form"> 
       <rich:dataScroller for="dataTableId" maxPages="8" /> 
       <rich:extendedDataTable id="dataTableId" rows="200" 
        value="#{declarationReglementaireModel.detailCurrentDecReg.decReg.listLigneTa3SDTO}" 
        var="ligneTA3" frozenColumns="2" 
        style="height:300px; width:800px;" selectionMode="none"> 

        <rich:column width="35px"> 
         <h:panelGrid columns="1" cellpadding="2"> 

          <a4j:commandLink class="lien_detail" render="editGrid" 
           execute="@this" 
           oncomplete="#{rich:component('editPane')}.show()"> 
           <span class="icone icone-edit icone-align-center" /> 
           <a4j:param value="1" 
            assignTo="#{modifDecRegTa3Model.currentLigneTa3Index}" /> 
           <f:setPropertyActionListener target="#{modifDecRegTa3Model.editedRow}" 
            value="#{ligne}" /> 
          </a4j:commandLink> 

         </h:panelGrid> 
        </rich:column> 
        <rich:column width="150px" sortBy="#{ligneTA3.idTitre}" 
         sortOrder="ascending"> 
         <f:facet name="header">Référence Titre</f:facet> 
         <h:outputText value="#{ligneTA3.idTitre}"> 
         </h:outputText> 
        </rich:column> 
        <rich:column> 
         <f:facet name="header"> 
          <h:outputText value="a" /> 
         </f:facet> 
         <h:outputText value="#{ligneTA3.vlColA}"> 
         </h:outputText> 
        </rich:column> 
        <rich:column> 
         <f:facet name="header"> 
          <h:outputText value="b" /> 
         </f:facet> 
         <h:outputText value="#{ligneTA3.vlColB}"> 
         </h:outputText> 
        </rich:column> 
        <rich:column> 
         <f:facet name="header"> 
          <h:outputText value="c" /> 
         </f:facet> 
         <h:outputText value="#{ligneTA3.vlColC}"> 
         </h:outputText> 
        </rich:column> 

       <rich:dataScroller for="dataTableId" maxPages="8" /> 


    <rich:popupPanel id="statPane" autosized="true"> 
     Please wait... 
    </rich:popupPanel> 

    <rich:popupPanel header="Modifier ligne" id="editPane" domElementAttachment="parent" width="400" height="170"> 
     <h:panelGrid columns="3" id="editGrid"> 
      <h:outputText value="vlColA" /> 
      <h:outputText value="#{modifDecRegTa3Model.editedRow.vlColA}" /> 
      <h:panelGroup /> 
      <h:outputText value="vlColB" /> 
      <h:outputText value="#{modifDecRegTa3Model.editedRow.vlColB}" /> 
      <h:panelGroup /> 
      <h:outputText value="vlColC" /> 
      <h:inputText value="#{cmodifDecRegTa3Model.editedRow.vlColC}" required="true" requiredMessage="Price is required" id="price"/> 
     </h:panelGrid> 
     <a4j:commandButton value="Store" action="#{rechercheDecRgltCtrl.validerModifications}" render="table" execute="editPane" 
      oncomplete="if (#{facesContext.maximumSeverity==null}) {#{rich:component('editPane')}.hide();}" /> 
     <a4j:commandButton value="Cancel" onclick="#{rich:component('editPane')}.hide(); return false;" /> 
    </rich:popupPanel> 


      </h:form> 
     </h:panelGrid> 
    </h:form> 

我的模型

@ManagedBean(name="modifDecRegTa3Model") 
@SessionScoped 
public class ModifDecRegTa3Model { 
private static final long serialVersionUID = 1L; 
private LigneTa3DTO currentElement; 
private Integer selectedPage; 
private int currentLigneTa3Index; 
private LigneTa3DTO editedRow; 
public ModifDecRegTa3Model() { 
    super(); 
} 

public LigneTa3DTO getCurrentElement() { 
    return currentElement; 
} 
public void setCurrentElement(LigneTa3DTO currentElement) { 
    this.currentElement = currentElement; 
} 
public Integer getSelectedPage() { 
    return selectedPage; 
} 
public void setSelectedPage(Integer selectedPage) { 
    this.selectedPage = selectedPage; 
} 
public int getCurrentLigneTa3Index() { 
    return currentLigneTa3Index; 
} 
public void setCurrentLigneTa3Index(int currentLigneTa3Index) { 
    this.currentLigneTa3Index = currentLigneTa3Index; 
} 
public LigneTa3DTO getEditedRow() { 
    return editedRow; 
} 
public void setEditedRow(LigneTa3DTO editedRow) { 
    this.editedRow = editedRow; 
} 

} 

回答

13

這可能與你的壞屬性:

<a4j:commandLink class="lien_detail" /> 

沒有爲組件a4j:commandLink你應該使用styleClass,而不是無屬性class

+0

謝謝(merci:p),對,就是這樣,我太蠢了! – Netmaster

+0

Juste多了一個問題,「請等待」消息需要很多時間,請問我能減少這個嗎? – Netmaster

+0

@Netmaster我沒有看到它顯示或隱藏的地方。 –

相關問題