Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 59028 invoked from network); 24 Nov 2005 07:18:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Nov 2005 07:18:55 -0000 Received: (qmail 87834 invoked by uid 500); 24 Nov 2005 07:18:40 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 87544 invoked by uid 500); 24 Nov 2005 07:18:39 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 86948 invoked by uid 99); 24 Nov 2005 07:18:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2005 23:18:35 -0800 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [193.187.200.7] (HELO smtpgw.magnasteyr.com) (193.187.200.7) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2005 23:20:06 -0800 Received: from mail02.magnasteyr.com (localhost [127.0.0.1]) by mail02-30025.magnasteyr.com (smtp02-I2) with ESMTP id 6121AB2992 for ; Thu, 24 Nov 2005 08:18:10 +0100 (CET) Received: filtered by cf_outgoing_out (MSF/_dis_att_) Received: from mail02.magnasteyr.com (localhost [127.0.0.1]) by mail02-10026.magnasteyr.com (smtp02-I1) with SMTP id 488BCFA085 for ; Thu, 24 Nov 2005 08:18:10 +0100 (CET) X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: AW: {Filename?} German Umlauts with InputSuggestAjax, Stylesheets and Speed of Code with InputSuggestAjax Date: Thu, 24 Nov 2005 08:18:10 +0100 Message-ID: <36C24A541267A547A3E73D79864920F1049DA17B@GRZMX1.io.sft.ms.steyr.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: {Filename?} German Umlauts with InputSuggestAjax, Stylesheets and Speed of Code with InputSuggestAjax Thread-Index: AcXwPQV5JSWLJ+eRRo+uH7FRiTnNXgAiaRDw From: To: X-PMX-Version-I: 4.7.0.111621 X-Filtered-With: renattach 1.2.2 X-RenAttach-Info: mode=badlist action=delete AttCount=0 count=0 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N That's for answering.. 1)Problems with german Umlauts Is there a possibility to encode the response before its send? How can I do that? 2)Stylesheets: Can you give me a hint, where I can set them. Do I have to set it in the = InputSuggestAjaxRenderer? Regards Andy -----Urspr=FCngliche Nachricht----- Von: Volker Weber [mailto:users.myfaces@weber-oldenburg.de] Gesendet: Mittwoch, 23. November 2005 15:47 An: MyFaces Discussion Betreff: Re: {Filename?} German Umlauts with InputSuggestAjax, Stylesheets and Speed of Code with InputSuggestAjax Hi Andy, andreas.mitter@magnasteyr.com wrote: > Hi all! >=20 > I have now achieved that the InputSuggestAjax Component works, but I > have still three questions and I would be terribly grateful, if = somebody > could answer me: >=20 > 1) How can I add stylesheet attributes for the List and the = Inputfield. > I have already tried to add a styleClass attribute, but it doesn't = work > like I want it. No idea, i think this is not supported yet. Martin? >=20 > 2) I have Problems with German Umlauts like =E4=F6=FC .. They are = display with > a ? in the List... How can I change this? Is this done per purpose or = is > this a bug? This is a bug i think, the response is not specialy encoded before send. >=20 > ole0.bmp >=20 >=20 > 3) My code works, but I'm afraid that it will be too slow, if the list > contains too much records. Perhaps some of you can tell me, if there > could be problems with my code and what I can do better >=20 > (I get the List of Fnames from an Hibernate Query) >=20 > public List getItems(String prefix, Integer maxSize) { >=20 > qh =3D (QueryHelper) = FacesUtil.getManagedBean("queryHelper"); > Iterator it =3D qh.getFnames().iterator(); >=20 > List li =3D new ArrayList(); >=20 > try { > while (it.hasNext()) { >=20 > EtCompany company =3D (EtCompany) = it.next(); >=20 > String fname =3D > company.getCompany().toUpperCase(); > =20 > if > (fname.startsWith(prefix.toUpperCase())) { > = if(li.size() { > li.add(fname); > } > } >=20 > } > } > catch (Exception e) { > e.printStackTrace(); > } > return li; > } >=20 1. get the prefix.toUpperCase() out of the loop. 2. break the loop if maxSize is reached, don't continue looping without any adding to result list: int max =3D maxSize.intValue() - 1; String upperCasePrefix =3D prefix.toUpperCase(); while (it.hasNext()) { if (li.size() > max) { break; } EtCompany company =3D (EtCompany) it.next(); String fname =3D company.getCompany().toUpperCase(); if (fname.startsWith(upperCasePrefix)) { li.add(fname); } } Regards, Volker > Regards > Andy >=20 --=20 Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. ______________________________________________________________________ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. ______________________________________________________________________