1
新窗口我用打開一個彈出這個代碼在JavaScript:打開從託管bean
function showMyPage() {
window.open('./showMyPage.xhtml','mywindow', 'resizable=no,toolbar=no,scrollbars=yes,height=450,width=530,top=145,left=235');
return true;
}
不過,我想從一個託管Bean做到這一點,這可能嗎?
例子,我有以下的情況下,從一個p:dataTable中:
<p:column >
<h:commandLink action="#{tableBean.list(ind)}" >
<i class="cus-find"></i>
</h:commandLink>
</p:column>
我要調用一個託管Bean,並通過它打開一個彈出,這可能嗎?
public String list(InfoListVO ind){
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("InfoListVO ", ind);
//here I want to return my page in a popud directly from a Managed Bean
return "myPage";
}
在此先感謝!
嘿,你爲什麼要在你的託管bean? – Ced
由於我想在再次在其他窗口中呈現我的表之前處理參數,因此,我的表的行是用於調整另一個窗口中另一個表的大小的參數 –
非常感謝,我發現此RequestContext.getCurrentInstance()。execute( 「PF( 'nomeDoDialog')顯示();」); –