why did you choose to use jquery rather than just normal struts select and let the action class create an array of objects (i use an object that has a key/value pair) i haven't used jquery but not sure what extra it adds. adam
---------------------------------------- > Date: Thu, 4 Mar 2010 04:29:15 -0800 > From: nani2ra...@gmail.com > To: user@struts.apache.org > Subject: Struts2 JQuery select box > > > Hi, > > I am trying to use http://code.google.com/p/struts2-jquery/ for loading > select box. > I just followed this link > http://www.weinfreund.de/struts2-jquery-showcase/index.action#. > > Every thing is executing fine. > But the list not loading properly. > I am new to JSON. > > I changed below jsp page which was working fine with normal select box. > > my code is > > JSP > > > > > > > > >> theme="simple" cssClass="form1"> > > Product Master Description Details > > > > > > > > readonly="true"/> > > > > > readonly="true"/> > > > > > >> listKey="prodcat" listValue="prodcat_desc" > key="prodmDatPm.website_category" > value="prodmDatPm.website_category"> > > > > > > > > Above jsp got almost 100 fields. I just trancated it. > > > Action: > > > import java.util.ArrayList; > import java.util.List; > > import org.apache.struts2.convention.annotation.Action; > import org.apache.struts2.convention.annotation.Actions; > import org.apache.struts2.convention.annotation.ParentPackage; > import org.apache.struts2.convention.annotation.Result; > > import co.za.xxx.ecm.actions.EcmAction; > import co.za.xxx.ecm.business.vo.masterFile.PmProdCat; > import co.za.xxx.ecm.service.productmaster.ProdmDatPmService; > > @ParentPackage(value = "pm-json") > public class JsonAction extends EcmAction { > > /** > * > */ > private static final long serialVersionUID = -3858830120549401006L; > > private List prodCatList; > private ProdmDatPmService prodmDatPmService; > > public List getProdCatList() { > return prodCatList; > } > public void setProdCatList(List prodCatList) { > this.prodCatList = prodCatList; > } > public ProdmDatPmService getProdmDatPmService() { > return prodmDatPmService; > } > public void setProdmDatPmService(ProdmDatPmService prodmDatPmService) { > this.prodmDatPmService = prodmDatPmService; > } > > @Actions( { > @Action(value = "/JsonAction", results = { > @Result(name = "success", type = "json") > }) > }) > public String execute(){ > System.out.println("This is execute method in json action calss"); > prodCatList = new ArrayList(); > prodCatList = prodmDatPmService.getProdCatList(); > System.out.println(prodCatList); > return SUCCESS; > } > > public String getJSON() > { > System.out.println("This is getJSon method in json action calss"); > return execute(); > } > } > > Struts.xml > > > > > > > > When jsp loading, its calling my action class. > Action class calling service class and loading list into prodcatList. > But its not getting into list box. > > Can anybody please explain whats the problem is. > > Thanks in advance > RS > -- > View this message in context: > http://old.nabble.com/Struts2-JQuery-select-box-tp27780125p27780125.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > _________________________________________________________________ Do you have a story that started on Hotmail? Tell us now http://clk.atdmt.com/UKM/go/195013117/direct/01/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org