• Post Reply Bookmark Topic Watch Topic
  • New Topic

onblur ignored for h:inputText

 
Mustafa Garhi
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I m writing AJAX in a JSF page and have an on-blur="someJavaScriptFunction()" for an h:inputText component. However this js function is never called.When i did viewSource i found everything but the on-Blur="someJavaScriptFunction()" declaration in the rendered page.
Is there something i m missing in the approach?
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since JSF 1.2_05 an optimization in the HTML renderer regarding to the standard HTML attributes was introduced where the responsible renderer was moved from the IMPL to the API. If the right version of the API isn't present, then the those HTML attributes (all on* attributes and a few more) won't be rendered.

Thus, it look like that your classpath is messed up with duplicate JSF JAR's where only the IMPL of 1.2_05 or newer got precedence in classloading (through /WEB-INF/lib) and the API of older than 1.2_05 got precedence in classloading (through /Appserver/lib).

Are you using Glassfish application server? It ships by default with JSF Mojarra as well. You need to update it either whenever you update the JARs in the /WEB-INF/lib. There is a Glassfish updater tool available at http://javaserverfaces.dev.java.net Good luck.
 
Mustafa Garhi
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Bauke (nice name),

Can i directly copy the jars from another PC where the on-blur thing works just fine. I tried updating the jars through mojarra and with every version i have a new exception . I use eclipse for development so wouldn't it be just enough to paste the right jars at the right place and refer to them through the Java Build option in eclipse.
 
Mustafa Garhi
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey its done.

Did a mojarra update and also deleted one extra entry from my PATH for Glassfish. Actually i m not sure what made it work because i updated the jars to what they were there before.I think i have a long way to go

Thanks Bauke !!
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.

My name is Frisian by the way.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!