Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 73781 invoked from network); 2 May 2007 16:48:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 May 2007 16:48:06 -0000 Received: (qmail 41188 invoked by uid 500); 2 May 2007 16:48:01 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 41175 invoked by uid 500); 2 May 2007 16:48:01 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 41164 invoked by uid 99); 2 May 2007 16:48:01 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 May 2007 09:48:01 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of musachy@gmail.com designates 209.85.132.249 as permitted sender) Received: from [209.85.132.249] (HELO an-out-0708.google.com) (209.85.132.249) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 May 2007 09:47:54 -0700 Received: by an-out-0708.google.com with SMTP id c34so188457anc for ; Wed, 02 May 2007 09:47:33 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=eiGvqjAHgv/0LcVt1u8gkf9aOWqpd7D+zKiJP17fJeypU6sH7cbXFFXQ5JRynncIO2iJS+ilnVp5NHu1q4yCak5gfQOAl0dsRfw93881gTOH2t4Z7WbWfPzDC/ztp3VETF5u4Q+nDT71lHSXqGK4JkIk6hW1nhxcQsPXsZvl6f4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=cTewKcAS+MNgj77oD9Sm7FtZG7U5lR8I7Ggr2w/lg/UgGMdFP3ASj3Qsc1vNDImk9NHzwqCY6sbE839qj35ynCr4+oOHk0qaKIJiBXhxqyviyXkxcrtOvAzEbzvDvUQllFfpRZ8FHJvaiEZOXMUZckcNlMG6ksqIDhVn29J5AdA= Received: by 10.100.133.9 with SMTP id g9mr678978and.1178124453052; Wed, 02 May 2007 09:47:33 -0700 (PDT) Received: by 10.100.242.20 with HTTP; Wed, 2 May 2007 09:47:32 -0700 (PDT) Message-ID: Date: Wed, 2 May 2007 12:47:32 -0400 From: "Musachy Barroso" To: "Struts Users Mailing List" Subject: Re: S2: submit tag and handler In-Reply-To: <471502.81970.qm@web33511.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7991_4953282.1178124452961" References: <471502.81970.qm@web33511.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_7991_4953282.1178124452961 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline If you are using submit, or anchor tag you can call "reloadContents()" on the widget passed as a parameter, if you are using the div tag, you can call "refresh()" on it. These functions are not really part of the api and might change in the future (although it would be nice if they were right?). musachy On 5/2/07, Scott Nesbitt wrote: > > > Yes, I would like to do the request in the JavaScript > because I need to do some other work there before the > request happens. > > If I knew how Struts did the request I would just do > the same thing at the bottom of my function. > > Scott > > --- Musachy Barroso wrote: > > > The whole idea behind the "handler" function is that > > you are going to make > > the request yourself, instead of letting struts do > > it for you. The handler > > is just a plain javascript function like: > > > > function superHandler(widget, domNode) { > > //use some other framework to do the ajax request, > > Dojo, Prototype, YUI, > > DWR, JQuery,....zillion_framework_name > > } > > > > is that what you are trying to do? do the request > > yourself? > > > > musachy > > > > On 5/2/07, Scott Nesbitt > > wrote: > > > > > > Does anyone know how to invoke a request from a > > submit > > > handler function? > > > > > > > > > I am using a submit tag like this: > > > > > >
Div 1
> > > > > > > > src="images/indicator.gif" > > > alt="Loading..." > > > style="display:none"/> > > > > > theme="ajax" > > > value="Save" > > > title="Save all changes." > > > cssClass="butstylewide" > > > targets="t1" > > > handler="handler" > > > notifyTopics="/after" > > > href="%{ajaxTest}" > > > align="left" > > > indicator="indicator"/> > > > > > > My Javascript looks like this: > > > > > > function handler(widget, node) > > > { > > > alert("DEBUG in handler"); > > > } > > > > > > dojo.event.topic.subscribe("/after", > > function(data, > > > type, e) > > > { > > > alert("Lineup saved"); > > > }); > > > > > > The documentation says this: > > > > > > 'handler' is the name of the function that will > > take > > > care of making the AJAX request. Dojo's widget and > > dom > > > node are passed as parameters). > > > > > > But I do not see any example of how to actually do > > > that. I guess it is some Dojo magic but looking > > > through the Dojo documentation has not proved > > > illuminating. (BTW, I know if I do not have > > handler > > > specified it calls the action but I need to do > > some > > > JavaScript work beforehand.) > > > > > > Thanks, > > > > > > Scott > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Tired of spam? Yahoo! Mail has the best spam > > protection around > > > http://mail.yahoo.com > > > > > > > > > --------------------------------------------------------------------- > > > 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 > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > --------------------------------------------------------------------- > 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 ------=_Part_7991_4953282.1178124452961--