Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 30895 invoked from network); 20 Mar 2006 08:26:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Mar 2006 08:26:33 -0000 Received: (qmail 76625 invoked by uid 500); 20 Mar 2006 08:26:32 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 76590 invoked by uid 500); 20 Mar 2006 08:26:32 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 76578 invoked by uid 99); 20 Mar 2006 08:26:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Mar 2006 00:26:32 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [217.160.230.40] (HELO mout.perfora.net) (217.160.230.40) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Mar 2006 00:26:30 -0800 Received: from [24.163.167.196] (helo=[192.168.1.102]) by mrelay.perfora.net (node=mrelayus0) with ESMTP (Nemesis), id 0MKoyl-1FLFiK2ptV-00024U; Mon, 20 Mar 2006 03:26:09 -0500 Message-ID: <441E6729.6070803@hookom.net> Date: Mon, 20 Mar 2006 02:26:17 -0600 From: Jacob Hookom User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: MyFaces Development Subject: ResponseWriter Question Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: perfora.net abuse@perfora.net login:38996d6b4507362014e15e1650404613 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I noticed in the ResponseWriter: public void writeText(char cbuf[], int off, int len) throws IOException { if(cbuf == null) throw new NullPointerException("cbuf name must not be null"); if(cbuf.length < off + len) throw new IndexOutOfBoundsException((off + len) + " > " + cbuf.length); closeStartTagIfNecessary(); if(isScriptOrStyle()) { String strValue = new String(cbuf, off, len); _writer.write(UnicodeEncoder.encode(strValue, false, false)); } else if(isTextarea()) { String strValue = new String(cbuf, off, len); _writer.write(HTMLEncoder.encode(strValue, false, false)); } else { String strValue = new String(cbuf, off, len); _writer.write(HTMLEncoder.encode(strValue, true, true)); } } In the last case: HTMLEncoder.encode(strValue, true, true) Why would you want to tell the HTMLEncoder to write out a line break in this case and this case only? Adam and I are trying to get Facelets to go pure ResponseWriter for all encode events, but this little quirk causes pages to render with lots of breaks in MyFaces (this doesn't happen in the RI). -- Jacob Hookom - Minneapolis ---------------------------- JSF-EG, JSF-RI, EL, Facelets