David, I forgot to mention another alternative.

You can also add this constraint at runtime to a bean instance. So either you do getConstraint() to receive an existing one, or do addConstraint() as you do in the class itself. You can then add the inList() constraint in your element and generate your form explicitly with that instance of your bean.

This is probably the cleanest way to do dynamic lists based on constraints.


On 23-feb-06, at 20:09, Geert Bevin wrote:

it will not generate the select list if your property hasn't got an "inList" constraint.

Alternatively, you can generate the field explicitly with this method:
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)

--
Geert Bevin                       Uwyn bvba
"Use what you need"               Avenue de Scailmont 34
http://www.uwyn.com               7170 Manage, Belgium
gbevin[remove] at uwyn dot com    Tel +32 64 84 80 03

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

Reply via email to