You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Crocker, Patrick" <Pa...@bear.com> on 2007/11/13 20:43:56 UTC

[S2.0.11] TabbedPanel remote div loads twice on notifyTopic

Struts 2.0.11

I have a tabbed panel with 2 div's, one static, one remote.  Tab one
(static) has a form with a submit button that publishes a notify topic
of "/refresh".  Tab two (remote) has a listen topic of "/refresh".

The problem is that when the form is submitted, Tab two (remote) is
loaded twice:

Firebug Console Output:
GET
http://localhost:8080/emckpi/test/tab2.htm?dojo.preventCache=11949822065
98
POST http://localhost:8080/emckpi/test/tab1.htm
GET
http://localhost:8080/emckpi/test/tab2.htm?dojo.preventCache=11949822066
30

As you can see, the topic is notified, then the form posts, then the
topic is notified again.  According to the documentation, the s:submit
notifyTopics is "Topics that will published when the remote call
completes".

So, why is the topic being notified *before* the remote call has even
been performed?

JSP:
----------
<%@ taglib uri="/struts-tags" prefix="s" %>
<html>
  <head>
    <s:head theme="ajax" />
  </head>
  <body>
    <s:tabbedPanel id="tabs">

      <s:div id="tabOne" theme="ajax" label="Tab One">

        <s:form namespace="/test" action="tab1" method="post"
theme="ajax">
          <s:submit notifyTopics="/refresh" />
        </s:form>

      </s:div>

      <s:url id="tabTwoUrl" namespace="/test" action="tab2" />
      <s:div id="tabTwo" href="%{#tabTwoUrl}" theme="ajax" label="Tab
Two" listenTopics="/refresh" />

    </s:tabbedPanel>
  </body>
</html>

Thank you,
Patrick Crocker



***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation, 
offer or agreement or any information about any transaction, customer 
account or account activity contained in this communication.
***********************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2.0.11] TabbedPanel remote div loads twice on notifyTopic

Posted by Alvaro Sanchez-Mariscal <al...@gmail.com>.
https://issues.apache.org/struts/browse/WW-2123

On Nov 13, 2007 9:06 PM, Alvaro Sanchez-Mariscal
<al...@gmail.com> wrote:
> I fired a bug about this some weeks ago, and the response was "we will
> solve it in Struts 2.1".
>
> Alvaro.
>
>
> On Nov 13, 2007 8:43 PM, Crocker, Patrick <Pa...@bear.com> wrote:
> > Struts 2.0.11
> >
> > I have a tabbed panel with 2 div's, one static, one remote.  Tab one
> > (static) has a form with a submit button that publishes a notify topic
> > of "/refresh".  Tab two (remote) has a listen topic of "/refresh".
> >
> > The problem is that when the form is submitted, Tab two (remote) is
> > loaded twice:
> >
> > Firebug Console Output:
> > GET
> > http://localhost:8080/emckpi/test/tab2.htm?dojo.preventCache=11949822065
> > 98
> > POST http://localhost:8080/emckpi/test/tab1.htm
> > GET
> > http://localhost:8080/emckpi/test/tab2.htm?dojo.preventCache=11949822066
> > 30
> >
> > As you can see, the topic is notified, then the form posts, then the
> > topic is notified again.  According to the documentation, the s:submit
> > notifyTopics is "Topics that will published when the remote call
> > completes".
> >
> > So, why is the topic being notified *before* the remote call has even
> > been performed?
> >
> > JSP:
> > ----------
> > <%@ taglib uri="/struts-tags" prefix="s" %>
> > <html>
> >   <head>
> >     <s:head theme="ajax" />
> >   </head>
> >   <body>
> >     <s:tabbedPanel id="tabs">
> >
> >       <s:div id="tabOne" theme="ajax" label="Tab One">
> >
> >         <s:form namespace="/test" action="tab1" method="post"
> > theme="ajax">
> >           <s:submit notifyTopics="/refresh" />
> >         </s:form>
> >
> >       </s:div>
> >
> >       <s:url id="tabTwoUrl" namespace="/test" action="tab2" />
> >       <s:div id="tabTwo" href="%{#tabTwoUrl}" theme="ajax" label="Tab
> > Two" listenTopics="/refresh" />
> >
> >     </s:tabbedPanel>
> >   </body>
> > </html>
> >
> > Thank you,
> > Patrick Crocker
> >
> >
> >
> > ***********************************************************************
> > Bear Stearns is not responsible for any recommendation, solicitation,
> > offer or agreement or any information about any transaction, customer
> > account or account activity contained in this communication.
> > ***********************************************************************
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
>
> --
> Alvaro Sanchez-Mariscal Arnaiz
> Java EE Architect & Instructor
> alvaro.sanchezmariscal@gmail.com
>



-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect & Instructor
alvaro.sanchezmariscal@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2.0.11] TabbedPanel remote div loads twice on notifyTopic

Posted by Alvaro Sanchez-Mariscal <al...@gmail.com>.
I fired a bug about this some weeks ago, and the response was "we will
solve it in Struts 2.1".

Alvaro.

On Nov 13, 2007 8:43 PM, Crocker, Patrick <Pa...@bear.com> wrote:
> Struts 2.0.11
>
> I have a tabbed panel with 2 div's, one static, one remote.  Tab one
> (static) has a form with a submit button that publishes a notify topic
> of "/refresh".  Tab two (remote) has a listen topic of "/refresh".
>
> The problem is that when the form is submitted, Tab two (remote) is
> loaded twice:
>
> Firebug Console Output:
> GET
> http://localhost:8080/emckpi/test/tab2.htm?dojo.preventCache=11949822065
> 98
> POST http://localhost:8080/emckpi/test/tab1.htm
> GET
> http://localhost:8080/emckpi/test/tab2.htm?dojo.preventCache=11949822066
> 30
>
> As you can see, the topic is notified, then the form posts, then the
> topic is notified again.  According to the documentation, the s:submit
> notifyTopics is "Topics that will published when the remote call
> completes".
>
> So, why is the topic being notified *before* the remote call has even
> been performed?
>
> JSP:
> ----------
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <html>
>   <head>
>     <s:head theme="ajax" />
>   </head>
>   <body>
>     <s:tabbedPanel id="tabs">
>
>       <s:div id="tabOne" theme="ajax" label="Tab One">
>
>         <s:form namespace="/test" action="tab1" method="post"
> theme="ajax">
>           <s:submit notifyTopics="/refresh" />
>         </s:form>
>
>       </s:div>
>
>       <s:url id="tabTwoUrl" namespace="/test" action="tab2" />
>       <s:div id="tabTwo" href="%{#tabTwoUrl}" theme="ajax" label="Tab
> Two" listenTopics="/refresh" />
>
>     </s:tabbedPanel>
>   </body>
> </html>
>
> Thank you,
> Patrick Crocker
>
>
>
> ***********************************************************************
> Bear Stearns is not responsible for any recommendation, solicitation,
> offer or agreement or any information about any transaction, customer
> account or account activity contained in this communication.
> ***********************************************************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
Alvaro Sanchez-Mariscal Arnaiz
Java EE Architect & Instructor
alvaro.sanchezmariscal@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org