generics - jsf el expression to build methodname -


is possibile build methodname variable value?

<c:foreach value="#{db.pojo.classlist}" var="v">    <c:foreach items="#{db.pojo.methodnameslist}" var="o">      <c:set var="superman" value="#{o}" />      #{v.[superman]}    </c:foreach> </c:foreach > 

... database.entity.list list of generic classes.

list<?> list.. 

i can use generic class if know methodname.

 <c:foreach value="#{db.pojo.classlist}" var="v">      #{v.value}  </c:foreach > 

#{v.[superman]} 

punch period.

#{v[superman]} 

that <c:set> unnecessary, way.

#{v[o]} 

i use more self-documenting variable names though. e.g.

#{bean[property]} 
#{entity[field]} 

see also:


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -