update jar to primefaces 5 general problem

UI Components for JSF
samimvp
Posts: 9
Joined: 17 Aug 2011, 14:45
Location: Amman Jordan

21 Aug 2014, 13:19

when I update from primefaces 3.0 to primefaces 5 i found the following problem in all the pages :
javax.faces.FacesException: Cannot find component with expression ""
i found the solution in this link http://stackoverflow.com/questions/1694 ... enced-from
but i will take time and effort to change in all existing pages, can any one please help me to not change in jsf pages ?

note : this problem is was not exist in the primefaces 3

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

21 Aug 2014, 15:24

This might not be an issue with PrimeFaces upgrade.There were no changes related to Component qualified path.Just check with migration guide then it works without issues.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

samimvp
Posts: 9
Joined: 17 Aug 2011, 14:45
Location: Amman Jordan

21 Aug 2014, 19:06

can you please help me in which booklet and which page ?
and i will be grateful if you give me a link to download for free ?

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

21 Aug 2014, 19:19

Check the changes from PF 3.x to PF 5.0 here https://code.google.com/p/primefaces/wi ... ationGuide
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

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

21 Aug 2014, 20:25

Same jsf version? Mojarra has become strickter as farcas I know

samimvp
Posts: 9
Joined: 17 Aug 2011, 14:45
Location: Amman Jordan

22 Aug 2014, 21:20

i have read the migration guide but i found this part
3.0 to 3.1
General Changes
Component Referencing

i must update your component reference is this related to my problem ??

i remember that when i upgrade to primefaces 5 there was a problem i was using :
http://primefaces.prime.com.tr/ui , i googled it and solution was to add
http://primefaces.org/ui

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

22 Aug 2014, 21:21

Nobody can ever help you without a small example.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

samimvp
Posts: 9
Joined: 17 Aug 2011, 14:45
Location: Amman Jordan

22 Aug 2014, 21:51

when i upgrade to primefaces 5 :

the first problem :
javax.faces.view.facelets.TagException: /home_page.xhtml @421,51 <f:validator> Parent not an instance of EditableValueHolder: javax.faces.component.html.HtmlForm@2f2cbe03

the Taglib namespaces
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"

and the

code like this
<p:inputText id="userEmail" required="true" style=" margin-left: 0; " requiredMessage="#{bundle.signUpEmailAddress} : #{bundle.required}"
value="#{loginManger.loginUser.userEmail}">
<f:validator validatorId="checkvalidemail"></f:validator>
<f:validator validatorId="emailExist"></f:validator>
</p:inputText>


i found the solution to update the Taglib namespaces to
from "http://primefaces.prime.com.tr/ui" to http://primefaces.org/ui

when i fixed it
the following second problem is :
javax.faces.FacesException: Cannot find component with expression "userName" referenced from "j_idt30:j_idt32".

snapshot from my page :

<h:form id="all" dir="#{bundle.dir}">

<p:growl id="messagesAll" ></p:growl>

<table width="385" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="43%"><span class="style1">#{bundle.userName}</span></td>
<td width="42%" class="style1">#{bundle.password}</td>
<td width="15%">&nbsp;</td>
</tr>
<tr>
<td>
<p:inputText id="userName" required="true" style="float: none; margin-left: 0;" requiredMessage="#{bundle.userName} : #{bundle.required}"
value="#{loginManger.loginUserLogin.userName}"></p:inputText>
</td>
<td>
<p:password id="password" required="true" requiredMessage="#{bundle.password} : #{bundle.required}"
value="#{loginManger.loginUserLogin.password}"
feedback="false" />
</td>
<td><p:commandButton value="#{bundle.loginButton}" process="@this,userName,password,company"
update="all" style=" height: 19px;
width: 58px;color:white;"
action="#{loginManger.checkUserName}"></p:commandButton></td>
</tr>
<tr>
<td> </td>
<td class="style2"><p:commandLink value="#{bundle.forgotLogin}" process="@this" styleClass="style2" style=" text-decoration: none;"
action="forgetPassword"></p:commandLink></td>
<td>&nbsp;</td>
</tr>
</table>
</h:form>

