<s:div > ajax problem 2007-09-06 - By dsoriano
Back
Hi, ptriller. I'm trying to make that hook:
var myLoadMessage = { show: function(event){ event.preventDefault(); alert('ho'); }, hide: function(event){} } dojo.addOnLoad(function(){ var formEventspane = dojo.widget.byId('formEvents'); dojo.event.connect(formEventspane, 'onLoad', myLoadMessage, 'show'); });
But doesn't work. Could you tell me how do you did that?
ptriller wrote: > > Hi, > > I hooked it directly to the onLoad event, and everything works just > fine. > > Thanks for the answer. > > > Greets > > > Peter > > > > Jeromy Evans - Blue Sky Minds wrote: >> >> ptriller wrote: >>> i am using an >>> >>> <s:div theme="ajax" id="myDiv" notifyTopics="myTopic" href="someUrl"> >>> </s:div> >>> >>> and I have some JavaScript Code that alters the links in the div. >>> >>> but when I get notified by the div tag through , the new content of the >>> div >>> has not yet >>> been set, so I can't do that. >>> >> >> Hi Peter, >> >> Apologies I can't give you can complete answer, but in Struts2.0, you're >> right the notifyTopics event is published before the content is loaded. >> >> If you can use Struts 2.1 you may be able to use the afterNotifyTopics >> attribute. Even though 2.1 isn't released yet, I found its ajax >> features are less 'experimental' than 2.0.x >> >> If not, as the struts div is a dojo widget extending ContentPane I >> suppose you should be able to use dojo directly to connect to an event >> from the widget after its content is loaded. >> I haven't tried it, but it's partially described at >> http://dojotoolkit.org/book/dojo-book-0 (See http://ook-0.ora-code.com)-4/part-4 (See http://art-4.ora-code.com)-more-widgets/advanced -contentpane-usage >> >> regards, >> Jeromy Evans >> >> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ >> To unsubscribe, e-mail: user-unsubscribe@(protected) >> For additional commands, e-mail: user-help@(protected) >> >> >> > >
-- View this message in context: http://www.nabble.com/%3Cs%3Adiv%3E-ajax-problem -tf4292785.html#a12517569 Sent from the Struts - User mailing list archive at Nabble.com.
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|