You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by K Nataraj <kn...@prodapt.com> on 2002/11/05 12:56:32 UTC

Sample App

Hello,
     In my application all my screens extends from SecureScreen where i have
overriden isAuthorized(Rundata data) method. On this returning false i set
the template to

data.getTemplateInfo().setScreenTemplate("Login.vm").

In Login.java(in Screens directory) some db specific operations has to be
done or i need to load some values on showing the Login.vm file. What
happens is when the isAuthorized() returns false, the vm is displayed but
the Login.java file in screens directory doesnt get executed.

Is isAuthorized(rundata data) method special so that it doesnt execute the
java file corresponding to vm file in screens directory??

this is my tr.prop file (for templates of velocity service)...

template.homepage=/Login.vm
default.doctype=Html40Transitional
action.sessionvalidator=sessionvalidator.TemplateSessionValidator
session.timeout=18000
action.accesscontroller=AccessController



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Sample App

Posted by Rodney Schneider <ro...@actf.com.au>.
On Tue, 5 Nov 2002 22:56, you wrote:

> Hello,
>      In my application all my screens extends from SecureScreen where i
> have overriden isAuthorized(Rundata data) method. On this returning false i
> set the template to
>
> data.getTemplateInfo().setScreenTemplate("Login.vm").
>
> In Login.java(in Screens directory) some db specific operations has to be
> done or i need to load some values on showing the Login.vm file. What
> happens is when the isAuthorized() returns false, the vm is displayed but
> the Login.java file in screens directory doesnt get executed.
>
> Is isAuthorized(rundata data) method special so that it doesnt execute the
> java file corresponding to vm file in screens directory??

Hi,

Your Login.java screen should not extend SecureScreen, it should extend 
VelocityScreen.

Regards,

-- Rodney

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>