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
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
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Struts
Struts 2 Dojo autocompleter not working in Struts 2.0.14?
Ashu Jain
Ranch Hand
Posts: 73
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
I am able to implement autocompleter ( theme ajax) in
struts
2.1 but unable to do so in 2.0.14
It says "struts-dogo-tags" not found. I am refering to
http://struts.apache.org/2.0.14/docs/autocompleter.html
but there does not exist any jar for struts-dogo plugin in 2.0.14. Can you please suggest if it will work by including dogo plugin jar of 2.1. I can not change my application to struts 2.0
.
David Newton
Author
Posts: 12617
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
That's because the Dojo tags (which are deprecated as of Struts 2.1) aren't a plugin in Struts 2.0.
Ashu Jain
Ranch Hand
Posts: 73
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Does that mean that i can NOT use autocompleter theme ajax in 2.0.* at all.
I thought people used to implement autocompleter earlier as well. it is just dojo tags moved to another jar ( plugin of dojo tags ).
I want to implement autocompleter theme ajax in 2.0.*. How to do that without dojo??
David Newton
Author
Posts: 12617
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
It's in the core.
Ashu Jain
Ranch Hand
Posts: 73
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
But it does not seem to be working in 2.0.x
HelloWorld.java
package example; import java.util.*; /** * <code>Set welcome message.</code> */ public class HelloWorld extends ExampleSupport { private Map<String,String> cities; public String execute() throws Exception { cities = new HashMap<String,String>(); cities.put("TEST","FIRST"); cities.put("TEST2","SECOND"); //setMessage(getText(MESSAGE)); return SUCCESS; } public Map<String,String> getCities() { return cities; } public void setCities(Map<String, String> cities) { this.cities = cities; }
ExampleSupport.java
package example; import com.opensymphony.xwork2.ActionSupport; /** * Base Action class for the Tutorial package. */ public class ExampleSupport extends ActionSupport { }
struts.xml is as follows::
<struts> <package name="example" namespace="/example" extends="struts-default"> <action name="HelloWorld" class="example.ExampleSupport"> <result>/example/HelloWorld.jsp</result> </action> <!-- Add actions here --> </package> <package name="Test" namespace="/example" extends="json-default"> <action name="TestWorld" class="example.HelloWorld"> <result type="json" /> </action> </package> </struts>
and HelloWorld.jsp
<%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib prefix="s" uri="/struts-tags" %> <html> <head> <title><s:text name="HelloWorld.message"/></title> <s:head debug="true" theme="ajax"/> </head> <body> <h2><s:property value="message"/></h2> <h3>Languages</h3> <ul> <li> <s:url id="cityTest" value="TestWorld" /> <s:autocompleter name="cities" theme="ajax" href="%{#cityTest}" showDownArrow="false" autoComplete="false" /> </li> </ul> </body> </html>
I have json plugin apart from struts core 2.0 in WEB-INF\lib
There is no error but it is still not working. What could be the problem.
David Newton
Author
Posts: 12617
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
See
ItDoesntWorkIsUseless
.
Turn the Ajax debugging on, also see if it says anything in the Firebug console.
I also edited your question's subject to make sense. See
UseAMeaningfulSubjectLine
.
My name is Inigo Montoya, you killed my father, prepare to read a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Struts 2 Autocompleter
Autocompleter
Autocompleter - NoSuchMethodException
Struts Dojo autocompleter
jquery + struts2 => JSON autocompleter example?
More...