Dialog Framework: Working with Primefaces 5 & PF Mobile

UI Components for JSF
Post Reply
Ortho
Posts: 3
Joined: 19 Mar 2014, 17:31

17 Apr 2014, 17:04

Hi@All.

I have a simple question:

I was used to open an dialog of the Primefaces 4.0 dialog franework using this Java command:

Code: Select all

RequestContext.getCurrentInstance().openDialog(
				"/example/exampleDialog",
				options, null);
It worked like a charm with plain Primefaces 4.0.

Now we have switched to Primefaces 5.0 and it's not working anymore. The progress indecator which indicates a loading process is working until all eternity.

I have added this to faces-config.xml:

Code: Select all

	<application>
		<action-listener>org.primefaces.application.DialogActionListener
		</action-listener>
		<navigation-handler>org.primefaces.application.DialogNavigationHandler
		</navigation-handler>
		<view-handler>org.primefaces.application.DialogViewHandler
		</view-handler>
	</application>
	
	<application>
		<default-render-kit-id>PRIMEFACES_MOBILE</default-render-kit-id>
	</application>
Here's the xhtml which contains the button, which shall call the method in which the dialog shall be opened:

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>

</h:head>
<h:body>
	<h:form>
		<p:panelGrid columns="1" id="showDialogMediaPanel">
			<p:row>
				<p:column>
					<p:commandLink
						action="#{patientController.starteMitarbeiterSucheDialog()}">
						<p:spacer width="3"></p:spacer>
						<p:graphicImage styleClass="j_img_vertical_1"
							value="/resources/img/png/find_1.png" width="18" height="21" />
						<p:ajax event="dialogReturn"
							listener="#{patientController.setOrgMitarbeiter}" />
					</p:commandLink>
				</p:column>
			</p:row>
		</p:panelGrid>
	</h:form>
</h:body>
</html>
We are also using Primefaces Mobile now! Is it possible, that opening a dialog from the dialog framework is not supported at the moment when using PF Mobile?

This components are being used from us to develop: Java 1.7 JSF Mojarra 2.2.6 EclipseLink 2.5.1 PrimeFaces 4.0 Glassfish Server 4.0 Advantage Database Server 10.10

Thanks a lot in advance for your help!
Java EE7, Glassfish Server 4.1, Mojarra JSF 2.2.8, Primefaces 5.2.10, Eclipse Kepler

srbala
Posts: 139
Joined: 02 May 2010, 01:06

18 Apr 2014, 16:08

Few things ...
1. Only Primefaces Mobile related questions should be posted here. You should post your question under General Section http://forum.primefaces.org/viewforum.php?f=3
2. In my experience Upgrade from 4.0 to 5.0 is not an drop in replacement, 5.0 is major release, team will post the upgrade steps on final release. Primefaces core has revamped to adopt mobile enhancement.
3. If you would like to be get prepared for 5.0 before the release in your development, good for you; use labs showcase examples for necessary modifications.
http://www.primefaces.org/showcase-labs ... kBasic.jsf
http://www.primefaces.org/showcase-labs ... rkData.jsf
http://www.primefaces.org/showcase-labs ... essage.jsf

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests