Forum


18:55

31/08/2011

Hi guys,
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 /blog/?page_id=393/help/strut2-jquery-plugin-grid-table-2-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>
and in my Category.jsp
<%@ taglib prefix="s" uri="/struts-tags"%>
<s:select list="category" theme="simple"/>
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
Most Users Ever Online: 715
Currently Online:
80 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66