Monday, October 13, 2008

RPI or (musehånd) in Norwegian is something I have had problems with the last three years.Read more about RPI here: RPI

Since I work as a developer and using a mouse every day, it has put a strain on my wrist. I have tried many different things throughout the years, like different types of mouse and such.But I have finally found something that works! And that is the RollerMouse Pro

This is how it looks like. The roller is used as a mouse. So you dont have to change position so much with your hands. And you use your thumbs to roll the mouse and clicking, instead of your point finger. Remember that when you buy the RollerMouse Pro it doesnt come with a keyboard. You can use your own keyboard with it. The RollerMouse Pro is quite expensive, but it was well worth the 2000kr I paid for it. It also works great on Linux.

Wednesday, October 1, 2008

Using <a4j:log>To see this in action, you can use an <a4j:log>, which shows requestdata, response data, DOM tree changes on update, and other useful debuginformation. When placed on the page, the control doesn’t produce anyvisible output, but after hitting Ctrl+Shift+L (the default register hotkey), adebug window will open. If for some reason a debug log window doesn’topen, change the hotkey by setting the hotkey attribute to a letter of yourchoice, for example, <a4j:log hotkey="D"/>.…</rich:panel><a4j:log/>

*********a4j:support****************----------------------------------------JavaScript InteractionsAlthough RichFaces shields you from writing JavaScript, sometimes youmight want to invoke a custom JavaScript function. Injecting customJavaScript is possible by using the following attributes on components thatinitiate an Ajax request:- onsubmit: Just before Ajax request is sent- onbeforedomupdate: Before any DOM updates are processed- oncomplete: After DOM updates have been processed

-----------------------Using bypassUpdatesWhen just validating form values, set bypassUpdates="true". When setto true, the Update Model and Invoke Application phases will not beinvoked, improving response time.-------------------------------------------Using eventsQueue and requestDelayUse the eventsQueue attribute when possible. When settingeventsQueue, the next request will not be set until the previous requestcomes back (the response). To further control the sending of requests, userequestDelay to delay the sending of a request by some number ofmilliseconds.--------------------------------------------------------Another attribute is data, which allows you to get any additional data fromthe server during an Ajax request. The data attribute can simply point to abean property via EL, and the data will be serialized in JSON format andavailable on the client side. Here’s an example:<a4j:commandButton value="Submit" reRender="out"data="#{bean.text}"oncomplete="alert(data)"/>where text is as follows:private String text = "Nice, I can get any data from the server";*********/a4j:support****************--------------------------------------------------------------------------Notice that the event on which anAjax request is sent is onblur. The onblur event means the user has to tabout of the current field or click somewhere else using the mouse.-------------------------------------------------------------------To show a modal window with a status "Please wait" and block everything in the background, you can do something like this:<h:form><a4j:commandButton actionListener="#{bean.calculate}"value="Calculate"/></h:form><rich:modalPanel id="mp" style="text-align:center"><h:outputText value="Please wait..."style="font-weight:bold;font-size:large"/></rich:modalPanel>186 Using RichFaces<a4j:status id="actionStatus"onstart="#{rich:component('mp')}.show('',{height:'80',width:'150'})"onstop="#{rich:component('mp')}.hide()" />