Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 75737 invoked from network); 5 Dec 2005 10:53:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Dec 2005 10:53:32 -0000 Received: (qmail 49976 invoked by uid 500); 5 Dec 2005 10:53:19 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 49902 invoked by uid 500); 5 Dec 2005 10:53:19 -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 49889 invoked by uid 99); 5 Dec 2005 10:53:19 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2005 02:53:19 -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; Mon, 05 Dec 2005 02:53:17 -0800 Received: from mail02.magnasteyr.com (localhost [127.0.0.1]) by mail02-30025.magnasteyr.com (smtp02-I2) with ESMTP id 9DDF5B2992; Mon, 5 Dec 2005 11:52:55 +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 8AB1EFA086; Mon, 5 Dec 2005 11:52:55 +0100 (CET) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 Subject: AW: Problems with ValueChangeListener and FacesMessages Date: Mon, 5 Dec 2005 11:52:54 +0100 Message-ID: <36C24A541267A547A3E73D79864920F1049DA199@GRZMX1.io.sft.ms.steyr.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Problems with ValueChangeListener and FacesMessages Thread-Index: AcX5gj+2c+eFk4OWS5KgVRvKtDy+xwAB0ySQ 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 I have one component on my page, where the immediate Attribute is set to = true. And for this component the message is shown when the = ValueChangeListener from my Selectbox is executed. For others no message = is shown! The Problem is, that I need this immediate Attribute to set to true, = because on this component (it's a InputTextBox) I also have a = ValueChangeListener. So is there a way to skip the validation for this one component (for the = InputTextBox) during the first ValueChangeListener method? Regards, Andy -----Urspr=FCngliche Nachricht----- Von: Martin Marinschek [mailto:martin.marinschek@gmail.com] Gesendet: Montag, 5. Dezember 2005 10:57 An: MyFaces Discussion Betreff: Re: Problems with ValueChangeListener and FacesMessages It's only executed for the components which have immediate set to true - if you call facesContext.renderResponse in your valueChangeListener, it won't be executed for the others. regards, Martin On 12/5/05, andreas.mitter@magnasteyr.com = wrote: > The only thing I want to do is: > > Set some values from the backing bean into some inputtext tags (and = this is done in the valuechangelistener method) > > I didn't know, that the conversion and validation phase is executed... > Is there a way to skip this? > > Regards, > Andy > > -----Urspr=FCngliche Nachricht----- > Von: Martin Marinschek [mailto:martin.marinschek@gmail.com] > Gesendet: Montag, 5. Dezember 2005 10:23 > An: MyFaces Discussion > Betreff: Re: Problems with ValueChangeListener and FacesMessages > > > so in fact you want to get rid of the submitted values, and for this > you recreate the whole tree? > > maybe you could use component binding on those inputTexts that should > loose their submitted value and reset the submitted value yourself for > them? > > In any case I don't see why your approach shouldn't work. Have you > checked if the conversion and validation phase is executed for the > other components except your immediate components? > > You know that for the immediate components, the conversion and > validation _is_ executed anyways, so you would see those messages in > any case? > > regards, > > Martin > > On 12/5/05, andreas.mitter@magnasteyr.com = wrote: > > No it's the same page, but in the ValueChangeListener some values = for inputtext Tags are set and I have to refresh the page to display = them. > > This works fine, but is there another method to refresh the page? > > > > Regards, > > Andy > > > > > > -----Urspr=FCngliche Nachricht----- > > Von: Martin Marinschek [mailto:martin.marinschek@gmail.com] > > Gesendet: Montag, 5. Dezember 2005 10:14 > > An: MyFaces Discussion > > Betreff: Re: Problems with ValueChangeListener and FacesMessages > > > > > > Hmmm... > > > > Let me try to understand what you are doing here - you want to head > > off to a new page, right? > > > > regards, > > > > Martin > > > > On 12/5/05, andreas.mitter@magnasteyr.com = wrote: > > > > > > > > > Hi All! > > > > > > I have problems with a ValueChangeListener and FacesMessages. > > > In my JSP Site there is a Selectbox with a ValueChangeListener. = Although I > > > have set the immediate=3DTrue Attribute at this Selectbox, = messages are shown > > > after the ValueChangeListener has been executed.. > > > > > > Can you tell me why this happens??Is it perhaps the = Context.setViewRoot? > > > > > > Here is my code:(JSP) > > > > > > > > id=3D"newPartnerstatus" styleClass=3D"mustfield" > > > value=3D"#{newPartnerDto.statusId}" required=3D"true" > > > valueChangeListener=3D"#{linker.setEndDate}" > > > onchange=3D"submit()"> > > > > > > > > > > > > > > > Here is my code:(ValueChangeListener Method:) > > > > > > public void setEndDate(ValueChangeEvent event) { > > > editDto =3D (EditDto) = FacesUtil.getManagedBean("editDto"); > > > sessionDto =3D (SessionDto) > > > FacesUtil.getManagedBean("sessionDto"); > > > newPartnerDto =3D (NewPartnerDto) FacesUtil > > > > > > .getManagedBean("newPartnerDto"); > > > > > > if (((Long) event.getNewValue()).compareTo(new = Long(1)) =3D=3D 0 > > > && editDto.getEndDate() =3D=3D = null > > > && > > > event.getComponent().getId().equalsIgnoreCase("status")) { > > > editDto.setEndDate(new Date()); > > > = editDto.setEndPerson(sessionDto.getUserName()); > > > > > > String viewId =3D "/edit.jsp"; > > > FacesContext context =3D > > > FacesContext.getCurrentInstance(); > > > UIViewRoot view =3D > > > context.getApplication().getViewHandler() > > > .createView(context, = viewId); > > > > > > view.setViewId(viewId); > > > context.setViewRoot(view); > > > context.renderResponse(); > > > } > > > > > > } > > > > > > THX for help, > > > Regards > > > Andy > > > = ______________________________________________________________________ > > > 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. > > > = ______________________________________________________________________ > > > > > > > > > -- > > > > http://www.irian.at > > > > Your JSF powerhouse - > > JSF Consulting, Development and > > Courses in English and German > > > > Professional Support for Apache MyFaces > > > > > > = ______________________________________________________________________ > > > > 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. > > = ______________________________________________________________________ > > > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces > > > ______________________________________________________________________ > > 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. > ______________________________________________________________________ > -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces ______________________________________________________________________ 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. ______________________________________________________________________