The best place to ask programming/development questions, imo. UPDATE: stackoverflow is the *worst* place to *ask* questions (if your first question/comment doesn't get any up-rating/response, then u can't ask anymore questions--ridiculously unrealistic), but a great reference for finding answers.

My Music (Nickleus)

20111124

richfaces rich hotkey backspace navigation disabling not working [SOLVED]



i was debugging a page where i used a rich hotkey tag to disable backspace from navigating backwards in the browser history, using this code:
<!-- disable backspace navigation in e.g. IE -->
<rich:hotKey key="backspace" handler="return false;" disableInInput="true" />

but every time i clicked on this link to show a panel, then pushed backspace (all on the same page of code as the rich hotkey tag), backspace would still navigate backwards as long as i didnt click on the new panel (set focus on the new panel). i figured out that the problem was the use of oncomplete (not my code):
<a4j:commandLink ajaxSingle="true" id="editlink" oncomplete="#{rich:component('editPanel')}.show()">

so i changed it to onclick and then it worked! =)

<a4j:commandLink ajaxSingle="true" id="editlink" onclick="#{rich:component('editPanel')}.show()">

if you still need to use oncomplete instead of onclick, then see my article richfaces rich hotkey backspace navigation disabling not working with oncomplete [SOLVED]

No comments:

Post a Comment