代码如下:
<af:commandButton text="display">
<af:showPopupBehavior popupId="popupId" triggerType="action"/>
</af:commandButton>
<af:popup id="popupId" contentDelivery="lazyUncached"
binding="#{switchFacet.deletePopup}">
<af:dialog title="Delete report set" type="okCancel"
closeIconVisible="true"
inlineStyle="width:400px; height:200px; margin:auto; padding:inherit;"
visible="true" dialogListener="#{switchFacet.initialize}" >
<af:panelGroupLayout layout="vertical" partialTriggers="hhh">
<af:panelGroupLayout partialTriggers="hhh">
<af:switcher defaultFacet="three"
facetName="#{switchFacet.facetName}">
<f:facet name="one">
<af:group>
<af:outputText value="This is facet:one 1 1 1 1 1 1 1 1 1"/>
<af:outputText value="[#{ switchFacet.facetName},]"/>
<af:selectBooleanCheckbox text="selectBooleanCheckbox 1"
label="Label 1"/>
</af:group>
</f:facet>
<f:facet name="two">
<af:outputText value="This is facet:two 2 2 2 2 2 2 2"/>
</f:facet>
</af:switcher>
</af:panelGroupLayout>
<af:spacer width="10" height="10"/>
<af:panelGroupLayout>
<af:commandButton text="yes" partialSubmit="true" id="hhh"
action="#{switchFacet.setFacet}"
visible="#{switchFacet.isDisplay}"/>
<af:commandButton text="ok" visible="#{switchFacet.isOkDisplay}"
action="#{switchFacet.initializeState}"/>
<af:commandButton text="no"
visible="#{switchFacet.isNoDisplay}"/>
</af:panelGroupLayout>
</af:panelGroupLayout>
</af:dialog>
</af:popup>
scope为session时似乎switchFacet.initialize不会被执行,dialog关闭后也不会初始化,request时可以初始话
本文探讨了使用ADF(ADF Faces)中的af:switcher组件进行页面元素切换时遇到的问题,特别是在对话框中配置af:switcher组件,并尝试通过按钮触发状态改变时出现的行为不符合预期的情况。
544

被折叠的 条评论
为什么被折叠?



