[ 
https://issues.apache.org/jira/browse/WW-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart closed WW-3347.
-----------------------------

    Resolution: Not A Problem
      Assignee: Lukasz Lenart

Please ask this question on "Struts Users Mailing List" 
<[email protected]>, please be informed that Dojo plugin is deprecated!

Regards
--
Lukasz

> autocompleter
> -------------
>
>                 Key: WW-3347
>                 URL: https://issues.apache.org/jira/browse/WW-3347
>             Project: Struts 2
>          Issue Type: Temp
>          Components: Plugin - Dojo Tags
>    Affects Versions: 2.1.8
>         Environment: windows vista,oracle 10g database
>            Reporter: Dasari Taraka Rajendra Prasad
>            Assignee: Lukasz Lenart
>
> based on a tutorial,i created an action called AutoCompleteCityAction and 
> configured in struts.xml like
> .....Action.java
> package ajaxstruts;
> import java.util.List;
> import java.util.Map;
> import java.util.HashMap;
> import com.opensymphony.xwork2.ActionSupport;
> public class AutoCompleteCityAction extends ActionSupport {
>   Map<String,String> json;
>   String city;
>   CitiesDAO  dao;
>   public Map<String, String> getJson () {
>     return json;
>    }
>   public void setJson (Map<String, String> json ) {
>     this.json = json;
>   }
>   public String getCity () {
>     return city;
>   }
>   public void setCity (String city ) {
>     this.city = city;
>   }  
>   
>   public AutoCompleteCityAction() {
>         
>   }
>   
>   public String execute()throws Exception {
>       return SUCCESS;
>   }
>   
>   public String getCities() {
>         if(city != null && (!city.isEmpty())) {
>           json = new HashMap<String,String>();
>           dao = new CitiesDAO();
>           List<City> list = dao.getCities(city);
>           for(City city: list) {
>            
> json.put(""+city.getCityId(),city.getCityName()+","+city.getStateName());   
>           }
>         }
>         return SUCCESS;
>   } 
>   
> }
> <package name="ajaxstruts" 
>             extends="json-default">
>    <action name="autoComplete" 
>           class="ajaxstruts.AutoCompleteCityAction" >
>     
>     <result type="json">
>           <param name="root">json</param>
>     </result>
>    </action>
>  </package> 
> then written as .jsp
> <%@ taglib prefix="s" uri="/struts-tags" %>
> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
>  
> <html>
>   <head>
>     <sx:head />
>   </head>
>   <body>
>    <div align="center">
>     <s:label name="City" value="Choose City:" />
>     <s:url id="cityList" action="autoComplete" method="getCities" />
>     <sx:autocompleter name="city"  href="{%cityList}" 
>         size="20" />
>    
>    </div> 
>   </body>
> </html>
> when i am running 
> the text box is showing
> "message
> type
> number"
> but no auto completion  [even after adding autoComplete="true" ]
> please look into

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to