Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 67327 invoked from network); 3 Mar 2011 17:19:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Mar 2011 17:19:22 -0000 Received: (qmail 68175 invoked by uid 500); 3 Mar 2011 17:19:21 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 68119 invoked by uid 500); 3 Mar 2011 17:19:21 -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 68111 invoked by uid 99); 3 Mar 2011 17:19:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Mar 2011 17:19:21 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of darkarena@gmail.com designates 209.85.160.53 as permitted sender) Received: from [209.85.160.53] (HELO mail-pw0-f53.google.com) (209.85.160.53) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Mar 2011 17:19:14 +0000 Received: by pwj7 with SMTP id 7so267472pwj.12 for ; Thu, 03 Mar 2011 09:18:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=VGtAXAftXwQ1U/03SFSqRsDpdE8ks6STGu8BwspXUpo=; b=LI9HuJB74OAbWw7KYgGJdXqxtAjYgH17UiOEoWDgNaSRbcoTK14YEP3L9gDxRcqbjJ ldu57npTDHp1pGpYzRN8zflX/1SE2hcZAtsV0Ut8IVASt1vrL4J1bYZl7lx0XLZa4Eul R3TB1KlcVJgzChxlSI0jX7QuKJxKX3O6r3NaI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=YcbagRqinVOSq4UbaDwNb1gneVe/oGGRvjIpVkJOnE7Zy09PHkh7fQ0AcToi4AS3Qs KbXzDlAgzrpfLym/N4/bJIcNgwoxQYNmLugF36PUjF4dB7rpYtna96CN9JtYlB0vGmxQ Qb5ze8NOTu1G0cioicFm8TMQWZQDPP9/FO+AA= Received: by 10.142.144.18 with SMTP id r18mr1018043wfd.145.1299172734418; Thu, 03 Mar 2011 09:18:54 -0800 (PST) Received: from [0.0.0.0] (c-71-56-193-183.hsd1.co.comcast.net [71.56.193.183]) by mx.google.com with ESMTPS id d35sm1694624wfj.21.2011.03.03.09.18.51 (version=SSLv3 cipher=OTHER); Thu, 03 Mar 2011 09:18:52 -0800 (PST) Message-ID: <4D6FCD79.8080409@gmail.com> Date: Thu, 03 Mar 2011 10:18:49 -0700 From: Scott O'Bryan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 OracleBeehiveExtension/1.0.0.2-OracleInternal ObetStats/LAFCATCAF_1292261087882-121225476 Thunderbird/3.1.8 MIME-Version: 1.0 To: users@myfaces.apache.org Subject: Re: Using statusIndicator References: <3150623219871629127@unknownmsgid> <6819536426873199730@unknownmsgid> <-1240845642059190982@unknownmsgid> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Hakkon, put the form around everything and see if it changes the PPR On 03/03/2011 10:00 AM, Richard Yee wrote: > what is the initial value of pollText in your backing bean? If it is "", you > should set it to something else, ie. "Processing". > > The outputText inside statusIndicator will only show during the time the > Ajax request is being made. Once the response is returned, it will > disappear. > > -Richard > > > > 2011/3/3 H�kon Sagehaug > >> Hi >> >> I now have my login page like this >> >> >> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> >> > xmlns:f="http://java.sun.com/jsf/core" >> xmlns:h="http://java.sun.com/jsf/html" >> xmlns:tr="http://myfaces.apache.org/trinidad"> >> >> >> >> >> >> >> >> >> >> >> >> > value="#{helloWorldBacking.username}" >> required="true" /> >> >> > value="#{helloWorldBacking.password}" >> required="true" secret="true" /> >> >> >> > partialSubmit="true" >> actionListener="#{helloWorldBacking.send}" /> >> >> >> >> > partialTriggers="loginButton" /> >> >> >> >> >> >> >> >> But then I got nothing in the outPutText field. Any other hint/tips or >> tricks. I really appreciate the help >> >> Cheers, H�kon >> >> On 3 March 2011 17:25, Scott O'Bryan wrote: >> >>> That doesn't seem to make any sense to me Richard. The poll component >>> does not replace statusIndicator, they simply do two different things. >>> The purpose of the poll component is to initiate a request based on a >>> clock instead of a user click. You still need some way to display the >>> information.. >>> >>> Hakon, >>> >>> The partial trigger in this case should be on the output text although >>> having it on the status indicator should also work (you'll just get a >>> larger payload). >>> >>> Try this. Remove the status indicator and only have the output text. >>> Make sure your outputText is located inside the form (possible your >>> getting a scoping issue). >>> >>> Does that work? It should. >>> >>> On Mar 3, 2011, at 9:06 AM, Richard Yee wrote: >>> >>>> You don't want statusIndicator, use tr:poll instead >>>> >>>> Richard >>>> >>>> Sent from my iPhone >>>> >>>> On Mar 3, 2011, at 7:48 AM, H�kon Sagehaug >>> wrote: >>>>> Hi >>>>> >>>>> Yes, that was an old cut and past mistake, I've got loginButton as id >>> for >>>>> the button. The latest test are with loginButton, not button2. So this >>> way >>>>> of doing it should normally work? >>>>> >>>>> cheers, H�kon >>>>> >>>>> On 3 March 2011 16:35, Scott O'Bryan wrote: >>>>> >>>>>> Umm. Considering the id of your button is button2, I'm not sure why >>>>>> your partialTrigger is loginButton. Can you explain? >>>>>> >>>>>> On Mar 3, 2011, at 6:46 AM, "H�kon Sagehaug" >>>>>> wrote: >>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> I might not get the full point here ;). Here is what I tried, put >>> trigger >>>>>> on >>>>>>> the statusIndicator like here >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>> value="#{helloWorldBacking.pollText}" >>>>>>> /> >>>>>>> >>>>>>> >>>>>>> >>>>>>> And on the outputText like here >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>> value="#{helloWorldBacking.pollText}" >>>>>>> partialTriggers="loginButton"/> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Where loginButton is >>>>>>> >>>>>>> >>>>>>> >>>>>>> But nothing seems to have the wanted effect. I looks like it picks >> up >>> the >>>>>>> initial value for the helloWorldBacking.pollText, but when this >> value >>>>>>> changes it's it not propagated in the UI. Maybe this can't be done >>> like >>>>>> I've >>>>>>> sketched out. The backing code is the same as sent in a earlier >> email. >>>>>>> Other tips? >>>>>>> >>>>>>> Cheers, H�kon >>>>>>> >>>>>>> >>>>>>> On 3 March 2011 05:23, Richard Yee wrote: >>>>>>> >>>>>>>> Try putting it inside the tr:form or inside your panelPage >>>>>>>> >>>>>>>> >>>>>>>> -Richard >>>>>>>> >>>>>>>> 2011/3/1 H�kon Sagehaug >>>>>>>> >>>>>>>>> Hi >>>>>>>>> >>>>>>>>> Thanks for the reply, here is my xhtml, with a simple login form >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> > /> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> value="#{helloWorldBacking.username}" >>> required="true" >>>>>>>> /> >>>>>>>>> >>>>>>>> value="#{helloWorldBacking.password}" >>> required="true" >>>>>>>>> secret="true" /> >>>>>>>>> >>>>>>>> partialSubmit="true" >>>>>>>>> action="#{helloWorldBacking.send}" /> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> And parts of the backing bean >>>>>>>>> >>>>>>>>> public String send() { >>>>>>>>> FacesContext facesContext = FacesContext.getCurrentInstance(); >>>>>>>>> >>>>>>>>> System.out.println("user name " + username + " is logged in " >>>>>>>>> + userLoggedIn); >>>>>>>>> >>>>>>>>> try { >>>>>>>>> Thread.sleep(5000); >>>>>>>>> Token tok = tokenMgr.getToken(username, password, true); >>>>>>>>> Thread.sleep(2000); >>>>>>>>> pollText = "Token fetched"; >>>>>>>>> if (tok != null) { >>>>>>>>> userLoggedIn = true; >>>>>>>>> return ("success"); >>>>>>>>> } >>>>>>>>> username = ""; >>>>>>>>> password = ""; >>>>>>>>> } catch (TrustException e1) { >>>>>>>>> e1.printStackTrace(); >>>>>>>>> } catch (AxisFault e) { >>>>>>>>> e.printStackTrace(); >>>>>>>>> } catch (FileNotFoundException e) { >>>>>>>>> e.printStackTrace(); >>>>>>>>> } catch (XMLStreamException e) { >>>>>>>>> e.printStackTrace(); >>>>>>>>> } catch (InterruptedException e) { >>>>>>>>> >>>>>>>>> e.printStackTrace(); >>>>>>>>> } >>>>>>>>> FacesMessage message = new FacesMessage("Login failed"); >>>>>>>>> >>>>>>>>> facesContext.addMessage("username", message); >>>>>>>>> >>>>>>>>> username = ""; >>>>>>>>> password = ""; >>>>>>>>> >>>>>>>>> return ("error"); >>>>>>>>> >>>>>>>>> } >>>>>>>>> As you can see I sleep the thread to simulate the operations >> needed >>> to >>>>>>>> log >>>>>>>>> in the user, for now I'm only getting the token. After that I'll >>> fetch >>>>>>>> the >>>>>>>>> project, data etc... >>>>>>>>> >>>>>>>>> So I wanted the pollText to apear dynmically in the status >>> indicator, >>>>>>>> but >>>>>>>>> can get it to update,. >>>>>>>>> >>>>>>>>> Any tips? >>>>>>>>> >>>>>>>>> cheers, H�kon >>>>>>>>> >>>>>>>>> On 1 March 2011 23:23, Scott O'Bryan wrote: >>>>>>>>> >>>>>>>>>> I see no reason why this wouldn't work.. What specifically is >>> failing >>>>>>>>>> for you and perhaps a code snipi might help me visualize your >>> issue. >>>>>>>>>> On Mar 1, 2011, at 3:04 PM, "H�kon Sagehaug"< >>> hakon.sagehaug@uni.no> >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>>> Hi all, >>>>>>>>>>> >>>>>>>>>>> I've just stared using Trinidad and myFaces, and had a question. >>> I'm >>>>>>>>>>> implementing a login in page for uses, and wanted to use the >>>>>>>>>>> statusIndicator, to give back messages for the user like >>>>>>>>>>> >>>>>>>>>>> 1. Got user information >>>>>>>>>>> 2. Loading datasets >>>>>>>>>>> 3. Logged in >>>>>>>>>>> >>>>>>>>>>> And tried to have a tr:outputText within the statusIndicator. >> The >>>>>>>>> value >>>>>>>>>> for >>>>>>>>>>> the outPuttext would be linked to a backing bean, but I was not >>> very >>>>>>>>>>> successful, do you have any other tips? >>>>>>>>>>> >>>>>>>>>>> I guess one can use the progressIndicator, but I would like text >>> to >>>>>>>> be >>>>>>>>>>> returned not a procentage progress. >>>>>>>>>>> >>>>>>>>>>> cheers, H�kon