struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Johnson (JIRA)" <j...@apache.org>
Subject [jira] Created: (WW-1906) Publish to dojo topic fails for tabbedpanel div with a nested div listening to a topic IE 6 (Works in firefox)
Date Wed, 02 May 2007 19:17:43 GMT
Publish to dojo topic fails for tabbedpanel div with a nested div listening to a topic IE 6
(Works in firefox)
--------------------------------------------------------------------------------------------------------------

                 Key: WW-1906
                 URL: https://issues.apache.org/struts/browse/WW-1906
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.0.6
         Environment: Windows XP IE 6
            Reporter: Richard Johnson


I currently have an action page that contains a dojo filteringtable widget.  Within that page,
I have reference to another action that executes javascript each time something is published
to a dojo topic.  This all works fine with the page by itself, but if I put the action containing
the table within a div for a tabbed panel it is failing.  The point is to execute the javascript
each time an update is necessary for the table (by listening to the topic).  Here is some
code:

This is the tabbepanel code at top:

<s:url id="currentTradesRef" action="CurrentTrades">
            <s:param name="listenTopic">/currentTradesUpdate</s:param>
            <s:param name="tableID">currentTradesTable</s:param>
            <s:param name="updateAction">CurrentTradesUpdate</s:param>
            <s:param name="updateDivID">currentTradesUpdateDiv</s:param>
        </s:url>
<s:tabbedPanel id="tradeTables" labelposition="left">
            <s:div theme="ajax" href="%{currentTradesRef}" executeScripts="true" label="Current
Trades" id="currentTrades">
                <H3>Loading Current Trades...</H3>
            </s:div>
        </s:tabbedPanel>

currentTradesRef references an action with the result page containing following code:

<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
    <head>
        <link rel="stylesheet" href="css/filterTable.css" type="text/css"></link>
        <s:head theme="ajax" debug="true"/>
        <script type="text/javascript">
            // Load Dojo's code relating to widget managing functions
            dojo.require("dojo.widget.*");

            // Load Dojo's code relating to the FilteringTable widget
            dojo.require("dojo.widget.FilteringTable");
        </script>
    </head>
    
    <body>
        <!--use current action for table data-->
        <s:url action="%{#parameters.updateAction}" id="updateUrl">
            <s:param name="tableID" value="#parameters.tableID"/>
        </s:url>    
        <table dojoType="filteringTable" multiple="true" alternateRows="true" maxSortable="1"

                   cellpadding="0" cellspacing="0" border="0" id="<s:property value="#parameters.tableID"/>"
widgetId="<s:property value="#parameters.tableID"/>">
            <thead>
                <tr>
                    <s:iterator value="columns">
                        <th field="<s:property value="jSONField"/>">
                            <s:property value="displayName"/>
                        </th>
                    </s:iterator>
                </tr>
            </thead>
            <tbody></tbody>
        </table>
        <s:div id="%{#parameters.updateDivID}" theme="ajax" href="%{updateUrl}" executeScripts="true"
loadingText="Refreshing Table..." listenTopics="%{#parameters.listenTopic}"/>
    </body>
</html> 

The last div above is failing on receiving the event from the dojo topic.  However, it works
fine if it is not used within a tabbedpanel.  If I use the tabbedpanel it gives me the following
error:

DEBUG:  [currentTradesUpdateDiv] Listening to /currentTradesUpdate to refresh
DEBUG:  [currentTradesUpdateDiv] Listening to /currentTradesUpdate to refresh
DEBUG:  XMLHttpTransport error callback failed: [object Error]

Something else that seems odd as you will notice above is it seems to be registering to listen
to the topic twice.  It only displays this message once if the action is not contained within
a tabbedpanel div.

Thanks,
Rick

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