This is very simple, which I'm unable to do the simple variable display task.
I am getting one dynamic value where I'm assigning it to one variable. If I try to print the variable value it is printing as shown below,
<%=columnName%>
But When I try to assign the same value in the tag attribute, the value is not updated with tag name. code is shared below.
<aui:input name="preferences--<%=columnName%>--" type="checkbox"/>
Issue:Assume the variable value is 'screenname'. If I print the value <%=columnName%> then it is printing the value "screenname" on ui. Bhen I use the same variable in the name attribute it is showing the value as <%=columnName%> instead "screenname".
Note: This is the preferable format for name attribute with prefix as "preferences--" and suffix as "--".
Please correct my syntax and suggest me that which will print the variable value in the tag attribute
It seems that you cannot use mixed Strings having a string and scriptlet inside aui tags. http://www.liferay.com/community/forums/-/message_boards/message/16694386
can you try below
<% String tempColumnName="preferences--"+ columnName+"--" ; %>
<aui:input name="<%=tempColumnName%>" type="checkbox"/>
Also, try avoiding use of scriptlets :)