0

I'm evaluation OpenXava. Is it possible to create a check box using OpenXava? How could I do it?

Thanks,

Feras Odeh
  • 9,136
  • 20
  • 77
  • 121

2 Answers2

1

You only need to define a boolean property in your entity module (persisted or transient) and OpenXava will draw a CheckBox by default for that property in the views you include that property (of course).

Then, if you want to react to changes to that CheckBox, you can use the @OnChange() annotation for this property and link the event to your custom "On change action".

Please, read or test the multiple examples that there are available.

Try adding a boolean property to some entity of the quick star guide and you will see (remember to update the DB schema if the property is not transient).

HayrolR
  • 761
  • 5
  • 9
0

You can edit the .jsp and add what you need.

For a checkbox you can add this to your .jsp

<input type="checkbox" name="name" value="val" /> 
Sully
  • 14,672
  • 5
  • 54
  • 79