Re: 2.0.11: s:autocompleter
Hi,all, There are problem with the autocompleter when using non-English(Chinese,for example). When I input some Chinese ,autocompleter can not detect the change/input event.So it do nothing about it. Does this the problem of dojo or Struts? Thanks. On Dec 25, 2007 1:11 AM, Rodrigo Pereira <[EMAIL PROTECTED]> wrote: > Hi, > I am able to make it work in FF, but not in IE 6.0. > Is there any problems with s:autocompleter and IE? I checked show-case > example and it does not work as well. > > Thanks, > Rodrigo Pereira > > On Dec 15, 2007 4:53 PM, Rodrigo Pereira <[EMAIL PROTECTED]> wrote: > > I got it as well. > > Changing the "name" parameter to "keyName" works. > > > > Thanks, > > Rodrigo Pereira > > > > > > On Dec 15, 2007 3:03 PM, Rodrigo Pereira <[EMAIL PROTECTED]> > wrote: > > > I got it. :) > > > All magic is behind freemaker. > > > > > > dropdown.jsp: > > > > > > <%@ page contentType="text/html;charset=UTF-8" language="java" %> > > > <%@ taglib prefix="s" uri="/struts-tags" %> > > > > > > > > > Dropdown - Example > > > > > > > > > > > > > > > > > > > > listValue="name" listKey="valueId" notifyTopics="/refresh" /> > > > > > > > > > > > > > > formId="selectForm" listenTopics="/refresh" /> > > > > > > > > > > > > > > > > > > > > > struts.xml > > > > > > extends="struts-default"> > > > > > > method="upper"> > > > /dropdown.jsp > > > > > > > > > method="lower"> > > > type="freemarker">/options.ftl > > > > > > > > > > > > > > > > > > options.ftl > > > > > > [ > > > <#list lower as option> > > > ["${option.name}", "${option.valueId}"], > > > > > > ] > > > > > > DropdownAction: > > > > > > public class DropdownAction extends ActionSupport{ > > > > > > List upper = new ArrayList(); > > > List lower = new ArrayList(); > > > > > > private String upperValue; > > > private String lowerValue; > > > > > > > > > public String doUpper(){ > > > > > > upper.add( new Value(1,"A") ); > > > upper.add( new Value(2,"B") ); > > > > > > return SUCCESS; > > > } > > > > > > public String doLower(){ > > > > > > lower = new ArrayList(); > > > > > > if( upperValue.equalsIgnoreCase("A") ){ > > > lower.add( new Value(1,"a1") ); > > > lower.add( new Value(2,"a2") ); > > > }else{ > > > lower.add( new Value(1,"b1") ); > > > lower.add( new Value(2,"b2") ); > > > } > > > > > > return SUCCESS; > > > } > > > > > > // geters and seters > > > } > > > > > > Now I'd like to pass forward to my action list key value instead of > list value. > > > > > > Thanks, > > > Rodrigo Pereira > > > > > > > > > On Dec 15, 2007 2:32 PM, Martin Gainty <[EMAIL PROTECTED]> wrote: > > > > Rodrigo- > > > > > > > > There is a bug I logged on autocompleter..hopefully we'll have a > patch soon > > > > https://issues.apache.org/struts/browse/WW-2373 > > > > Since you and I are the only folks following this do you want to > take a > > > > quick glance at this? > > > > > > > > Saludos desde EEUU > > > > Martin- > > > > > > > > - Original Message - > > > > From: "Rodrigo Pereira" <[EMAIL PROTECTED]> > > > > To: "Struts Users Mailing List" > > > > Sent: Saturday, December 15, 2007 10:34
Re: 2.0.11: s:autocompleter
Hi, I am able to make it work in FF, but not in IE 6.0. Is there any problems with s:autocompleter and IE? I checked show-case example and it does not work as well. Thanks, Rodrigo Pereira On Dec 15, 2007 4:53 PM, Rodrigo Pereira <[EMAIL PROTECTED]> wrote: > I got it as well. > Changing the "name" parameter to "keyName" works. > > Thanks, > Rodrigo Pereira > > > On Dec 15, 2007 3:03 PM, Rodrigo Pereira <[EMAIL PROTECTED]> wrote: > > I got it. :) > > All magic is behind freemaker. > > > > dropdown.jsp: > > > > <%@ page contentType="text/html;charset=UTF-8" language="java" %> > > <%@ taglib prefix="s" uri="/struts-tags" %> > > > > > > Dropdown - Example > > > > > > > > > > > > > listValue="name" listKey="valueId" notifyTopics="/refresh" /> > > > > > > > > > formId="selectForm" listenTopics="/refresh" /> > > > > > > > > > > > > > > struts.xml > > > > > > > > > method="upper"> > > /dropdown.jsp > > > > > > > method="lower"> > > /options.ftl > > > > > > > > > > > > options.ftl > > > > [ > > <#list lower as option> > > ["${option.name}", "${option.valueId}"], > > > > ] > > > > DropdownAction: > > > > public class DropdownAction extends ActionSupport{ > > > > List upper = new ArrayList(); > > List lower = new ArrayList(); > > > > private String upperValue; > > private String lowerValue; > > > > > > public String doUpper(){ > > > > upper.add( new Value(1,"A") ); > > upper.add( new Value(2,"B") ); > > > > return SUCCESS; > > } > > > > public String doLower(){ > > > > lower = new ArrayList(); > > > > if( upperValue.equalsIgnoreCase("A") ){ > > lower.add( new Value(1,"a1") ); > > lower.add( new Value(2,"a2") ); > > }else{ > > lower.add( new Value(1,"b1") ); > > lower.add( new Value(2,"b2") ); > > } > > > > return SUCCESS; > > } > > > > // geters and seters > > } > > > > Now I'd like to pass forward to my action list key value instead of list > > value. > > > > Thanks, > > Rodrigo Pereira > > > > > > On Dec 15, 2007 2:32 PM, Martin Gainty <[EMAIL PROTECTED]> wrote: > > > Rodrigo- > > > > > > There is a bug I logged on autocompleter..hopefully we'll have a patch > > > soon > > > https://issues.apache.org/struts/browse/WW-2373 > > > Since you and I are the only folks following this do you want to take a > > > quick glance at this? > > > > > > Saludos desde EEUU > > > Martin- > > > > > > - Original Message - > > > From: "Rodrigo Pereira" <[EMAIL PROTECTED]> > > > To: "Struts Users Mailing List" > > > Sent: Saturday, December 15, 2007 10:34 AM > > > Subject: Re: 2.0.11: s:autocompleter > > > > > > > > > > Hi, > > > > does anybody have an example of s:autocompleter getting list value > > > > from an action? > > > > I have been trying to update a list based on the selection of another > > > > one, but no success. I'd like the dropdown lists not hardcoded as > > > > showcase example does. > > > > > > > > Thanks, > > > > Rodrigo Pereira > > > > > > > > > > > > On Dec 11, 2007 4:50 PM, Rodrigo Pereira <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > I tried that but it only loads 1st dropdown, the 2nd is never updated. > > > > > > > > > > > > > > > > > > > > > > > > listValue="name" listKey="valueId" notifyTopics="/changeLower"
Re: 2.0.11: s:autocompleter
I got it as well. Changing the "name" parameter to "keyName" works. Thanks, Rodrigo Pereira On Dec 15, 2007 3:03 PM, Rodrigo Pereira <[EMAIL PROTECTED]> wrote: > I got it. :) > All magic is behind freemaker. > > dropdown.jsp: > > <%@ page contentType="text/html;charset=UTF-8" language="java" %> > <%@ taglib prefix="s" uri="/struts-tags" %> > > > Dropdown - Example > > > > > > listValue="name" listKey="valueId" notifyTopics="/refresh" /> > > > > formId="selectForm" listenTopics="/refresh" /> > > > > > > > struts.xml > > > > method="upper"> > /dropdown.jsp > > > method="lower"> > /options.ftl > > > > > > options.ftl > > [ > <#list lower as option> > ["${option.name}", "${option.valueId}"], > > ] > > DropdownAction: > > public class DropdownAction extends ActionSupport{ > > List upper = new ArrayList(); > List lower = new ArrayList(); > > private String upperValue; > private String lowerValue; > > > public String doUpper(){ > > upper.add( new Value(1,"A") ); > upper.add( new Value(2,"B") ); > > return SUCCESS; > } > > public String doLower(){ > > lower = new ArrayList(); > > if( upperValue.equalsIgnoreCase("A") ){ > lower.add( new Value(1,"a1") ); > lower.add( new Value(2,"a2") ); > }else{ > lower.add( new Value(1,"b1") ); > lower.add( new Value(2,"b2") ); > } > > return SUCCESS; > } > > // geters and seters > } > > Now I'd like to pass forward to my action list key value instead of list > value. > > Thanks, > Rodrigo Pereira > > > On Dec 15, 2007 2:32 PM, Martin Gainty <[EMAIL PROTECTED]> wrote: > > Rodrigo- > > > > There is a bug I logged on autocompleter..hopefully we'll have a patch soon > > https://issues.apache.org/struts/browse/WW-2373 > > Since you and I are the only folks following this do you want to take a > > quick glance at this? > > > > Saludos desde EEUU > > Martin- > > > > - Original Message - > > From: "Rodrigo Pereira" <[EMAIL PROTECTED]> > > To: "Struts Users Mailing List" > > Sent: Saturday, December 15, 2007 10:34 AM > > Subject: Re: 2.0.11: s:autocompleter > > > > > > > Hi, > > > does anybody have an example of s:autocompleter getting list value > > > from an action? > > > I have been trying to update a list based on the selection of another > > > one, but no success. I'd like the dropdown lists not hardcoded as > > > showcase example does. > > > > > > Thanks, > > > Rodrigo Pereira > > > > > > > > > On Dec 11, 2007 4:50 PM, Rodrigo Pereira <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I tried that but it only loads 1st dropdown, the 2nd is never updated. > > > > > > > > > > > > > > > > > > > listValue="name" listKey="valueId" notifyTopics="/changeLower"/> > > > > > > > > > > > > > > > > > > > listValue="name" listKey="valueId" listenTopics="/changeLower" > > > > formId="selectForm"/> > > > > > > > > > > > > Thanks, > > > > Rodrigo Pereira > > > > > > > > > > > > On Dec 11, 2007 4:42 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > > > > > --- Rodrigo Pereira <[EMAIL PROTECTED]> wrote: > > > > > > this way you're hard coding the 1st dropdown list. > > > > > > I'd like to get it from an action. > > > > > > > > > > So use a value from the action instead of an immediate OGNL value. > > > > > > > > > > > By the way, how does the 2nd dropdown get updated? > > > > > > > > > > Via the notify/listen topics. > > > > > > > > > > d. > > > > > > > > > > > > > > > > > > > > - > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 2.0.11: s:autocompleter
I got it. :) All magic is behind freemaker. dropdown.jsp: <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="s" uri="/struts-tags" %> Dropdown - Example struts.xml /dropdown.jsp /options.ftl options.ftl [ <#list lower as option> ["${option.name}", "${option.valueId}"], ] DropdownAction: public class DropdownAction extends ActionSupport{ List upper = new ArrayList(); List lower = new ArrayList(); private String upperValue; private String lowerValue; public String doUpper(){ upper.add( new Value(1,"A") ); upper.add( new Value(2,"B") ); return SUCCESS; } public String doLower(){ lower = new ArrayList(); if( upperValue.equalsIgnoreCase("A") ){ lower.add( new Value(1,"a1") ); lower.add( new Value(2,"a2") ); }else{ lower.add( new Value(1,"b1") ); lower.add( new Value(2,"b2") ); } return SUCCESS; } // geters and seters } Now I'd like to pass forward to my action list key value instead of list value. Thanks, Rodrigo Pereira On Dec 15, 2007 2:32 PM, Martin Gainty <[EMAIL PROTECTED]> wrote: > Rodrigo- > > There is a bug I logged on autocompleter..hopefully we'll have a patch soon > https://issues.apache.org/struts/browse/WW-2373 > Since you and I are the only folks following this do you want to take a > quick glance at this? > > Saludos desde EEUU > Martin- > > - Original Message - > From: "Rodrigo Pereira" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > Sent: Saturday, December 15, 2007 10:34 AM > Subject: Re: 2.0.11: s:autocompleter > > > > Hi, > > does anybody have an example of s:autocompleter getting list value > > from an action? > > I have been trying to update a list based on the selection of another > > one, but no success. I'd like the dropdown lists not hardcoded as > > showcase example does. > > > > Thanks, > > Rodrigo Pereira > > > > > > On Dec 11, 2007 4:50 PM, Rodrigo Pereira <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I tried that but it only loads 1st dropdown, the 2nd is never updated. > > > > > > > > > > > > > > listValue="name" listKey="valueId" notifyTopics="/changeLower"/> > > > > > > > > > > > > > > listValue="name" listKey="valueId" listenTopics="/changeLower" > > > formId="selectForm"/> > > > > > > > > > Thanks, > > > Rodrigo Pereira > > > > > > > > > On Dec 11, 2007 4:42 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > > > > --- Rodrigo Pereira <[EMAIL PROTECTED]> wrote: > > > > > this way you're hard coding the 1st dropdown list. > > > > > I'd like to get it from an action. > > > > > > > > So use a value from the action instead of an immediate OGNL value. > > > > > > > > > By the way, how does the 2nd dropdown get updated? > > > > > > > > Via the notify/listen topics. > > > > > > > > d. > > > > > > > > > > > > > > > > - > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 2.0.11: s:autocompleter
Hi, does anybody have an example of s:autocompleter getting list value from an action? I have been trying to update a list based on the selection of another one, but no success. I'd like the dropdown lists not hardcoded as showcase example does. Thanks, Rodrigo Pereira On Dec 11, 2007 4:50 PM, Rodrigo Pereira <[EMAIL PROTECTED]> wrote: > Hi, > I tried that but it only loads 1st dropdown, the 2nd is never updated. > > > > listValue="name" listKey="valueId" notifyTopics="/changeLower"/> > > > > listValue="name" listKey="valueId" listenTopics="/changeLower" > formId="selectForm"/> > > > Thanks, > Rodrigo Pereira > > > On Dec 11, 2007 4:42 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > > --- Rodrigo Pereira <[EMAIL PROTECTED]> wrote: > > > this way you're hard coding the 1st dropdown list. > > > I'd like to get it from an action. > > > > So use a value from the action instead of an immediate OGNL value. > > > > > By the way, how does the 2nd dropdown get updated? > > > > Via the notify/listen topics. > > > > d. > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 2.0.11: s:autocompleter
Hi, I tried that but it only loads 1st dropdown, the 2nd is never updated. Thanks, Rodrigo Pereira On Dec 11, 2007 4:42 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > --- Rodrigo Pereira <[EMAIL PROTECTED]> wrote: > > this way you're hard coding the 1st dropdown list. > > I'd like to get it from an action. > > So use a value from the action instead of an immediate OGNL value. > > > By the way, how does the 2nd dropdown get updated? > > Via the notify/listen topics. > > d. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 2.0.11: s:autocompleter
--- Rodrigo Pereira <[EMAIL PROTECTED]> wrote: > this way you're hard coding the 1st dropdown list. > I'd like to get it from an action. So use a value from the action instead of an immediate OGNL value. > By the way, how does the 2nd dropdown get updated? Via the notify/listen topics. d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 2.0.11: s:autocompleter
Hi, this way you're hard coding the 1st dropdown list. I'd like to get it from an action. By the way, how does the 2nd dropdown get updated? Thanks, Rodrigo Pereira On Dec 11, 2007 2:01 PM, <[EMAIL PROTECTED]> wrote: > http://struts.apache.org/2.0.6/docs/ajax-tags.html > theme="simple" list="{'UPPERNAME','lowername'} name="upperValue" > notifyTopics="/Changed"/> formId="selectForm" listenTopics="/Changed"/>M-- > > > > Hi, > > I am trying to dynamic update a dropdown list based on the selection > > of the previous one, but I am getting no value in the 2nd dropdown > > list. > > > > > > dropdown.jsp: > > > > <%@ page contentType="text/html;charset=UTF-8" language="java" %> > > <%@ taglib prefix="s" uri="/struts-tags" %> > > > > > > Example - Dropdown > > > > > > > > > > > > > > > > > > > > > list="upper" listValue="name" listKey="valueId" > > notifyTopics="/Changed"/> > > > > > > > list="lower" listValue="name" listKey="valueId" href="%{#autoLower}" > > listenTopics="/Changed" formId="selectForm" /> > > > > > > > > > > Does anybody know what I am doing wrong? > > Btw, the action is called and it can access upperValue value, is there > > a way of sending key instead of value? > > > > Thanks, > > Rodrigo Pereira > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]