Return-Path: X-Original-To: apmail-myfaces-users-archive@www.apache.org Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DA8D91767B for ; Fri, 7 Nov 2014 21:16:52 +0000 (UTC) Received: (qmail 76035 invoked by uid 500); 7 Nov 2014 21:16:52 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 75985 invoked by uid 500); 7 Nov 2014 21:16:52 -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 75964 invoked by uid 99); 7 Nov 2014 21:16:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Nov 2014 21:16:51 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of smithh032772@gmail.com designates 209.85.215.52 as permitted sender) Received: from [209.85.215.52] (HELO mail-la0-f52.google.com) (209.85.215.52) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Nov 2014 21:16:26 +0000 Received: by mail-la0-f52.google.com with SMTP id pv20so5007729lab.25 for ; Fri, 07 Nov 2014 13:14:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=7LCmltqLCU/iCoZqOmp2BgO2XIkuFDRrtxj39xWRxuI=; b=MF6DgASTVl2QDnCLpO2+vchn/qW/0orMAGVIcOBuKv7ghlwtTfe/Zvt5X8VyLyAmFU DjYzwFuBRxYsPfHunT3IUyDRBaDeTvibTUBh6QFPNN8Y2J4Obhxh4/uWGpctCWti8ysR ZfHu9D2OtH22IyAri8/DeeKFHkQpOcN5m4ux/MW2hUFV6Ljf4BOI/9rhs6nRbbqAK+1u LK7h1IyqpKmN0rxX1a9yJYTTNQPoA2Vf8HMIC2MHY7tL3FQ6rwvjgmi5zRYbRsxBShAg STlT2rM5BaIDbHx8UdH+j9W87wsklPkNecRkGgyHnJiiGIyVSTWiFWaye/kSi700X95V kCeg== MIME-Version: 1.0 X-Received: by 10.112.166.101 with SMTP id zf5mr13979597lbb.42.1415394895583; Fri, 07 Nov 2014 13:14:55 -0800 (PST) Received: by 10.112.125.97 with HTTP; Fri, 7 Nov 2014 13:14:55 -0800 (PST) In-Reply-To: <20141107221130.62a165e3@pennywise.havleik.no> References: <20141107214257.1465a20b@pennywise.havleik.no> <20141107221130.62a165e3@pennywise.havleik.no> Date: Fri, 7 Nov 2014 16:14:55 -0500 Message-ID: Subject: Re: ViewScoped bean created multiple times? From: "Howard W. Smith, Jr." To: MyFaces Discussion Content-Type: multipart/alternative; boundary=001a11c38506f7df7605074b4de9 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c38506f7df7605074b4de9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable That's fine. Can you provide your XHTML and java bean definition (source code) here? You provided a little bit of your java bean in primefaces forum. Your XHTML and java bean may help us on this list to help you. On Fri, Nov 7, 2014 at 4:11 PM, Bj=C3=B8rn T Johansen wrot= e: > Yes, I did.. But since I did not get any answer there and I thought that > this was more a JSF question than a PrimeFaces question, I thought I shou= ld > try here.... Was that wrong? > > BTJ > > On Fri, 7 Nov 2014 15:58:59 -0500 > "Howard W. Smith, Jr." wrote: > > > Interesting, you asked the same question in PrimeFaces forum. > > > > http://forum.primefaces.org/viewtopic.php?f=3D3&t=3D40267 > > > > > > On Fri, Nov 7, 2014 at 3:42 PM, Bj=C3=B8rn T Johansen = wrote: > > > > > I trying to create a webapplication using request and/or viewscope > instead > > > of sessionscope, which I have always used... (Neved needed to concern > > > myself with memory usage in the apps I have implemented.. :) ) > > > But I now have a problem using @ViewScoped.. > > > When I access index.xhtml which uses a managed bean in viewscope, the > > > constructor is called multiple times. And the same with an init > method, that > > > should be called only once. I am using..: > > > > > > > > > > > > > > > > > > ...... > > > > > > to call the init method, but I have also tried using f:event > prerenderView > > > and also @PostConstruct but I am not able to make the bean call the > init > > > method only once... > > > > > > What am I missing? > > > > > > > > > Regards, > > > > > > BTJ > > > -- > > > > > > > -------------------------------------------------------------------------= ---------------------- > > > Bj=C3=B8rn T Johansen > > > > > > btj@havleik.no > > > > > > > -------------------------------------------------------------------------= ---------------------- > > > Someone wrote: > > > "I understand that if you play a Windows CD backwards you hear strang= e > > > Satanic messages" > > > To which someone replied: > > > "It's even worse than that; play it forwards and it installs Windows" > > > > > > > -------------------------------------------------------------------------= ---------------------- > > > > > --001a11c38506f7df7605074b4de9--