0

My JSP has aui input-move-boxes. I am selecting values from the predefined List and Passing it to the relevant Portlet Controller.

JSP Code

<%
List<KeyValuePair> leftList = new ArrayList<KeyValuePair>();
leftList.add(new KeyValuePair("1","One"));
leftList.add(new KeyValuePair("2","Two"));
leftList.add(new KeyValuePair("3","Three"));
List<KeyValuePair> rightList = new ArrayList<KeyValuePair>();
%>
<form>
    <input type="text" name="unm"/>
    <aui:input name="values" type="hidden" />

    <liferay-ui:input-move-boxes
        leftBoxName="availableValues"
        leftList="<%=leftList %>"
        leftReorder="true"
        leftTitle="available"
        rightBoxName="selectedValues"
        rightList="<%=rightList %>"
        rightTitle="selected"
    />
</form>

<aui:script use="liferay-util-list-fields">
A.one('#<portlet:namespace/>fm').on('submit', function(event) {
    var selectedValues = Liferay.Util.listSelect('#<portlet:namespace/>selectedValues');
    A.one('#<portlet:namespace/>values').val(selectedValues);
    submitForm('#<portlet:namespace/>fm');
});
</aui:script>

Portlet Controller

method(request, response){
String[] sf = ParamUtil.getParameterValues(request,"values");
//getting sf length 0 
}

I am successfully fetching other input values except aui input-move-boxes values.

Please help me out...Any help would be appreciated...!!!

Vinita Shah
  • 118
  • 2
  • 13

0 Answers0