struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Newton (JIRA)" <j...@apache.org>
Subject [jira] Closed: (WW-2833) linking 2 autocompleters
Date Wed, 08 Oct 2008 22:11:36 GMT

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

Dave Newton closed WW-2833.
---------------------------

    Resolution: Not A Problem

Please ask questions on the Struts user list; if there is a bug in Struts itself you may re-open
this issue or create a new one.

http://struts.apache.org/mail.html

> linking 2 autocompleters
> ------------------------
>
>                 Key: WW-2833
>                 URL: https://issues.apache.org/struts/browse/WW-2833
>             Project: Struts 2
>          Issue Type: Temp
>          Components: Example Applications
>    Affects Versions: 2.0.11.1
>         Environment: Websphere  Server 6.1,RAD 7,jdk1.5,struts2.0.11.1
>            Reporter: vennela
>            Priority: Blocker
>
> i am working on dependent dropdows using <s:autocompleter>. Here is my jsp,action
and struts.xml. I am able to populate list of values from database for first dropdonwn. when
onchange of this second dropdonw needs to be populated. But second dropdonw n is displaying
as textbox. I followed struts showcase example. I am not getting this working. Please help
me. This issue is blocking me.
> Here is my code.
> JSP file
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <%@taglib uri="/struts-tags" prefix="s"%>
> <%@taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
> <html>
> <head>
> <link rel="stylesheet"
> 	href="${pageContext.request.contextPath}/theme/Master.css"
> 	type="text/css">
> <title>example</title>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> <meta name="GENERATOR" content="Rational Application Developer">
> <s:head theme="ajax"/> 
> </head>
> <body>
> <s:form name="frmExam" namespace="/hhsc" theme="simple">
> 	<s:label value="ItemType:"></s:label>
> 	<s:url id="autoex" action="example.action"/>
> 	<form id="exam">
> 	<s:autocompleter theme="simple" 
> 				  name="idItemType"
> 				  notifyTopics="/Changed"
>  				  headerKey="-1"
>  				  headerValue="--Please Select--"
>  				  keyName="ItemType"
>  				  list="upper"
>  				  listKey="id"
>  				  listValue="description"
>     />
>     </form>
>     <s:autocompleter theme="ajax" 
>     				 href="%{#autoex}"
>     				 autoComplete="false"
>     				 formId="exam"
>     				 keyName="Make"
>     				 listenTopics="/Changed"
>     				 forceValidOption="true"
>     				 id="ops"
>     				 headerKey="-1"
>     				 headerValue="--Please Select--"
>     				 list="MakeList"
>     				 showDownArrow="true"
>     />
> </s:form>
> </body>
> </html>
> Here is my action
>  public String execute() throws Exception{
>           upper.add("A");
>           upper.add("B");
>           makeList =getMakeItemTypeList(this.getitemtype());
>           return SUCCESS;
>     }
>      public String doUpper() throws Exception {
>            upper.add("A");
>            upper.add("B");
>            System.out.println("selected value is " + this.getItemType());
>            upper =getItemTypeList();
>            return SUCCESS;
>      }
> Here is my struts.xml
> <action name="example" class="hhsc.wts.actions.Example">
> 		<result type="freemarker">/ajax/options.ftl</result>
> 	  </action>
> 	  <action name="doUpper" method="doUpper" class="hhsc.wts.actions.Example">
> 		<result name="success">/jsp/requests/example.jsp</result>
> 	  </action>
> Please help me.
> appreciate your help.

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


Mime
View raw message