Recent Notes

Displaying keyword search results 1 - 5
Created by Fang on January 04, 2012 09:54:05    Last update: January 04, 2012 09:54:05
There are two ways to validate a form with JSF: jsf validation on the page with <f:validate...> tags (for example: <f:validateLength> , <f:validateRegex> , etc.), or JSR303 bean validation. This note is about how to customize messages for JSR303 bean validation. The validation message is specified in the message attribute for each validation annotation type. The mesage attribute is not a literal string, but a string that is interpolated in various ways. For example, the default validation message for AssertFalse is {javax.validation.constraints.AssertFalse.message} , which is replaced with the corresponding string in ValidationMessages.properties (or ValidationMessages_tr.properties , ValidationMessages_es.properties , depending on the locale). This is the contents of ValidationMessages.properties in the hibernate validator reference implementation: javax.validation.constraints.AssertFalse.message =... To customize the messages, just provide the new value in...
Created by freyo on May 13, 2011 15:45:29    Last update: September 20, 2011 08:08:12
This is an Android app that dumps any binarized xml file as plain text - to the sdcard on the device or emulator. build.xml : <?xml version="1.0" encoding="UTF-8"?> <project... AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <man... res/layout/main.xml <?xml version="1.0" encoding="utf-8"?> <Lin... res/values/strings.xml : <?xml version="1.0" encoding="utf-8"?> <res... src/com/android/xmltool/DumpXml.java package com.android.xmltool; import java.ut... Screenshot Pre-built APK can be downloaded from: http://code.google.com/p/android-binxml-dump/
Created by Dr. Xi on October 26, 2010 04:47:37    Last update: January 11, 2011 20:00:36
The code presented here is a simple implementation of a tab set. It is used to demo how a tab set could be implemented. The code is stand alone and does not depend on any JavaScript libraries. Multiple tab sets within the same page is supported. The HTML markup is fairly simple: Tabs sets are contained within a DIV element with class name "tabsContainer". Define a UL list for the tabs. Follow the UL list with equal number of DIVs for the tab contents. The Nifty Corners Cube technique is used to draw the rounded corners (original form, not the enhanced JavaScript form). HTML, CSS and JavaScript: <!doctype html> <html> <head> <style typ...
Created by James on September 10, 2010 23:01:14    Last update: September 10, 2010 23:01:14
By default, heights for jQuery UI tab panels expand or contract depending on the height of each tab. The code snippet here sets the height of all tabs to be equal to that of the container. <!DOCTYPE html> <html> <head> <title>jQu...
Created by nogeek on June 01, 2010 14:34:12    Last update: June 01, 2010 14:34:12
Test with curl and default Apache doc. C:\>curl --dump-header - http://localhost HTTP/...