<af:panelBorderLayout id="pbl1">
<af:commandButton text="commandButton 1" id="cb1" partialSubmit="true">
<af:clientListener method="showPopup" type="click"/>
</af:commandButton>
<af:spacer inlineStyle="border: 1px solid red; position: relative; left: 100px; right: 100px;" id="s1" clientComponent="true"/>
</af:panelBorderLayout>
<af:popup autoCancel="disabled" id="popup">
<af:dialog id="d2" title="Test!" clientComponent="true"/>
</af:popup>
<af:resource type="javascript">
function showPopup(event) {
event.cancel();
var source = event.getSource();
var popup = source.findComponent("popup");
var spacer = source.findComponent("s1");
alert(spacer);
popup.show( {
align : "after_end", alignId : spacer.getClientId()
});
}
</af:resource>
ليست هناك تعليقات:
إرسال تعليق