The best place to *find* answers to programming/development questions, imo, however it's 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 again, a great reference for *finding* answers.

My Music (Nickleus)


richfaces rich hotkey backspace navigation disabling not working with oncomplete [SOLVED]

in my post richfaces rich hotkey backspace navigation disabling not working [SOLVED] i showed how to get the rich hotkey working by changing oncomplete to onclick, but what if you need oncomplete?

the hack i found to work was to set the focus to somewhere in the panel after the a4j:commandLink link was clicked.

rendered="#{detail.actionEdit and myBean.isBuyer}"
oncomplete="if (#{facesContext.maximumSeverity==null}) #{rich:component('detailsPanel')}.show();#{rich:element('CDD_quatityInput')}.focus();">
target="#{myBean.currentDtlItem}" />
target="#{myBean.currentRow}" />
CDD_quatityInput is the id of an element in the panel i am showing when the link is clicked.

i saw an example today where the author also put "event.stopPropagation(); event.preventDefault();" into the handler attribute, but i havent seen the need for it yet.


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]


ubuntu 11.10 unity turns grey and touchpad mouse stops working/freezes [SOLVED]

all of the sudden, mid session, my interface went grey and the theme vanished so everything looked like an old theme and the mousepad mouse cursor wouldnt move, but i could still type and use the keyboard. to fix this i opened a terminal and ran these commands:
sudo modprobe -r psmouse
sudo modprobe psmouse



f:loadBundle not working in jboss 7, can't see properties label text [SOLVED]

i made a simple jsf page to test using a properties file
here was the code i had:

<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns=""
<f:loadBundle basename="com.mycompany.labels_no" var="label"/>
<ui:define name="content">
<h:form id="reg">
           <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{label.userFirstName}" for="userFirstName" />
 and in the eclipes preview window i could see the label and it's value, but in a browser the label was missing. i figured out that the f:loadBundle tag was just in the wrong place, so i moved it inside the ui:define tag (the next line under it) and the label appeared! =)

see also:


jboss quickstarts kitchensink arquillian junit remote test not working [SOLVED]

i ran the managed test and it worked, but when i tried the remote test i got this error:
java.lang.IllegalStateException: Cannot obtain MBeanServerConnection to: service:jmx:rmi:///jndi/rmi://
the reason is that i needed to start the local server first, THEN run the unit test.


ubuntu 11.10 unity left side bar gone [SOLVED]

i upgraded to ubuntu 11.10 a while ago instead of a fresh clean install and then i (regretfully) changed some settings and then the left bar in unity disappeared. to get it back i had to do the following:
* in a terminal run:
* search for unity
* enable Ubuntu Unity Plugin
* choose Ignore Conflicts (if you're asked about it)