Hi Mork,

i have got a registration html page. On the first hit, i would like to print out the empty template, i do that with the processElement method. If an submission (register) occurs, i would like to handle it, i do that with doSubmissionName(). This works. Is it the intended way?

Yes, or you can also check for the submission inside processElement using hasSubmission().

Another problem is, that my register site is a merging of the login template and the registration form. Both forms contain a field called login. If i generate the form in the registration element (generateForm()) both fields are filled with the login value. I thaught calling generateForm(template, object) binds the generation to a specific template, no mather if the field names are equal?

generateForm doesn't bind. It merely generates the form fields on a name basis. If you have conflicts of fields with the same names, you can use prefixes for field names as values IDs in the template and then use that prefix when you generate the form.

RIFE has no way of knowing which field belongs to which from unless it starts parsing the HTML of your templates and detects which fields belong to which submissions. Even that wouldn't be good enough though, since you can also use submissions in other template formats. So I took the general approach of flattening name spaces and just doing it on a name basis.

Hope this helps,

Geert

--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com


_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to