[ 
https://issues.apache.org/jira/browse/ADFFACES-445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Safurudin Mahic reopened ADFFACES-445:
--------------------------------------


With a clean browser cache - using both Firefox (2.0.3) and IE7, latest trunk I 
get this error on both the convertValidate/convertValidate.jspx
and a simple file with a single <tr:inputText> component, bound to an 
integer/long value in a backing bean.

The simple file looks something like this:

<tr:document>
 <tr:form id="form1">
   <tr:inputText value="#{TestBean.intVal}"/>
   <tr:outputText value="#{TestBean.intVal}"/>
   <tr:commandButton text="Submit" action="success"/>
</tr:form>
</tr:document>

This causes the earlier mentioned JavaScript error, which I suspect comes from 
that Trinidad is trying to validate the field with JavaScript before submittal 
of the form. But when the JavaScript produces an error, the form is never 
submitted. 

However, I see that when I attach a converter to the <tr:inputText> component, 
something like <tr:inputText value="#{TestBean.intVal}" 
converter="javax.faces.convert.IntegerConverter"> component, this seems to 
resolve the issue in my simple form.

The issue with the demo application still remains though, 
convertValidate/convertValidate.jspx has attached <f:convertNumber> to its 
fields, but here I still get the JavaScript error.

Conclusion: 

<tr:inputBox> used without a converter for values of type Integer/Long etc 
produces a JavaScript error

<tr:inputBox> used with an explicit converter for the required datatype works 
fine.

<h:inputBox> used without a converter works fine, and is able to convert 
automatically to these datatypes, with built-in converters.

This issue is confusing, because you are never required to use explicit 
converters with <h:inputText> components for these datatypes, since MyFaces and 
the vanilla version of JSF have these converters built-in (IntegerConverter, 
LongConverter etc). I guess, I was expecting Trinidad having a similar 
behaviour, using the built-in converters of MyFaces. How is Trinidad supposed 
to behave? Should expected behaviour be documented somewhere?



> Converters not working , Javascript error occuring on submit
> ------------------------------------------------------------
>
>                 Key: ADFFACES-445
>                 URL: https://issues.apache.org/jira/browse/ADFFACES-445
>             Project: MyFaces ADF-Faces
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.1-incubating-core-SNAPSHOT
>            Reporter: Safurudin Mahic
>         Assigned To: Adam Winer
>            Priority: Blocker
>
> When using a Trinidad InputBox bound to an eg. Long value in a backing bean, 
> such as in the demo application (convertValidate.jspx), when trying to submit 
> the form, 
> one gets a javascript error :
> e.getFacesMessage is not a function
>  var errorString1=e.getFacesMessage().getDetail();  (Common11-m7.js, line 
> 4650)
> This only affects the Trindad InputBox component, the myfaces version is 
> working properly.
> This basically means that one cannot bind InputBox components to values other 
> than a String.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to