oracle-adfweblogic12cjdeveloperjspx

ADF-Jdeveloper How to set the first value by default of a RichSelectOneChoice?


I have a RichSelectOneChoice that is populated from a LOV, the default value is null, I know that it is a bad practice to leave default values in a SelectOneChoice but the user requires it. Thanks in advance.


Solution

  • I know is a bad practice set default values in comboboxes,

    In my solution I set the default value in the current row of my viewModel of the field that I want to be selected by default in my select on choice, before to go to that page.

    It´s something like this:

    rowViewObjectRow.setCodeFieldReferenceSelectOneChoice(0);
    

    The value "0" always be in the lov, is a bad practice, and if you find another solution without set the value by default could be better.