Hi there! Another fun JSF related question.

I want a nested el:

<ui:param name="sma" value="#{data.sma}/dialog/lblInputtext')}" />
<ui:param name="smalbl" value="#{sma}" />
<h:outputText value="#{smalbl}" style="height: 300px; width:450px"/>

The output is the following:


I want exactly this output evaluated by jsf. It doesn't work when I put the result in #{} one more time. JSF prints out a warning due to wrong syntax.

Has anyone else tried to nest el's?

thx for help!

asked 26.11.2013 at 16:53

Daniel%20Oechslin's gravatar image

Daniel Oechslin
accept rate: 39%

Nesting EL expressions is illegal syntax. You should see the #{} as one big space where variables/strings can interact with each other.

(27.11.2013 at 08:41) Nikel Weis Nikel%20Weis's gravatar image

THX for the hint!

(27.11.2013 at 11:37) Daniel Oechslin Daniel%20Oechslin's gravatar image

I solved the problem using a ManagedBean. Concatenating the strings in the bean itself and reading it via EL-function call. I took this solution because I needed a value from the dialog-data-class and a value from the cms. This could not be solved in the JSF-Dialog due to the nested EL impossibility.


public String getCmsValue(){
        return Ivy.cms().co(getConcatenatedValues());


<h:outputText value="#{dialogBean.getCmsValue()}"

THX to Raphael Bürgin


answered 28.11.2013 at 09:06

Daniel%20Oechslin's gravatar image

Daniel Oechslin
accept rate: 39%

Glad I could help

(28.11.2013 at 13:20) Raphael Bürgin Raphael%20B%C3%BCrgin's gravatar image

Use #{ivy.cms.co(data.sma.concat('/dialog/lblInputtext'))}


answered 26.11.2013 at 22:07

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
accept rate: 74%

Hi this works if the two values are both stored in the CMS.

What if one value is stored in the data class and this value should get concatenated with something from the CMS?

How to do that? like data.sma is a value from the data class.

(27.11.2013 at 12:02) Daniel Oechslin Daniel%20Oechslin's gravatar image

In your way I've never tried. I always (outsource) nested EL. For a workaround you can try something like this: In the Javasource you can join cms Strings easily. public String getRoleName(){ return Ivy.cms().co("/ch/lepa/common/roles/" + role.getName() ); }

(27.11.2013 at 13:36) Raphael Bürgin Raphael%20B%C3%BCrgin's gravatar image

Not sure if I understand you right. You want to concat as string from the data class and one from the cms? Then you can use two el expressions the result of both expressions are concated.


<p:outputlabel value="#{ivy.cms.co('/dialog/lbInputtest')} #{data.sma}"/>

(27.11.2013 at 13:54) Reto Weiss ♦♦ Reto%20Weiss's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 26.11.2013 at 16:53

Seen: 2,717 times

Last updated: 28.11.2013 at 13:20