小编ali*_*noe的帖子

java.lang.IllegalStateException:CDATA标记可能无法嵌套

我在JSF页面中遇到了ajax请求的问题.当我点击按钮时,我得到以下异常:

SEVERE: Servlet.service() for servlet Faces Servlet threw exception
java.lang.IllegalStateException: CDATA tags may not nest
    at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.startCDATA(HtmlResponseWriter.java:630)
    at javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWrapper.java:172)
    at javax.faces.context.PartialResponseWriter.startError(PartialResponseWriter.java:342)
    at org.primefaces.context.PrimePartialResponseWriter.startError(PrimePartialResponseWriter.java:210)
    at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:200)
    at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:123)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
Run Code Online (Sandbox Code Playgroud)

我认为这是String对象的一些问题,因为当我对网站上显示的JPA实体属性进行硬编码时,一切都还可以.但是,当从数据库(PostgreSQL)中检索实体时,它会抛出上述异常.

JSF代码:

<p:column>
    <f:facet name="header">
        Akcja
    </f:facet>
    <h:commandButton actionListener="#{mBDocumentMigration.actionEdit(object)}" value="Edytuj" rendered="#{mBDocumentMigration.editingObject == null}" >
        <f:ajax render="@form" execute="@form" />
    </h:commandButton>
    <h:commandButton action="#{mBDocumentMigration.actionZapisz}" value="Zapisz" rendered="#{mBDocumentMigration.editingObject != null}" >
    <f:ajax render="@form"  execute="@this" />
    </h:commandButton>
</p:column>
Run Code Online (Sandbox Code Playgroud)

ajax jsf cdata primefaces illegalstateexception

19
推荐指数
1
解决办法
4万
查看次数

标签 统计

ajax ×1

cdata ×1

illegalstateexception ×1

jsf ×1

primefaces ×1