Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/ELExpressionValidator.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/ELExpressionValidator.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/ELExpressionValidator.java
index 7eecb4cc9..c26a561cd 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/ELExpressionValidator.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/el/ELExpressionValidator.java
@@ -65,6 +65,11 @@ public class ELExpressionValidator
*/
public ASTExpression validateXMLNode()
{
+ //Bug 325496 - [JSF2.0] False warning from facelet validator for the attribute value #{resource['lib:file']}
+ if (isELResourceReference(_elText)) {
+ return null;
+ }
+
JSPELParser elParser = JSPELParser.createParser(_elText);
// =
try {
@@ -115,6 +120,23 @@ public class ELExpressionValidator
return null;
}
}
+
+ private boolean isELResourceReference(String elText) {
+ boolean isResource = false;
+ //does EL contain enough chars?
+ if (elText != null && elText.length() > 8) {
+ //does EL begin with "resource[" and end with "]"?
+ if (elText.toLowerCase().startsWith("resource[") && //$NON-NLS-1$
+ elText.endsWith("]")) { //$NON-NLS-1$
+ //is project JSF 2.0 or greater?
+ if (ELValidationUtil.isProjectEL22(_context)) {
+ //if all above is true, EL is a resource reference
+ isResource = true;
+ }
+ }
+ }
+ return isResource;
+ }
/**
* @return the type of the expression or null if

Back to the top