/** Convert the given path to a URL: encode spaces to %20's, use * only forward slashes, etc. * @todo Find a better home for this method */ public static String toURL(String path) { // The URL encoder doesn't seem to do this - surprising path = path.replace('\\','/'); // This was also surprising - it makes spaces into +'es instead path = path.replaceAll(" ", "%20"); StringWriter sw = new StringWriter(); try { // WriteURL signature changed in JSF1.2-02-b04 com.sun.faces.util.HtmlUtils.writeURL(sw, path, null, null); } catch (java.io.IOException ex) { ErrorManager.getDefault().notify(ex); return path; } return sw.toString(); }
if (length >= 16) { text.getChars(0, length, textBuff, 0); writeURL(out, textBuff, 0, length, queryEncoding); } else { for (int i = 0; i < length; i++) {
if (length >= 16) { text.getChars(0, length, textBuff, 0); writeURL(out, textBuff, 0, length, queryEncoding); } else { for (int i = 0; i < length; i++) {
if (length >= 16) { text.getChars(0, length, textBuff, 0); writeURL(out, textBuff, 0, length, queryEncoding); } else { for (int i = 0; i < length; i++) {
if (length >= 16) { text.getChars(0, length, textBuff, 0); writeURL(out, textBuff, 0, length, queryEncoding); } else { for (int i = 0; i < length; i++) {
if (length >= 16) { text.getChars(0, length, textBuff, 0); writeURL(out, textBuff, 0, length, queryEncoding); } else { for (int i = 0; i < length; i++) {
HtmlUtils.writeAttribute(writer, buffer, stringValue); } else { HtmlUtils.writeURL(writer, stringValue, encoding, null);
isScriptInAttributeValueEnabled); } else { HtmlUtils.writeURL(attributesBuffer, stringValue, textBuffer,
isScriptInAttributeValueEnabled); } else { HtmlUtils.writeURL(attributesBuffer, stringValue, textBuffer,
isScriptInAttributeValueEnabled); } else { HtmlUtils.writeURL(attributesBuffer, stringValue, textBuffer,
isScriptInAttributeValueEnabled); } else { HtmlUtils.writeURL(attributesBuffer, stringValue, textBuffer,
isScriptInAttributeValueEnabled); } else { HtmlUtils.writeURL(attributesBuffer, stringValue, textBuffer,