el

Change color/syntax highlighting for JSF/Facelets EL expressions in Eclipse

做~自己de王妃 提交于 2019-12-10 23:37:36
问题 I have installed both plugins: WTP and JBoss Tools (3.3) for Eclipse Indigo, but could not found a way to configure special syntax highlighting for EL expression in JSF (.xhmtl Facelets views). The EL expressions they look like other html-attributes, but I want they have special highlighting (highlighted with other color for all #{...} expressions), so one can easier understand what are being rendered and navigate through the code faster. Does anyone know, is it possible in Eclipse. I know,

Including JSF Expression Language in JavaScript

感情迁移 提交于 2019-12-10 21:54:32
问题 I found this question and answer Mixing JSF EL in a JavaScript file The question was asked over 2 years ago so was wondering if there are any further alternatives with JSF 2.0. I've been looking at using <h:outputStylesheet> for including CSS and this EL in these files does seem to get parsed. However using <h:outputScript> doesn't seem to do the same. So Question 1) Would the above be the better way of doing it (if it worked)? Question 2) As it doesn't seem to work with JS, which of the

contains invalid expression(s): javax.el.ELException:

瘦欲@ 提交于 2019-12-10 21:49:50
问题 Error on run time: index.jsp(12,8) PWC6038: "${sqlStatement == null}" contains invalid expression(s): javax.el.ELException: Unable to find ExpressionFactory of type: org.apache.el.ExpressionFactoryImpl org.apache.jasper.JasperException: : javax.el.ELException: Unable to find ExpressionFactory of type: org.apache.el.ExpressionFactoryImpl Questions: How would I go about debugging this? Unable to find ExpressionFactory of type: org.apache.el.ExpressionFactoryImpl <-- what does this mean? This is

JSF action method with variable parameter [duplicate]

送分小仙女□ 提交于 2019-12-10 19:12:34
问题 This question already has answers here : Invoke direct methods or methods with arguments / variables / parameters in EL (2 answers) Closed last year . How do I call method with variable parameters in JSF? I tried something like this: <h:commandButton value="Send" action="#{myBean.checkPIN(someOtherBean.PIN)}" /> However, this doesn't work. 回答1: If you are using EL 2.2+, it's possible. If you are using older version ot EL, you can use do the following: <h:commandButton value="Send" action="#

How to include _ in a numeric value in properties file?

折月煮酒 提交于 2019-12-10 19:05:52
问题 How can I have _ (underscore) in my numerical property while injecting it with @Value annotation in Spring? If I include _ in my value, Spring throws TypeMismatchException . .properties file: min-score=20_000 java class: @Value("${min-score}") private int minScore; 回答1: Use Spring EL in your @Value annotation to replace _ characters: @Value("#{'${min-score}'.replace('_','')}") private int minScore; 来源: https://stackoverflow.com/questions/51090283/how-to-include-in-a-numeric-value-in

ERROR: operator does not exist: integer = character varying, using Postgres 8.2

别等时光非礼了梦想. 提交于 2019-12-10 18:56:09
问题 I have a Java EE web application developed in an old version of Eclipse (Ganymede if I remember correctly). I recently migrated to Kubuntu 12.04 LTS and migrated the application to Eclipse Kepler (which I downloaded and installed from the Eclipse website). It is using Java Compliance Level 1.6 and the target container is Tomcat 6. My problem is that I now receive the error: org.postgresql.util.PSQLException: ERROR: operator does not exist: integer = character varying when the application

EL and covariant return types

自作多情 提交于 2019-12-10 18:54:07
问题 i have these classes public abstract class Unit { public abstract UnitType getType(); ... } public class Item extends Unit { protected ItemType type; @Override public ItemType getType() { return type; } public void setType(ItemType type) { this.type = type; } ... } and obvoiusly ItemType extends UnitType . and i get: javax.el.PropertyNotWritableException: /WEB-INF/facelets/general.xhtml @23,165 value="#{bean.item.type}": The class 'com.example.Item' does not have a writable property 'type'. i

javax.el.ELException: Cannot convert [light, amber, brown, dark] of type class java.util.ArrayList to class [Ljava.lang.String;

风流意气都作罢 提交于 2019-12-10 17:24:30
问题 I am practicing the examples in Head First Servlets and JSP book. I am trying to create a simple tag which acts like html select tag. I have created the tld, tag handler and the rest of the servlets as well as the JSPs according to the examples given in the book. For reference please see page numebr 542. But, I am getting the above said exception. Any help will be greatly appreciated. TLD: <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP

nested el in jsf

心不动则不痛 提交于 2019-12-10 17:06:27
问题 I am having a problem with nested EL for <t:inputText> required Attribute. I am using tomahawk implementation. I have a dataTable with 2 columns of inputText. I have forceId=true for both the inputText boxes. When you look at view source of page, id's looks as postal[0] and zone[0] where postalCode and zone are the id's of textBox and the number 0 is the rowId of dataTable. My requirement here is zone inputText is required only when postal is not empty. I have written something like below

JSTL Condition with multiple operators

自闭症网瘾萝莉.ら 提交于 2019-12-10 16:14:55
问题 I am trying to write a condition in JSTL that has multiple operators. <c:if test="${!memberObj.provider && empty subscriptions or subscriptions eq false}"></c:if> The above doesn't execute correctly, because "empty subscriptions or subscriptions eq false" needs to be contained. I would expect to be able to do: ${!memberObj.provider && (empty subscriptions or subscriptions eq false)} But the jsp page goes blank when I do that. Which I am guessing means something is off... How can I combine