struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SudhirJava <sudhi...@gmail.com>
Subject RE: Javascript proble in sx:civ in struts2
Date Mon, 20 Sep 2010 05:50:25 GMT

Thanks for the advice.
But my problem is, after clicking on the tabbed pannel I am loading one
jsp(certification.jsp).

I want, if I write javascript inside certification.jsp that should work.




mgainty wrote:
> 
> 
> Good Advice
>  
> struts anchor tag:
> href The URL to call to obtain the content. Note: If used with ajax
> context, the value must be set as an url tag value.
>  
> --the javascript anchor alternative references struts-dojo-tags uri and
> allows a javascript handler as illustrated here:
> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
> <sx:a
> ......
>  handler="JavaScriptFunction"
> />
> 
> Martin 
> ______________________________________________ 
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
> 
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
> copie de ceci est interdite. Ce message sert à l'information seulement et
> n'aura pas n'importe quel effet légalement obligatoire. Étant donné que
> les email peuvent facilement être sujets à la manipulation, nous ne
> pouvons accepter aucune responsabilité pour le contenu fourni.
> 
> 
> 
>  
> 
>> Date: Fri, 17 Sep 2010 09:55:09 +0100
>> From: alopez@flordeutopia.pt
>> To: user@struts.apache.org
>> Subject: Re: Javascript proble in sx:civ in struts2
>> 
>> I don't have a definite answer, but just keep in mind that:
>> 
>> - The Dojo plugin is deprecated, you might want to consider other ways 
>> of achieving the same thing.
>> 
>> - For the ajax tags to work you have to include the head tag ( <sx:head/>
>> ).
>> 
>> Please read:
>> 
>> http://struts.apache.org/2.x/docs/ajax-tags.html
>> http://struts.apache.org/2.x/docs/dojo-head.html
>> http://struts.apache.org/2.x/docs/ajax.html
>> 
>> SudhirJava, 17-09-2010 06:44:
>> >
>> > Hi,
>> > Please help me in the following issue.
>> >
>> > I have gone throgh some threads which have explained the same problem.
>> > But not able to solve this.
>> >
>> > So I need your help on this.
>> > Please provide me if you know the solution is explained clearly.
>> >
>> > I apoloigize if this a duplicate thread.
>> >
>> >
>> > The issue in Javascript is not working in the included page in sx:div.
>> > Below is the code
>> > In certification.jsp if I click on Edit link it is not calling the
>> > javascript function editCertification()
>> > I am using struts2-dojo-plugin-2.1.8.1.jar
>> > struts2-core-2.1.8.1.jar
>> >
>> >
>> > welcome.jsp
>> > ------------------
>> > <sx:div id="two" label="Tab 2" href="certificationLink.action"
>> > preload="false" executeScripts="true" separateScripts="false">
>> </sx:div>
>> >
>> > struts.xml
>> > --------------
>> > <action name="certificationLink"
>> > class="com.lnt.pms.action.AddDeleteCertificationAction"> <result
>> > name="success">/pages/certification.jsp</result> </action>
>> >
>> > certification.jsp
>> > ---------------------
>> > <script>
>> > function editCertification(userCertificationId){
>> > var url =
>> > "editCertification.action?certificationId="+userCertificationId;
>> > var myAjax = new Ajax.Request(
>> > url,
>> > {
>> > method: 'post',
>> > onComplete: fetchSuccess
>> > }
>> > }
>> > function fetchSuccess(originalRequest){
>> > var result = originalRequest.responseText.evalJSON();
>> >
>> >
>> document.getElementById("certificationName").value=result.certificationList[0].certificationName;
>> >
>> > }
>> > </script>
>> >
>> > <td class="nowrap"><s:set id="userCertificationId"
>> > value="userCertificationId" />
>> > <s:a
>> > href="javascript:editCertification('%{userCertificationId}')"
>> > theme="xhtml">Edit</s:a>
>> > </td>
>> >
>> >
>> > Regards
>> > Sudhir
>> > sudhirid@...
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>> 
>  		 	   		  
> 

-- 
View this message in context: http://old.nabble.com/Javascript-proble-in-sx%3Aciv-in-struts2-tp29735361p29756382.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message