el

how to access a EL variable and pass it as an argument to a function in EL?

I want to call a function on a bean with an argument passsed to it in jsp using EL. The problem is it does not allow something like: "${teacherBean.certificationFor(${particularField})" the thing is i want to iterate over an array and call the function certificationFor for all the values in the array passed as an argument. I am getting ...

How to add custom VariableResolver to JSP Context in Jsp 2.0 to support special EL?

I'm building my own JSP Tag Library which need to support some features that Application developers can use like this: <w:user-label id="usrlb" value="${session.user}"/> <w:textbox id="tb" label="User Name" value="${usrlb.value.name}"/> which means I want my EL can interact with my Tag declaration. and also I need to add stack concept...

Should i use JSTL in JSF 2 xhtml pages?

Hi, I would like to bind a backing bean's field to the selected value of a selectOneListbox. This value could be null, so i want to convert this to 0. This will set the selected value to the "default" selectItem. I'm using JSF2 I'm planning to do this with the http://java.sun.com/jstl/core taglib (using <c:if test="#{empty...}>) My q...

Using JBoss EL with Websphere

Hey, 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 EL etc. ... usually this is accomplished by getting the JBoss EL jar and then putting this in the web.xml: <context-param> <par...

Advantages of OGNL usage over typical EL in Struts2

Say that I don't leverage OGNL to create my Struts2 web application and just purely uses typical el provided by Sun. What would be the downside of it? As far as I know, OGNL is a kind of expression which attempts to match the best matched value from ValueStack based on its current state. Could it also be achieved by just using EL alon...

using groovyxmlslurper from EL in JSP

I've been tasked with creating a JSP tag that will allow developers to pass a URI to an xml document, and have an object returned that can be navigated using EL. I have been using groovy and grails quite a bit so I thought of trying something like rval = new XmlSlurper().parseText(myXml); and throwing that into the request so that b...

What is a good resource for learning equivalent JSP, JSTL tags/EL, and Struts tags?

I'm looking to separate business logic from presentation in a project, but the business logic is written using a mixture of tag libraries. Are there any good resources for going from one taglib to another, converting Scriptlet code to EL and back, etc? ...

package javax.el does not exist

i'm using jre6/eclipse and importing javax.el.* the error package javax.el does not exist [javac] import javax.el.*; comes up. isn't this supposed to be part of java? can anyone tell me why this might be. thanks m ...

Expression Language in jsp not working

Hi I am new to jsp and using Expression language.I am using Eclipse Galileo with version 2.5 and tomcat6 server . I just want to ask that my simple expression language is not printing the vale like if i write ${1>2} which suppose to give false but it is displaying ${1>2} only when it renders the page. But when i am using <c:out value="$...

Regarding JSF Expression Language

Hi, 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. ...

Concatenate strings in JSF/JSP EL and Javascript

Hello, I'm having troubles with EL and javascript functions (JSF 1.2, Facelets, Richfaces 3.3.0GA). I have a page that includes another composition: <ui:include src="/pages/panels/examinationPanel.xhtml"> <ui:param name="prefix" value="new" /> And in my ui:composition I want to append the prefix to every id. For example: <rich:modalP...

null check in jsf expression language

Hi, 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 styleClass="#{empty obj.validationErrorMap ? ' ' : obj.validationErro...

Unusual error while using Expression language in JSP only for particular king of properties- Check this

Hi, I have this unusual scenario: I have a registrationVO with few properties and getter setters for that. For example city or bCity with their getter methods getCity() and getBCity() In JSP i tried to display the value of these properties using scriplets, <%=registrationVO.getCity()%> and <%=registrationVO.getBCity()%> , It works fine...

JSF - how to dynamically display values from messages.properties

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. Based on the locale, I want to display it from the messages.properties Here is my code snippet: <h:dataTable value="#{newMemberController.membershipModel}" ...

How to get EL (Expression Language) content assist (autocomplete) in JSP / JSP Tags in Eclipse?

Is there a way, via configuration, upgrade or a plugin to get content assist in JSP EL expressions? e.g. ${CTRL+SPACE ... or ${pageContext.CTRL+SPACE ... etc... ...

Can I access the values of an enum class from a JSP using EL?

I have an enum class USState. I would like to iterate through the states in a JSP. Is it possible to access a list of USStates without first setting such a list as an attribute? It seems that something as static as an enum should always be available, but I can't figure out how to do it. Here's what I'm looking for: (except working) ...

How can I access Java list elements from my client-side JavaScript code?

I have the following simple script, which I am using to dynamically create the list elements in a <ul> <script type="text/javascript"> function generate(){ var arr = new Array(); <c:forEach items="${articles}" var="a" varStatus="status"> $('#listitems').append( "<li>"+${a.title}+"</li>" ...

How to get a random number in JSTL?

I would like to get something like the next code generated in JSTL <c:choose> <c:when test="${random number is even}"> <div class="redlogo"> </c:when> <c:otherwise> <div class="greenlogo"> </c:otherwise> </c:choose> Thanks in advanced ...

el function with generic arraylist return type and with parameter

I want to return ArrayList<HashMap<String,String>> in EL function with three String argument. How to do that? ...

JSF/IceFaces Conditional Rendering

I am using Icefaces to conditonally render a component but it cant pick up the boolean: BeanCode: public boolean isEmpty(){ return true; } public int getCount(){ if (isEmpty()){ return 0; } return 1; } IceFaces <ice:panelGroup rendered="#{coverage.empty}"> //this doesnt work...