Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 37803 invoked from network); 6 Apr 2010 15:06:59 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Apr 2010 15:06:59 -0000 Received: (qmail 3985 invoked by uid 500); 6 Apr 2010 15:06:58 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 3941 invoked by uid 500); 6 Apr 2010 15:06:58 -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 3933 invoked by uid 99); 6 Apr 2010 15:06:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Apr 2010 15:06:58 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lukasz.feldman@googlemail.com designates 209.85.217.212 as permitted sender) Received: from [209.85.217.212] (HELO mail-gx0-f212.google.com) (209.85.217.212) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Apr 2010 15:06:54 +0000 Received: by gxk4 with SMTP id 4so368195gxk.5 for ; Tue, 06 Apr 2010 08:06:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type; bh=M1lE3hgw8dlX0STEOsZueAaXgRYNG/ijjCFGl/2JLpI=; b=o5Ffog+T8tD0hmUTLgJoAo2oKwq7/ppOXKTaB6RYaPR0ZQovKXWeQzoPwJ3tGypYh+ iVwWpyVK9VEGLkeqy4aiLrDFvW2s/qY7U5crjNpSnQfSpluOAITmVn2QTgbKatqi2KNF e399zH6j06gOm8Obs5jFI1VTWVB7E51cNfqIc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=RWAmsXLLKAxt/0+rBxrpE2V7LoBgnbV1I7vUlN1GoQtexSXtyjrHnQkS1K7GpR/+yY 44w/gil+gfCUdHQCxcUXKdL+1PDavKYOHTenMJaOb+KITaKrYszhpyHSkRvSFQtCe33d 6SBxpsSa4A9FIENZejlP4mtuzbUVeh96rvLLE= MIME-Version: 1.0 Received: by 10.90.102.15 with HTTP; Tue, 6 Apr 2010 08:06:31 -0700 (PDT) In-Reply-To: References: Date: Tue, 6 Apr 2010 17:06:31 +0200 Received: by 10.91.50.34 with SMTP id c34mr2218313agk.44.1270566391906; Tue, 06 Apr 2010 08:06:31 -0700 (PDT) Message-ID: Subject: Re: Problem with combination of f:selectItems and tr:selectOneChoice... From: Lukasz Feldman To: MyFaces Discussion , bart@kummelweb.nl Content-Type: multipart/alternative; boundary=0016e64097f474055f048392cad3 --0016e64097f474055f048392cad3 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable Here is english version: WARNING: Could not find selected item matching value " com.pac5.datamodel.pojos.ris.dictionaries.SlownikRisPracowni@1b3114" in * CoreSelectOneChoice*[*UIXEditableFacesBeanImpl*, id=3Dj_id213] I have found same error here but still I am not sure what should I do: http://old.nabble.com/af:selectOneChoice-td16572647.html BR, Lukasz 2010/4/6 Bart Kummel > Hi Lukasz, > > I don't understand the error message, it is not in English. Can you > configure your appserver to generate English error messages? > > Best regards, > Bart > > 2010/4/6 Lukasz Feldman > > > Hi, > > > > I have some challenging problem which makes me a little nervouse since = I > > have started to solve it few days ago. I want to combine f:selectItems > with > > tr:selectOneChoice. Here is code snippet: > > > > something.xhtml: > > ------------------------- > > (...) > > > partialTriggers=3D"slownikRisAparatow" > > actionListener=3D"#{konsolaadminabb.ustawRisAparat}" > > value=3D"#{konsolaadmina.risAparat.slownikRisPracowni}" > > label=3D"w pracowni"> > > > > > > > > (...) > > > > konsolaadminabb.java: > > --------------------------------- > > (...) > > public void ustawRisAparat(ValueChangeEvent event) { > > risAparat =3D (SlownikRisAparatow) event.getNewValue(); > > DetachedCriteria criteria =3D > > DetachedCriteria.forClass(SlownikRisPracowni.class); > > criteria.setFetchMode("slownikRisAparatows", > > FetchMode.DEFAULT).createAlias("slownikRisAparatows", > > "aparat").add(Restrictions.eq("aparat.id", risAparat.getId())); > > risAparat.setSlownikRisPracowni(new > > RisPracowniSlownikDAO().findByCriteria(criteria).get(0)); > > (...) > > slownikibb.java: > > ---------------------- > > (...) > > public List getRisPracownieSlownik() { > > List selectItemList =3D new ArrayList(); > > for (SlownikRisPracowni pracownia : > > slownikiService.zaladujRisPracowniSlownik()) { > > selectItemList.add(new > > SelectItem(Long.toString(pracownia.getId()), > > pracownia.getNazwaPracowni())); > > } > > return selectItemList; > > } > > (...) > > risPracowniReadWriteConverter: > > ----------------------------------------------- > > public class RisPracowniReadWriteConverter implements Converter { > > > > private Logger logger =3D Logger.getLogger("com.pac5"); > > > > public Object getAsObject(FacesContext arg0, UIComponent arg1, Strin= g > > arg2) { > > if (arg2.equals(null)) { > > return null; > > } > > return (Object) new RisPracowniSlownikDAO().findById(arg2); > > } > > > > public String getAsString(FacesContext arg0, UIComponent arg1, Objec= t > > arg2) { > > > > if (arg2=3D=3Dnull) { return ""; } > > SlownikRisPracowni pracownia =3D new > > RisPracowniSlownikDAO().findById(arg2.toString()); > > return Long.toString(pracownia.getId()); > > } > > > > As a result of this I have a problem like this: > > > > 2010-04-05 23:10:35 org.apache.myfaces. > > trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer > > _getSelectedIndex > > WARNING: Nie znaleziono wybranego elementu zgodnego z warto=B6ci=B1 > > "com.pac5.datamodel.pojos.ris.dictionaries.SlownikRisPracowni@1b3114" w > > CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=3Dj_id213] > > > > Has anyone idea what is going on? > > > > BR, > > > > Lukasz > > > > > > -- > ___________________________________________________________ > Bart Kummel > > Author of the book "Apache MyFaces 1.2 Web Application Development" > See http://tinyurl.com/am12wad > --0016e64097f474055f048392cad3--