You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-dev@incubator.apache.org by Adam Winer <aw...@gmail.com> on 2007/04/15 20:00:11 UTC

Fwd: [jira] Reopened: (ADFFACES-445) Converters not working , Javascript error occuring on submit

Safurudin,

I still can't reproduce this.  What you're doing should work
without hitch;  you're not supposed to have to code anything
differently.  With the latest trunk, Firefox 2.0.0.3, and the following
page:

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:tr="http://myfaces.apache.org/trinidad" >
  <jsp:directive.page contentType="text/html;charset=utf-8"/>
  <f:view>
   <tr:document>
    <tr:form id="form1">
      <tr:inputText value="#{data.int}"/>
      <tr:outputText value="#{data.int}"/>
      <tr:commandButton text="Submit"/>
    </tr:form>
   </tr:document>
  </f:view>
</jsp:root>

... everything works fine for me.

To get to the bottom of this, I'll need your help to
look into the Javascript and see what's going wrong.
For example, install Firebug and put a breakpoint
in this code.  Or, if you can't do that, maybe e-mail
me the HTML generated by this simple page?

The lines where you're getting the error are:

var converter=eval(converterConstructor);
try{
  value=converter.getAsObject(value,label);
}
catch(e)
{
  converterError=true;
  if(firstFailure)
  {
    _setFocus(currInput);
    firstFailure=false;
  }
  var errorString1=e.getFacesMessage().getDetail();
...
}

... and if "e" doesn't have a FacesMessage, that means
there *is* an exception being thrown, but it's somehow not
of the right type.  Which is very, very strange - "converter"
here should be an instance of TrIntegerConverter,
which only throws TrConverterException.

If anyone else on the list has reproduced this bug
and can help out, please do. :)

-- Adam



