Hi,
I know these examples. But they don't suit my needs in this case
(unfortunateley).
Cheers
Jonny
Linden H van der (MI) wrote:
Have you checked the authentication-fw sample? There are two
alternatives: one with actions and one with flow. The last one might be
just what you need.
Bye, Helma
-----Original Message-----
From: Johannes Becker [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 14 June, 2005 12:46
To: users@cocoon.apache.org
Subject: Login and CForms - How to handle in FlowScript?
Hi,
I have a CForm (Definiton + Template) and a login-function in
flow. Now
I want to combine these two.
function loginpage() {
var loginForm = new Form("forms/LoginForm_d.xml");
loginForm.showForm("form/LoginForm");
}
function login() {
var message = false;
var username = cocoon.request.get("username");
var password = cocoon.request.get("password");
account = getStore().readAccount(username, password);;
if (account == null) {
return message;
} else {
message = "true";
return message;
}
}
}
Is it possible (and wise) to change the loginpage()-function
like this:
function loginpage() {
while(true){
var loginForm = new Form("forms/LoginForm_d.xml");
loginForm.showForm("form/LoginForm");
var loggedin = login();
if(loggedin == "true") break;
}
Since this approach doesn't seem quite right and efficient to me:
- Is there a better approach? (I guess there is)
- Any suggestions how I can solve this problem?
Thanks
Jonny
---------------------------------------------------------------------
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]