Return-Path: X-Original-To: apmail-isis-users-archive@www.apache.org Delivered-To: apmail-isis-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 50E7F17854 for ; Wed, 25 Mar 2015 12:42:22 +0000 (UTC) Received: (qmail 19928 invoked by uid 500); 25 Mar 2015 12:42:12 -0000 Delivered-To: apmail-isis-users-archive@isis.apache.org Received: (qmail 19896 invoked by uid 500); 25 Mar 2015 12:42:12 -0000 Mailing-List: contact users-help@isis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@isis.apache.org Delivered-To: mailing list users@isis.apache.org Received: (qmail 19885 invoked by uid 99); 25 Mar 2015 12:42:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Mar 2015 12:42:12 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [109.235.32.66] (HELO smtp1.pocos.nl) (109.235.32.66) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Mar 2015 12:41:45 +0000 Received: from [109.235.34.226] (helo=[10.0.3.211]) by smtp1.pocos.nl with esmtp (Exim 4.80) (envelope-from ) id 1Yakcx-0005dG-2N for users@isis.apache.org; Wed, 25 Mar 2015 13:41:44 +0100 Message-ID: <5512AD1A.2020004@pocos.nl> Date: Wed, 25 Mar 2015 13:42:02 +0100 From: Erik de Hair User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "users@isis.apache.org" Subject: calling webservice only once from viewmodel Content-Type: multipart/alternative; boundary="------------040406000402060804020000" X-Virus-Checked: Checked by ClamAV on apache.org --------------040406000402060804020000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi, I have to call I web service from a view model but, when opening the view model, the call to the web service is called twice. It doesn't matter if the call is in de viewmodelinit or in some other method. May be there's some way to track the state of the view model and let whether or not the call is executed depend on that? The web service is fetching data, triggered by an action in the view model, for the same view model. Do I always have to return a new view model with the fetched data in it or can I use the data from the fetch method and return the same view model? Thanks, Erik --------------040406000402060804020000--