August 7th, 2010
Something for the german speaking people:
javax.faces.event.MethodExpressionActionListener processAction
SCHWERWIEGEND: Beim Aufrufen des Aktionszielgeräts 'java.lang.NullPointerException'
für Komponente '#{reportingBean.createPdfReport}' wurde 'j_id84' erhalten.
Isn’t it wonderfull to read error messages in your mother tongue? But who does understand what this means??
Besonders schön finde ich das Aktionszielgerät NullPointerException und dass eine ID erhalten wird. Super!
Tags: fun, logging
Posted in JSF, Other | No Comments »
August 5th, 2010
If you are fed up with Hibernate’s ? ? ?s, try this:
(needs mysql 5.1)
1) execute
SET GLOBAL general_log = 'ON';
2) execute
SET GLOBAL log_output = 'TABLE';
3) take a look at the table mysql.general_log
In general_log you find all processed queries on you database, there with values and not like hibernate prints them to the console.
Tags: hibernate, logging, MySQL, queries
Posted in Java | No Comments »
August 5th, 2010
If your mac does start with the dead battery date which is in the past and has problems to ntp update to the current time automatically, you can try this:
http://support.apple.com/kb/TA24116?viewlocale=en_US
I tested it on an older OS 10.3.9 and it worked well there.
Tags: ntp
Posted in Mac OS | No Comments »
February 8th, 2010
Sometimes the problem with validators is that you can’t send a cancel button from within a form, because the validator stops processing it. In this case it is usefull to set the button on immediate=”true”, but then the problem might be that the view ist not correctly cleared. To force clearing the view, it is important to navigate with an outcome other than null (”").
<h:commandButton immediate="true"
actionListener="#{bean.discardEditing}"
value="#{msg.action_cancel}" />
In the example “bean.discardEditing” does some cleanup and returns a navigation outcome to navigate to the same screen again, e.g. “revertToEdit”.
See also:
Tags: jsf
Posted in JSF, Rich Faces | No Comments »
February 8th, 2010
To put a general error message on screen, that is shown only if errors occurred (but is not h:messages) use:
facesContext.maximumSeverity
An example:
<h:panelGroup rendered="#{! empty facesContext.maximumSeverity}">
<h:outputText styleClass="error" value="Some errors occurred." />
...
</h:panelGroup>
Tags: jsf
Posted in JSF | No Comments »
January 27th, 2010
Avoid to mix those two up. Do NOT nest them to trigger rerendering, like this:
<a4j:commandLink ajaxSingle="true" actionListener="#{...}">
<a4j:support event="onclick" reRender="..." />
</a4j:commandLink>
It will lead to funky behaviour, sometimes sending the link, sometimes not. If you use a4j:commandLink you do not need a4j:support. Do trigger rerendering from within the commandLink.
<a4j:commandLink ajaxSingle="true" actionListener="#{...}" reRender="..." />
Tags: jsf, rich faces
Posted in JSF, Rich Faces | No Comments »
January 20th, 2010
Posted in Eclipse | No Comments »
January 7th, 2010
If your project appears to be a death march, you might like this:
http://www.youtube.com/watch?v=KcyzF06ridc
(german language)
Posted in Other | No Comments »
December 18th, 2009
To get the md5 hash of a string from the command line, do e.g. this:
echo -n hallo | md5sum
It is important to do “echo -n” to prevent echo from outputting the trailing new line. Otherwise the newline will be included in the hash.
Posted in Linux | No Comments »