Re: T5: page redirect

2007-07-23 Thread CarstenM

Hey guys,

already any solution for this behaviour?

Bye
Carsten


Sven Homburg wrote:
 
 wow, and i think i must be crazy and nobody believes me !!
 
 Mit freundlichem Gruss
 
 homburg Softwaretechnik
 S.Homburg
 21220 Seevetal / GERMANY
 Fon: +49-4105-669746
 Fax: +49-4105-668947
 
 
 
 
 Bill Holloway schrieb:
 I'm having the same trouble.  My Start page inherits from ProtectedPage:

 public abstract class ProtectedPage
 {
 @InjectPage
 private Login _loginPage;
 
 @ApplicationState
 private AppState _state;
 
 Object onActivate ()
 {
 if (! _state.isLoggedIn())
 {
 _loginPage.setCallback (this);
 return _loginPage;
 }
 return null;
 }
 }

 Start has an empty class, no members, just a template.  The Login
 works fine.  Everything is OK under Jetty (logged in or logged out) as
 long as I call localhost:8080/start, but if I'm not logged in, a
 call to localhost:8080 gets me a blank page.  Introducing Login tmp =
 _loginPage at the beginning of onActivate and watching that in a
 debug session shows a good _loginPage variable.  But BOOM.

 Bill

 -
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-page-redirect-tf3486878.html#a11751934
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: page redirect

2007-07-23 Thread Nick Westgate

Yes, search the list for bug in redirect.
I posted a workaround a couple of weeks ago (and logged a JIRA issue).

BTW, readers who view threaded wouldn't see your reply to such an old post.

Cheers,
Nick.


CarstenM wrote:

Hey guys,

already any solution for this behaviour?

Bye
Carsten


Sven Homburg wrote:

wow, and i think i must be crazy and nobody believes me !!

Mit freundlichem Gruss

homburg Softwaretechnik
S.Homburg
21220 Seevetal / GERMANY
Fon: +49-4105-669746
Fax: +49-4105-668947




Bill Holloway schrieb:

I'm having the same trouble.  My Start page inherits from ProtectedPage:

public abstract class ProtectedPage
{
@InjectPage
private Login _loginPage;

@ApplicationState

private AppState _state;

Object onActivate ()

{
if (! _state.isLoggedIn())
{
_loginPage.setCallback (this);
return _loginPage;
}
return null;
}
}

Start has an empty class, no members, just a template.  The Login
works fine.  Everything is OK under Jetty (logged in or logged out) as
long as I call localhost:8080/start, but if I'm not logged in, a
call to localhost:8080 gets me a blank page.  Introducing Login tmp =
_loginPage at the beginning of onActivate and watching that in a
debug session shows a good _loginPage variable.  But BOOM.

Bill

-
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]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: page redirect

2007-06-17 Thread Sven Homburg

wow, and i think i must be crazy and nobody believes me !!

Mit freundlichem Gruss

homburg Softwaretechnik
S.Homburg
21220 Seevetal / GERMANY
Fon: +49-4105-669746
Fax: +49-4105-668947




Bill Holloway schrieb:

I'm having the same trouble.  My Start page inherits from ProtectedPage:

public abstract class ProtectedPage
{
@InjectPage
private Login _loginPage;

@ApplicationState

private AppState _state;

Object onActivate ()

{
if (! _state.isLoggedIn())
{
_loginPage.setCallback (this);
return _loginPage;
}
return null;
}
}

Start has an empty class, no members, just a template.  The Login
works fine.  Everything is OK under Jetty (logged in or logged out) as
long as I call localhost:8080/start, but if I'm not logged in, a
call to localhost:8080 gets me a blank page.  Introducing Login tmp =
_loginPage at the beginning of onActivate and watching that in a
debug session shows a good _loginPage variable.  But BOOM.

Bill

-
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]



Re: T5: page redirect

2007-05-07 Thread Sven Homburg

Hi Howard,

here my the deployment directory listing

Best regards
Sven




Howard Lewis Ship schrieb:

So, an  ls -lR  of your workspace would be helpful, to see that files
are named correctly and in the proper places.

On 5/5/07, Sven Homburg [EMAIL PROTECTED] wrote:


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;
h1Login 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;
h1Welcome/h1
t:OutputRaw value=namethe 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]





./test5:
total 8
-rwx--+ 1 shomburg Kein 1125 May  6 03:11 Login.html
-rwx--+ 1 shomburg Kein  701 May  6 00:39 Start.html
drwx--+ 5 shomburg Kein0 May  6 02:58 WEB-INF
drwx--+ 3 shomburg Kein0 May  6 02:58 asset

./test5/WEB-INF:
total 1
drwx--+ 5 shomburg Kein   0 May  6 02:58 classes
drwx--+ 2 shomburg Kein   0 May  6 02:58 conf
drwx--+ 2 shomburg Kein   0 May  6 02:58 lib
-rwx--+ 1 shomburg Kein 629 May  6 00:39 web.xml

./test5/WEB-INF/classes:
total 16
-rwx--+ 1 shomburg Kein 1125 May  6 03:11 Login.html
drwx--+ 2 shomburg Kein0 May  6 02:58 META-INF
-rwx--+ 1 shomburg Kein  701 May  6 00:39 Start.html
drwx--+ 3 shomburg Kein0 May  6 02:58 WEB-INF
drwx--+ 3 shomburg Kein0 May  6 02:58 de
-rwx--+ 1 shomburg Kein 2679 May  6 00:39 hibernate.mysql.cfg.xml
-rwx--+ 1 shomburg Kein  645 May  6 00:39 log4j.properties

