1
我有一個JSF頁面,我需要預先檢查頁面上的其中一個複選框,當它第一次加載時。我會如何去做這件事?我知道我可以將控件綁定到後臺bean,但是在什麼時候我會設置值來填充selectmany項目?jsf - 如何預先檢查selectmanycheckbox項目?
我的頁面包含: -
<h:selectManyCheckbox
disabledClass="selectManyCheckbox_Disabled"
styleClass="selectManyCheckbox" id="checkbox2"
required="true" value="#{pc_Proposaldeclaration.selectedDistWho}" >
<f:selectItem itemLabel="item1" itemValue="Name1" />
<f:selectItem itemLabel="item2" itemValue="Name2" />
</h:selectManyCheckbox>
在制定任何幫助的「物品1」,以檢查在頁面加載讚賞!