el Questions

5

Solved

I'm doing a division in a JSP and I'd like to round the result - how should I do this? i.e. <c:set var="expiry" value="${(expire.time - now.time) / (60 * 1000)}"/> ...how do I round th...
Armil asked 18/9, 2009 at 9:12

6

Solved

Is there any way to call toString() on an object with the EL and JSTL? (I need the String representation of an enum as index in a map in a JSP EL expression.) I hoped something like ${''+object} wo...
Sarita asked 21/5, 2010 at 16:20

4

Solved

I'm trying to retrieve attribute values set by a servlet in a JSP page, but I've only luck with parameters by ${param}. I'm not sure about what can I do different. Maybe its simple, but I couldn't ...
Gut asked 5/6, 2012 at 13:39

4

Solved

I have a web app, where I have different navigation anchor tags such as Home, Profile and etc. What I want: When I press anchor tags like home or profile. I just want to ensure that current user ...
Classieclassification asked 1/5, 2011 at 18:13

2

I am getting EL parsing exceptions when doing this in my JSP: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt"%...
Paramilitary asked 12/5, 2011 at 21:25

9

Solved

I'm new to JSP. I tried connecting MySQL and my JSP pages and it works fine. But here is what I needed to do. I have a table attribute called "balance". Retrieve it and use it to calculate a new va...
Skeie asked 18/6, 2011 at 10:58

8

Solved

I'm trying to use Freemarker in conjunction with jQuery Templates. Both frameworks use dollar sign/curly brackets to identify expressions for substitution (or as they're called in freemarker, "int...
Aspiration asked 5/3, 2011 at 23:47

4

Solved

How do I check two conditions in one <c:if>? I tried this, but it raises an error: <c:if test="${ISAJAX == 0} && ${ISDATE == 0}">
Hafler asked 2/12, 2011 at 11:40

3

Solved

I'm passing a parameter p1 to another page page.xhtml: <ui:include src="page.xhtml"> <ui:param name="p1" value="#{someObject}"/> </ui:include> Is this possible to evaluate #{p...
Microtome asked 22/1, 2013 at 13:36

2

Solved

I would like to declare a conditional method expression in EL like below: <p:dataTable id="#{cc.attrs.datatableId}" var="overview" rowSelectListener="#{cc.attrs.detailsMode == 'single' ? cc.a...
Maplemaples asked 25/3, 2011 at 14:35

2

Whenever doing <c:set var="name" value="1"/>, #{name} is always a String as evidenced by #{name.class}. Is there any way to in a JSF/Facelets context to set a scoped attribute that is an In...
Arrhythmia asked 17/3, 2010 at 17:33

2

Solved

How can I make a formatted output for a number (e.g. long or BigDecimal) in EL? For example, I want to limit a number of decimal digits to 3 in ${result.returnValue.contract.balance}
Oratorio asked 7/6, 2010 at 21:0

7

Solved

Is there a way to perform an instanceof check in EL? E.g. <h:link rendered="#{model instanceof ClassA}"> #{errorMessage1} </h:link> <h:link rendered="#{model instanceof ClassB}"&...
Amarillis asked 25/4, 2012 at 10:55

3

Solved

When we can access all the implicit variables in JSP, why do we have pageContext ? My assumption is the following: if we use EL expressions or JSTL, to access or set the attributes we need pageCon...
Kleeman asked 17/9, 2010 at 12:45

2

Solved

I have run into a weird situation. I have an application which was originally developed in RAD and uses a construct like rendered="#{bean.show and user.can('foo')}" Our developers use mix of RAD...
Disaccredit asked 19/2, 2015 at 12:1

2

Solved

Normally I would do: Function<Integer, Integer> a = b -> b * 2; System.out.println(a.apply(3)); // prints 6 I was amazed to see that following EL expression works: ${a = b -> b * 2;...
Ursula asked 23/2, 2018 at 13:47

1

Solved

I am using Thymeleaf 3 within a Spring Boot application. Currently I am in a situation where I want to use a message expression inside an EL expression (Spring EL). First use case: trim the messag...
Alee asked 12/1, 2018 at 17:16

3

Solved

How do I show JSF components if a list is not null and it has a size() > 0?
Woundwort asked 3/5, 2013 at 13:59

5

Solved

How do I get the promoPrice variable to print as part of the string ONLY $4.67? <c:set var="promoPrice" value="4.67" /> <p>${(promoPrice != null) ? "ONLY $${promoPrice}" : "FREE"}</...
Kato asked 9/6, 2011 at 18:7

8

Solved

I am trying to integrate Spring into a JSF application. In faces-config.xml, I have included this: <application> <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolve...
Melancon asked 29/7, 2009 at 15:16

1

Solved

First off in plain Html+css and no JS this is pretty easy to do : table { border-collapse: collapse; } tr { border: solid black 1px; } td{ border: solid black 1px; } .outer-con...
Diaphanous asked 2/11, 2017 at 10:38

4

Solved

I want to do something like this: <display:table name="${summary${index}}"> But it does not work throws exception: "${summary${selChrm}}" contains invalid expression(s). I would like the ...
Affined asked 28/6, 2010 at 2:31

2

Solved

I have a: <h:panelGroup /> <h:outputText value="title" /> <h:itemThatSometimesWillShow rendered="sometimes1" /> <h:itemThatSometimesWillShow rendered=&qu...
Furmenty asked 3/6, 2016 at 19:36

4

In EL expressions, used in a jsp page, strings are taken literally. For example, in the following code snippet <c:when test="${myvar == 'prefix.*'}"> test does not evaluate to true if the ...
Dishpan asked 17/11, 2008 at 17:36

8

Solved

I have a List of beans, each of which has a property which itself is a List of email addresses. <c:forEach items="${upcomingSchedule}" var="conf"> <div class='scheduled' title="${conf.su...
Sangfroid asked 17/11, 2008 at 18:22

© 2022 - 2024 — McMap. All rights reserved.