Hi David,
I added support for PROPERTY:name value tags in templates and you can
download the build that supports it from here:
http://rifers.org/downloads/rife/snapshots/rife-1.4.1-snapshot-20060316/
Without this you could either use an embedded element for this, or
extend the authentication implementation by extending the class
http://rifers.org/docs/api/com/uwyn/rife/authentication/elements/
PurgingDatabaseAuthenticated.html and implementing the entrance
(Template) method to set a value in the template.
The exits should just work.
Best regards,
Geert
On 16-mrt-06, at 10:54, David Herbert wrote:
(Re my earlier post - thanks Geert for helping me see the mistake
I'd made - now fixed!).
I need to set a few values/exits within the template on my database
users login screen. I have this set up via an auth.xml element thus:
<element extends="rife/authenticated/database.xml">
<property name="datasource"><datasource>postgresql_local</
datasource></property>
<property name="template_name">login</property>
<property name="title">Please log in</property>
<submission name="credentials">
<param name="login"/>
<param name="password"/>
</submission>
<exit name="register"/>
<childtrigger name="authid"/>
</element>
In my login.html template I need to set a value "title" which is
the title of the window (this is defined within a header file and
included using <!--I 'header'/-->). My assumption was that I could
set this as a property in the element as above and it would be
picked up by the RIFE default element template printing. Doesn't
appear to work - it just leaves my title as <!--V 'title'/-->.
Also, I need to have a couple of exit links within the login template:
* register for an account
* forgotten my password
Do I have to write a Java implementation for the auth element if I
want to do this? Given this is a special element within RIFE, I'm
not really sure how to go about this and would appreciate some
pointers. My login template looks like this:
<!--I 'header'/-->
<h2>User login</h2>
<p>Your login username will normally be your email address for
access
to reports. If you don't yet have an account you can
<a href="[!V 'EXIT:QUERY:register'/]">register</a> for one.
</p>
<!--I 'autherror'/-->
<form name="credentials" action="[!V
'SUBMISSION:FORM:credentials'/]" method="post">
<!--V 'SUBMISSION:PARAMS:credentials'/-->
<table border="0" cellpadding="2" cellspacing="0"
summary="Login area">
<tr>
<td>Username</td>
<td><input name="login" value="[!V 'PARAM:login'][!/V]"
type="text" size="30" maxlength="150" /></td>
</tr>
<tr>
<td>Password</td>
<!--I 'header'/--> <td><input name="password"
type="password" size="30" maxlength="20" /></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Login" /></td>
</tr>
</table>
</form>
<!--I 'footer'/-->
Thanks,
David Herbert.
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users
--
Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED]
"Use what you need" Avenue de Scailmont 34 Skype: gbevin
http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin
gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599
PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9
Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users