[richfaces-issues] [JBoss JIRA] Created: (RF-7771) jQuery.hotkeys is undefined

Andreas Höhmann (JIRA) jira-events at lists.jboss.org
Thu Aug 27 09:19:23 EDT 2009


jQuery.hotkeys is undefined
---------------------------

                 Key: RF-7771
                 URL: https://jira.jboss.org/jira/browse/RF-7771
             Project: RichFaces
          Issue Type: Bug
         Environment: 3.3.2-SNAPSHOT
            Reporter: Andreas Höhmann
             Fix For: 3.3.2.GA


i must load jquery with
<a4j:loadScript src="resource://jquery.js"/>

to register a resize-handler:
<script type="text/javascript">
    var resizing = false;
    jQuery(document).ready(function(){
      autoLayout();
    });
    jQuery(window).resize(function(){
      if (resizing) {
        return;
      }
      resizing = true;
      autoLayout();
      resizing = false;
    });
  </script>

the later i use rich:hotKey to avoid "form submit with enter":
<a4j:form>
  <!-- this form does not support submit via 'enter' -->
  <rich:hotKey key="return" handler="return false;" />
  <h:inputText id="name" value="#{bean.name}"/>
</a4j:form>

if i load jQuery by hand then i got the js-error:

jQuery.hotkeys is undefined in hotKey.js.jsf (line 97)

96 for (var i = 0; i < options.length; i++) {
97 jQuery.hotkeys.add(key, options[i], _handler);
98 } 

if i look into my firebug i see that the "hotKey.js.jsf" was loaded *before* "jQuery.js.jsf"

what can i do?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the richfaces-issues mailing list