a4j:support 和 seam:集合操作的非法语法
我通常使用javascript解决这个问题,但我尝试在seam项目+ jsf + faces上使用de a4j。我只想使用 ajax4jsf 创建一个简单的日期掩码输入,但我总是遇到相同的错误:设置操作的语法非法。我正在关注此页面示例:http://www.javabeat。 net/articles/19-introduction-to-ajax4jsf-3.html。
页面代码:
<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>
支持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);
}
setter和getter方法正常,但当我访问页面时,我收到此错误:
javax.el.PropertyNotWritableException:/T233Ev01CreateRevendas.xhtml @284,140绑定=“t233SeamBean.userInput”:非法语法对于设置操作
有人可以给我一个线索吗?
提前致谢
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.
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:
javax.el.PropertyNotWritableException: /T233Ev01CreateRevendas.xhtml @284,140 binding="t233SeamBean.userInput": Illegal Syntax for Set Operation
someone can give me a clue?
thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这看起来不对:
您无法将输入组件绑定到 Ajax 支持组件。
This doesn't look right:
You can't bind an input component to an Ajax support component.