Hi there! Another fun JSF related question. I want a nested el:
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 Oechslin |
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. ManagedBean:
JSF:
THX to Raphael Bürgin answered 28.11.2013 at 09:06 Daniel Oechslin Glad I could help
(28.11.2013 at 13:20)
Raphael Bürgin
|
Use #{ivy.cms.co(data.sma.concat('/dialog/lblInputtext'))} answered 26.11.2013 at 22:07 Reto Weiss ♦♦ 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
1
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
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. Example: <p:outputlabel value="#{ivy.cms.co('/dialog/lbInputtest')} #{data.sma}"/>
(27.11.2013 at 13:54)
Reto Weiss ♦♦
|
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 26.11.2013 at 16:53
Seen: 3,675 times
Last updated: 28.11.2013 at 13:20
Nesting EL expressions is illegal syntax. You should see the #{} as one big space where variables/strings can interact with each other.
THX for the hint!