jsf-2.2

JSF navigation rule doesn't work on form submit [duplicate]

橙三吉。 提交于 2020-01-02 21:41:30
问题 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 4 years ago . I'm trying to make a very simple couple of HTML pages with JSF, to search for something in a database, but for some reason, when I hit the submit button, nothing happens. The text input goes empty and nothing else happen. It should go to another page displaying the results. Here are my files : index.html <!DOCTYPE html>

Access raw expression of ValueExpression attribute to taglib component

泪湿孤枕 提交于 2020-01-02 06:56:11
问题 Can I access the expression string of a ValueExpression passed as attribute value to my taglib component? My goal is to programmatically derive missing attribute values from it. In this case I'm trying to avoid having to repeat an attribute as a literal. now: <a:columnText title="name" value="#{entity.name}" sortBy="entity.name" /> desired: <a:columnText title="name" value="#{entity.name}" /> -taglib.xml <tag> <tag-name>columnText</tag-name> <source>column-text.xhtml</source> <attribute>

JSF 2.2 - fileupload does not work with Ajax. Form appears to have incorrect enctype (only via AJAX)

送分小仙女□ 提交于 2020-01-01 05:16:14
问题 Trying to implement the JSF 2.2 example I have the following code: <h:form prependId="false" enctype="multipart/form-data"> <!-- Now it's the AJAX file upload component --> <h:inputFile id="fileUpload" value="#{someBean.file}" > <f:ajax /> </h:inputFile> <h:commandButton value="Upload" /> </h:form> According to some JSF 2.2 this should work but in my case it is giving me the following error: the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is

java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory

大兔子大兔子 提交于 2019-12-31 02:26:06
问题 I have upgraded application to use javax.faces-2.2.4 and primefaces-4.0 jars.After deploying my application to weblogic from myeclipse I am getting below error: Jan 10, 2014 2:37:13 PM javax.faces.FactoryFinder$FactoryManager getFactory SEVERE: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory. Attempting to find backup. Jan 10, 2014 2:37:13 PM com.sun.faces.config.ConfigureListener contextDestroyed SEVERE: Unexpected

Overwriting default Hibernate Validator messages

扶醉桌前 提交于 2019-12-30 06:22:08
问题 I want to overwrite the default Hibernate Validator messages in a server faces web app, so I read this part of the documentation: https://docs.jboss.org/hibernate/validator/5.0/reference/en-US/html/chapter-message-interpolation.html#section-message-interpolation I created two files inside the src/ folder: ValidationMessages.properties and ValidationMessages_de_DE.properties . The file contents are: javax.validation.constraints.AssertFalse.message = must be false javax.validation.constraints

Change composite-component's namespace

会有一股神秘感。 提交于 2019-12-29 09:18:10
问题 I have a small library (JAR) containing some custom JSF-components. Some of them are composite-components which are completely (or partly) implemented in XHTML files which reside under META-INF/resources/my-components . To use these components from other XHTML-files I have to use the XML-namespace http://xmlns.jcp.org/jsf/composite/my-components . Other related components in this library are implemented as POJOs using @FacesComponent (and @FacesRenderer ). To use these components, I have to

Write file into disk using JSF 2.2 inputFile

↘锁芯ラ 提交于 2019-12-29 07:22:48
问题 I'm trying to upload an image file using h:inputFile tag and write it to disk. My JSF code: <h:form id="fileUploadForm" enctype='multipart/form-data' prependId="false"> <h:inputFile value="#{solicitacaoManagedBean.imagemCarregada}" /> <br /> <h:commandButton styleClass="btn btn-primary " value="Enviar" action="#{solicitacaoManagedBean.enviarImagem}" /> </h:form> My ManagedBean: @Named(value = "solicitacaoManagedBean") @SessionScoped @MultipartConfig(location = "/home/rogerio/tmp/") public

Illegal Syntax for Set Operation: How to tell JSF I don't “want” a setter

ε祈祈猫儿з 提交于 2019-12-29 06:52:26
问题 This question may be more of the type "conceptual" or "I don't understand JSF". My scenario: I have a JSF Page ( index.xhtml ) where I use a p:accordionPanel (but I don't think it matters what component it is). What I want to do is to set the activeIndexes of it. <p:accordionPanel multiple="true" activeIndex="#{myController.getActiveIndexesForSections('whatever')}"> // bla bla... </p:accordionPanel> And the (simplified) method in the backing bean: public String getActiveIndexesForSections

Pass an object between @ViewScoped beans without using GET params

纵然是瞬间 提交于 2019-12-27 10:30:28
问题 I have a browse.xhtml where I browse a list of cars and I want to view the details of the car in details.xhtml when a "View more" button is pressed. Their backing beans are @ViewScoped and are called BrowseBean and DetailsBean , respectively. Now, I wouldn't like the user/client to see the car ID in the URL, so I would like to avoid using GET params, as presented here and here. Is there any way to achieve this? I'm using Mojarra 2.2.8 with PrimeFaces 5 and OmniFaces 1.8.1. 回答1: Depends on

Pass an object between @ViewScoped beans without using GET params

好久不见. 提交于 2019-12-27 10:30:09
问题 I have a browse.xhtml where I browse a list of cars and I want to view the details of the car in details.xhtml when a "View more" button is pressed. Their backing beans are @ViewScoped and are called BrowseBean and DetailsBean , respectively. Now, I wouldn't like the user/client to see the car ID in the URL, so I would like to avoid using GET params, as presented here and here. Is there any way to achieve this? I'm using Mojarra 2.2.8 with PrimeFaces 5 and OmniFaces 1.8.1. 回答1: Depends on