Boa tarde Galera, estou com a seguinte dúvida, e creio que os senhores(as) podem me ajudar.
Bom estou tentando fazer um popup utilizando os recursos do tomahawk, é já configurei o extensionsFilter no arquivo web.xml, também acho que estou chamando a actionListener da forma correta. Estou seguindo esse exemplo. Mas ao clicar no link apenas e feito um reload na pagina e não abre o popup. Fiz a seguinte configuração, vejam se estou fazendo algo de errado. Lembrando que por normas do projeto e coisas politicas não posso utilizar o modal panel do richFaces.
//na pagina jsp
<h:commandLink id="infoEDica" actionListener="#{meuMB.openPopupClicked}">
<f:param name="param1" value="#{param1}"/>
<f:param name="param2" value="#{param2}"/>
<h:graphicImage width="18" height="18" style="cursor:pointer"
title="Info" alt="Info"
value="/url/img.gif"/>
</h:commandLink>
//arquivos web.xml(lembrando que soh coloquei as informações relevantes ao tomahawk)
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<param-name>uploadMaxFileSize</param-name>
<param-value>20m</param-value>
<description>Set the size limit for uploaded files.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB
</description>
</init-param>
</filter>
<!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages -->
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
<!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages -->
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
// e no managedBean
public void openPopupClicked(ActionEvent event) {
// Pass Screen Name you want to open inside popup window
final String viewId = "/pacote/popup.jsf";
FacesContext facesContext = FacesContext.getCurrentInstance();
// This is the proper way to get the view's url
ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
String actionUrl = viewHandler.getActionURL(facesContext, viewId);
//modify popup look and feel settings.
String javaScriptText = "window.open('"
+ actionUrl
+ "', '_blank', 'dependent=yes, menubar=no, toolbar=no, location=no, status=no, "
+ "scrollbars=yes, resizable=no, width=" + 600
+ ", height=" + 300 + ", titlebar=no');";
// Add the Javascript to the rendered page's header for immediate execution
AddResource addResource = AddResourceFactory.getInstance(facesContext);
addResource.addInlineScriptAtPosition(facesContext, AddResource.HEADER_BEGIN, javaScriptText);
}
Ao clicar no link, minha página popup.jsp não abre, eu jah tentei tbm renomear para .jsf e mesmo não deu certo. Alguém sabe o que pode ser?
Agradeço desde já.