Actions
Bug #1293
closedsetInternalPath() triggers one extra internalPathChanged() signal in non-ajax session
Start date:
05/18/2012
Due date:
% Done:
0%
Estimated time:
Description
My app's logic:
- click a button
- change internal path to '/alice/'
- handlePathChange: append the text value of current internal path to the page
- as a result, the string '/alice/' will appear after the button.
Those works fine in ajax session.
But in non-ajax session, my app gets TWO internalPathChanged() signal, the 1st is handlePathChange( '/alice/' ), the 2nd is handlePathChange( '/' ), finally I get '/alice//' appended.
Code for reproduction:
#include <Wt/WContainerWidget>
#include <Wt/WPushButton>
#include <Wt/WText>
using namespace Wt;
class MyApp : public WApplication
{
public:
MyApp(const WEnvironment& env)
: WApplication(env)
{
WPushButton* button = new WPushButton( "click to see alice", root() );
button->clicked().connect( this, &MyApp::changePath );
internalPathChanged().connect( this, &MyApp::handlePathChange );
}
void changePath() { setInternalPath( "/alice/", true ); }
void handlePathChange( std::string path )
{
std::cout << "handlePathChange " << path << std::endl;
new WText( path, root() );
}
};
WApplication *createMyApplication(const WEnvironment& env)
{
return new MyApp(env);
}
int main(int argc, char **argv)
{
return WRun(argc, argv, &createMyApplication);
}
Updated by Koen Deforche over 12 years ago
- Status changed from New to Resolved
- Assignee set to Koen Deforche
- Target version set to 3.2.2
Hey,
This has been fixed in git.
Regards,
koen
Updated by Koen Deforche over 12 years ago
- Status changed from Resolved to Closed
Released in Wt 3.2.2
Actions