Hi Maxim,
you can generate individual field by using a FormBuilder:
http://rifers.org/docs/api/com/uwyn/rife/site/
FormBuilder.html#generateField(com.uwyn.rife.template.Template,%
20com.uwyn.rife.site.ConstrainedProperty,%20java.lang.String[],%
20java.lang.String)
You can obtain the form builder from the template instance or
instantiate it yourself:
template.getBeanHandler().getFormBuilder()
To receive the value, you can simply use the getParameter* methods
from the element itself, or add a setAgree(boolean value) method to
the element implementation and it will be injected. Don't forget that
you have to declare the fact that this 'agree' parameter is part of
the submission either for example through XML, or by an annotation on
the setAgree method that you just added:
http://rifers.org/wiki/display/RIFE/Annotations+support+for+element
+declaration
Hope this helps.
Best regards,
Geert
On 19 Nov 2006, at 00:23, Maxim Grigoriev wrote:
I've got a form which consists of bean with its properties and
fileupload element and checkbox "I have read, understand and agree to
the User Agreement".
"agree" checkbox isn't a property of the editing bean.
How can i generate this checkbox and get value from it in my Element?
Because when i use in template this code:
<!--V 'FORM:CHECKBOX:agree'/-->
then nothing is rendered.
But if i just write
<input type='checkbox' name='agree' value='1'>
then i can't get its value in Element.
--
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