Author Archives: Mystic

Outlook macro example

To setup macro script for Rule to call. Press Alt+F11 in Outlook VBA code screen will be prompted. Select Project1 -> Microsoft Outlook Objects -> ThisOutlookSession Create subroutine with Public Sub Routine_name(Item As Outlook.MailItem) as signature Then you can found this subroutine in Rule window. This example remove attachment and forward to someone. Public Sub… Read More »

How to fix nvidia display reset window size when monitor poweroff

Here is a solution that created a solution for me, with extra directions at the end since only doing what MichealAtOz states didn’t solve the problem for me: http://answers.microsoft.com/en-us/windows/forum/windows_7-hardware/windows-7-movesresizes-windows-on-monitor-power/1653aafb-848b-464a-8c69-1a68fbd106aa “I have found a work-around. Using Sysinternals ProcessMonitor I found that Windows was accessing the following Registry path; HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration My system had three entries; DELF003YY7707BR0MUL_30_07D7_6A^9A3774EB79DEE3E3E38496CC7DF4D936 QHD32000001_31_07D6_D5^63E1ABDD175E7871DCAEB710418A0F75… Read More »

Swing Textfield selectAll without invokeLater

Get rid of the evil invokeLater. InvokeLater will pollute the UX design. private class SelectAllOfFocus extends FocusAdapter { @Override public void focusGained(FocusEvent e) { if (! e.isTemporary()) { JFormattedTextField textField = (JFormattedTextField)e.getComponent(); // This is needed to put the text field in edited mode, so that its processFocusEvent doesn’t // do anything. Otherwise, it calls… Read More »

JSF1.2 -> JSF2

1. upgrade all the jar remove facelet.jar, jsf.jar, myface.jar, richfaces.jar, oro.jar, tomahawk.jar use myfaces-bundle-2.1.1.jar xml-apis-1.0.b2.jar xmlParserAPIs-2.0.2.jar tomahawk20-1.1.11.jar oro-2.0.8.jar richfaces-components-api-4.0.0.Final.jar richfaces-components-ui-4.0.0.Final.jar richfaces-core-api-4.0.0.Final.jar richfaces-core-impl-4.0.0.Final.jar (richfaces dependency) batik-awt-util-1.6-1.jar batik-ext-1.6-1.jar batik-gui-util-1.6-1.jar batik-util-1.6-1.jar cssparser-0.9.5.jar guava-r09.jar guava-r09-gwt.jar 2. must add jstl-impl-1.2jar jstl-api-1.2.jar 3. in web.xml, replace xmlns=”http://java.sun.com/xml/ns/j2ee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”> with xmlns=”http://java.sun.com/xml/ns/javaee” xmlns:web=”http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd” xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd” version=”2.5″> replace facelets.DEVELOPMENT true javax.faces.DEFAULT_SUFFIX.html with… Read More »

Richfaces 4 FAQ

Q: why my eclipse doesn’t support richfaces 4 tag? (auto insert) A: ensure your Jboss plugin is 3.2 or later, and your eclipse should be support JSF2. if nth helps, remove the project and reimport. Q: how to set the project be maven project in eclipse? A: Right click the project, Configure -> convert to… Read More »

Reference java env variable in spring config

How to reference java environment variable when using spring config For example: Using Tomcat server, ${catalina.home} is one of the system variable provided by Tomcat In abc.properties file, test.ref1=${catalina.home} In context.xml (or whatever context xml file you referencing), <!– Properties –> <bean class=”org.springframework.beans.factory.config.PropertyPlaceholderConfigurer”>    <property name=”locations”>    <list>       <value>classpath:properties/abc.properties</value>    </list>  … Read More »