a4j:支持和接缝:集合操作的非法语法

时间:2023-01-24 20:00:26

I'm usually resolve this problem using javascript, but i'm trying to use de a4j on a seam project + jsf + faces. I just want to create a simple mask input for date using ajax4jsf but i always have the same error: Illegal Syntax for Set Operation. I was following this page example: http://www.javabeat.net/articles/19-introduction-to-ajax4jsf-3.html.

我通常使用javascript解决这个问题,但我正在尝试在一个接缝项目+ jsf + faces上使用de a4j。我只想使用ajax4jsf为日期创建一个简单的掩码输入,但我总是有同样的错误:Set Operation的非法语法。我正在关注此页面示例:http://www.javabeat.net/articles/19-introduction-to-ajax4jsf-3.html。

The page code:

页面代码:

<s:decorate template="layout/display.xhtml" id="dataEmissaoD">
   <ui:define name="label">Data Emissão CRV</ui:define>
   <h:inputText id="dataEmissao" value="#{t233SeamBean.t233Ev01.dataEmissaoDT}" required="true" maxlength="10">
     <f:convertDateTime timeZone="#{t233SeamBean.t233Ev01.timeZone}" pattern="dd/MM/yyyy" />
     <a4j:support event="onkeypress" reRender="dataEmissao" action="#{t233SeamBean.formatar}" binding="t233SeamBean.userInput"></a4j:support>
     <a4j:support event="onblur" ajaxSingle="true" reRender="dataEmissaoD"/>
   </h:inputText>
   <h:outputText value="(ex: 01/01/2010)" />
   <ui:define name="message"><h:message for="dataEmissao" styleClass="error" /></ui:define>
</s:decorate>

Backing bean:

private UIInput userInput;

public UIInput getUserInput() {
    return userInput;
}

public void setUserInput(UIInput userInput) {
    this.userInput = userInput;
}

public void formatar(){
    UIInput input = new UIInput();
    input.setValue("TESTE");
    setUserInput(input);
}

The setter and getter methods are normal but when i access the page i receive this error:

setter和getter方法是正常的,但是当我访问页面时,我收到此错误:

javax.el.PropertyNotWritableException: /T233Ev01CreateRevendas.xhtml @284,140 binding="t233SeamBean.userInput": Illegal Syntax for Set Operation

javax.el.PropertyNotWritableException:/T233Ev01CreateRevendas.xhtml @ 284,140 binding =“t233SeamBean.userInput”:集合操作的非法语法

someone can give me a clue?

有人可以给我一个线索吗?

thanks in advance

提前致谢

1 个解决方案

#1


0  

This doesn't look right:

这看起来不正确:

binding="t233SeamBean.userInput"

You can't bind an input component to an Ajax support component.

您无法将输入组件绑定到Ajax支持组件。

#1


0  

This doesn't look right:

这看起来不正确:

binding="t233SeamBean.userInput"

You can't bind an input component to an Ajax support component.

您无法将输入组件绑定到Ajax支持组件。