Hey, When, during event handling, an uncaught exception is thrown, then Wt will print out the exception and terminate the session. The next request from the browser will then trigger a new session to be created, causing in a page refresh.
In your case, the exception that is being thrown is most likely an exception from Wt::Dbo that you don't have an active transaction while you are interacting with the database. Regards, koen 2015-08-20 23:41 GMT+02:00 Aaron Laws <dartm...@gmail.com>: > I created a minimum working example of what I'm talking about, and it's > attached. It actually compiles and runs! > > Although it's 135 lines, I had to get a web server and DBO up and going. > Really, it's *remarkable* that it's so short and in C++! Anyway, when I > click the pushbutton created on line 124, it looks like the session.find on > line 112 is causing the page to refresh. I'm not sure why a Wt::Dbo call > would cause the page to reload? Or would cause the browser to issue a new > GET. > > Any ideas? Thanks, all! > > In Christ, > Aaron Laws > > On Wed, Aug 12, 2015 at 4:26 PM, Aaron Laws <dartm...@gmail.com> wrote: >> >> In this code: http://pastie.org/10347062, when I uncomment line 36 and >> click the new ingredient button, the page refreshes, and I'm not sure why. >> When I comment line 36, no refresh. Of course, the ingredient isn't added to >> the dbo collection, but the GUI element shows up on the page, etc. >> >> Is there anything about getting a non-const pointer to an object, and >> adding something to a Wt::Dbo::collection on that object that would cause a >> page to refresh? It has me a bit frazzled. Let me know if you have any other >> questions. >> >> In Christ, >> Aaron Laws > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > witty-interest mailing list > witty-interest@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/witty-interest > ------------------------------------------------------------------------------ _______________________________________________ witty-interest mailing list witty-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/witty-interest