Sunday, 15 June 2014

jsf - Expression language: Concat String with variable in method-call -



jsf - Expression language: Concat String with variable in method-call -

i have backingbean next method (signature):

public class sessionbean { ... public boolean subjectispermitted(final string permission); ... }

in jsf-template, want phone call method dynamically, this:

${sessionbean.subjectispermitted('company:manage:'company.id)}

well, concatenation within method-call throw com.sun.el.parser.parseexception. using "+" or "." concat string not help, too.

how concat string variable within el-method-call?

check other question:

combining string value of variable name of variable in el

according it, can use:

<c:set var="variable" value="company:manage:${company.id}" />

before:

${sessionbean.subjectispermitted(variable)}

and should work.

regards,

jsf

No comments:

Post a Comment