Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: AUI hidden input
I currently have the following AUI input type as hidden in my JSP
I can use the original <input> tag successfully but can anyone tell me why <aui:input> won't evaluate to a dynamic name value??
Seems like it should be pretty simple, I'm using hidden <aui:input> with dynamic values and those seem to work..
<aui:input name="hapNeedDeferredNote_<%=n.getId()%>" value="" type="hidden" />
The "getId()" is not evaluating to it's value, when I do an inspect on the HTML element I see<input class="field" id="_khm_v2_WAR_KHMV2portlet_hapNeedDeferredNote_<%=n.getId()%>" name="_khm_v2_WAR_KHMV2portlet_hapNeedDeferredNote_<%=n.getId()%>" type="hidden" value="">
I can use the original <input> tag successfully but can anyone tell me why <aui:input> won't evaluate to a dynamic name value??
Seems like it should be pretty simple, I'm using hidden <aui:input> with dynamic values and those seem to work..
You need to do something like:
<%
String name = "hapNeedDeferredNote_" + n.getId();
%>
<aui:input name="<%= name %>" value="" type="hidden" />
Any reason why we need to do it that way? What does AUI do that makes this a problem?
Thanks for the info
Thanks for the info
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™