Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

onblur attribute is not working  RSS feed

 
Sijesh Alayaril
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
onblur attribute is not working for h:inputText..I'm unable to copy the code here ..if any one know the solution let me know



 
Sijesh Alayaril
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its bit urgent for me any one can help me ..its great!!!
 
Tim Holloway
Bartender
Posts: 18709
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, the JavaRanch isn't the place to ask questions that need answers in 30 minutes or less. We're all unpaid volunteers and we come and go on whatever schedules are convenient for us. For guaranteed response time, you need a paid support service.

Except maybe for a certain very well-known financial software company I could name where the customer forum has managed to avoid serving up a simple answer to what version of their software does what for an entire month now.

However, paid or not, if you don't get an answer on the JavaRanch in 2-3 days it's usually because no one knows one, not because the (un)paid support staff is ignoring you, so here's my answer.

No, onblur works just fine on JSF input control tags and I use it extensively for h:inputText.

Without seeing your code, I can only guess, but two of the more common problems are these:

1. JSF View Definition Language is XML. Some JavaScript code can require things that produce invalid HTML. For example:


cannot be used because the "<" looks like an XML "magic character" - one of the 5 characters in XML that have restricted use. Instead, code:


The use of the "&lt;" entity avoid XML problems and converts to the proper javascript code (<) on the output HTML.

A second common problem has to do with locating DOM elements by ID. JSF permits the same ID to be used in multiple places because it supports something known as a naming container. Things like forms, dataTables, and panelGrids are all naming containers. When an item within a naming container is compiled its HTML ID is a concatenation of its simple ID plus the IDs of the set of naming containers. So the actual ID - which is what JavaScript works with - for a inputText "dollars" on row 3 of a datatable whose ID is "tbl1" in form ID "form1" would be "form1:tbl1:2:dollars". Row numbering starts at 0, so Row 3 in the table has row ID 2.
 
kumar toomu
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are you using ajax feature on your <h:inputText>? if not it should work on a form submit....
 
Sijesh Alayaril
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you soo much for reply.
 
Sijesh Alayaril
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kumar toomu wrote:are you using ajax feature on your <h:inputText>? if not it should work on a form submit....


No im not using ajax component
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!