Getting null value submitting my form to a new window using java script
<pre><code>function openWindowWithGraph(selectedItems){
            var i=0;
            var form = document.createElement("form");
            form.setAttribute("method", "post");
            form.setAttribute("action", "http://localhost:8080/cmonitor/app/solarPlant/showChart");
            form.setAttribute("target", "formresult");

            alert(selectedItems[0].solarPanel.id);
            for(i=0;i&lt;selectedItems.length;i++){
                var hiddenField = document.createElement("input");              
                hiddenField.setAttribute("name", "solarPanelIds["+i+"]");
                hiddenField.setAttribute("value", selectedItems[i].solarPanel.id);
                form.appendChild(hiddenField);
            }

            document.body.appendChild(form);
            window.open('','formresult','width=1000,height=1000,toolbar=no ');
            alert("hello");
            form.submit();
        }
</code></pre>

<p>here is my spring controller</p>

<pre><code>@RequestMapping(value="/showChart",method=RequestMethod.POST)
    public ModelAndView showChart(@RequestParam(required=false) Long[] selectedItemIds){
        System.out.println(selectedItemIds);  //getting null in controller
        return new ModelAndView("noHeader/solarPlant/chart");
    }
</code></pre>

<p>any kind of help will be greatly appreciated 
Thanks in Advance</p>
