In OpenXava, I have a class having a "certificateType" property, with a set of fixed values from an enumeration.
In the same class, there is another property that have to be displayed if the certificateType has a specific value, hidden in other cases.
Can you suggest the best approach?
Thanks
You have to add an @OnChange action to your certificateType property. Then in the code of your action you can hide or show any property using getView().setHidden("theProperty", true).
In your entity write your property:
Then write an action like this:
For more information about how to use @OnChange look at the reference documentation, here: https://openxava.org/OpenXavaDoc/docs/view_en.html#View-Property%20customization-Property%20value%20change%20event