In my Edit Grid functionality my dropdown menu is unable to populate data and i still cannot resolve even though i was looking at this thread http://www.trirand.com/blog/?p…..-questions . So I need your help as I my new to this. Basically in my Action class
public class CategoryAction extends ActionSupport {
private static final long serialVersionUID = 3643090482804105068L;
private List<String> category;
public String execute() throws Exception{
generalDelegate util = new generalDelegate();
category = util.retrieveCategory();
System.out.println("+++++++++");
return "success";
}
public List<String> getCategory() {
return category;
}
}
The category return the following result [Toothpaste, Body Bath, Shampoo, Shaver Cream, Hand Soap, Facial Wash, Hair Dressing] In my Struts.xml
<action name="jsonCategoryAction" class="general.CategoryAction">
<result type="json" name="success">Category.jsp</result>
</action>
while lastly my Main.jsp
<s:url id="selectCategoryUrl" action="jsonCategoryAction" />
<sjg:gridColumn
name="category1″
index="category1″
title="Item Category"
sortable="true"
editable="true"
edittype="select"
editoptions="{ dataUrl : '%{selectCategoryUrl}' }" />
Pls guide me where did i go wrong…. Thanks a lot