jsf-2

Tag Library supports namespace: http://java.sun.com/jsf/core, but no tag was defined for name: ajax

感情迁移 提交于 2019-12-17 21:11:57
问题 Below page <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %> <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %> <h:form> <h:outputLabel id="outtxt" value="#{user.name}"/> <h:inputText id="intxt" value="#{user.name}"> <f:ajax event="keyup" execute="intxt" render="outtxt"/> </h:inputTtext> </h:form> Throws below error Tag Library supports namespace: http://java.sun.com/jsf/core, but no tag was defined for name: ajax How is this caused and how can I solve it? 回答1: The <f:ajax>

getting error missing a runtime dependency: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItem

拜拜、爱过 提交于 2019-12-17 21:09:39
问题 I am trying to setup Maven, JSF and Primefaces project. But when i run the project i get the following error com.sun.faces.config.ConfigurationException: Source Document: jar:file:/D:/Personal%20Work/eclipse%2032%20Bit/workspace/Java%20EE /Spring/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps /ch18_SpringWebFlowAndJSF/WEB-INF/lib/primefaces-3.5.jar!/META-INF/faces-config.xml Cause: Class 'org.primefaces.component.fileupload.FileUploadRenderer' is missing a runtime dependency:

nesting JSF expression strings

筅森魡賤 提交于 2019-12-17 21:06:11
问题 I want to achieve this using dynamic parameters for value expressions: <h:dataTable value="#{someBean.someValue}" var="field"> <h:column>#{anotherBean[field]}</h:column> </h:dataTable> where field is 'user.name' or 'location.address.zip' or... Is it possible? Note that this is a simple example, I'm interested in ValueExpression not in dataTable component. UPDATE now the question is: how to replace standard BeanELResolver? looking in ELUtils: ... composite.addRootELResolver(IMPLICIT_RESOLVER);

How to bind List<Integer> values to selectManyListbox in JSF

有些话、适合烂在心里 提交于 2019-12-17 20:57:48
问题 The situation : I have a JavaServer Faces page and a session-scoped managed bean that has two ArrayList<Integer> properties: one for holding a list of possible values and another for holding a list of selected values. On the JSF page there is a <h:selectManyListBox> component with these two properties bound. The problem : after submitting the form the selected values will be converted to string (the property of type ArrayList actually holds a couple of strings!); however, when I use a

*.xhtml url-pattern causes java.lang.NullPointerException at com.sun.faces.context.flash.ELFlash.loggingGetPhaseMapForReading

ε祈祈猫儿з 提交于 2019-12-17 20:52:06
问题 I am trying to force JSF to process my welcome file. I have set the servlet-mapping in my web.xml to the following: <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.xhtml</url-pattern> </servlet-mapping> However, when I try to run my project after doing this, I get this exception: java.lang.NullPointerException at com.sun.faces.context.flash.ELFlash.loggingGetPhaseMapForReading(ELFlash.java:793) at com.sun.faces.context.flash.ELFlash.getPhaseMapForReading(ELFlash

Using f:selectItems var in passtrough attribute

依然范特西╮ 提交于 2019-12-17 20:47:23
问题 can I pass expressions to JSF 2 passthrough-attributes? the following code is not working. expression #{country.isoCode} is not evaluated. <h:selectOneMenu value="#{bean.selectedCountry}" styleClass="selectlist"> <f:selectItems value="#{bean.countries}" var="country" itemLabel="#{country.countryName}" pt:data-icon="flag flag-#{country.isoCode}"/> </h:selectOneMenu> I am using namespace xmlns:pt="http://xmlns.jcp.org/jsf/passthrough" and bootstrap-select. attribute "data-icon" is used to show

h:commandButton is not working once I wrap it in a <h:panelGroup rendered>

坚强是说给别人听的谎言 提交于 2019-12-17 20:26:36
问题 The reason why the topic has "kind of" is because I have an example in JSF 2.2 where I use a commandButton and call a bean function twice (depending on the url). It's basically the same code, which executes only in one example. Here's the code with the description of the "error" below the code: User bean @ManagedBean @RequestScoped public class User { private String name; private String surname; private int age; private int id; public String getName() { return name; } public void setName

How do I break the tyranny of the clientID?

早过忘川 提交于 2019-12-17 20:16:11
问题 My least favorite part of coding JSF 2.0 forms has to do with the handing of the id attributes of the various input elements. I am forever having trouble coding the clientID of the target component from within the backing bean, particularly since PrimeFaces tabView now includes the id of the p:tab element as part of the clientID. I waste tons of time coding, testing, then re-coding those clientIDs. It is reminiscent of older-style assembly language programming where you have to generate tons

java.lang.IllegalArgumentException: javax.faces.lifecycle.ClientWindowFactory

空扰寡人 提交于 2019-12-17 19:55:12
问题 We've been running a web app on a development server and recently somebody built a production server for us (with supposedly) the exact same tomcat config including the JSF libraries in the /lib directory. When I try to deploy my app the new server is throwing a rather confusing error message that I'd love some help understanding. catalina.out Both Production and Devel logs look similar up to this point: 24-Jun-2015 13:16:47.880 INFO [localhost-startStop-1] org.apache.catalina.startup

XML prolog / instruction not removed from XHTML output

若如初见. 提交于 2019-12-17 19:38:31
问题 I'm starting to learn JavaServer Faces (JSF). I'm using GlassFish 3+. I've just created a new JSF project in NetBeans and run the project. It worked fine, but upon examining the XHTML output, I noticed the XML declaration was left in. This messes up the DOCTYPE declaration (which is always supposed to be first in the document). Is JSF supposed to remove the XML declaration, or is there something I've done wrong? 回答1: Facelets will by default only remove it from compositions (include files and