简体   繁体   中英

a4j:support and seam: Illegal Syntax for Set Operation

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

This doesn't look right:

binding="t233SeamBean.userInput"

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM