I want to create links using database columns. I have a backing bean where I 'm connecting to the database. There is no problem with the connection and also no problem ... |
I got this error:
cannot access javax.el.ELContext
class file for javax.el.ELContext not found
I'm using Tomcat 6.0.20 and Mojarra JSF 1.2_13-b01-FCS. What class am I missing? Please help.
|
I've read some time ago about the difference in 'Core JSF' but now I can't find that place.
Nevertheless I don't remember that there was a word about cases when we ... |
I'm doing a project which is going to run on Websphere.
I'm using JSF/Facelets/Richfaces for this project.
I want to use the JBoss EL implementation as it allows calling methods with parameters from ... |
I noticed this behaviour of JSF EL.
1.
<h:panelGroup rendered="#{!admissionBean.requestStatus=='PR'}">
..some buttons without rendered attribute
</h:panelGroup>
2.
<h:inputText size="6" value="#{dimension.newWeight}" disabled="#{admissionBean.requestStatus=='PR'}"></h:inputText>
1 is not rendered.
2. text box is not disabled.
How can both happen together? textbox not disabled means ... |
Please see this Expression Language
styleClass="#{obj.validationErrorMap eq null ? ' ' :
obj.validationErrorMap.contains('key')?'highlight_field':'highlight_row'}"
Even if the map is null, highlight_row style is getting applied.
So I changed to ... |
I have a DataModel which has plan names and some other attributes.
I have different plans - gold , silver etc.
But I dont want to display Gold or Silver as it is. ... |
|
I have to call Javascript funtion based on the bean value. i use the following code
onmouseover="#{occasionBean.user.userPreference.defaultPreview==true?'':'Tip()'})"
I need to send some parameters in Tip() like this
Tip('<img src="pics/image.jpg" width="60">')
Error ... |
I need to have resource messages that contain EL expressions be resolved when loaded from a ResourceBundle. Basically I have a number of properties files containing the text. Some of the ... |
I can't find any resources which can answer why I'm getting an error with this:
oncomplete="#{MyBacking.oError ? #{rich:component('oErrorPanel')}.show() : return false;}"
in a richfaces a4j:commandButton. oError is referring to a method in ... |
I want to have a generic menu in my jsf (myfaces 1.2) application.
<h:form>
<h:dataTable id="dt1" value="#{portal.actionList}" var="item">
<f:facet name="header">
<h:outputText ...
|
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 ... |
How can the JSF implicit objects be access via expression language?
For example, if I wanted to determine what roles the current principal is associated with, how could I do this?
|
My JSF2 application is fully internationalized, using a ResourceBundle.
Now i have a lot of Javascript-code, which does some alerts and stuff. There i would like to access my ResourceBundle. I ... |
I have a JSF2 application that renders a large table with complex content. Unfortunately, each request takes up to 6 seconds to process. Using simple debug output inside a phase listener, ... |
I got a simple setup (and a big issue): a JSP page with en empty panel grid item container and a binding to a bean.
<h:panelGrid binding="#{ bean.container }" id="container" />
When the ... |
Is this just an API defined by Java, to be implemented by (say) servers, or the JRE includes the implementation too?
Thing is that I was trying to concatenate two strings using ... |
This works :
<h:outputText value="Active Locale : " />
#{view.locale}
But how can i achieve something like this with EL ?
<h:outputText value="Active Locale Decimal Separator : " />
#{new DecimalFormat(view.locale).decimalFormatSymbols.groupingSeparator}
|
I am starter on JSF and have trouble with invokation of arbitrary methods via EL.
According to what I read version 2.1 of the Unified Expression Language, included in Java EE 6, ... |
<table>
<tr>
<td>INDEX</td>
<td>ID</td>
<td>RACE</td>
...
|
I have been using expressions like this in JSF 1.2: rendered="#{foo.bar!=null && !foo.isBar}". However in JSF 2.0 I've found this doesn't work, and rendered="#{foo.bar!=null and !foo.isBar}" comes out to be the ... |
I am trying to validate a inputText box based on the selection of a CheckBox as shown below.
< <h:inputText required="#{param[facesContext.externalContext.response.namespace'form:checkBoxId']}"> >.
The issue is as you see, the component ... |
I'm trying to use Cufon js lib. to display specific font on web page.
jQuery is used also.
<script language="javascript" src="resources/js/cufon-yui.js"/>
<script language="javascript" src="resources/js/Salaryman_400.font.js"/>
<script type="text/javascript">
Cufon.replace('.menu-text');
</script>
if link text obtained with EL ... |
I have a menu item that I want to show/hide only if the user has certain roles.
I'm using the rendered attribute for this, but I'm stuck on something. This works ... |
<h:inputText rendered="#{bean.myStringVariable [is numeric]}"
id="myID"
value="#{bean.myStringVariable}"/>
Is it possible to have an expression in the rendered element that says render only if the contents myStringVariable is a ... |
Code
<c:if test="#{attr1 && !attr2 && (empty attr3)}">
Error returned
The entity name must immediately
follow the '&' in the entity
reference.
I simply need to check if attribute 1 is ... |
I have a form with a combo box populated like this:
<f:selectItems value="#{programHandler.validLanguages}"
var="languageConstant"
itemLabel="#{languageConstant.value}"
itemValue="#{languageConstant}" />
I also have a message bundle defined:
<f:loadBundle basename="MessageResource" var="msg" />
My question is, my problem is the ... |
Hi
I'm trying to test jsf's navigation rules.
My Person bean:
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
@ManagedBean
@SessionScoped
public class Person {
private int id;
private String name;
private ...
|
I've found the instanceof operator in JSF EL, but it throws an exception when used. It's obviously reserved but not implemented? When will it (probably) be available, if not already in ... |
Are there short circuit operators for Expression Language used in JSF, JSP?
I mean &&,|| Java analog,when if it's obvious that further evaluation of boolean has no sense, that evaluation is ... |
what is the best way to bind a datacolumn to a property that might or might not exist in the datasource?
This happens for example when you have a class hierarchy where ... |
I have a generic EL producer that I've written to take advantage of WELD's ability to just 'make it work' when I need it done, and even have the type coercion ... |
In external style sheets of my current JSF project, there are hard-coded links to external resources like
.someId { background-image:url(/context/resources/images/example.jpg); }
In the JSF xhtml documents, I could use EL expressions like ${request.contextPath} ... |
I have been hitting my head against the wall with this one for few hours already and I dont have a clue why this is happening...
Recently we have began process of ... |
I'm using JSF 2.0.
Is there a way to make this code work?
<ui:repeat value="#{theBean.tabList}" var="tab">
<h:panelGroup rendered="#{theBean.chose == tab.tabHash}">
<h:outputText value="TESTING #{tab.tabName} ...
|
Is EL-parsing of children to elements with rendered="false" really supposed to be evaluated? This is causing me alot of trouble with null pointer exceptions and similar. Looking at the following example:
<p:tab ...
|
I have a datatable which provides objects from a list. Within this data table I would like to use a tag like p:columns(primefaces) which provides strings from a list that represent ... |
i have a problem when i run a page.jsp :
Exception while calling encodeEnd on component : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /compteListe.jsp][Class: javax.faces.component.html.HtmlDataTable,Id: j_id_jsp_1879226420_1][Class: javax.faces.component.UIColumn,Id: j_id_jsp_1879226420_2][Class: javax.faces.component.html.HtmlOutputText,Id: j_id_jsp_1879226420_4]}
Caused by:
org.apache.jasper.el.JspPropertyNotFoundException - /compteListe.jsp(29,13) '#{l.Identifiant}' ...
|
How can I concatenate the name of a property using the EL?
This is what I tried:
<ui:repeat value="#{someBean.getParts()}" var="part">
<h:inputTextarea value="#{someOtherBean.result}#{part}" /> ...
|
My inputname.jsp file
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<html>
<head>
<title>enter your name page</title>
</head>
<body>
<f:view>
<h1>
<h: outputText value="JSF 1.2 Tutorial"/>
</h1>
<h:form id="UserEntryForm"> ...
|
I'm having a problem with one of my custom JSF components. My component is called inputTextCustom.
In one of the pages that uses this custom component, I have :
<s:inputTextCustom length="400px"/>
And within ... |
I have the following code:
<ui:repeat var="_shipment"
value="#{_order.orderShipmentList}">
<h:selectOneMenu value="#{_shipment.shipmentMethodCode.id}">
<f:selectItems id="selectShipList"
value="#{consoleContext.shipmentMethods}" />
</h:selectOneMenu>
</ui:repeat>
In the f:selectItems value attribute I want to add #{_shipment.shipmentMethodCode.id} - ... |
I'm having some problems with JSF.
It look like deferred evaluations (eg. #{bean.property} do not get resolved. Immediate evaluations (eg. ${bean.property}) seem to work fine.
The following JSF page:
<!DOCTYPE html PUBLIC ...
|
I have imported login example project from Jboss Weld examples into NetBeans IDE 7.0. Application works great on GlassFish 3.1. But the IDE seams to fail. The code completion doesn't work ... |
I have a JSF 1.2 application which I intend to deploy to Weblogic 10.3.4. At local Tomcat environment it works fine. But when I try to deploy it to weblogic I ... |
Im new to JSF 2. My question is related to BalusC's answer to this question jsf2 ajax update parts based on request parameters I tried the kickstart code BalusC ... |
Folks, I'm finding that with a test value of 1 minute expiry in web.xml the following code redirects to the given url immediately when the page is rendered:
<meta http-equiv="refresh" ...
|
I'd like to know if there's a way to bind the returned value of a method into a JSF component.
I'll explain myself better.
Let's say I have a class like this:
public class ...
|
Is it possible to nest variable calls like below in EL using FacesContext or other implicit objects like request, session, etc.? This of course is not working. I get this ... |
My question is straightforward as you can see.
What is the difference between #{...} and ${...} in EL Syntax?
|
I'm using @ResourceDependency annotation in a JSF component to add Javascript and CSS files into my JSF page.
In my Javascript file, I need to reference another resource file (a .swf file, ... |
I often want to declare conditional CSS style-classes for components if a certain condition is met. If the condition is not met, then no style should be added. I usually do ... |
is it possible to pass a method in an EL expression?
I have one bean and two views. The second view has a button but which method the button triggers should be ... |
I would like to use a property of a form element instead of using an additional function to just return a certain value.
Current situation
XHTML file:
<h:commandLink action="#{menuBean.navigationAction(menuItem)}" ... >
Managed Bean behind it:
public ...
|
I'm using dynamically created links:
<h:link outcome="/page" value="#{name}">
<f:param name="name" value="#{name}"/>
...
|
Is it possible to cast using EL?
I've got a class Vehicle, and two other classes Car and Bus that extends Vehicle.
I'm searching for all Vehicles and there's some data that has ... |
We recently upgraded from WebSphere Portal v6.1 to v7.0 and in the process we now have JSF 1.2 available. Creating a new Portlet project in Rad 8 creates a faces-config.xml with ... |
I have some code as follows:
<f:loadBundle basename="messages.application" var="prop" />
<ui:param name="currentUserAttr" value="#{prop['currentUser']}" />
// currentUserAttr=currentUserVal
<h1>Welcome #{sessionScope.currentUserAttr.name}</h1> // should be evaludated to sessionScope.currentUserVal.name
I want to get the value of currentUserAttr then when reading ... |
I would like to make an OR condition in this menu :
<li class="#{facesContext.viewRoot.viewId == ('/company/team.xhtml' or '/company/partnerships.xhtml' ) ? 'active' : '' }"><a class="item" href="company/company.xhtml">Company</a>
<ul>
...
|
The following JSF code contains two separate <c:if></c:if>. Let's look at it.
<?xml version='1.0' encoding='UTF-8' ?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jsp/jstl/core">
...
|
I am trying to write a expression with the unified expression language in JSF that states that, if an image is not empty, then use it otherwise use a default one. ... |
I have a value attribute:
value="#{mgdBean.directory}\\ #{mgdBean.file}"
I need to trim the white space between directory and file name so that the value appears as:
Directory\File.
I cannot remove the white space ... |
|
|
I'm using Hibernate to insert/select data from a database. I have a JavaBean class 'Product' that has the getters/setters that Hibernate uses to insert and get data with. My problem is, when I get the data back from Hibernate, I create a list to store the records in, then pass that list back to the JSP as an attribute. I can ... |
|
|
I'll let you in on a secret. All this stuff is handled by the Apache beanutils, which is a general-purpose library that allows you to do an extended set of the kinds of functions that Java's introspection mechanism supports. It also supports accessing data via expressions such as the ones you've listed. You can find details about beanutils at http://jakarta.apache.org/commons/beanutils/ . ... |
|
|
Hi Thank you for reading my post. I do not know what is wrong but its two day that i get the above error. here is the complete stack trace of log files. Jan 13, 2007 12:52:43 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener java.lang.NoClassDefFoundError: javax/el/ELException at com.sun.faces.application.ApplicationFactoryImpl.getApplication(ApplicationFactoryImpl.java:94) at com.sun.faces.config.ConfigureListener.application(ConfigureListener.java:402) at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:444) at ... |
|
Hi guys, I have a page with a Richfaces datatable that has a column for dynamic actions (command links) depending on the type of data in each row. I'm trying to use an EL expression to determine which actions to display. JSP: |
Hello, I have the following problem with Richfaces + Facelets: java.lang.NullPointerException at javax.el.BeanELResolver$BeanProperty.read(BeanELResolver.java:259) at javax.el.BeanELResolver$BeanProperty.access$000(BeanELResolver.java:209) at javax.el.BeanELResolver.getValue(BeanELResolver.java:60) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53) at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72) at org.apache.el.parser.AstValue.getValue(AstValue.java:118) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71) at javax.faces.component.UIOutput.getValue(UIOutput.java:184) at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861) at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:286) at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262) at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:79) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592) at org.restfaces.application.RestViewHandler.renderView(RestViewHandler.java:148) at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108) at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) ... |
I've been working on an application and everything has been running fine. Suddenly, a few days ago, I'm getting an exception thrown: Aug 28, 2008 1:06:33 PM com.sun.facelets.FaceletViewHandler handleRenderException SEVERE: Error Rendering View[/index.xhtml] javax.el.PropertyNotFoundException: Property 'logout' not found on type com.company.product.controller.LoginController at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193) at javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:170) at javax.el.BeanELResolver.property(BeanELResolver.java:279) ... It's kind of odd that "logout" is being referred to as a property ... |
|
I think you can get a copy from the Maven repositories or the jakarta website. But as Ulf noted, it's built into newer web application servers. A fact I learned the hard way when I switched over and had conflicts in the app I was using that had bundled the el jars into the WAR. Since this is the JSF forum, ... |
|
Hi all, I have two command buttons on my jsp, which I should show or hide based on the user action for which I have set a property in by backed bean. i am using the rendered tag for this, the logic works fine I mean the buttons are displayed accordingly, but one of the button does not work having the ... |
A lot of times, a database will end up with the actual text word "null" in a column after a binding mechanism has been used to edit the table row. That happens when the display mechanism pushed the word "null" out to the user form and the user then sent it back. There's a big difference between no value (null) and ... |
|
|
I am trying to use jsf el to to a conditional statement in my faces-config.xml file. #{ (currentUserRole.userInSecureRole==true) ? agsws3 : agsws0} works perfectly the problem is the next line needs to be #{ (currentUserRole.userInSecureRole==true) ? #{agsws3} : #{agsws0}} which of course doesnt parse basically if it fails check it needs to be agsws0 #{agsws0} and if it passes agsws3 #{agsws3} ... |
|
|
|
Hello I'm just starting to write my JSF application. It is ment for a school project so it's supposed to stay as JSF-way as possible. So my problem is: <%! private / public String foo; %> <% foo = "bar"; %> Compiler says that the value for a foo is eighter null or don't render the ... |
|
|
|
|
|
|
|
|
Hi all, I have 2 text fields and one select drop down. The logic is that if i change the value in one text box the value in the other text box needs to be changed automatically based on a logic implemented in a method in the controller and vice versa. Code for Percentage text field |
|
I don't have the source code on this notebook, but the ui:repeat-part seemed to work fine, it was the concatenation that didn't work. Do you see anything wrong there? I called "getParts()" because it isn't a property in sense of having a getter and setter. It was just a method that provides me a list. (Which is always the same anyway.) ... |
|
hi, My inputname.jsp file <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> enter your name page My welcome.jsp file <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> ... |