Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSM0M-0001W0-Mg for pgadmin-hackers@arkaria.postgresql.org; Mon, 11 Jun 2018 12:33:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fSM0K-0005wt-DZ for pgadmin-hackers@arkaria.postgresql.org; Mon, 11 Jun 2018 12:33:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSM0K-0005wj-4q for pgadmin-hackers@lists.postgresql.org; Mon, 11 Jun 2018 12:33:00 +0000 Received: from mail-lf0-x22c.google.com ([2a00:1450:4010:c07::22c]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fSM0C-0001wT-7a for pgadmin-hackers@postgresql.org; Mon, 11 Jun 2018 12:32:58 +0000 Received: by mail-lf0-x22c.google.com with SMTP id g21-v6so28295529lfb.4 for ; Mon, 11 Jun 2018 05:32:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=ykRaGkr4AD/sH1viohTXGa50w8Zulqg907WjvIaNyFU=; b=FMhyVVA/NoCvPu3KwffL1E+DiLsr3lf8C/fbstXdAtH+kvMRBFRHcNAYTV59bLLbDm 8q8UxNSYi2qQors+lvk8SkaXmGWMm4oIH9kAcoSFIl9UwIN40k+ikgbuiOxsgjymoVgA Gmlq4ueKBJKLQJ7h9q0WtgXr9ch4HhdHKVOGDqC0fgZU8UObU0HMh5HnTyavPYlpXvZD wxvxWfn0qQNQpyeWnSyQ756xjKna/iJFeBpgxisNBeoIB5dxh4IO8IxDzRw44L1PP4gr w/YknzRWfd4stGPO99aznAMCOF/Y1tfXExjKCUinOZhfHGNhKWmuZ+F8oaPV7RVaVcPo cixQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ykRaGkr4AD/sH1viohTXGa50w8Zulqg907WjvIaNyFU=; b=ZDeE/BdB6/mHkjUedtFkA+B3xPvc3y6kfDRaSAZ2KUyN5DQVWRV8Kcot5ys+Th3Ck/ xjvmz1NzIXS2e7MbQcFSOnvbAXPowjoo7GEaeDgICxkpTvmhF6GEAOegn3jSnsX0QO2I I/xgP95pWEZ5Z7iKyuDYjlhO6FJm3yrMTdNyADvKicFv/e5kqLTZASztJ4Uu6Yiu5E/w XumWZo0udqp4+GYcbzvTio8DdtPUf3DQ5tkjxHvLoQj+kE95IvHVtLw2uZ+TSvmG0v6g HPE1r7WxGVjtMp1oBsgVSien47oACFzTupLaFgVDoua9zJgcwwvr9nbFzzuaDQi1+iOV oMOQ== X-Gm-Message-State: APt69E3D3HGF+F180hXMxXgLP5JMM36A8m6/j9ICxp5OpDhpg+9n1KPJ 3EZMFx4nOY6oEt56a0AdxnxXe0Q4AvycOWNa7RjIApBZ X-Google-Smtp-Source: ADUXVKIm3/TQWHTwOvJCj3AQjRLg6O6vhJ0zfLWtoufMcqpkpV9dxA0OctQVdp1VrsCm85EW9e8aYOaknyLrkT21YQQ= X-Received: by 2002:a19:dec2:: with SMTP id i63-v6mr9998716lfl.53.1528720371286; Mon, 11 Jun 2018 05:32:51 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:7a02:0:0:0:0:0 with HTTP; Mon, 11 Jun 2018 05:32:50 -0700 (PDT) From: Aditya Toshniwal Date: Mon, 11 Jun 2018 18:02:50 +0530 Message-ID: Subject: RM#3294 - User need to reset the layout to see the changed preferences parameters To: pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000b11986056e5cf259" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000b11986056e5cf259 Content-Type: text/plain; charset="UTF-8" Hi Hackers, This is regarding RM3294 which I am working on, where user needs to reset the layout to see the changed preferences parameters. I am able to implement it, and have used the following approach: 1) when preference changed, fire a custom event - prefChangedEvent 2) listent to prefChangedEvent wherever preferences should be reflected in realtime. 3) In the event handler, make the changes as per the module. 4) So whenever the preferences are changed, the event fires, the listener executes the event handler and changes are done. Benefit of this approach is no polling. But, there is a problem here. It is not possible to fire event in another tab/new browser window. For example, query tool can be open in another tab. And thus, changes are not reflected there. There are solutions available like updating the localStorage of the browser but those are not reliable and does not work properly on different browsers. Request you to kindly suggest if you any better idea. Thanks and Regards, Aditya Toshniwal Software Engineer | EnterpriseDB Software Solutions | Pune "Don't Complain about Heat, Plant a tree" --000000000000b11986056e5cf259 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Hackers,

This is regarding RM3294 which I am working on, where user needs to re= set the layout to see the changed preferences parameters. I am able to impl= ement it, and have used the following approach:
1) w= hen preference changed, fire a custom event - prefChangedEvent
2) listent to prefChangedEvent wherever preferences should be ref= lected in realtime.
3) In the event handler, make the= changes as per the module.
4) So whenever the prefer= ences are changed, the event fires, the listener executes the event handler= and changes are done.

Ben= efit of this approach is no polling. But, there is a problem here.=C2=A0
It is not possible to fire event in another tab/new bro= wser window. For example, query tool can be open in another tab. And thus, = changes are not reflected there. There are solutions available like updatin= g the localStorage of the browser but those are not reliable and does not w= ork properly on different browsers.

Request you to kindly suggest if you any better idea.

Thanks and Regards,Aditya Toshniwal
Software Enginee= r |=C2=A0EnterpriseDB Software Solutions |=C2=A0Pune
"Don&#= 39;t Complain about Heat, Plant a tree"
--000000000000b11986056e5cf259--