<h:selectOneListbox disabled=true causing NullPointerException

前端 未结 1 656
抹茶落季
抹茶落季 2021-01-25 02:36

I have JSF 1.1 page in which I have a . When I set property disabled=true, selected value in becomes null

相关标签:
1条回答
  • 2021-01-25 02:49

    When the disabled attribute is set on a HTML input element, then it is not only uneditable, but it would also not send its name=value pair as request parameter to the server. That explains why the server retrieves nulls for them.

    If you want to make it uneditable, but still want to send its name=value pair as request parameter to the server, then you should be using readonly instead.

    <h:someInput ... readonly="true">
    
    0 讨论(0)
提交回复
热议问题