struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mario Matias Urbieta (JIRA)" <j...@apache.org>
Subject [jira] Commented: (WW-2356) autocompleter widget fails to publish topic in some cases
Date Wed, 29 Oct 2008 18:45:37 GMT

    [ https://issues.apache.org/struts/browse/WW-2356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44891#action_44891
] 

Mario Matias Urbieta commented on WW-2356:
------------------------------------------

that bug arises when you have autoComplete=true.
Setting it in false it works.


> autocompleter widget fails to publish topic in some cases   
> ------------------------------------------------------------
>
>                 Key: WW-2356
>                 URL: https://issues.apache.org/struts/browse/WW-2356
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Dojo Tags
>         Environment: Fedora 6, Tomcat 6.x, JDK 1.6.0_02, Firefox 1.5.x
>            Reporter: Giovanni Azua Garcia
>            Priority: Minor
>             Fix For: Future
>
>
> Given the JSP page below, autocompleter fails to publish the required topic "/changedHistoricBook0"
in the following use case:
> - User types a substring  
> - The user clicks on the top suggested (bold) matching element.
> In that case the notify does not happen. though, when the user clicks the second choice
the topic is published correctly.
> <%@ page contentType="text/html; charset=UTF-8"%>
> <%@ taglib prefix="s" uri="/struts-tags"%>
> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
> <script type="text/javascript">
>   dojo.event.topic.subscribe("/afterExchangeRateReloaded", function(data, request, widget)
>   {
>      //data : text returned from request
>      //request: XMLHttpRequest object
>      //widget: widget that published the topic
>      widget.setSelectedKey("value");
>   });  
> </script>
> <s:url var="exchangeRates" action="AjaxGetExchangeRates.action" />
> <s:form id="formSimulation" action="%{targetAction}" method="post" theme="%{currentTheme}">
> <sx:autocompleter tooltip="Provide the first Historic Book" forceValidOption="true"
valueNotifyTopics="/changedHistoricBook0"  notifyTopics="/changedHistoricBook0" searchType="substring"
label="Historic Book 1" cssStyle="width: 250px;" dropdownHeight="180"  name="historicBook0"
list="historicBooks" listKey="id" listValue="name" />		
> <!-- etc -->
> <sx:autocompleter id="eurosPerListedUnit0" tooltip="Provide the Currency Rate 1" formId="formSimulation"
showDownArrow="false" 
> cssStyle="width: 250px;" href="%{#exchangeRates}" listenTopics="/changedHistoricBook0"
label="Currency Rate 1" name="eurosPerListedUnit0" autoComplete="false" afterNotifyTopics="/afterExchangeRateReloaded"
/>
> <s:submit value="%{buttonLabel}" align="center"/>
> </s:form>

-- 
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