---------- Forwarded message ----------
From: Safurudin Mahic (JIRA) <ad...@incubator.apache.org>
Date: Apr 15, 2007 3:37 AM
Subject: [jira] Reopened: (ADFFACES-445) Converters not working ,
Javascript error occuring on submit
To: awiner@gmail.com



     [ 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.

Re: Fwd: [jira] Reopened: (ADFFACES-445) Converters not working , Javascript error occuring on submit

Posted by Safurudin Mahic <sa...@stud.hist.no>.
I'm capturing view->page source.

I am using a lot of filters actually. As I am using
Trinidad with Facelet support, this is added to the web.xml
according to the Trinidad Wiki. Also, I've added some
performance-enhancing context-parameters according to the MyFaces and
Trinidad Wikis.

I use Spring and Hibernate with this application, therefore some
filters are added in the web.xml, necesarry for JSF to work nicely with
Spring.

I've attached a zip-file containing my web.xml, faces-config,
trindad-config and skin, backing bean and an JSF (facelet page) The
facelet XHTML page is actually a blueprint of the Wiki simple example,
just replaced with an Integer bound value.

Hope it will be in assistance to narrowing down the problem.
If it doesn't, I can send you a war demonstrating the problem, or the
complete maven project even.

--Safi


Adam Winer skrev:
> I can't explain why the heck you're getting the HTML
> you are...  lots and lots of things are just bizarre
> in the HTML output I see.  How are you capturing this?
> You should just be using View/Page Source,
> copying and pasting the results.
> 
> Do you have any servlet filters installed?  Anything
> weird about your setup *at all*?
> 
> -- Adam
> 
> 
> 
> On 4/17/07, Safurudin Mahic <sa...@stud.hist.no> wrote:
>> Adam,
>>
>> my trindad-config.xml does not have the <client-validation-disabled>
>> entry. Just for fun, I tested by adding this entry to the config. The
>> JavaScript error (and validation) disappears - the framework is
>> producing old-fashioned validation errors with appropriate messages upon
>> postback. This means that there is some setting blocking Trinidad from
>> generating that last piece of JavaScript.
>>
>> For this particular project, I guess I can manage without the JavaScript
>> validation, but this doesn't solve the underlying problem. Are there any
>> other settings in either web.xml, faces-config or trindad-config which
>> may affect that the required JavaScript isn't generated as supposed to?
>>
>>
>> -- Safi
>>
>> Adam Winer skrev:
>> > Safurudin,
>> >
>> > Trinidad HTML source should always have something like:
>> >
>> > <script>var _reset_idJsp1Names=["source"];</script><script>function
>> > __idJsp1Validator(){return true;}var _idJsp1_SF={};</script>
>> >
>> > ... near the end.  Yours doesn't.  By any chance, do
>> > you have:
>> >   <client-validation-disabled>true</client-validation-disabled>
>> > in your trinidad-config.xml?  If so, does the problem go away when
>> > you remove it?
>> >
>> > -- Adam
>> >
>> >
>> > On 4/17/07, Safurudin Mahic <sa...@stud.hist.no> wrote:
>> >> Adam,
>> >>
>> >> I wasn't sure how to do the Firebug breakpoint thingy,
>> >> I've attached the generated HTML code instead.
>> >>
>> >>
>> >> -- Safi
>> >>
>> >> Adam Winer skrev:
>> >> > Safurudin,
>> >> >
>> >> > I still can't reproduce this.  What you're doing should work
>> >> > without hitch;  you're not supposed to have to code anything
>> >> > differently.  With the latest trunk, Firefox 2.0.0.3, and the
>> following
>> >> > page:
>> >> >
>> >> > <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
>> >> >          xmlns:f="http://java.sun.com/jsf/core"
>> >> >          xmlns:tr="http://myfaces.apache.org/trinidad" >
>> >> >  <jsp:directive.page
>> >> contentType="text/html;charset=utf-8"/>
>> >> >  <f:view>
>> >> >   <tr:document>
>> >> >    <tr:form id="form1">
>> >> >      <tr:inputText value="#{data.int}"/>
>> >> >      <tr:outputText value="#{data.int}"/>
>> >> >      <tr:commandButton text="Submit"/>
>> >> >    </tr:form>
>> >> >   </tr:document>
>> >> >  </f:view>
>> >> > </jsp:root>
>> >> >
>> >> > ... everything works fine for me.
>> >> >
>> >> > To get to the bottom of this, I'll need your help to
>> >> > look into the Javascript and see what's going wrong.
>> >> > For example, install Firebug and put a breakpoint
>> >> > in this code.  Or, if you can't do that, maybe e-mail
>> >> > me the HTML generated by this simple page?
>> >> >
>> >> > The lines where you're getting the error are:
>> >> >
>> >> > var converter=eval(converterConstructor);
>> >> > try{
>> >> >  value=converter.getAsObject(value,label);
>> >> > }
>> >> > catch(e)
>> >> > {
>> >> >  converterError=true;
>> >> >  if(firstFailure)
>> >> >  {
>> >> >    _setFocus(currInput);
>> >> >    firstFailure=false;
>> >> >  }
>> >> >  var errorString1=e.getFacesMessage().getDetail();
>> >> > ...
>> >> > }
>> >> >
>> >> > ... and if "e" doesn't have a FacesMessage, that means
>> >> > there *is* an exception being thrown, but it's somehow not
>> >> > of the right type.  Which is very, very strange - "converter"
>> >> > here should be an instance of TrIntegerConverter,
>> >> > which only throws TrConverterException.
>> >> >
>> >> > If anyone else on the list has reproduced this bug
>> >> > and can help out, please do. :)
>> >> >
>> >> > -- Adam
>> >> >
>> >> >
>> >> >
>> >> > ---------- Forwarded message ----------
>> >> > From: Safurudin Mahic (JIRA)
>> >> <ad...@incubator.apache.org>
>> >> > Date: Apr 15, 2007 3:37 AM
>> >> > Subject: [jira] Reopened: (ADFFACES-445) Converters not working ,
>> >> > Javascript error occuring on submit
>> >> > To: awiner@gmail.com
>> >> >
>> >> >
>> >> >
>> >> >     [
>> >> >
>> >>
>> 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.
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>  Your name Submit Real housewives write extensions.
>> >>
>>
>>


Re: Fwd: [jira] Reopened: (ADFFACES-445) Converters not working , Javascript error occuring on submit

Posted by Matthias Wessendorf <ma...@apache.org>.
Safurudin,

can you check your mail settings?
Every email from you ends up in my moderated queue :-(
Perhaps there is something wrong w/ the mail-system ? Or your settings ?

-Matthias

On 4/17/07, Adam Winer <aw...@gmail.com> wrote:
> I can't explain why the heck you're getting the HTML
> you are...  lots and lots of things are just bizarre
> in the HTML output I see.  How are you capturing this?
> You should just be using View/Page Source,
> copying and pasting the results.
>
> Do you have any servlet filters installed?  Anything
> weird about your setup *at all*?
>
> -- Adam
>
>
>
> On 4/17/07, Safurudin Mahic <sa...@stud.hist.no> wrote:
> > Adam,
> >
> > my trindad-config.xml does not have the <client-validation-disabled>
> > entry. Just for fun, I tested by adding this entry to the config. The
> > JavaScript error (and validation) disappears - the framework is
> > producing old-fashioned validation errors with appropriate messages upon
> > postback. This means that there is some setting blocking Trinidad from
> > generating that last piece of JavaScript.
> >
> > For this particular project, I guess I can manage without the JavaScript
> > validation, but this doesn't solve the underlying problem. Are there any
> > other settings in either web.xml, faces-config or trindad-config which
> > may affect that the required JavaScript isn't generated as supposed to?
> >
> >
> > -- Safi
> >
> > Adam Winer skrev:
> > > Safurudin,
> > >
> > > Trinidad HTML source should always have something like:
> > >
> > > <script>var _reset_idJsp1Names=["source"];</script><script>function
> > > __idJsp1Validator(){return true;}var _idJsp1_SF={};</script>
> > >
> > > ... near the end.  Yours doesn't.  By any chance, do
> > > you have:
> > >   <client-validation-disabled>true</client-validation-disabled>
> > > in your trinidad-config.xml?  If so, does the problem go away when
> > > you remove it?
> > >
> > > -- Adam
> > >
> > >
> > > On 4/17/07, Safurudin Mahic <sa...@stud.hist.no> wrote:
> > >> Adam,
> > >>
> > >> I wasn't sure how to do the Firebug breakpoint thingy,
> > >> I've attached the generated HTML code instead.
> > >>
> > >>
> > >> -- Safi
> > >>
> > >> Adam Winer skrev:
> > >> > Safurudin,
> > >> >
> > >> > I still can't reproduce this.  What you're doing should work
> > >> > without hitch;  you're not supposed to have to code anything
> > >> > differently.  With the latest trunk, Firefox 2.0.0.3, and the following
> > >> > page:
> > >> >
> > >> > <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
> > >> >          xmlns:f="http://java.sun.com/jsf/core"
> > >> >          xmlns:tr="http://myfaces.apache.org/trinidad" >
> > >> >  <jsp:directive.page
> > >> contentType="text/html;charset=utf-8"/>
> > >> >  <f:view>
> > >> >   <tr:document>
> > >> >    <tr:form id="form1">
> > >> >      <tr:inputText value="#{data.int}"/>
> > >> >      <tr:outputText value="#{data.int}"/>
> > >> >      <tr:commandButton text="Submit"/>
> > >> >    </tr:form>
> > >> >   </tr:document>
> > >> >  </f:view>
> > >> > </jsp:root>
> > >> >
> > >> > ... everything works fine for me.
> > >> >
> > >> > To get to the bottom of this, I'll need your help to
> > >> > look into the Javascript and see what's going wrong.
> > >> > For example, install Firebug and put a breakpoint
> > >> > in this code.  Or, if you can't do that, maybe e-mail
> > >> > me the HTML generated by this simple page?
> > >> >
> > >> > The lines where you're getting the error are:
> > >> >
> > >> > var converter=eval(converterConstructor);
> > >> > try{
> > >> >  value=converter.getAsObject(value,label);
> > >> > }
> > >> > catch(e)
> > >> > {
> > >> >  converterError=true;
> > >> >  if(firstFailure)
> > >> >  {
> > >> >    _setFocus(currInput);
> > >> >    firstFailure=false;
> > >> >  }
> > >> >  var errorString1=e.getFacesMessage().getDetail();
> > >> > ...
> > >> > }
> > >> >
> > >> > ... and if "e" doesn't have a FacesMessage, that means
> > >> > there *is* an exception being thrown, but it's somehow not
> > >> > of the right type.  Which is very, very strange - "converter"
> > >> > here should be an instance of TrIntegerConverter,
> > >> > which only throws TrConverterException.
> > >> >
> > >> > If anyone else on the list has reproduced this bug
> > >> > and can help out, please do. :)
> > >> >
> > >> > -- Adam
> > >> >
> > >> >
> > >> >
> > >> > ---------- Forwarded message ----------
> > >> > From: Safurudin Mahic (JIRA)
> > >> <ad...@incubator.apache.org>
> > >> > Date: Apr 15, 2007 3:37 AM
> > >> > Subject: [jira] Reopened: (ADFFACES-445) Converters not working ,
> > >> > Javascript error occuring on submit
> > >> > To: awiner@gmail.com
> > >> >
> > >> >
> > >> >
> > >> >     [
> > >> >
> > >> 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.
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>  Your name Submit Real housewives write extensions.
> > >>
> >
> >
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: Fwd: [jira] Reopened: (ADFFACES-445) Converters not working , Javascript error occuring on submit

Posted by Adam Winer <aw...@gmail.com>.
I can't explain why the heck you're getting the HTML
you are...  lots and lots of things are just bizarre
in the HTML output I see.  How are you capturing this?
You should just be using View/Page Source,
copying and pasting the results.

Do you have any servlet filters installed?  Anything
weird about your setup *at all*?

-- Adam



On 4/17/07, Safurudin Mahic <sa...@stud.hist.no> wrote:
> Adam,
>
> my trindad-config.xml does not have the <client-validation-disabled>
> entry. Just for fun, I tested by adding this entry to the config. The
> JavaScript error (and validation) disappears - the framework is
> producing old-fashioned validation errors with appropriate messages upon
> postback. This means that there is some setting blocking Trinidad from
> generating that last piece of JavaScript.
>
> For this particular project, I guess I can manage without the JavaScript
> validation, but this doesn't solve the underlying problem. Are there any
> other settings in either web.xml, faces-config or trindad-config which
> may affect that the required JavaScript isn't generated as supposed to?
>
>
> -- Safi
>
> Adam Winer skrev:
> > Safurudin,
> >
> > Trinidad HTML source should always have something like:
> >
> > <script>var _reset_idJsp1Names=["source"];</script><script>function
> > __idJsp1Validator(){return true;}var _idJsp1_SF={};</script>
> >
> > ... near the end.  Yours doesn't.  By any chance, do
> > you have:
> >   <client-validation-disabled>true</client-validation-disabled>
> > in your trinidad-config.xml?  If so, does the problem go away when
> > you remove it?
> >
> > -- Adam
> >
> >
> > On 4/17/07, Safurudin Mahic <sa...@stud.hist.no> wrote:
> >> Adam,
> >>
> >> I wasn't sure how to do the Firebug breakpoint thingy,
> >> I've attached the generated HTML code instead.
> >>
> >>
> >> -- Safi
> >>
> >> Adam Winer skrev:
> >> > Safurudin,
> >> >
> >> > I still can't reproduce this.  What you're doing should work
> >> > without hitch;  you're not supposed to have to code anything
> >> > differently.  With the latest trunk, Firefox 2.0.0.3, and the following
> >> > page:
> >> >
> >> > <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
> >> >          xmlns:f="http://java.sun.com/jsf/core"
> >> >          xmlns:tr="http://myfaces.apache.org/trinidad" >
> >> >  <jsp:directive.page
> >> contentType="text/html;charset=utf-8"/>
> >> >  <f:view>
> >> >   <tr:document>
> >> >    <tr:form id="form1">
> >> >      <tr:inputText value="#{data.int}"/>
> >> >      <tr:outputText value="#{data.int}"/>
> >> >      <tr:commandButton text="Submit"/>
> >> >    </tr:form>
> >> >   </tr:document>
> >> >  </f:view>
> >> > </jsp:root>
> >> >
> >> > ... everything works fine for me.
> >> >
> >> > To get to the bottom of this, I'll need your help to
> >> > look into the Javascript and see what's going wrong.
> >> > For example, install Firebug and put a breakpoint
> >> > in this code.  Or, if you can't do that, maybe e-mail
> >> > me the HTML generated by this simple page?
> >> >
> >> > The lines where you're getting the error are:
> >> >
> >> > var converter=eval(converterConstructor);
> >> > try{
> >> >  value=converter.getAsObject(value,label);
> >> > }
> >> > catch(e)
> >> > {
> >> >  converterError=true;
> >> >  if(firstFailure)
> >> >  {
> >> >    _setFocus(currInput);
> >> >    firstFailure=false;
> >> >  }
> >> >  var errorString1=e.getFacesMessage().getDetail();
> >> > ...
> >> > }
> >> >
> >> > ... and if "e" doesn't have a FacesMessage, that means
> >> > there *is* an exception being thrown, but it's somehow not
> >> > of the right type.  Which is very, very strange - "converter"
> >> > here should be an instance of TrIntegerConverter,
> >> > which only throws TrConverterException.
> >> >
> >> > If anyone else on the list has reproduced this bug
> >> > and can help out, please do. :)
> >> >
> >> > -- Adam
> >> >
> >> >
> >> >
> >> > ---------- Forwarded message ----------
> >> > From: Safurudin Mahic (JIRA)
> >> <ad...@incubator.apache.org>
> >> > Date: Apr 15, 2007 3:37 AM
> >> > Subject: [jira] Reopened: (ADFFACES-445) Converters not working ,
> >> > Javascript error occuring on submit
> >> > To: awiner@gmail.com
> >> >
> >> >
> >> >
> >> >     [
> >> >
> >> 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.
> >>
> >>
> >>
> >>
> >>
> >>  Your name Submit Real housewives write extensions.
> >>
>
>

Re: Fwd: [jira] Reopened: (ADFFACES-445) Converters not working , Javascript error occuring on submit

Posted by Safurudin Mahic <sa...@stud.hist.no>.
Adam,

my trindad-config.xml does not have the <client-validation-disabled>
entry. Just for fun, I tested by adding this entry to the config. The
JavaScript error (and validation) disappears - the framework is
producing old-fashioned validation errors with appropriate messages upon
postback. This means that there is some setting blocking Trinidad from
generating that last piece of JavaScript.

For this particular project, I guess I can manage without the JavaScript
validation, but this doesn't solve the underlying problem. Are there any
other settings in either web.xml, faces-config or trindad-config which
may affect that the required JavaScript isn't generated as supposed to?


-- Safi

Adam Winer skrev:
> Safurudin,
> 
> Trinidad HTML source should always have something like:
> 
> <script>var _reset_idJsp1Names=["source"];</script><script>function
> __idJsp1Validator(){return true;}var _idJsp1_SF={};</script>
> 
> ... near the end.  Yours doesn't.  By any chance, do
> you have:
>   <client-validation-disabled>true</client-validation-disabled>
> in your trinidad-config.xml?  If so, does the problem go away when
> you remove it?
> 
> -- Adam
> 
> 
> On 4/17/07, Safurudin Mahic <sa...@stud.hist.no> wrote:
>> Adam,
>>
>> I wasn't sure how to do the Firebug breakpoint thingy,
>> I've attached the generated HTML code instead.
>>
>>
>> -- Safi
>>
>> Adam Winer skrev:
>> > Safurudin,
>> >
>> > I still can't reproduce this.  What you're doing should work
>> > without hitch;  you're not supposed to have to code anything
>> > differently.  With the latest trunk, Firefox 2.0.0.3, and the following
>> > page:
>> >
>> > <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
>> >          xmlns:f="http://java.sun.com/jsf/core"
>> >          xmlns:tr="http://myfaces.apache.org/trinidad" >
>> >  <jsp:directive.page
>> contentType="text/html;charset=utf-8"/>
>> >  <f:view>
>> >   <tr:document>
>> >    <tr:form id="form1">
>> >      <tr:inputText value="#{data.int}"/>
>> >      <tr:outputText value="#{data.int}"/>
>> >      <tr:commandButton text="Submit"/>
>> >    </tr:form>
>> >   </tr:document>
>> >  </f:view>
>> > </jsp:root>
>> >
>> > ... everything works fine for me.
>> >
>> > To get to the bottom of this, I'll need your help to
>> > look into the Javascript and see what's going wrong.
>> > For example, install Firebug and put a breakpoint
>> > in this code.  Or, if you can't do that, maybe e-mail
>> > me the HTML generated by this simple page?
>> >
>> > The lines where you're getting the error are:
>> >
>> > var converter=eval(converterConstructor);
>> > try{
>> >  value=converter.getAsObject(value,label);
>> > }
>> > catch(e)
>> > {
>> >  converterError=true;
>> >  if(firstFailure)
>> >  {
>> >    _setFocus(currInput);
>> >    firstFailure=false;
>> >  }
>> >  var errorString1=e.getFacesMessage().getDetail();
>> > ...
>> > }
>> >
>> > ... and if "e" doesn't have a FacesMessage, that means
>> > there *is* an exception being thrown, but it's somehow not
>> > of the right type.  Which is very, very strange - "converter"
>> > here should be an instance of TrIntegerConverter,
>> > which only throws TrConverterException.
>> >
>> > If anyone else on the list has reproduced this bug
>> > and can help out, please do. :)
>> >
>> > -- Adam
>> >
>> >
>> >
>> > ---------- Forwarded message ----------
>> > From: Safurudin Mahic (JIRA)
>> <ad...@incubator.apache.org>
>> > Date: Apr 15, 2007 3:37 AM
>> > Subject: [jira] Reopened: (ADFFACES-445) Converters not working ,
>> > Javascript error occuring on submit
>> > To: awiner@gmail.com
>> >
>> >
>> >
>> >     [
>> >
>> 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.
>>
>>
>>
>>
>>
>>  Your name Submit Real housewives write extensions.
>>


Re: Fwd: [jira] Reopened: (ADFFACES-445) Converters not working , Javascript error occuring on submit

Posted by Adam Winer <aw...@gmail.com>.
Safurudin,

Trinidad HTML source should always have something like:

<script>var _reset_idJsp1Names=["source"];</script><script>function
__idJsp1Validator(){return true;}var _idJsp1_SF={};</script>

... near the end.  Yours doesn't.  By any chance, do
you have:
   <client-validation-disabled>true</client-validation-disabled>
in your trinidad-config.xml?  If so, does the problem go away when
you remove it?

-- Adam


On 4/17/07, Safurudin Mahic <sa...@stud.hist.no> wrote:
> Adam,
>
> I wasn't sure how to do the Firebug breakpoint thingy,
> I've attached the generated HTML code instead.
>
>
> -- Safi
>
> Adam Winer skrev:
> > Safurudin,
> >
> > I still can't reproduce this.  What you're doing should work
> > without hitch;  you're not supposed to have to code anything
> > differently.  With the latest trunk, Firefox 2.0.0.3, and the following
> > page:
> >
> > <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
> >          xmlns:f="http://java.sun.com/jsf/core"
> >          xmlns:tr="http://myfaces.apache.org/trinidad" >
> >  <jsp:directive.page
> contentType="text/html;charset=utf-8"/>
> >  <f:view>
> >   <tr:document>
> >    <tr:form id="form1">
> >      <tr:inputText value="#{data.int}"/>
> >      <tr:outputText value="#{data.int}"/>
> >      <tr:commandButton text="Submit"/>
> >    </tr:form>
> >   </tr:document>
> >  </f:view>
> > </jsp:root>
> >
> > ... everything works fine for me.
> >
> > To get to the bottom of this, I'll need your help to
> > look into the Javascript and see what's going wrong.
> > For example, install Firebug and put a breakpoint
> > in this code.  Or, if you can't do that, maybe e-mail
> > me the HTML generated by this simple page?
> >
> > The lines where you're getting the error are:
> >
> > var converter=eval(converterConstructor);
> > try{
> >  value=converter.getAsObject(value,label);
> > }
> > catch(e)
> > {
> >  converterError=true;
> >  if(firstFailure)
> >  {
> >    _setFocus(currInput);
> >    firstFailure=false;
> >  }
> >  var errorString1=e.getFacesMessage().getDetail();
> > ...
> > }
> >
> > ... and if "e" doesn't have a FacesMessage, that means
> > there *is* an exception being thrown, but it's somehow not
> > of the right type.  Which is very, very strange - "converter"
> > here should be an instance of TrIntegerConverter,
> > which only throws TrConverterException.
> >
> > If anyone else on the list has reproduced this bug
> > and can help out, please do. :)
> >
> > -- Adam
> >
> >
> >
> > ---------- Forwarded message ----------
> > From: Safurudin Mahic (JIRA)
> <ad...@incubator.apache.org>
> > Date: Apr 15, 2007 3:37 AM
> > Subject: [jira] Reopened: (ADFFACES-445) Converters not working ,
> > Javascript error occuring on submit
> > To: awiner@gmail.com
> >
> >
> >
> >     [
> >
> 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.
>
>
>
>
>
>  Your name Submit Real housewives write extensions.
>

Re: Fwd: [jira] Reopened: (ADFFACES-445) Converters not working , Javascript error occuring on submit

Posted by Safurudin Mahic <sa...@stud.hist.no>.
Adam,

I wasn't sure how to do the Firebug breakpoint thingy,
I've attached the generated HTML code instead.


-- Safi

Adam Winer skrev:
> Safurudin,
> 
> I still can't reproduce this.  What you're doing should work
> without hitch;  you're not supposed to have to code anything
> differently.  With the latest trunk, Firefox 2.0.0.3, and the following
> page:
> 
> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
>          xmlns:f="http://java.sun.com/jsf/core"
>          xmlns:tr="http://myfaces.apache.org/trinidad" >
>  <jsp:directive.page contentType="text/html;charset=utf-8"/>
>  <f:view>
>   <tr:document>
>    <tr:form id="form1">
>      <tr:inputText value="#{data.int}"/>
>      <tr:outputText value="#{data.int}"/>
>      <tr:commandButton text="Submit"/>
>    </tr:form>
>   </tr:document>
>  </f:view>
> </jsp:root>
> 
> ... everything works fine for me.
> 
> To get to the bottom of this, I'll need your help to
> look into the Javascript and see what's going wrong.
> For example, install Firebug and put a breakpoint
> in this code.  Or, if you can't do that, maybe e-mail
> me the HTML generated by this simple page?
> 
> The lines where you're getting the error are:
> 
> var converter=eval(converterConstructor);
> try{
>  value=converter.getAsObject(value,label);
> }
> catch(e)
> {
>  converterError=true;
>  if(firstFailure)
>  {
>    _setFocus(currInput);
>    firstFailure=false;
>  }
>  var errorString1=e.getFacesMessage().getDetail();
> ...
> }
> 
> ... and if "e" doesn't have a FacesMessage, that means
> there *is* an exception being thrown, but it's somehow not
> of the right type.  Which is very, very strange - "converter"
> here should be an instance of TrIntegerConverter,
> which only throws TrConverterException.
> 
> If anyone else on the list has reproduced this bug
> and can help out, please do. :)
> 
> -- Adam
> 
> 
> 
> ---------- Forwarded message ----------
> From: Safurudin Mahic (JIRA) <ad...@incubator.apache.org>
> Date: Apr 15, 2007 3:37 AM
> Subject: [jira] Reopened: (ADFFACES-445) Converters not working ,
> Javascript error occuring on submit
> To: awiner@gmail.com
> 
> 
> 
>     [
> 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.