Salutations,Java Expression Language: Interpolation?
Dans le webapplication je développe, je veux faire quelque chose comme suit:
J'ai un Bean comme
class Gene{
String geneid;
String sequence;
..
}
// EL expression (sometimes should be simple as "${geneid}" without URL pattern)
String exp="<a> href='http://www.ncbi.nlm.nih.gov/pubmed?term=${geneid}' />";
String outputString=someframeworkobject.somemethod(exp,aGeneInstance);
Ainsi, le outputString est interpolée comme: http://www.ncbi.nlm.nih.gov/pubmed?term=gene19191X
Existe-t-il des structures EL légères que je peux utiliser pour cela?
Pour ajouter ma propre question: Peut-on appeler le JSP EL (qui serait un ajustement ici) à partir du code Java? – Thilo
Je suis tombé sur Apache Common JEXL et Commons EL.Mais je ne sais pas comment je peux résoudre ce –
voir aussi http://stackoverflow.com/questions/1133660/open-source-expression-engines-java – Thilo