public CSVBuilder source(String source) {
        if (source == null || "this".equals(source)) {
            buffer.append("s:").append("this");
        }
        else {
            buffer.append("s:").append("'").append(source).append("'");
        }

        return this;
    }
Helper to generate javascript code of a client side validation*
primefaces/src/main/java/org/primefaces/util/CSVBuilder.java