Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object expected Error when I use a4j:ajax happens only IE8

 
tony altaico
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

For a job, I have to use only IE8 as a browser. When I use a4j:ajax event it gives me "Object expected" error and in IE8 Developer tools it tells that this "Object Expected" comes from rich:messages that I used before.

This issue only happens in IE8 and it happens when I use a4j:ajax event. Even when I use only <a4j:ajax event="dblclick"> without any other tag, I still come across with "Object Expected" javascript error which comes from rich:messages .. You can see code of the exact poing where error happens and my <rich:message> declaration below.




Error :
Object Expected
;new RichFaces.ui.Message("j_idt374",{"forComponentId":"sarfTuruId","showSummary":false,"showDetail":true} )

Rich Message declaration:


Any assistance you can provide would be greatly appreciated.

Cheers
Altaico
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a guess, but I suspect that your references to the open and close button controls are incorrect. When coding JavaScript, you have to reference the HTML IDs, which are usually not quite the same as the JSF IDs, since JSF supports naming containers such as forms, dataTables, and so forth. The JavaScript (HTML) name is a concatenation of the simple JSF ID plus the IDs of its containers. When a name is in a for like "j_12345" that means that that particular control/container was not supplied with an explicit ID and therefore JSF synthesized an ID. Unfortunately, these synthetic IDs are prone to change without notice, so it's best to supply an explicit ID on all containers plus on any controls that you'd like to be able to easily identify.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic