我正尝试通过JSP include包含ADF上下文菜单,但菜单拒绝显示。以下是试图包含菜单的代码片段:
<af:table value="#{mockupPersonController.people}"
var="person" id="personDataTable"
rowSelection="single" inlineStyle="width: 100%; height: 95%">
<f:facet name="contextMenu">
<af:popup id="tableContextMenu">
<af:menu>
<jsp:include page="/contextMenu.jsp" flush="true"/>
</af:menu>
</af:popup>
</f:facet>
....这是contextMenu.jsp的一部分。这个想法是用来显示上下文菜单的各个部分,基于会话作用域的值"whereami":
<af:commandMenuItem text="Review Person"
actionListener="#{personStatusBean.launchPopup}" />
<af:separator />
<af:switcher facetName="#{sessionScope.whereami}"
defaultFacet="default">
<f:facet name="default">
<af:commandMenuItem text="Main Menu" />
</f:facet>
<f:facet name="location1">
<af:commandMenuItem text="Do Something" />
<af:commandMenuItem text="Do Something Else" />
</f:facet>有人能帮上忙吗?
发布于 2012-03-07 21:53:11
您应该创建一个声明性组件来完成此操作...
看看这个https://blogs.oracle.com/adffun/entry/fun_with_declarative_components
发布于 2012-03-07 23:24:52
声明式菜单是这样做的一种方式,另一种方式是使用页面碎片并将其包含在任务流中,然后将其作为区域引入到页面中。
https://stackoverflow.com/questions/9592239
复制相似问题