This discussion is archived
1 Reply Latest reply: Apr 18, 2012 8:55 AM by Sudipto Desmukh RSS

ADF problems with af:validateRegExp (binding Long field)

916484 Newbie
Currently Being Moderated
I have a portlet application in a WebCenter env. This application is made using JSF (with the ADF implementation), so I have a field like that:

*<af:inputText visible="#{CadastrarFormularioContato.showCodigoEc}"
label="#{msg.CODIGODOEC}" id="it2" required="true"
requiredMessageDetail="#{msg.INFORMECODIGOEC}"
showRequired="true"
value="#{CadastrarFormularioContato.item.cdEstabelecimento}">
<af:validateRegExp messageDetailNoMatch="#{msg.CODIGOECSOMENTENUMEROS}" pattern="^[0-9]{1,}$"/>
<af:convertNumber type="number"/>
</af:inputText>*

But, when I invoke the form submit i receive the follow error:

javax.portlet.faces.BridgeException: java.lang.IllegalArgumentException: 'value' is not of type java.lang.String.

My Object.longField is:

private Long longField

(with its getters/setters)

I try to use convert, convertNumber etc but with no sucess.

The problem is about the "validateRegExp" tag (if i remove it, works) So, why?

Any suggestion?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points