and the my main problem

i found the soulaiton in this link http://stackoverflow.com/questions/1694 ... enced-from

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

22 Aug 2014, 22:20

1) change the p namespace like you posted in before
2) post the full error message from "Cannot find component with identifier...."
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

samimvp
Posts: 9
Joined: 17 Aug 2011, 14:45
Location: Amman Jordan

22 Aug 2014, 22:43

tandraschko wrote:1) change the p namespace like you posted in before
2) post the full error message from "Cannot find component with identifier...."


another snap shot is :
<h:form id="all" dir="#{bundle.dir}">
<table width="420" border="0" align="center" cellpadding="0"
cellspacing="4" style="margin-top: 70px; margin-bottom: 50px; font-weight: bold;">
<tr> <td style=" width: 77px;" >#{bundle.CFullName}</td> <td style=" width: 105px;"><p:inputText required="true" id="userName" value="#{contactUsManger.countactUs.countactUsUserName}"></p:inputText> </td><td style=" width: 140px;vertical-align: top;"><p:message id="fullNameMessage" for="userName"></p:message> </td></tr>
<tr> <td >#{bundle.CEmail}</td> <td><p:inputText id="userEmail" required="true" value="#{contactUsManger.countactUs.countactUsUserEmail}">
<f:validator validatorId="checkvalidemail"></f:validator>

</p:inputText></td><td><p:message id="fullEmalMessage" for="userEmail"></p:message> </td></tr>
<tr> <td>#{bundle.CPhone}</td> <td><p:inputText id="userPhone" required="true" onkeypress="return numbersonly(this, event)" value="#{contactUsManger.countactUs.countactUsMobile}"></p:inputText></td><td><p:message id="fullPhoneMessage" for="userPhone"></p:message> </td></tr>
<tr> <td style="vertical-align: top;">#{bundle.CMessage}</td> <td><p:inputTextarea required="true" styleClass="textArea"

autoResize="false" style=" height: 50px;
margin-left: 8px;
padding-left: 0;
width: 184px;" id="userMessage" value="#{contactUsManger.countactUs.countactUsComment}"></p:inputTextarea></td><td style="vertical-align: top;"><p:message id="fullMessageMessage" for="userMessage"></p:message> </td></tr>
<tr> <td> </td> <td><p:commandButton action="#{contactUsManger.sendContactMessage}" style=" margin-left: 8px;" value="#{bundle.saveShared}" process="@this,userName,userEmail,userPhone,userMessage" update="fullNameMessage,fullEmalMessage,fullPhoneMessage,fullMessageMessage,all" ></p:commandButton> </td><td> </td></tr>
<tr> <td colspan="3"><p:messages id="all"></p:messages> </td> </tr>
</table>

</h:form>


and the error is

javax.faces.FacesException: Cannot find component with expression "userName" referenced from "j_idt11:j_idt12".
at org.primefaces.expression.SearchExpressionFacade.resolveComponentInternal(SearchExpressionFacade.java:422)
at org.primefaces.expression.SearchExpressionFacade.resolveComponentForClient(SearchExpressionFacade.java:200)
at org.primefaces.expression.SearchExpressionFacade.resolveComponentsForClient(SearchExpressionFacade.java:147)
at org.primefaces.util.AjaxRequestBuilder.addExpressions(AjaxRequestBuilder.java:92)
at org.primefaces.util.AjaxRequestBuilder.process(AjaxRequestBuilder.java:79)
at org.primefaces.renderkit.CoreRenderer.buildAjaxRequest(CoreRenderer.java:352)
at org.primefaces.component.commandbutton.CommandButtonRenderer.buildRequest(CommandButtonRenderer.java:123)
at org.primefaces.component.commandbutton.CommandButtonRenderer.encodeMarkup(CommandButtonRenderer.java:65)
at org.primefaces.component.commandbutton.CommandButtonRenderer.encodeEnd(CommandButtonRenderer.java:54)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1864)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1857)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1860)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1860)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:461)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Last edited by samimvp on 22 Aug 2014, 23:16, edited 1 time in total.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 37 guests