Jsf1.1 selectManyCheckbox问题

时间:2012-11-23 06:49:04

标签: java jsf

我正在使用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+"--------");
}

当我面对这个页面时,我只获得了四个复选框,我尝试了布局,layoutwidth但仍然没有显示完整列表。 它也没有在任何地方显示 err 输出。这个代码怎么了? 有人知道吗? Thanx

0 个答案:

没有答案