I found 2 bugs in Release 3.1.4, and believe they must also exist in
the latest relase 3.1.5 after looking over the release notes.
OS: Windows Vista. Browser: Firefox 3.6, IE 7.
1. setTarget(TargetNewWindow) has no effect if the anchor is set by
setRefInternalPath(). The link is still opened in the same window.
2. with server configuration option tracking=Auto and
reload-is-new-session=false, the application redirects its path from
the url set by setRef() to the root ended with '#'. In other words,
the anchor set by setRef() fails in navigating to its goal with such
server settings.
The following is demo code for bug #2( the entry is "/here", and the
goal is "/here/goThere" ):
#include <Wt/WAnchor>
#include <Wt/WApplication>
#include <Wt/WServer>
using namespace Wt;
struct MyApplication : WApplication {
MyApplication( const WEnvironment& env ) : WApplication(env) {
WAnchor *anchor = new WAnchor( root() );
anchor->setText( "goThere" );
anchor->setRef( "here/goThere" ); // "here#/goThere" is OK!
}
};
WApplication *createApplication( const WEnvironment& env ) { return
new MyApplication(env); }
int main( int argc, char **argv ) {
WServer server( argv[0], "configuration.xml" ); // <tracking> Auto
and <reload-is-new-session> false
server.setServerConfiguration( argc, argv, WTHTTP_CONFIGURATION );
server.addEntryPoint( Application, createApplication, "here" );
if( server.start() ) {
WServer::waitForShutdown();
server.stop();
}
return 0;
}
Clicking on the anchor "/here/goThere" will lead to "/here/goThere",
and finally "/here#".
The workaround is add a '#' in the url, but I don't like it because
the url "/here/goThere" is prettier than "/here#/goThere".
Are these real bugs or right but odd behaviors?
If the former, I hope there is no hard obstacle in witty architecture to fix it.
If the latter, I think some explainations should be added in the witty document.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest