jsf-2.2

java.lang.UnsupportedOperationException: getRowData(String rowKey) must be implemented when basic rowKey algorithm is not used

折月煮酒 提交于 2019-12-01 14:39:32
问题 I have upgraded PrimeFaces from 5.1 final to 5.2 final (the Community Release). I have a <p:dataTable> which is lazily loaded as follows (a minimal example to reproduce the problem for a pure testing purpose only). <p:dataTable var="row" value="#{testManagedBean}" lazy="true" editable="true" rowKey="#{row.fruitId}" selection="#{testManagedBean.selectedValues}" rows="50"> <p:column selectionMode="multiple"/> <p:ajax event="rowEdit" listener="#{testManagedBean.onRowEdit}"/> <p:column headerText

Get full path of selected file in JSF

社会主义新天地 提交于 2019-12-01 14:39:10
I need a JSF button which allows user to browse and select a particular file, then I need my program to retrieve full path of the file. This functionality is required when user runs the client portion from the server itself (i.e. browses to the file in the same server which hosts the web app). If the user sends request from another machine, then uploading the file is enough. For now, I am using h:inputFile tag. <h:inputFile id="file" value="#{TrainingDirectoryBean.file}"></h:inputFile> My bean : TrainingDirectoryBean has the following property protected Part file; But I can't get full path

There was a failure when processing annotations for application

眉间皱痕 提交于 2019-12-01 13:40:45
I have an application that is using jsf2,hibernate4,spring4 and i am using the annotations in all the project ,the project was working fine on the Tomcat server ,but a new requirement appear that i have to use weblogic application server so i have installed weblogic 12.1.3 cause i have read it supports web module 3.0 ,but when to deploy to weblogic i got this error <Error> <HTTP> <BEA-101371> <There was a failure when processing annotations for application C:\EclipseWorkspace\TESTAPP\target\m2e-wtp\web-resources. Ensure that the annotations are valid. The error is null java.lang

jsf 2.2 (final) not works on Jboss 7.1.1

穿精又带淫゛_ 提交于 2019-12-01 12:46:26
seems for me JSF 2.2 is not working at all on JBoss 7.1.1 with jboss's multi jsf I just dropped in replacement of the jsf api and jsf implementation modules with respective jars of jsf 2.2 when my application starts I see following error: 01:46:59,286 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Initializing Mojarra 2.2.0 ( 20130502-2118 https://svn.java.net/svn/mojarra~svn/tags/2.2.0@11930) for context '/broker' 01:46:59,922 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Critical error during deployment: : java.lang

How not to set an attribute of a component inside a composite component if it is empty?

五迷三道 提交于 2019-12-01 11:27:30
I have a h:graphicImage in a composite component like this: <composite:interface> <composite:attribute name="name" required="true" type="java.lang.String" /> <composite:attribute name="alt" required="false" type="java.lang.String" /> <composite:attribute name="height" required="false" type="java.lang.String" /> <composite:attribute name="width" required="false" type="java.lang.String" /> </composite:interface> <composite:implementation> <h:graphicImage url="something-common#{cc.attrs.name}" alt="#{cc.attrs.alt}" height="#{cc.attrs.height}" width="#{cc.attrs.width}" /> </composite

Validating dimensions of an uploaded image in file upload listener in PrimeFaces

隐身守侯 提交于 2019-12-01 09:45:45
问题 I'm uploading images using <p:fileUpload> as follows. <p:outputLabel for="txtCatImage" value="#{messages['category.image']}"/> <p:fileUpload id="txtCatImage" mode="advanced" dragDropSupport="true" required="true" sizeLimit="1000000" fileLimit="1" multiple="false" cancelLabel="#{messages['fileupolad.cancelLabel']}" label="#{messages['fileupolad.label']}" uploadLabel="#{messages['fileupolad.uploadLabel']}" allowTypes="/(\.|\/)(gif|jpe?g|png)$/" invalidFileMessage="#{messages['fileupolad

Multiple browser tabs or windows with the same ViewScoped bean class

你离开我真会死。 提交于 2019-12-01 08:20:41
问题 Using Payara Server 4.1.2.174 with mojarra 2.2.15. I have a simple Named Bean with scope javax.faces.view.ViewScoped. import java.io.Serializable; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.PostConstruct; import javax.faces.view.ViewScoped; import javax.inject.Named; @Named @ViewScoped public class SimpleBean implements Serializable { private final Logger logger = Logger.getLogger(SimpleBean.class.getName()); @PostConstruct private void init() {

How to save and retrive view when it's needed

断了今生、忘了曾经 提交于 2019-12-01 08:03:35
My goal is to keep session size as small as possible. (Why?.. it's other topic). What I have is Phase listener declared in faces-config.xml <lifecycle> <phase-listener>mypackage.listener.PhaseListener</phase-listener> </lifecycle> I want to save all other views, except the last one(maximum two) , in some memcache. Getting the session map: Map<String, Object> sessionMap = event.getFacesContext().getExternalContext().getSessionMap(); in beforePhase(PhaseEvent event) method is giving me access to all views. So here I could save all views to the memcache and delete them from the session. The

Modifiying default “Choose File” label of <h:InputFile>

戏子无情 提交于 2019-12-01 07:48:58
I would like to know if there is a method to label and rename the text displayed by JSF Choose a File when I'm using the tag <h:InputFile> in JSF. BalusC That's not possible with native HTML. The appearance and the button's label is browser-dependent. The particular "Choose File" label is recognizable as the one from Chrome with English language pack (e.g. FireFox uses "Browse..."). As JSF is in the context of this question just a HTML code generator, it can't do much for you either. There are several ways to achieve this. All can be found in this HTML+CSS targeted Q&A: Styling an input type=

How not to set an attribute of a component inside a composite component if it is empty?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 07:39:38
问题 I have a h:graphicImage in a composite component like this: <composite:interface> <composite:attribute name="name" required="true" type="java.lang.String" /> <composite:attribute name="alt" required="false" type="java.lang.String" /> <composite:attribute name="height" required="false" type="java.lang.String" /> <composite:attribute name="width" required="false" type="java.lang.String" /> </composite:interface> <composite:implementation> <h:graphicImage url="something-common#{cc.attrs.name}"