I refresh a WTreeTable the server push way: steps to take into account: 1. this->enableUpdates(true); on your WApplication (I just put that right after creating the WApplication) 2. in your non-wt thread: do a WServer post with a callback method that will fill the data eg. server_.post(session_id_, boost::bind(&some_page::refresh_data, this)); 3. Wt will run the refresh_data callback function when it is ready (so you don't have to lock). But make sure that at the end of the method you put WApplication::instance()->triggerUpdate(); This indicates that Wt has to check for changes and apply them client side.
That should do the trick. Regards, Rob. Date: Fri, 1 Jul 2011 15:22:57 +0300 From: zhivko vasilev <e.zhi...@gmail.com> Subject: [Wt-interest] reload WTableView from background thread To: witty-interest@lists.sourceforge.net Message-ID: <banlktimehenvgzdf26ksyxgnek1ybqb...@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1" Hi all, Does anyone know how to reload WTableView data from an background thread ? For other component getUpdateLock triggerUpdate flow works ,but not for WTableView. If I reload WAbstractItemModel on next scroll event table data is re-rendered correctly ,but do not want to simulate scroll event as an workaround. Seems computeRenderedArea() and scheduleRerender(NeedAdjustViewPort) function do the magic but they are declared private. Probably I missed something but I've ran out of ideas. regards, Zhivko ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ witty-interest mailing list witty-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/witty-interest