我需要你的帮助 。
我正在使用 jsf2.0 和 primefaces 3.2 开发一个简单的项目。
我有 2 页首先是 page1.xhtml 其中包含:
<p:column>
<p:panel header="#{ct.coTypeName}" >
<h:panelGrid columns="1" width="100" height="100">
<h:outputText value="#{ct.coTypeId}" />
<p:commandLink action="distributer/distributersList.xhtml">
<h:graphicImage url="/resources/images/homePagecartoonBusinessMan.jpg" width="100" height="100"/>
<f:param name="bt" value="dist" />
<f:param name="ti" value="#{ct.coTypeId}" />
</p:commandLink>
</h:panelGrid>
</p:panel>
</p:column>
</p:dataGrid>
当我按下命令链接时,它会将我转发到另一个页面“distributer/distributersList.xhtml”,该页面有一个 selectOneMenu,直到我手动刷新页面才会显示其项目,这仅在 IE“我正在使用 Internet Explorer 8”时发生,但是chrome 或 firefox 不会发生此问题。
我收到 javascript 错误 ..网页错误详细信息
Message: Object expected
Line: 19
Char: 1
Code: 0
URI: http://localhost:8089/pro/
Message: Object doesn't support this property or method
Line: 1
Char: 5500
Code: 0
URI: http://localhost:8089/pro/faces/javax.faces.resource/primefaces.js? ln=primefaces&v=3.2
selectonemenucode 是:
<p:selectOneMenu value="#{bussinessOwnersViewerMB.selectedCity}" effect="fold" immediate="true">
<f:selectItems value="#{bussinessOwnersViewerMB.cities}" var="city" itemLabel="#{city.cityName}" itemValue="#{city.cityId}"/>
</p:selectOneMenu>
城市数组列表的吸气剂是:
public ArrayList<CityDto> getCities() {
cities = cb.laodAllCities();
System.out.println(">>>>"+cities.size());
return cities;
}
和system.out ..给我正确的arraylist大小的消息,但dropdownList项目在我刷新页面之前不会出现!