jsf-2

Pick Custom Object from Select one menu JSF Converter Exception [duplicate]

空扰寡人 提交于 2019-12-11 15:44:26
问题 This question already has answers here : Pick Custom Object from Select one menu JSF [duplicate] (2 answers) Closed 6 years ago . i want to pick custom object from select one menu. it neither shows an error nor values. what to do? please help me. thanks in advance. Now i'm seeing Null pointer exception at getAsObject at this line: return getCurrencyService().getCurrencyBtId(currencyId); this is my xhtml document <h:panelGrid columns="2"> <p:outputLabel value="" /> <p:selectOneMenu id=

Bean property becomes null when using CDI @Named Annotation [duplicate]

风流意气都作罢 提交于 2019-12-11 15:32:48
问题 This question already has an answer here : JSF does not populate @Named @RequestScoped bean with submitted input values (1 answer) Closed 2 years ago . I am using JSF2+CDI in a Tomcat 7 Container. I found a strange problem, I have got one @RequestScoped managed bean annotated with @Named annotation, Iam using its properties on a Facelet page. In that page three consecutive dropdown list is arranged. when the page loads i have initialized the first dropdown list using its getter method. In

<p:selectOneMenu> getting null on submit/next

[亡魂溺海] 提交于 2019-12-11 15:24:32
问题 I am using primefaces wizard. During wizard flow all parameters saved correctly . However <p:selectOneMenu> items getting NULL on submit.Also on 'back', it will not show what I have selected. Same for <p:selectManyMenu> also. Any solution ? Here is the code snippets.I'm using primefaces-3.0.M3 and jsf2. <h:outputText value="Employee Status" /> <p:selectOneMenu id="employeeStatus"value="#{employeeRepositoryImpl.employeeStatus.title}"> <f:selectItem itemLabel="Select One" itemValue="" /> <f

why don't my jsf tags work? [duplicate]

▼魔方 西西 提交于 2019-12-11 15:11:46
问题 This question already has an answer here : JSF returns blank/unparsed page with plain/raw XHTML/XML/EL source instead of rendered HTML output (1 answer) Closed 2 years ago . In Eclipse JUNO, I started: new Dynamic Web Project Name: JSFTest; Configuration: JavaServer Faces v2.0 Project JSF Capabilites: Copy jars to WEB-INF/lib (jstl-api, jstl-impl, jsf-api, jsf-impl): new HTML to WebContent: index.xhtml with "New Facelet Composition Page", and the code inside: in web.xml, I write the index

Eclipse jsf managedBean javax.el.PropertyNotFoundException

和自甴很熟 提交于 2019-12-11 15:07:13
问题 In a simple non maven jsf project i'm having this error SEVERE: javax.el.PropertyNotFoundException: /form_tour.xhtml @13,49 value="#{tourBean.kindOfTour}" Caused by: javax.el.PropertyNotFoundException: Target Unreachable, identifier [tourBean] resolved to null . I checked the bean class and the xhtml and everything looks fine to me. <!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

Primefaces <p:graphicImage /> is throwing undefined function

谁说我不能喝 提交于 2019-12-11 15:03:02
问题 <p:galleria id="gal" value="#{homeBean.images}" var="image" panelWidth="600" panelHeight="300" > <p:graphicImage value="#{image.imagePath}" width="600" height="300" /> </p:galleria> Problem: Uncaught TypeError: undefined is not a function galleria.js?ln=primefaces&v=4.0:1 And no preview, nothing - like it doesn't exist. But in the source code it does exist. The generated source code is : <div id="gal" class="ui-galleria ui-widget ui-widget-content ui-corner-all"> <ul class="ui-galleria-panel

Why ace:fileEntry does not work?

不想你离开。 提交于 2019-12-11 14:58:10
问题 I'm using jsf 2.0 and icefaces 3 component to upload files: <h:form enctype="multipart/form-data"> <ace:fileEntry id="file-entry" relativePath="/files/" maxFileCount="10" maxFileCountMessage="Limited to 10 files uploaded concurrantly." fileEntryListener="#{uploadFileBean.sampleListener}" maxFileSize="6291456" maxFileSizeMessage="Submitted file is too large." maxTotalSize="18874368" maxTotalSizeMessage="Total size of submitted files is too large." required="true" requiredMessage="The file is

Primefaces push with dynamic paths is not working

戏子无情 提交于 2019-12-11 14:38:46
问题 I tried to implement the chat sample of primefaces-push, but it doesn't working. I run some tests and i figured out that using @PushEndpoint with fixed paths e.g. /channel , it works properly, however, using path params e.g. /channel/{userId} , the socket doesn't receive any message. I'm using: Wildfly 9.0.0-Final Primefaces 5.2 Atmosphere 2.3.3 web.xml: <servlet> <servlet-name>Push Servlet</servlet-name> <servlet-class>org.primefaces.push.PushServlet</servlet-class> <load-on-startup>1</load

JSF2-Behaviour of viewParam on viewscoped bean after postback

本小妞迷上赌 提交于 2019-12-11 14:34:30
问题 I have a viewscoped bean wich receives parameters through f:viewparam and set values in the model using them. After a page postback, the parameters dissapear from the url but the model values setted by the initial params are retained somehow. Is this a safe way of keeping parameters or should I rewrite the url on postback so it keeps the initial parameters subsequent calls? How are the parameter retained? In the viewstate? 回答1: Here's what the f:viewParam documentation says: [...] this tag

JSF f:selectItems set item selected [duplicate]

限于喜欢 提交于 2019-12-11 14:26:01
问题 This question already has answers here : Default selection for <f:selectItem> within <h:selectOneMenu> (3 answers) Closed 3 years ago . I have a <f:selectItems> as follows: <p:selectOneMenu id="anios"> <f:selectItems value="#{pruebaCalendarBean.anios}" var="anio" itemLabel="#{anio}" itemValue="#{anio}" /> </p:selectOneMenu> anios is defined as: String[] anios = new String[]{"2014","2015","2016","2017"}; The value selected is 2014, but I want that is 2016. How to do this? I'm using Primefaces.