i spend some hours to check out where is my error in reasoning.
if i send the url http://localhost:8080/test5/, tapestry redirects via
onActivated to the
login page but i receive an blank page
if i send the url http://localhost:8080/test5/start, i receive the
excepted content from login page
if wrote an testng module like this
public class TestStartPage extends Assert
{
private PageTester _tester;
private String _appPackage = "de.hsofttec.test5";
private String _appName = "test5";
@BeforeClass
public void initializeTest()
{
_tester = new PageTester(_appPackage, _appName, "resources");
}
@Test
public void test1()
{
Document doc = _tester.renderPage("TestStart");
System.err.println(doc.toString());
assertTrue(true);
}
}
and i wonder, that the doc object is an "empty document"
public class TestStart
{
@InjectPage
private TestLogin _login;
Object onActivate()
{
return _login;
}
}
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<h1>Login Test</h1>
</html>
public class TestLogin
{
public String getName()
{
return getClass().getName();
}
}
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<h1>Welcome</h1>
<t:OutputRaw value="name">the class name</t:OutputRaw>
</html>
Mit freundlichem Gruss
homburg Softwaretechnik
S.Homburg
21220 Seevetal / GERMANY
Fon: +49-4105-669746
Fax: +49-4105-668947
Howard Lewis Ship schrieb:
That should be how it works and a blank page is really odd. I'll check
to make sure I have an integration test that proves it works.
On 3/29/07, Sven Homburg <[EMAIL PROTECTED]> wrote:
hi folks,
i want to check if the user is authentificated if he request a page.
i use the RequestEvent-Method "String onActivate()" looks like this:
String onActivate()
{
VisitStateObject visitStateObject = getVisitStateObject();
if (this instanceof IRestrictedPage)
{
if (visitStateObject != null && visitStateObject.getUserEntity()
== null)
return "Login";
}
return null;
}
but if this method returns the pagename "Login" tapestry renders an
empty screen to browser.
no exceptions, no warnings.
where is my "brain leak"
--
Mit freundlichem Gruss
homburg Softwaretechnik
S.Homburg
21220 Seevetal / GERMANY
Fon: +49-4105-669746
Fax: +49-4105-668947
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]