Calling a JSF popup from a Managed Bean

1

I use this JavaScript to call a popup on JSF :   

function showMyPage() { 
    window.open('./showMyPage.xhtml','mywindow', 'resizable=no,toolbar=no,scrollbars=yes,height=450,width=530,top=145,left=235');
    return true;
}

But, I want to call it straight from a Managed Bean , is it possible?

Example, I have the following condition, of a p:dataTable :

<p:column >
    <h:commandLink action="#{tabelasBean.list(ind)}" >  
        <i class="cus-find"></i> 
    </h:commandLink>  
</p:column>

I want to call the Managed Bean popup, is it possible?

public String list(InfoListVO ind){         
    FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("InfoListVO ", ind);

    //aqui quero retornar minha popup direto do Managed Bean
    return "myPage";
}

Thank you in advance!

    
asked by anonymous 24.08.2015 / 18:34

1 answer

1

With primefaces just do this: RequestContext.getCurrentInstance().execute("PF('nomeDoDialog').show();");

I passed the answer through the primefaces because you put it in the question tags.

    
24.08.2015 / 18:38