./test5/WEB-INF/classes/META-INF:
total 0
-rwx--+ 1 shomburg Kein 0 May  6 00:39 MANIFEST.MF

./test5/WEB-INF/classes/WEB-INF:
total 1
drwx--+ 2 shomburg Kein   0 May  6 02:58 conf
-rwx--+ 1 shomburg Kein 629 May  6 00:39 web.xml

./test5/WEB-INF/classes/WEB-INF/conf:
total 21
-rwx--+ 1 shomburg Kein 997 May  6 00:39 hibernate.ajanzen.properties
-rwx--+ 1 shomburg Kein 855 May  6 00:39 hibernate.homburg.properties
-rwx--+ 1 shomburg Kein 997 May  6 00:39 hibernate.jmoerth.properties
-rwx--+ 1 shomburg Kein 989 May  6 00:39 hibernate.properties
-rwx--+ 1 shomburg Kein 849 May  6 00:39 hibernate.shomburg.properties
-rwx--+ 1 shomburg Kein 409 May  6 00:39 userauth.properties

./test5/WEB-INF/classes/de:
total 0
drwx--+ 3 shomburg Kein 0 May  6 02:58 hsofttec

./test5/WEB-INF/classes/de/hsofttec:
total 0
drwx--+ 5 shomburg Kein 0 May  6 02:58 test5

./test5/WEB-INF/classes/de/hsofttec/test5:
total 0
drwx--+ 3 shomburg Kein 0 May  6 02:58 components
drwx--+ 2 shomburg Kein 0 May  6 02:58 pages
drwx--+ 2 shomburg 

Re: T5: page redirect

2007-05-07 Thread Howard Lewis Ship

In Tapestry 5, the component templates must be in WEB-INF not in the web
application root.

On 5/7/07, Sven Homburg [EMAIL PROTECTED] wrote:


Hi Howard,

here my the deployment directory listing

Best regards
Sven




Howard Lewis Ship schrieb:
 So, an  ls -lR  of your workspace would be helpful, to see that
files
 are named correctly and in the proper places.

 On 5/5/07, Sven Homburg [EMAIL PROTECTED] wrote:

 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;
 h1Login 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;
 h1Welcome/h1
 t:OutputRaw value=namethe 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]





./test5:
total 8
-rwx--+ 1 shomburg Kein 1125 May  6 03:11 Login.html
-rwx--+ 1 shomburg Kein  701 May  6 00:39 Start.html
drwx--+ 5 shomburg Kein0 May  6 02:58 WEB-INF
drwx--+ 3 shomburg Kein0 May  6 02:58 asset

./test5/WEB-INF:
total 1
drwx--+ 5 shomburg Kein   0 May  6 02:58 classes
drwx--+ 2 shomburg Kein   0 May  6 02:58 conf
drwx--+ 2 shomburg Kein   0 May  6 02:58 lib
-rwx--+ 1 shomburg Kein 629 May  6 00:39 web.xml

./test5/WEB-INF/classes:
total 16
-rwx--+ 1 shomburg Kein 1125 May  6 03:11 Login.html
drwx--+ 2 shomburg Kein0 May  6 02:58 META-INF
-rwx--+ 1 shomburg Kein  701 May  6 00:39 Start.html
drwx--+ 3 shomburg Kein0 May  6 02:58 WEB-INF
drwx--+ 3 shomburg Kein0 May  6 02:58 de
-rwx--+ 1 shomburg Kein 2679 May  6 00:39 hibernate.mysql.cfg.xml
-rwx--+ 1 shomburg Kein  645 May  6 00:39 log4j.properties

./test5/WEB-INF/classes/META-INF:
total 0
-rwx--+ 1 shomburg Kein 0 May  6 00:39 MANIFEST.MF

./test5/WEB-INF/classes/WEB-INF:
total 1
drwx--+ 2 shomburg Kein   0 May  6 02:58 conf
-rwx--+ 1 shomburg Kein 629 May  6 00:39 web.xml

./test5/WEB-INF/classes/WEB-INF/conf:
total 21
-rwx--+ 1 shomburg Kein 997 May  6 00:39 hibernate.ajanzen.properties
-rwx--+ 1 shomburg Kein 855 May  6 00:39 hibernate.homburg.properties
-rwx--+ 1 shomburg Kein 997 May  6 00:39 hibernate.jmoerth.properties
-rwx--+ 1 shomburg Kein 989 May  6 00:39 hibernate.properties
-rwx--+ 1 shomburg Kein 849 May  6 00:39 hibernate.shomburg.properties
-rwx--+ 1 shomburg Kein 409 May  6 00:39 userauth.properties

./test5/WEB-INF/classes/de:
total 0
drwx--+ 3 shomburg Kein 0 May  6 02:58 hsofttec


Re: T5: page redirect

2007-05-05 Thread Sven Homburg

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;
   h1Login 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;
   h1Welcome/h1
   t:OutputRaw value=namethe 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]



Re: T5: page redirect

2007-05-05 Thread Howard Lewis Ship

So, an  ls -lR  of your workspace would be helpful, to see that files
are named correctly and in the proper places.

On 5/5/07, Sven Homburg [EMAIL PROTECTED] wrote:


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;
h1Login 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;
h1Welcome/h1
t:OutputRaw value=namethe 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]





--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com


T5: page redirect

2007-03-29 Thread Sven Homburg

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]



Re: T5: page redirect

2007-03-29 Thread Howard Lewis Ship

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]





--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]