java.lang.IllegalArgumentException:找不到属性类的设置器 [英] java.lang.IllegalArgumentException: Setter not found for property class
本文介绍了java.lang.IllegalArgumentException:找不到属性类的设置器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想用行编辑实现一个表.
I want to implement a table with row editing.
我发现此示例在展示柜中,但我得到了这个错误估计时间:
I found this exemple in the showcase, but I get this error evry time :
- javax.servlet.ServletException:找不到属性类的设置器
- java.lang.IllegalArgumentException:找不到属性的设置器 课
- javax.servlet.ServletException: Setter not found for property class
- java.lang.IllegalArgumentException: Setter not found for property class
我的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;
}
}
推荐答案
这可能与您的错误属性有关:
This is probably related to your bad attribute :
<a4j:commandLink class="lien_detail" />
对于组件a4j:commandLink
没有属性class
,应改为使用styleClass
.
There is no attribute class
for the component a4j:commandLink
you should use styleClass
instead.
这篇关于java.lang.IllegalArgumentException:找不到属性类的设置器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文