我有一个在 panelBar 中显示的项目列表,每个项目都有一个在控制器上调用操作的命令按钮,问题是操作方法永远不会被调用!帮助?
这是代码:
<apex:panelBar id="eventBarSeller" switchType="client" items="{!relatedEventsSeller}" var="event" rendered="true">
<apex:panelbarItem label="{!event.SUBJECT__c}">
<apex:outputText escape="false" value="{!event.BODY__c}" />
<br/>
<br/>
<apex:commandButton value="View details" action="{!showPopup}" rerender="popup" immediate="true" rendered="true"/>
</apex:panelBarItem>
</apex:panelbar>
和弹出输出面板:
<apex:outputPanel id="popup">
<apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!displayPopup}"/>
<apex:outputPanel styleClass="custPopup" layout="block" rendered="{!displayPopup}">
This is where I would put whatever information I needed to show to my end user.<br/><br/><br/>
<apex:commandButton value="Hide Pop up" action="{!closePopup}" rerender="popup"/>
</apex:outputPanel>
</apex:outputPanel>
在控制器中,我有以下内容:
public boolean displayPopup {get; set;}
public void closePopup() {
System.Debug(LoggingLevel.INFO, 'Close Popup...');
displayPopup = false;
}
public void showPopup() {
System.Debug(LoggingLevel.INFO, 'Show Popup...');
displayPopup = true;
}
函数 showPopup 从未被调用,因为我签入了日志,会发生什么?提前致谢!