加载JSF组件时出现IllegalArgumentException
我在PrimeFace中有自己的组件加载JSF组件时出现IllegalArgumentException,jsf,composite-component,illegalargumentexception,clientid,Jsf,Composite Component,Illegalargumentexception,Clientid,我在PrimeFace中有自己的组件 <h:form id="formTramitation"> ... <p:dialog widgetVar="panelTramitation" position="center middle" resizable="false" header="Tramitation" closable="true" showEffect="fade" hideEffect="fade" id="formT
<h:form id="formTramitation">
...
<p:dialog widgetVar="panelTramitation" position="center middle" resizable="false"
header="Tramitation" closable="true" showEffect="fade" hideEffect="fade"
id="formTramitationOpe" modal="true">
<foo:tramitationOperations id="formTramitationOperation"
accountingTransaction="#{tramitationView.accountingOperation}"/>
</p:dialog>
</h:form>
我知道我的id中存在格式错误,因为:是非法字符。但是我不知道为什么当我的id为formtramitionOperation时会出现getformtramition:formtramitionOperation
问候。我终于解决了我的问题。问题出在复合材料组件中
<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:composite="http://xmlns.jcp.org/jsf/composite"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:rigel="http://xmlns.jcp.org/jsf/composite/rigel"
xmlns:rigel-ui="http://aytos.rigel.es/ui"
xmlns:aytos="http://xmlns.jcp.org/jsf/composite/aytos">
<composite:interface displayName="History grid of tramitation"
componentType="Foo.historicoTramitacionOperacionGastos">
<composite:attribute name="accountingTransaction" type="es.foo.accountingTransaction"
required="false" shortDescription="Required. Accounting transaction to extimated transation" />
</composite:interface>
<composite:implementation>
<foo:QueryResult bean="#{cc.componente}" id="#{cc.clientId}" lazy="true" idProceso="0"
columnFormat="formatoColumnas" datos="lazyModel"
headerText="#{msj['etiqueta.historicoTramitacionOperacionesPrevias.cabecera']}"/>
</composite:implementation>
</ui:composition>
我使用的是合成的clientId,这是错误的。我通过像id=“idAccountingOperation”这样的硬代码id更改了id=“#{cc.clientId}”
注意。这可能是框架(Primefaces)引用ID的方式(通过其父级)。尝试删除父id(如果您不使用它),看看是否有帮助。我需要父id,无法删除它。在此对话框之前,我有另一个相同形式的对话框,它工作得很好。如果您在这里没有得到帮助,请尝试询问PrimeFaces团队中的其他人。祝你好运:)
<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:composite="http://xmlns.jcp.org/jsf/composite"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:rigel="http://xmlns.jcp.org/jsf/composite/rigel"
xmlns:rigel-ui="http://aytos.rigel.es/ui"
xmlns:aytos="http://xmlns.jcp.org/jsf/composite/aytos">
<composite:interface displayName="History grid of tramitation"
componentType="Foo.historicoTramitacionOperacionGastos">
<composite:attribute name="accountingTransaction" type="es.foo.accountingTransaction"
required="false" shortDescription="Required. Accounting transaction to extimated transation" />
</composite:interface>
<composite:implementation>
<foo:QueryResult bean="#{cc.componente}" id="#{cc.clientId}" lazy="true" idProceso="0"
columnFormat="formatoColumnas" datos="lazyModel"
headerText="#{msj['etiqueta.historicoTramitacionOperacionesPrevias.cabecera']}"/>
</composite:implementation>
</ui:composition>