Unfortunately this didn't help me. It used deprecated dojo widgets. I spent the whole day yesterday trying to get this work. Finally gave up and am just loading the whole thing into memory. Here's what I ended up doing that is a temporary solution:
In header:
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>/
<script src="<%= request.getContextPath() %>/js/dojo-release-1.3.2/do
<script language="JavaScript">
dojo.require("dijit.form.C
dojo.require("dojo.data.It
dojo.require("dojo.parser"
</script>
B
<body class="soria">
Component:
<div
url="/btd/bugs/autoCompone
<s:tex
dojoType="dijit.form.Combo
searchAttr="name" name="searchComponent"
id="searchComponent" autoComplete="false" hasDownArrow="false"
/>
The autoComponents.action returns JSON string:
<%@ taglib prefix="s" uri="/struts-tags" %>
{
identifier:"key",
items: [
<s:iterator value="searchComponents" status="status">
{key:"<s:property value="key"/>", name:"<s:property value="name"/>"}
<s:if test="!#status.last">,</s:if
</s:iterato
]
}
Hope this helps someone out there. I can't believe that dojo doesn't have a google suggest option that supports onkey up. I think I may have to write one :-)
Thanks,
J
Main Topics
Browse All Topics





by: kadabaPosted on 2009-09-22 at 21:40:02ID: 25400073
http://today.java.net/pub/ a/today/20 06/04/27/b uilding-aj ax- with-do jo-and-jso n.html
you went through this?
>> but I need the list to change based on the letters the users types
you can call a function to fetch you the list on each key press.
Hope this helps.