0

Sometimes EL expressions go too long or otherwise I am forced to truncate names of my beans to make the EL easily readable. I was just wondering if there is a way I could give my long 4-5 level deep EL expressions just a simple alias or a variable name ? so that I could use that instead of repeating the whole expression repeatedly on page ?

I am truly frustrated with repeating long ELs like this:

#{profilesInteractionManager.profile.quickIntro.specializationAreas}
#{profilesInteractionManager.profile.quickIntro.interestAreas}

I was wondering if I could just do this instead:

#{prf.specializationAreas}
#{prf.interestAreas}

Is there any way to do this ?

Rajat Gupta
  • 25,853
  • 63
  • 179
  • 294

1 Answers1

2

How about using a ui:parm. e.g.

<ui:param name="quickIntro" value="#{profilesInteractionManager.profile.quickIntro.}" />

and then use: #{quickIntro.specializationAreas}, etc

zargarf
  • 633
  • 6
  • 18