Hi everybody,
I'm in a project using Grails,
I user beanFields plugin where I'm changing the bean:inputTemplate into the following
<bean:inputTemplate>
<div class="prop ${hasErrors(bean:$beanName,field:'$fieldId','errors')}">${label}
<span class="value">${field}
</span>
</div>
</bean:inputTemplate>
As you can, I'm trying to use $beanName as the BeanName .. that is because beanFields passes beanName and fieldId and some more other properties to the inputTemplate tag..
But, the problem is that I can't do that.. And I'm really lazy and dont want to spend all the time copy and pasting the same field div and maintaining a huge file for that...
So, I will be really greatful if any could help in that situation.
I want to reference a variable inside the $ { } block of code, as in PHP there is $$variable that uses the value of the $variable as a name of a variable to evaluate.
Hope I was clear enought.. and thank you for helping.