• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

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

Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.

Saloon Keeper
Posts: 26291
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
Fire me boy! Cool, soothing, shameless self promotion:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic