RichFaces javascript warnings

Hello,

I am developing an application using JSF, facelets and the RichFaces library.  When referencing some RichFaces javascript like the following:

<a4j:commandLink action="#{mbean.action}" value="Close" reRender="details"
    onclick="Richfaces.hideModalPanel('serveDetailsPanel');"/>


I get a warning concerning the javascript concerning 'Unresolved variable or type RichFaces' and 'Unresolved function or method hodeModalPanel'.  Of course this is understandable considering the JS is magically included by the RichFaces library and IDEA has not been told about it.  If I try to use the //noinspection notation, it pushes the actual JS onto another line and this does not work when it is deployed.

I tried encapsulating the undefined stuff into a JS file and invoke functions from that JS file within the XHTML so there would be no warnings, but for some reason this causes the RichFaces object not to be available for that code at runtime.  (I'm not sure why that is, but it is.)

Does anybody have any techniques to clear these warnings?

Thanks,
Ray

Please sign in to leave a comment.