S2: Bug in struts or dojo? was Re: S2: Getting info from server via topic
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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> > > 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: > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > > > -- > > "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: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2: Getting info from server via topic
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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> > 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: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > -- > "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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2: Getting info from server via topic
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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- "Hey you! Would you help me to carry the stone?" Pink Floyd