Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Last week, we had the author of
TDD for a Shopping Website LiveProject
. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See
for the agenda and registration link
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Paul Clapham
Ron McLeod
Jeanne Boyarsky
Tim Cooke
Sheriffs:
Liutauras Vilda
paul wheaton
Henry Wong
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Carey Brown
Frits Walraven
Bartenders:
Piet Souris
Himai Minh
Forum:
Struts
Autocompleter Struts2 not working for me:: Please help
Ashu Jain
Ranch Hand
Posts: 73
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
My struts.xml is as follows::
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <package name="example" extends="struts-default"> <action name="HelloWorld" class="example.HelloWorld"> <result>/example/HelloWorld.jsp</result> </action> </package> <package name="test" extends="json-default"> <action name="Login" class="example.Login"> <result type="json" ><param name="root">testingMap</param></result> </action> <!-- Add actions here --> </package> </struts>
HelloWorld.java is as follows::
package example; import java.util.*; public class HelloWorld extends ExampleSupport { private String test; private List<String> testingMapKeys; public String execute() throws Exception { test = "test"; return SUCCESS; } public String getTest() { return test; } }
Login.java is as follows::
package example; import java.util.*; public class Login extends ExampleSupport { private Map<String,String> testingMap; public String execute() throws Exception { testingMap = new HashMap<String,String>(); testingMap.put("TREE","DEL"); testingMap.put("HELLO","MUM"); return SUCCESS; } public Map<String,String> getTestingMap() { return testingMap; } public Map<String,String> getTestingMap() { return testingMap; } }
My HelloWorld.jsp is as follows::
<%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib prefix="s" uri="/struts-tags" %> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %> <html> <head> <title><s:text name="HelloWorld.message"/></title> <sx:head debug="true"/> </head> <body> <h2><s:property value="message"/></h2> <h3>Languages</h3> <ul> <li> <s:url id="url" action="HelloWorld" /> <s:a href="%{url}">Espanol</s:a> <s:url id="cityTest" action="Login" /> <sx:autocompleter name="testingMap" href="%{#cityTest}" showDownArrow="false" autoComplete="false" /> </li> </ul> </body> </html>
It is not working for me. Please help
Of course, I found a very beautiful couch. Definitely. And this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
autocompleter tag...not working out. Please help S2
Struts 2 Dojo autocompleter not working in Struts 2.0.14?
Interceptor messes up action class in Struts2
struts2 properties file reload
S2: autocompleter - how to populate a list based on user's input?
More...