action="pm:edit?transition=flip" not working

UI Components for JSF
Post Reply
corchi72
Posts: 7
Joined: 11 Dec 2013, 12:22

19 Jun 2014, 15:11

with primefaces 5 not working action="pm:edit?transition=flip" for open new page "edit"
I have copied this source from http://www.primefaces.org/showcase/mobi ... acts.xhtml and I have replace the class contactsView with my appolesMdController that I have generate with Netbeans 8 but it not working
Only after, that I have replaced
<p:commandLink value="#{item.desNomepers} #{item.desCognomepers}" action="pm:second:editForm?transition=slide" >

with

<h:outputLink value="#">

<h2>#{item.desNomepers}</h2>
<p> #{item.desCognomepers}</p>
<p:link outcome="pm:second" value="Go Link" />

</h:outputLink>
it's worked

Why?????


the correct code is:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
xmlns:p="http://primefaces.org/ui"
xmlns:pm="http://primefaces.org/mobile">

<f:view renderKitId="PRIMEFACES_MOBILE" />

<h:head>
<link type="text/css" rel="stylesheet" href="#{request.contextPath}/css/syntaxhighlighter/syntaxhighlighter.css" />
</h:head>

<h:body>

//more pages

<pm:page id="list">
<pm:header title="Contacts" swatch="b">
<!--p:commandButton styleClass="ui-btn-right ui-btn-inline" value="New" icon="ui-icon-plus" update=":edit2:editForm:editFormPanel" action="#{contactsView.prepareNewContact}"/-->
<p:link outcome="pm:second" value="Go Link" />
</pm:header>
<pm:content>
<h:form id="listForm" prependId="false">

<p:dataList id="contactsList" value="#{appolesMdController.items}" var="item" pt:data-inset="true"
pt:data-filter="true" pt:data-filter-placeholder="Search key...">

<!--p:commandLink value="#{item.desNomepers} #{item.desCognomepers}" action="pm:second:editForm?transition=slide" >

</p:commandLink-->
<h:outputLink value="#">

<h2>#{item.desNomepers}</h2>
<p> #{item.desCognomepers}</p>
<p:link outcome="pm:second" value="Go Link" />

</h:outputLink>

</p:dataList>
</h:form>
</pm:content>

</pm:page>

<pm:page id="second">
<h:form id="editForm">
<pm:header title="Page 2"></pm:header>

<pm:content>
<p>Page 2 content.</p>
<p:button outcome="pm:list" value="Go Back" />
</pm:content>
</h:form>

</pm:page>



<!--script language="javascript" src="#{request.contextPath}/syntaxhighlighter/scripts/sh.js"></script>
<script language="javascript">
SyntaxHighlighter.all();
</script-->


</h:body>

</html>



thank corchi :?: :?: :?:


Today I have create the example from http://www.primefaces.org/showcase/mobi ... acts.xhtml example and when I click to "New" contact I get the following error:

Avvertenza: JSF1064: Unable to find or serve resource, /mobile/pm:edit.xhtml.

Why?

sujithb
Posts: 3
Joined: 20 Sep 2011, 23:54

05 Oct 2014, 11:59

I have also faced the same issue, looks like there is some issue with <p:commandLink

I have used the same code which is given in the Contacts.xhtml. Finally as suggested by you, I have tried <p:link and it worked.

<p:commandLink value="#{contact.firstname} #{contact.surname}" update=":editForm:editFormPanel" action="pm:edit?transition=flip">

I am using Primefaces 5.0 with NB8.0

Thanks for your post

jobor
Posts: 33
Joined: 19 Dec 2011, 22:34
Location: the Netherlands

07 Oct 2014, 12:58

Code: Select all

JSF1064: Unable to find or serve resource, /mobile/pm:edit.xhtml
The above logging information tells that the normal navigation handler is in charge and that it can't find the page /mobile/pm:edit.xhtml
So the mobile navigation handler is not registered the right way.

Bad faces-config.xml because missing application tag (bad copy/paste)

Code: Select all

<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
			  xmlns="http://xmlns.jcp.org/xml/ns/javaee"
			  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
			  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
	<navigation-handler>
		org.primefaces.mobile.application.MobileNavigationHandler
	</navigation-handler>
</faces-config>
Good faces-config.xml, see manual page 535

Code: Select all

<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
			  xmlns="http://xmlns.jcp.org/xml/ns/javaee"
			  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
			  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
	<application>
		<navigation-handler>
			org.primefaces.mobile.application.MobileNavigationHandler
		</navigation-handler>
	</application>
</faces-config>
With regards,
Johan Borchers

Mac OS X 10.15.7
NetBeans 12.3
OpenJDK Zulu11.37
JSF Mojarra 2.3.14
PrimeFaces 10.0.0
Tomcat 9.0.43
MySQL 5.6.x

sujithb
Posts: 3
Joined: 20 Sep 2011, 23:54

07 Oct 2014, 22:34

I am not sure how to edit faces-config.xml file.

I cant find this file in the application directory. Could you please help me how to overcome this issue?

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

08 Oct 2014, 17:15

it should be YOUR faces-config.xml file, which I hope you know how to edit

sujithb
Posts: 3
Joined: 20 Sep 2011, 23:54

08 Oct 2014, 23:05

Many Thanks Johan,
Edited the faces_config and it worked.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 61 guests