Primefaces Showcase demo stuff

UI Components for JSF
chiefredcloud
Posts: 6
Joined: 27 Jul 2017, 18:49

18 Oct 2017, 23:57

How much of the primefaces showcase demo control behavior/operation is dependent upon extraneous code or code that is included in templates?

Hopefully the answer is there are no external dependencies in order to get the demos to work by simply just copy and pasting into a brand new clean xhtml and java bean
Using JSF 2.2 and Primefaces 6.1

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

19 Oct 2017, 09:12

Just try it, it's clean as possible to show the components.
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

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

19 Oct 2017, 10:36

@Thomas: it is not... Beans are declared in the faces-config.xml not via annotations. And since (contrary to PF extensions if I remember correctly) the visible code in the showcase is copy-pasted and not used directly, so there might be (and sometimes are) typos

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

19 Oct 2017, 11:13

Beans are declared via annotations ;) But yes, the copy&paste of the examples isn't that nice.
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

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

19 Oct 2017, 11:39

OOOOPS, I missed that the change to annotations was made... :oops: Sorry...

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

19 Oct 2017, 13:13

:D NP! 8-)
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

User avatar
lexapierce
Posts: 1
Joined: 25 Oct 2016, 13:28

19 Oct 2017, 15:16

Hello!
My question is also about PrimeFaces demo.
When I try to test <p:fileUpload> component I get the following error:

Code: Select all

java.lang.RuntimeException: java.io.IOException: Missing content for multipart request
at org.eclipse.jetty.server.Request.extractMultipartParameters(Request.java:525)
at org.eclipse.jetty.server.Request.extractContentParameters(Request.java:442)
at org.eclipse.jetty.server.Request.getParameters(Request.java:366)
at org.eclipse.jetty.server.Request.getParameterNames(Request.java:1018)
at javax.servlet.ServletRequestWrapper.getParameterNames(ServletRequestWrapper.java:212)
at org.primefaces.webapp.MultipartRequest.getParameterNames(MultipartRequest.java:143)
at com.sun.faces.context.RequestParameterMap.get(RequestParameterMap.java:80)
at com.sun.faces.context.RequestParameterMap.get(RequestParameterMap.java:57)
at java.util.Collections$UnmodifiableMap.get(Collections.java:1454)
at org.primefaces.component.lifecycle.LifecyclePhaseListener.isGetLifecycleInfoRequest(LifecyclePhaseListener.java:101)
at org.primefaces.component.lifecycle.LifecyclePhaseListener.beforePhase(LifecyclePhaseListener.java:32)
at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:225)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:98)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:133)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:201)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:670)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:97)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621)
at org.primefaces.showcase.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:32)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1613)
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:206)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:541)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1592)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1239)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:481)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1561)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1141)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:118)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:564)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Missing content for multipart request
at org.eclipse.jetty.util.MultiPartInputStreamParser.parse(MultiPartInputStreamParser.java:554)
at org.eclipse.jetty.util.MultiPartInputStreamParser.getParts(MultiPartInputStreamParser.java:441)
at org.eclipse.jetty.server.Request.getParts(Request.java:2319)
at org.eclipse.jetty.server.Request.extractMultipartParameters(Request.java:520)
... 49 more

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

19 Oct 2017, 18:34

You have a 'concrete' question. Please create a new question!!!

chiefredcloud
Posts: 6
Joined: 27 Jul 2017, 18:49

19 Oct 2017, 21:58

"Just try it, it's clean as possible to show the components."

Well actually I did try to perform a copy and paste of the inplace showcase demo capability, I don't get the same behavior as what is produced by the showcase demo.

All of the

However, when I run the demo on my local machine, I get the same page output(as seen below) as showcase demo but the actual clicking on the items to the right nothing occurs in that no in place capability happens. So I'm still trying to figure out what the problem is and will continue to do so...this is not the first item that I've had issues with so I'm starting to get somewhat concerned by this turn of events...for expediency sake I actually put my page code at the bottom of this post...

Basic: Edit Me
Ajax: PrimeFaces
Dblclick Cities
Facet: Yes or No
Image: Show

<ui:composition 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">


<ui:define name="head">
<style type="text/css">
.column {
font-weight: bold;
}
</style>
</ui:define>




<h:form>
<h:panelGrid columns="2" columnClasses="column" cellpadding="5">
<h:outputLabel for="basic" value="Basic:" />
<p:inplace id="basic">
<p:inputText value="Edit Me" />
</p:inplace>

<h:outputLabel for="ajax" value="Ajax:" />
<p:inplace id="ajax" editor="true">
<p:inputText value="#{inplaceView.text}" required="true" label="text" />
</p:inplace>

<h:outputLabel for="event" value="Dblclick"/>
<p:inplace id="event" label="Cities" effectSpeed="fast" event="dblclick">
<h:selectOneMenu>
<f:selectItem itemLabel="New York" itemValue="0" />
<f:selectItem itemLabel="London" itemValue="1" />
<f:selectItem itemLabel="Paris" itemValue="2" />
<f:selectItem itemLabel="Berlin" itemValue="3" />
</h:selectOneMenu>
</p:inplace>

<h:outputLabel for="facet" value="Facet:" />
<p:inplace id="facet" effect="none">
<f:facet name="output">
Yes or No
</f:facet>
<f:facet name="input">
<h:selectBooleanCheckbox />
</f:facet>
</p:inplace>

<h:outputLabel for="image" value="Image:" />
<p:inplace id="image" label="Show" effect="slide">
<p:graphicImage name="/demo/images/nature/nature3.jpg" />
</p:inplace>
</h:panelGrid>
</h:form>

</ui:composition>
Using JSF 2.2 and Primefaces 6.1

chiefredcloud
Posts: 6
Joined: 27 Jul 2017, 18:49

19 Oct 2017, 21:59

"Beans are declared via annotations But yes, the copy&paste of the examples isn't that nice."

Yes I would agree that this is a very nice gesture on the part of primefaces teams so long as examples in question work :P
Using JSF 2.2 and Primefaces 6.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 15 guests