我試圖填充另一個控制器的下拉列表。我有DeviceController有一個@ Html.DropDownList被填充。最初我有在控制器中填充DropDown的代碼。現在我正試圖將它移到指定用於下拉菜單的控制器。所以我有代碼在一個位置填充下拉列表,而不是多個控制器中的相同代碼。下拉正確加載,當我有它在,不過原來的控制器,當我移動它的下拉控制器我收到以下錯誤There is no ViewData
我已經爲了調用使用Spring MVC一個javascript表單JSP嘗試不同的方法來調用JSP JavaScript中,所有的失敗: Spring MVC – How to include JS or CSS files in a JSP page Spring MVC 4.2.2 – Best way to Add/Integrate JS, CSS and images into JSP