You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Scott Nesbitt <sc...@yahoo.com> on 2007/07/17 23:34:44 UTC
S2: Getting info from server via topic
For this topic:
dojo.event.topic.subscribe("/saveTopic",
function(data, type, e)
{
// data : text returned
// type : "before", "load" or "error"
// e : request object
if ('load' == type)
{
}
}
When my action on the server is successful the type is
set to load and things work great. However, I would
like to send some data back from the server also (in
the "data" arg, I presume.)
I posted this a week ago but got no response. Is this
better asked in the Dojo list?
Thanks,
Scott
____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
S2: Bug in struts or dojo? was Re: S2: Getting info from server via topic
Posted by Scott Nesbitt <sc...@yahoo.com>.
Is this a bug in Struts 2.0.6 or Dojo 0.4? Why would
there be garbage in the data argument?
Is this not the right way to subscribe to a topic?
Surely somebody out there is doing this.
Thank you,
Scott
--- Scott Nesbitt <sc...@yahoo.com> wrote:
>
> Hmm, when I print out the value of the "data"
> argument
> it seems to have the complete text of the JSP (in
> both
> before and load sections of the function.)
>
> All the JavaScript and HTML is in this argument.
> Could it be because this JSP is included from
> another
> JSP like this?
>
> <%@ include file="sports.jsp" %>
>
> Thanks for the help,
>
> Scott
>
> --- Musachy Barroso <mu...@gmail.com> wrote:
>
> > Anything that you write to the output stream on
> your
> > action will be
> > available on the "data" argument.
> >
> > musachy
> >
> > On 7/17/07, Scott Nesbitt <sc...@yahoo.com>
> > wrote:
> > >
> > >
> > > For this topic:
> > >
> > > dojo.event.topic.subscribe("/saveTopic",
> > > function(data, type, e)
> > > {
> > > // data : text returned
> > > // type : "before", "load" or "error"
> > > // e : request object
> > > if ('load' == type)
> > > {
> > >
> > > }
> > > }
> > >
> > > When my action on the server is successful the
> > type is
> > > set to load and things work great. However, I
> > would
> > > like to send some data back from the server also
> > (in
> > > the "data" arg, I presume.)
> > >
> > > I posted this a week ago but got no response.
> Is
> > this
> > > better asked in the Dojo list?
> > >
> > > Thanks,
> > >
> > > Scott
> > >
> > >
> > >
> > >
> >
>
____________________________________________________________________________________
> > > Park yourself in front of a world of choices in
> > alternative vehicles.
> > > Visit the Yahoo! Auto Green Center.
> > > http://autos.yahoo.com/green_center/
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> > user-help@struts.apache.org
> > >
> > >
> >
> >
> > --
> > "Hey you! Would you help me to carry the stone?"
> > Pink Floyd
> >
>
>
>
>
>
____________________________________________________________________________________
> Fussy? Opinionated? Impossible to please? Perfect.
> Join Yahoo!'s user panel and lay it on us.
>
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
>
>
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: S2: Getting info from server via topic
Posted by Scott Nesbitt <sc...@yahoo.com>.
Hmm, when I print out the value of the "data" argument
it seems to have the complete text of the JSP (in both
before and load sections of the function.)
All the JavaScript and HTML is in this argument.
Could it be because this JSP is included from another
JSP like this?
<%@ include file="sports.jsp" %>
Thanks for the help,
Scott
--- Musachy Barroso <mu...@gmail.com> wrote:
> Anything that you write to the output stream on your
> action will be
> available on the "data" argument.
>
> musachy
>
> On 7/17/07, Scott Nesbitt <sc...@yahoo.com>
> wrote:
> >
> >
> > For this topic:
> >
> > dojo.event.topic.subscribe("/saveTopic",
> > function(data, type, e)
> > {
> > // data : text returned
> > // type : "before", "load" or "error"
> > // e : request object
> > if ('load' == type)
> > {
> >
> > }
> > }
> >
> > When my action on the server is successful the
> type is
> > set to load and things work great. However, I
> would
> > like to send some data back from the server also
> (in
> > the "data" arg, I presume.)
> >
> > I posted this a week ago but got no response. Is
> this
> > better asked in the Dojo list?
> >
> > Thanks,
> >
> > Scott
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Park yourself in front of a world of choices in
> alternative vehicles.
> > Visit the Yahoo! Auto Green Center.
> > http://autos.yahoo.com/green_center/
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >
>
>
> --
> "Hey you! Would you help me to carry the stone?"
> Pink Floyd
>
____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: S2: Getting info from server via topic
Posted by Musachy Barroso <mu...@gmail.com>.
Anything that you write to the output stream on your action will be
available on the "data" argument.
musachy
On 7/17/07, Scott Nesbitt <sc...@yahoo.com> wrote:
>
>
> For this topic:
>
> dojo.event.topic.subscribe("/saveTopic",
> function(data, type, e)
> {
> // data : text returned
> // type : "before", "load" or "error"
> // e : request object
> if ('load' == type)
> {
>
> }
> }
>
> When my action on the server is successful the type is
> set to load and things work great. However, I would
> like to send some data back from the server also (in
> the "data" arg, I presume.)
>
> I posted this a week ago but got no response. Is this
> better asked in the Dojo list?
>
> Thanks,
>
> Scott
>
>
>
> ____________________________________________________________________________________
> Park yourself in front of a world of choices in alternative vehicles.
> Visit the Yahoo! Auto Green Center.
> http://autos.yahoo.com/green_center/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd