From adffaces-user-return-1760-apmail-incubator-adffaces-user-archive=incubator.apache.org@incubator.apache.org Wed Jan 10 00:23:07 2007 Return-Path: Delivered-To: apmail-incubator-adffaces-user-archive@locus.apache.org Received: (qmail 83397 invoked from network); 10 Jan 2007 00:23:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jan 2007 00:23:05 -0000 Received: (qmail 96812 invoked by uid 500); 10 Jan 2007 00:23:11 -0000 Delivered-To: apmail-incubator-adffaces-user-archive@incubator.apache.org Received: (qmail 96796 invoked by uid 500); 10 Jan 2007 00:23:11 -0000 Mailing-List: contact adffaces-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: adffaces-user@incubator.apache.org Delivered-To: mailing list adffaces-user@incubator.apache.org Received: (qmail 96787 invoked by uid 99); 10 Jan 2007 00:23:11 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jan 2007 16:23:11 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of awiner@gmail.com designates 66.249.92.172 as permitted sender) Received: from [66.249.92.172] (HELO ug-out-1314.google.com) (66.249.92.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jan 2007 16:23:01 -0800 Received: by ug-out-1314.google.com with SMTP id y2so7693518uge for ; Tue, 09 Jan 2007 16:22:39 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Pk7V49sCAFekhVpTSHXQZX33+LqlVQnn43/3KIREUMBQvUy6/zZ2TY8wOpbfNfePXWUGmIpeOaKPNH92U+Afl9TQprqfBHE/H0xi4dwOdor6Msch+XrqZtBeN2BanbZCIrNvYQdgI87dP4r9nIOcTUhNCNoT2miGIkihW82sijc= Received: by 10.67.20.3 with SMTP id x3mr23648211ugi.1168388559506; Tue, 09 Jan 2007 16:22:39 -0800 (PST) Received: by 10.67.102.2 with HTTP; Tue, 9 Jan 2007 16:22:39 -0800 (PST) Message-ID: <6dac79b90701091622nea0a8fcqdbdec80e484bbcd2@mail.gmail.com> Date: Tue, 9 Jan 2007 16:22:39 -0800 From: "Adam Winer" To: adffaces-user@incubator.apache.org Subject: Re: Table refresh problem when using dialog In-Reply-To: <254acf980701091308u91810fds261210b36532bf8d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <37699f4d0701091301o49cfc7c4yfd0802da87fa9f47@mail.gmail.com> <254acf980701091308u91810fds261210b36532bf8d@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org I think Venkata's suggestions would work. There is the oddity for partialTriggers that they're actually evaluated relative to the parent - the reason being that without that, cmdOut wouldn't work. So, you need the "data:cmdIn" to first go back into the table. -- Adam On 1/9/07, Simon Lessard wrote: > Hello Magdolna, > > I don't think the naming container trick will work as I already tried it in > the past. Then again I might have messed up while trying. I was able to > achieve refresh with a manual call to > TrinidadContext.addPartialTarget(tableComponent). > It's really a poor man solution, but it works. I think that issue deserve a > JIRA entry. > > > Regards, > > ~ Simon > > On 1/9/07, venkata guddanti wrote: > > > > Hi Magdolna, > > > > Can you change the partialTriggers="cmdIn cmdOut" to > > partialTriggers="data:cmdln cmdOut" and see if it works? This is because > > the table is a naming container. > > > > If this does not work, I believe it might be related to the fact that the > > currency is established for the table when the commandLink action is > > invoked > > and the clientId for the commandLink includes the currency. > > > > Regards, > > Venkata > > > > > > On 1/9/07, magdolna holitska wrote: > > > > > > Hi all, > > > > > > Did anyone had a chance to have a look at the issue I am having below? > > > > > > Here are a few more details: > > > > > > In the example below I am trying to add one row to a table using PPR. > > > The command link that opens the dialog is inside the table, in each row. > > > When the dialog returns a new row should be added to the table, > > > but for some reason this isn't happening. > > > > > > However, if I refresh with the browser, the row is added. > > > > > > Any ideas? > > > Thanks, > > > Magdolna > > > > > > > > > > > > > > > > > > >From: "magdolna holitska" < mholitska3@hotmail.com> > > > >Reply-To: adffaces-user@incubator.apache.org > > > >To: adffaces-user@incubator.apache.org > > > >Subject: Table refresh problem when using dialog > > > >Date: Fri, 05 Jan 2007 12:01:27 -0500 > > > > > > > >Hello, > > > > > > > >I have a table containing numbers and a link: "Add New". > > > >When the user clicks on the link, a new number will be added to the > > > table. > > > > > > > > > > > >The problem I have is: > > > >If I have the link outside the table, the number will be added to the > > > list > > > >and the table will be refreshed properly. > > > > > > > >At the other hand, when I place the command link inside the table, the > > > >number will be added to the list, but the table is not refreshed with > > the > > > >new value. > > > > > > > >I only noticed this behaviour when I am using it with dialogs. If I > > just > > > >use an ActionEvent instead of a ReturnEvent, it works fine. > > > > > > > >This is just a simple example that I prepared to point out the issue, > > but > > > >of course in the real application I do have values that I am passing > > and > > > >retrieving from the dialog. > > > > > > > >I also pasted the code below. > > > > > > > > > > > >Thank you in advance. > > > >Regards, > > > >Magdolna > > > > > > > > > > > > > > > > > > > >Example.xhtml: > > > > > > > useWindow="true" windowWidth="300" > > > >windowHeight="400" > > > > partialSubmit="true" action="dialog:numDialog" > > > > returnListener="#{exampleBean.numDialogReturned > > }"/> > > > > > > > > > > partialTriggers="cmdIn cmdOut" width="20%"> > > > > > > > > > > > useWindow="true" windowWidth="300" > > > >windowHeight="400" > > > > partialSubmit="true" > > > >action="dialog:numDialog" > > > > > > > >returnListener="#{exampleBean.numDialogReturned}"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > >ExampleBean.java: > > > > private List numList; > > > > private int num = 100; > > > > > > > > public List getNumList() { > > > > if (numList == null) { > > > > numList = new ArrayList(); > > > > } > > > > System.out.println("numList: ("+numList.size()+"): "+numList); > > > > return numList; > > > > } > > > > public void numDialogReturned(ReturnEvent event) { > > > > System.out.println("--- RETURN"); > > > > Boolean isAdd = (Boolean)event.getReturnValue(); > > > > if (isAdd) > > > > numList.add(new Integer(num++)); > > > > } > > > > > > > > // DIALOG > > > > public void performOK(ActionEvent e) { > > > > logger.debug("Click OK "); > > > > RequestContext.getCurrentInstance > > ().returnFromDialog(true,null); > > > > } > > > > public void performCancel(ActionEvent e) { > > > > logger.debug("Click Cancel "); > > > > RequestContext.getCurrentInstance > > ().returnFromDialog(false,null); > > > > } > > > > > > > >NumDialog.xhtml > > > > > > > > > > > > > > > > > > >actionListener="#{equipmentDetailBean.performOK}"/> > > > > > > >actionListener="#{equipmentDetailBean.performCancel}"/> > > > > > > > > > > > > > > > > > > > >_________________________________________________________________ > > > >Discover Live.ca , the search engine by the creators > > of > > > Windows Live > > > >Messenger http://www.live.com/?mkt=en-ca > > > > > > > > > > _________________________________________________________________ > > > Share your opinion and enter to win! Please complete this survey to > > enter > > > into a draw for a grand prize of $500 or one of twenty $50 cash prizes. > > > http://www.youthographyinsiders.com/R.aspx?a=116 > > > > > > > > > > > >