code: @SuppressWarnings("unchecked")
  	private void handleKey(final StringBuffer sb, Map<String, Object> currentLeaf, String currentKey, String fullKey,
  			boolean isLeafLast) {
  
  		Map<String, Object> newLeaf = (Map<String, Object>) currentLeaf.get(currentKey);
  
  		if (bundleValues.containsKey(fullKey)) {
  			addValuedKey(sb, currentKey, fullKey);
  			if (!newLeaf.isEmpty()) {
  				sb.append(",({");
  				for (Iterator<String> it = newLeaf.keySet().iterator(); it.hasNext();) {
  					String newKey = it.next();
  					handleKey(sb, newLeaf, newKey, fullKey + "." + newKey, !it.hasNext());
  				}
  				sb.append("}))");
  			} else {
  				sb.append(")");
  			}
  		} else if (!newLeaf.isEmpty()) {
  			sb.append(getJsonKey(currentKey)).append(":{");
  			for (Iterator<String> it = newLeaf.keySet().iterator(); it.hasNext();) {
  				String newKey = it.next();
  				handleKey(sb, newLeaf, newKey, fullKey + "." + newKey, !it.hasNext());
  			}
  			sb.append("}");
  
  		}
  		if (!isLeafLast)
  			sb.append(",");
  	}
docs: Processes a leaf from the key map, adding its name and values recursively
  in a javascript object literal structure, where values are invocations of
  a method that returns a function.
  
  @param sb
  StringBuffer to append the javascript code.
  @param currentLeaf
  Current Map from the keys tree.
  @param currentKey
  Current key from the keys tree.
  @param fullKey
  Key with ancestors as it appears in the message bundle(foo -->
  com.mycompany.foo)
  @param isLeafLast
  Whether this is the last item in the current leaf, to append a
  separator.