0

我正在使用 selectManyCheckbox 处理 JSF1.1,我有这个东西_

……

<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="x"%>

</h:panelGrid>
                <h:panelGrid cellpadding="5">
                <x:selectManyCheckbox value="#{hotelBean.selectedAmenities}" layoutWidth="2">
                    <f:selectItems value="#{hotelBean.amenities}" />
                </x:selectManyCheckbox>
            </h:panelGrid>

            <h:commandButton id="saveDetails" value="Save Details"></h:commandButton>

还有豆子_

private List<String> amenities;  
private List<String> selectedAmenities;


public HotelBean()
{
amenities = new ArrayList<String>();  
    amenities.add("Business Center");  
    amenities.add("Bar");  
    amenities.add("Cable TV");  
    amenities.add("Coffee Shop");
    amenities.add("Golf");
    amenities.add("Gym");
    amenities.add("Pub's");
    amenities.add("Swimming");
    System.err.println("---------"+amenities+"--------");
}

当我面对这个页面时,我只得到了四个复选框,我尝试了布局、布局宽度,但它仍然没有显示完整的列表。它也没有在任何地方显示错误输出。这段代码有什么问题?有人知道吗?谢谢

4

0 回答 0