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?
action="pm:edit?transition=flip" not working
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
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
Code: Select all
JSF1064: Unable to find or serve resource, /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>
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
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
-
- Information
-
Who is online
Users browsing this forum: No registered users and 61 guests