[richfaces-issues] [JBoss JIRA] Commented: (RF-7771) jQuery.hotkeys is undefined
Benno Markiewicz (JIRA)
jira-events at lists.jboss.org
Thu Sep 10 06:23:23 EDT 2009
[ https://jira.jboss.org/jira/browse/RF-7771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12485128#action_12485128 ]
Benno Markiewicz commented on RF-7771:
--------------------------------------
If you load "jquery.hotkeys.js" manually too, then it works
[code]
<a4j:loadScript src="resource:///org/richfaces/renderkit/html/scripts/jquery/jquery.js" />
<!-- load the missing jquery-patch too -->
<a4j:loadScript src="resource:///org/richfaces/renderkit/html/scripts/jquery.hotkeys.js" />
[/code]
> 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
> Assignee: Nick Belaevski
>
> 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