You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by irene zeller sancho <ir...@gmail.com> on 2009/11/07 17:44:28 UTC

sx:div and executeScript

Hi,

I'm using sx:div for loading a content after the page is loaded.
But, I have problems because Javascript is not working in the page linked by
<sx:div ..>. I read about a solution with Struts2.1.2 (I'm using
Struts2.1.8) in this page(
http://mail-archives.apache.org/mod_mbox/struts-issues/200808.mbox/%3C2107922214.1217595186486.JavaMail.jira@brutus%3E,
but it did not work for me.
I'm using this code:
<sx:div id="tableScroll"label="table" href="%{#table}"
separateScripts="false" executeScripts="true">
                    Carregant'se
 </sx:div>
and the returned code is a populated table.
I changed the jar struts2-dojo-plugin-2.1.8.jar, how the thread indicates,
but nothing changed.
I need Javacript in the returned content. Please, I need help.


Thanks in advance,

Irene

RE: sx:div and executeScript

Posted by Martin Gainty <mg...@hotmail.com>.
/* for FF add a window.addEventListener */

window.addEventListener('DOMContentLoaded', init, false);

/* when DOMContentLoaded event is detected the init method is called */
Martin Gainty 
______________________________________________ 
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: Mon, 9 Nov 2009 10:04:35 +0100
> Subject: Re: sx:div and executeScript
> From: irenezeller@gmail.com
> To: user@struts.apache.org
> 
> Thanks Martin, I wil try to do it. However, I'm using Firefox and not
> Windows.
> 
> Irene
> 
> 2009/11/9 Martin Gainty <mg...@hotmail.com>
> 
> >
> > Irene-
> > the standard onLoad="javascript:function" doesnt seem to work (in IE at
> > least) so use this document.write to replace __ie_onload
> > /*information courtesy of dean edwards*/
> > http://dean.edwards.name/weblog/2006/06/again/
> >
> > <%@ page contentType="text/html; charset=UTF-8" %>
> > <%@ taglib prefix="s" uri="/struts-tags" %>
> > <%@ page language="java" contentType="text/html; charset=UTF-8"
> > pageEncoding="UTF-8"%>
> > <html>
> > <head>
> > <title>This is the title</title>
> > <script LANGUAGE="JavaScript" type="text/javascript">
> > function init()
> > { // if set to true then mouseover a table cell will
> > alert('inside init()');
> > //highlight entire column (except sibling headings)
> > document.forms[0].Title.value='newTitle';
> > document.forms[0].Author.value='newAuthor';
> > document.forms[0].Ending.value='newEnding';
> > document.forms[0].Energy.value='newEnergy';
> > document.forms[0].Flatness.value='newFlatness';
> > document.forms[0].Validate.value='newValidate';
> > document.forms[0].Play.value='newPlay';
> > }
> > /** for Internet Explorer (using conditional comments) **/
> > /*@cc_on @*/
> > /*@if (@_win32)
> > document.write("<script id=__ie_onload defer
> > src=javascript:void(0)><\/script>");
> > var script = document.getElementById("__ie_onload");
> > script.onreadystatechange = function() {
> >  if (this.readyState == "complete") {
> >    init(); // call the onload handler
> >  }
> > };
> > /*@end @*/
> > window.onload = init;
> > //-->
> > </script>
> > </head>
> >
> > <body onLoad="'window.onload = init'">
> >
> > <p>This is a test for Irene </p>
> > <s:div href="javascript:tablecloth_function">
> > </s:div>
> > <form action="somethingAction" name="theForm" >
> > <table>
> >  <tr>
> >    <th><s:textfield name="Title" label="Title" value="DefaultTitle"/></th>
> >    <th><s:textfield name="Author" label="Author" value="DefaultAuthor"
> > /></th>
> >    <th><s:textfield name="Ending" label="Ending" value="DefaultEnding"
> > /></th>
> >    <th><s:textfield name="Energy" label="Energy" value="DefaultEnergy"
> > /></th>
> >    <th><s:textfield name="Flatness" label="Flatness"
> > value="DefaultFlatness" /></th>
> >    <th><s:textfield name="Validate" label="Validate"
> > value="DefaultValidate" /></th>
> >    <th><s:textfield name="Play" label="Play" value="DefaultPlay" /></th>
> >   </tr>
> > <s:iterator value="songs" status="rowstatus">
> >  <tr>
> >    <td><s:property value="songs[#rowstatus.index].title" /></td>
> >    <td><s:property value="songs[#rowstatus.index].author" /> </td>
> > <s:hidden name="songs[#rowstatus.index].id">
> > </s:hidden>
> >  </tr>
> > </s:iterator>
> > </table>
> > <s:submit value="SUBMIT" />
> > </form>
> > </body>
> > </html>
> >
> > hth
> > Martin Gainty
> > ______________________________________________
> > 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: Sun, 8 Nov 2009 22:43:09 +0100
> > > Subject: Re: sx:div and executeScript
> > > From: irenezeller@gmail.com
> > > To: user@struts.apache.org
> > >
> > > Yes, it is basically to give style to the table.
> > >
> > > this.tablecloth = function(){
> > >
> > >     // CONFIG
> > >
> > >     // if set to true then mouseover a table cell will highlight entire
> > > column (except sibling headings)
> > >     var highlightCols = false;
> > >
> > >     // if set to true then mouseover a table cell will highlight entire
> > > row    (except sibling headings)
> > >     var highlightRows = true;
> > >
> > >     // if set to true then click on a table sell will select row or
> > column
> > > based on config
> > >     var selectable = true;
> > >
> > >     // this function is called when
> > >     // add your own code if you want to add action
> > >     // function receives object that has been clicked
> > >     this.clickAction = function(obj){
> > >         //alert(obj.innerHTML);
> > >
> > >     };
> > >
> > >
> > >
> > >     // END CONFIG (do not edit below this line)
> > >
> > >
> > >     var tableover = false;
> > >     this.start = function(){
> > >         var tables = document.getElementsByTagName("table");
> > >         for (var i=0;i<tables.length;i++){
> > >             tables[i].onmouseover = function(){tableover = true};
> > >             tables[i].onmouseout = function(){tableover = false};
> > >
> > >             rows(tables[i]);
> > >         };
> > >     };
> > >
> > >     this.rows = function(table){
> > >         var css = "";
> > >         var tr = table.getElementsByTagName("tr");
> > >         for (var i=0;i<tr.length;i++){
> > >             css = (css == "odd") ? "even" : "odd";
> > >             tr[i].className = css;
> > >             var arr = new Array();
> > >             for(var j=0;j<tr[i].childNodes.length;j++){
> > >                 if(tr[i].childNodes[j].nodeType == 1)
> > > arr.push(tr[i].childNodes[j]);
> > >             };
> > >             for (var j=0;j<arr.length;j++){
> > >                 arr[j].row = i;
> > >                 arr[j].col = j;
> > >                 if(arr[j].innerHTML == " " || arr[j].innerHTML == "")
> > > arr[j].className += " empty";
> > >                 arr[j].css = arr[j].className;
> > >                 arr[j].onmouseover = function(){
> > >                     over(table,this,this.row,this.col);
> > >                 };
> > >                 arr[j].onmouseout = function(){
> > >                     out(table,this,this.row,this.col);
> > >                 };
> > >                 arr[j].onmousedown = function(){
> > >                     down(table,this,this.row,this.col);
> > >                 };
> > >                 arr[j].onmouseup = function(){
> > >                     up(table,this,this.row,this.col);
> > >                 };
> > >                 arr[j].onclick = function(){
> > >                     click(table,this,this.row,this.col);
> > >                 };
> > >             };
> > >         };
> > >     };
> > >
> > >     // appyling mouseover state for objects (th or td)
> > >     this.over = function(table,obj,row,col){
> > >         if (!highlightCols && !highlightRows) obj.className = obj.css + "
> > > over";
> > >         if(check1(obj,col)){
> > >             if(highlightCols) highlightCol(table,obj,col);
> > >             if(highlightRows) highlightRow(table,obj,row);
> > >         };
> > >     };
> > >     // appyling mouseout state for objects (th or td)
> > >     this.out = function(table,obj,row,col){
> > >         if (!highlightCols && !highlightRows) obj.className = obj.css;
> > >         unhighlightCol(table,col);
> > >         unhighlightRow(table,row);
> > >     };
> > >     // appyling mousedown state for objects (th or td)
> > >     this.down = function(table,obj,row,col){
> > >         obj.className = obj.css + " down";
> > >     };
> > >     // appyling mouseup state for objects (th or td)
> > >     this.up = function(table,obj,row,col){
> > >         obj.className = obj.css + " over";
> > >     };
> > >     // onclick event for objects (th or td)
> > >     this.click = function(table,obj,row,col){
> > >         if(check1){
> > >             if(selectable) {
> > >                 unselect(table);
> > >                 if(highlightCols) highlightCol(table,obj,col,true);
> > >                 if(highlightRows) highlightRow(table,obj,row,true);
> > >                 document.onclick = unselectAll;
> > >             }
> > >         };
> > >         clickAction(obj);
> > >     };
> > >
> > >     this.highlightCol = function(table,active,col,sel){
> > >         var css = (typeof(sel) != "undefined") ? "selected" : "over";
> > >         var tr = table.getElementsByTagName("tr");
> > >         for (var i=0;i<tr.length;i++){
> > >             var arr = new Array();
> > >             for(j=0;j<tr[i].childNodes.length;j++){
> > >                 if(tr[i].childNodes[j].nodeType == 1)
> > > arr.push(tr[i].childNodes[j]);
> > >             };
> > >             var obj = arr[col];
> > >             if (check2(active,obj) && check3(obj)) obj.className =
> > obj.css +
> > > " " + css;
> > >         };
> > >     };
> > >     this.unhighlightCol = function(table,col){
> > >         var tr = table.getElementsByTagName("tr");
> > >         for (var i=0;i<tr.length;i++){
> > >             var arr = new Array();
> > >             for(j=0;j<tr[i].childNodes.length;j++){
> > >                 if(tr[i].childNodes[j].nodeType == 1)
> > > arr.push(tr[i].childNodes[j])
> > >             };
> > >             var obj = arr[col];
> > >             if(check3(obj)) obj.className = obj.css;
> > >         };
> > >     };
> > >     this.highlightRow = function(table,active,row,sel){
> > >         var css = (typeof(sel) != "undefined") ? "selected" : "over";
> > >         var tr = table.getElementsByTagName("tr")[row];
> > >         for (var i=0;i<tr.childNodes.length;i++){
> > >             var obj = tr.childNodes[i];
> > >             if (check2(active,obj) && check3(obj)) obj.className =
> > obj.css +
> > > " " + css;
> > >         };
> > >     };
> > >     this.unhighlightRow = function(table,row){
> > >         var tr = table.getElementsByTagName("tr")[row];
> > >         for (var i=0;i<tr.childNodes.length;i++){
> > >             var obj = tr.childNodes[i];
> > >             if(check3(obj)) obj.className = obj.css;
> > >         };
> > >     };
> > >     this.unselect = function(table){
> > >         tr = table.getElementsByTagName("tr")
> > >         for (var i=0;i<tr.length;i++){
> > >             for (var j=0;j<tr[i].childNodes.length;j++){
> > >                 var obj = tr[i].childNodes[j];
> > >                 if(obj.className) obj.className =
> > > obj.className.replace("selected","");
> > >             };
> > >         };
> > >     };
> > >     this.unselectAll = function(){
> > >         if(!tableover){
> > >             tables = document.getElementsByTagName("table");
> > >             for (var i=0;i<tables.length;i++){
> > >                 unselect(tables[i])
> > >             };
> > >         };
> > >     };
> > >     this.check1 = function(obj,col){
> > >         return (!(col == 0 && obj.className.indexOf("empty") != -1));
> > >     }
> > >     this.check2 = function(active,obj){
> > >         return (!(active.tagName == "TH" && obj.tagName == "TH"));
> > >     };
> > >     this.check3 = function(obj){
> > >         return (obj.className) ? (obj.className.indexOf("selected") ==
> > -1) :
> > > true;
> > >     };
> > >
> > >     start();
> > >
> > > };
> > >
> > > /* script initiates on page load. */
> > >
> > >     window.onload = tablecloth;
> > >
> > >
> > > 2009/11/8 Martin Gainty <mg...@hotmail.com>
> > >
> > > >
> > > > can you display the function(s) inside tablecloth.js
> > > >
> > > > thx
> > > > Martin Gainty
> > > > ______________________________________________
> > > > 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: Sun, 8 Nov 2009 20:49:29 +0100
> > > > > Subject: Re: sx:div and executeScript
> > > > > From: irenezeller@gmail.com
> > > > > To: user@struts.apache.org
> > > > >
> > > > > This is the jsp I'm calling:
> > > > >
> > > > > <%@ page contentType="text/html; charset=UTF-8" %>
> > > > > <%@ taglib prefix="s" uri="/struts-tags" %>
> > > > > <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
> > > > >
> > > > > <?xml version="1.0" encoding="UTF-8" ?>
> > > > > <%@ page language="java" contentType="text/html; charset=UTF-8"
> > > > >     pageEncoding="UTF-8"%>
> > > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> > > > > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> > > > > <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="
> > > > > http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html
> > ">
> > > > > <head>
> > > > > <link href="tablecloth/tablecloth.css" rel="stylesheet"
> > type="text/css"
> > > > > media="screen" />
> > > > > <script language="JavaScript" src="tablecloth/tablecloth.js"
> > > > > type="text/javascript"></script>
> > > > >
> > > > > <sx:head/>
> > > > >
> > > > > </head>
> > > > > <body>
> > > > >
> > > > > <table>
> > > > >      <tr>
> > > > >          <th><s:text name="Title"/></th>
> > > > >         <th><s:text name="Author"/></th>
> > > > >         <th><s:text name="Ending"/></th>
> > > > >         <th><s:text name="Energy"/></th>
> > > > >         <th><s:text name="Flatness"/></th>
> > > > >         <th><s:text name="Validate"/></th>
> > > > >         <th><s:text name="Play"/></th>
> > > > >     </tr>
> > > > >
> > > > >       <s:iterator value="songs" status="rowstatus">
> > > > >         <tr>
> > > > >           <td ><s:property
> > value="songs[#rowstatus.index].title"/></td>
> > > > >           <td >
> > > > >               <s:property value="songs[#rowstatus.index].author"/>
> > > > >           </td>
> > > > >          <s:hidden name = "songs[%{#rowstatus.index}].id">
> > > > >          </s:hidden>
> > > > >         </tr>
> > > > >
> > > > >     </s:iterator>
> > > > >
> > > > > </table>
> > > > >
> > > > > </body>
> > > > >
> > > > > </html>
> > > > >
> > > > > and I would like to call the Javascript function:
> > > > > window.onload = tablecloth;
> > > > >
> > > > >
> > > > > 2009/11/8 Martin Gainty <mg...@hotmail.com>
> > > > >
> > > > > >
> > > > > > then the href should call the javascript function instead of the
> > > > supplied
> > > > > > URL
> > > > > > please post the complete jsp (with the javascript function you want
> > to
> > > > > > call)
> > > > > >
> > > > > > Martin Gainty
> > > > > > ______________________________________________
> > > > > > 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: Sun, 8 Nov 2009 17:37:19 +0100
> > > > > > > Subject: Re: sx:div and executeScript
> > > > > > > From: irenezeller@gmail.com
> > > > > > > To: user@struts.apache.org
> > > > > > >
> > > > > > > I'm using <sx:head/>. Not theme="ajax", I think the last version
> > does
> > > > not
> > > > > > > support this theme. The href attribute points a working url,
> > however
> > > > > > > Javascript is not executed when the ajax url is loaded.
> > > > > > >
> > > > > > > 2009/11/8 Martin Gainty <mg...@hotmail.com>
> > > > > > >
> > > > > > > >
> > > > > > > > assuming theme="ajax"
> > > > > > > > then the div href would be
> > > > > > > >
> > > > > > > > href
> > > > > > > >                                        false
> > > > > > > >
> > > > > > > >
> > > > > > > >                                        false
> > > > > > > >                                        String
> > > > > > > >                                        The URL to call to
> > obtain
> > > > the
> > > > > > > > content. Note: If used with ajax context, the value must be set
> > as
> > > > an
> > > > > > url
> > > > > > > > tag value.
> > > > > > > > make sure your href attribute points a working url such as what
> > is
> > > > > > > > illustrated here
> > > > > > > > http://struts.apache.org/2.1.8/docs/ajax-div-template.html
> > > > > > > >
> > > > > > > > Martin Gainty
> > > > > > > > ______________________________________________
> > > > > > > > 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: Sat, 7 Nov 2009 17:44:28 +0100
> > > > > > > > > Subject: sx:div and executeScript
> > > > > > > > > From: irenezeller@gmail.com
> > > > > > > > > To: user@struts.apache.org
> > > > > > > > >
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > I'm using sx:div for loading a content after the page is
> > loaded.
> > > > > > > > > But, I have problems because Javascript is not working in the
> > > > page
> > > > > > linked
> > > > > > > > by
> > > > > > > > > <sx:div ..>. I read about a solution with Struts2.1.2 (I'm
> > using
> > > > > > > > > Struts2.1.8) in this page(
> > > > > > > > >
> > > > > > > >
> > > > > >
> > > >
> > http://mail-archives.apache.org/mod_mbox/struts-issues/200808.mbox/%3C2107922214.1217595186486.JavaMail.jira@brutus%3E
> > > > > > > > ,
> > > > > > > > > but it did not work for me.
> > > > > > > > > I'm using this code:
> > > > > > > > > <sx:div id="tableScroll"label="table" href="%{#table}"
> > > > > > > > > separateScripts="false" executeScripts="true">
> > > > > > > > >                     Carregant'se
> > > > > > > > >  </sx:div>
> > > > > > > > > and the returned code is a populated table.
> > > > > > > > > I changed the jar struts2-dojo-plugin-2.1.8.jar, how the
> > thread
> > > > > > > > indicates,
> > > > > > > > > but nothing changed.
> > > > > > > > > I need Javacript in the returned content. Please, I need
> > help.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Thanks in advance,
> > > > > > > > >
> > > > > > > > > Irene
> > > > > > > >
> > > > > > > >
> > _________________________________________________________________
> > > > > > > > Find the right PC with Windows 7 and Windows Live.
> > > > > > > >
> > > > > > > >
> > > > > >
> > > >
> > http://www.microsoft.com/Windows/pc-scout/laptop-set-criteria.aspx?cbid=wl&filt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000&cat=1,2,3,4,5,6&brands=5,6,7,8,9,10,11,12,13,14,15,16&addf=4,5,9&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen2:112009
> > > > > > > >
> > > > > >
> > > > > > _________________________________________________________________
> > > > > > Hotmail: Trusted email with Microsoft's powerful SPAM protection.
> > > > > > http://clk.atdmt.com/GBL/go/177141664/direct/01/
> > > > > > http://clk.atdmt.com/GBL/go/177141664/direct/01/
> > > > > >
> > > >
> > > > _________________________________________________________________
> > > > Hotmail: Trusted email with Microsoft's powerful SPAM protection.
> > > > http://clk.atdmt.com/GBL/go/177141664/direct/01/
> > > > http://clk.atdmt.com/GBL/go/177141664/direct/01/
> > > >
> >
> > _________________________________________________________________
> > Hotmail: Trusted email with powerful SPAM protection.
> > http://clk.atdmt.com/GBL/go/177141665/direct/01/
> >
 		 	   		  
_________________________________________________________________
Bing brings you maps, menus, and reviews organized in one place.
http://www.bing.com/search?q=restaurants&form=MFESRP&publ=WLHMTAG&crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1

Re: sx:div and executeScript

Posted by irene zeller sancho <ir...@gmail.com>.
Thanks Martin, I wil try to do it. However, I'm using Firefox and not
Windows.

Irene

2009/11/9 Martin Gainty <mg...@hotmail.com>

>
> Irene-
> the standard onLoad="javascript:function" doesnt seem to work (in IE at
> least) so use this document.write to replace __ie_onload
> /*information courtesy of dean edwards*/
> http://dean.edwards.name/weblog/2006/06/again/
>
> <%@ page contentType="text/html; charset=UTF-8" %>
> <%@ taglib prefix="s" uri="/struts-tags" %>
> <%@ page language="java" contentType="text/html; charset=UTF-8"
> pageEncoding="UTF-8"%>
> <html>
> <head>
> <title>This is the title</title>
> <script LANGUAGE="JavaScript" type="text/javascript">
> function init()
> { // if set to true then mouseover a table cell will
> alert('inside init()');
> //highlight entire column (except sibling headings)
> document.forms[0].Title.value='newTitle';
> document.forms[0].Author.value='newAuthor';
> document.forms[0].Ending.value='newEnding';
> document.forms[0].Energy.value='newEnergy';
> document.forms[0].Flatness.value='newFlatness';
> document.forms[0].Validate.value='newValidate';
> document.forms[0].Play.value='newPlay';
> }
> /** for Internet Explorer (using conditional comments) **/
> /*@cc_on @*/
> /*@if (@_win32)
> document.write("<script id=__ie_onload defer
> src=javascript:void(0)><\/script>");
> var script = document.getElementById("__ie_onload");
> script.onreadystatechange = function() {
>  if (this.readyState == "complete") {
>    init(); // call the onload handler
>  }
> };
> /*@end @*/
> window.onload = init;
> //-->
> </script>
> </head>
>
> <body onLoad="'window.onload = init'">
>
> <p>This is a test for Irene </p>
> <s:div href="javascript:tablecloth_function">
> </s:div>
> <form action="somethingAction" name="theForm" >
> <table>
>  <tr>
>    <th><s:textfield name="Title" label="Title" value="DefaultTitle"/></th>
>    <th><s:textfield name="Author" label="Author" value="DefaultAuthor"
> /></th>
>    <th><s:textfield name="Ending" label="Ending" value="DefaultEnding"
> /></th>
>    <th><s:textfield name="Energy" label="Energy" value="DefaultEnergy"
> /></th>
>    <th><s:textfield name="Flatness" label="Flatness"
> value="DefaultFlatness" /></th>
>    <th><s:textfield name="Validate" label="Validate"
> value="DefaultValidate" /></th>
>    <th><s:textfield name="Play" label="Play" value="DefaultPlay" /></th>
>   </tr>
> <s:iterator value="songs" status="rowstatus">
>  <tr>
>    <td><s:property value="songs[#rowstatus.index].title" /></td>
>    <td><s:property value="songs[#rowstatus.index].author" /> </td>
> <s:hidden name="songs[#rowstatus.index].id">
> </s:hidden>
>  </tr>
> </s:iterator>
> </table>
> <s:submit value="SUBMIT" />
> </form>
> </body>
> </html>
>
> hth
> Martin Gainty
> ______________________________________________
> 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: Sun, 8 Nov 2009 22:43:09 +0100
> > Subject: Re: sx:div and executeScript
> > From: irenezeller@gmail.com
> > To: user@struts.apache.org
> >
> > Yes, it is basically to give style to the table.
> >
> > this.tablecloth = function(){
> >
> >     // CONFIG
> >
> >     // if set to true then mouseover a table cell will highlight entire
> > column (except sibling headings)
> >     var highlightCols = false;
> >
> >     // if set to true then mouseover a table cell will highlight entire
> > row    (except sibling headings)
> >     var highlightRows = true;
> >
> >     // if set to true then click on a table sell will select row or
> column
> > based on config
> >     var selectable = true;
> >
> >     // this function is called when
> >     // add your own code if you want to add action
> >     // function receives object that has been clicked
> >     this.clickAction = function(obj){
> >         //alert(obj.innerHTML);
> >
> >     };
> >
> >
> >
> >     // END CONFIG (do not edit below this line)
> >
> >
> >     var tableover = false;
> >     this.start = function(){
> >         var tables = document.getElementsByTagName("table");
> >         for (var i=0;i<tables.length;i++){
> >             tables[i].onmouseover = function(){tableover = true};
> >             tables[i].onmouseout = function(){tableover = false};
> >
> >             rows(tables[i]);
> >         };
> >     };
> >
> >     this.rows = function(table){
> >         var css = "";
> >         var tr = table.getElementsByTagName("tr");
> >         for (var i=0;i<tr.length;i++){
> >             css = (css == "odd") ? "even" : "odd";
> >             tr[i].className = css;
> >             var arr = new Array();
> >             for(var j=0;j<tr[i].childNodes.length;j++){
> >                 if(tr[i].childNodes[j].nodeType == 1)
> > arr.push(tr[i].childNodes[j]);
> >             };
> >             for (var j=0;j<arr.length;j++){
> >                 arr[j].row = i;
> >                 arr[j].col = j;
> >                 if(arr[j].innerHTML == " " || arr[j].innerHTML == "")
> > arr[j].className += " empty";
> >                 arr[j].css = arr[j].className;
> >                 arr[j].onmouseover = function(){
> >                     over(table,this,this.row,this.col);
> >                 };
> >                 arr[j].onmouseout = function(){
> >                     out(table,this,this.row,this.col);
> >                 };
> >                 arr[j].onmousedown = function(){
> >                     down(table,this,this.row,this.col);
> >                 };
> >                 arr[j].onmouseup = function(){
> >                     up(table,this,this.row,this.col);
> >                 };
> >                 arr[j].onclick = function(){
> >                     click(table,this,this.row,this.col);
> >                 };
> >             };
> >         };
> >     };
> >
> >     // appyling mouseover state for objects (th or td)
> >     this.over = function(table,obj,row,col){
> >         if (!highlightCols && !highlightRows) obj.className = obj.css + "
> > over";
> >         if(check1(obj,col)){
> >             if(highlightCols) highlightCol(table,obj,col);
> >             if(highlightRows) highlightRow(table,obj,row);
> >         };
> >     };
> >     // appyling mouseout state for objects (th or td)
> >     this.out = function(table,obj,row,col){
> >         if (!highlightCols && !highlightRows) obj.className = obj.css;
> >         unhighlightCol(table,col);
> >         unhighlightRow(table,row);
> >     };
> >     // appyling mousedown state for objects (th or td)
> >     this.down = function(table,obj,row,col){
> >         obj.className = obj.css + " down";
> >     };
> >     // appyling mouseup state for objects (th or td)
> >     this.up = function(table,obj,row,col){
> >         obj.className = obj.css + " over";
> >     };
> >     // onclick event for objects (th or td)
> >     this.click = function(table,obj,row,col){
> >         if(check1){
> >             if(selectable) {
> >                 unselect(table);
> >                 if(highlightCols) highlightCol(table,obj,col,true);
> >                 if(highlightRows) highlightRow(table,obj,row,true);
> >                 document.onclick = unselectAll;
> >             }
> >         };
> >         clickAction(obj);
> >     };
> >
> >     this.highlightCol = function(table,active,col,sel){
> >         var css = (typeof(sel) != "undefined") ? "selected" : "over";
> >         var tr = table.getElementsByTagName("tr");
> >         for (var i=0;i<tr.length;i++){
> >             var arr = new Array();
> >             for(j=0;j<tr[i].childNodes.length;j++){
> >                 if(tr[i].childNodes[j].nodeType == 1)
> > arr.push(tr[i].childNodes[j]);
> >             };
> >             var obj = arr[col];
> >             if (check2(active,obj) && check3(obj)) obj.className =
> obj.css +
> > " " + css;
> >         };
> >     };
> >     this.unhighlightCol = function(table,col){
> >         var tr = table.getElementsByTagName("tr");
> >         for (var i=0;i<tr.length;i++){
> >             var arr = new Array();
> >             for(j=0;j<tr[i].childNodes.length;j++){
> >                 if(tr[i].childNodes[j].nodeType == 1)
> > arr.push(tr[i].childNodes[j])
> >             };
> >             var obj = arr[col];
> >             if(check3(obj)) obj.className = obj.css;
> >         };
> >     };
> >     this.highlightRow = function(table,active,row,sel){
> >         var css = (typeof(sel) != "undefined") ? "selected" : "over";
> >         var tr = table.getElementsByTagName("tr")[row];
> >         for (var i=0;i<tr.childNodes.length;i++){
> >             var obj = tr.childNodes[i];
> >             if (check2(active,obj) && check3(obj)) obj.className =
> obj.css +
> > " " + css;
> >         };
> >     };
> >     this.unhighlightRow = function(table,row){
> >         var tr = table.getElementsByTagName("tr")[row];
> >         for (var i=0;i<tr.childNodes.length;i++){
> >             var obj = tr.childNodes[i];
> >             if(check3(obj)) obj.className = obj.css;
> >         };
> >     };
> >     this.unselect = function(table){
> >         tr = table.getElementsByTagName("tr")
> >         for (var i=0;i<tr.length;i++){
> >             for (var j=0;j<tr[i].childNodes.length;j++){
> >                 var obj = tr[i].childNodes[j];
> >                 if(obj.className) obj.className =
> > obj.className.replace("selected","");
> >             };
> >         };
> >     };
> >     this.unselectAll = function(){
> >         if(!tableover){
> >             tables = document.getElementsByTagName("table");
> >             for (var i=0;i<tables.length;i++){
> >                 unselect(tables[i])
> >             };
> >         };
> >     };
> >     this.check1 = function(obj,col){
> >         return (!(col == 0 && obj.className.indexOf("empty") != -1));
> >     }
> >     this.check2 = function(active,obj){
> >         return (!(active.tagName == "TH" && obj.tagName == "TH"));
> >     };
> >     this.check3 = function(obj){
> >         return (obj.className) ? (obj.className.indexOf("selected") ==
> -1) :
> > true;
> >     };
> >
> >     start();
> >
> > };
> >
> > /* script initiates on page load. */
> >
> >     window.onload = tablecloth;
> >
> >
> > 2009/11/8 Martin Gainty <mg...@hotmail.com>
> >
> > >
> > > can you display the function(s) inside tablecloth.js
> > >
> > > thx
> > > Martin Gainty
> > > ______________________________________________
> > > 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: Sun, 8 Nov 2009 20:49:29 +0100
> > > > Subject: Re: sx:div and executeScript
> > > > From: irenezeller@gmail.com
> > > > To: user@struts.apache.org
> > > >
> > > > This is the jsp I'm calling:
> > > >
> > > > <%@ page contentType="text/html; charset=UTF-8" %>
> > > > <%@ taglib prefix="s" uri="/struts-tags" %>
> > > > <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
> > > >
> > > > <?xml version="1.0" encoding="UTF-8" ?>
> > > > <%@ page language="java" contentType="text/html; charset=UTF-8"
> > > >     pageEncoding="UTF-8"%>
> > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> > > > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> > > > <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="
> > > > http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html
> ">
> > > > <head>
> > > > <link href="tablecloth/tablecloth.css" rel="stylesheet"
> type="text/css"
> > > > media="screen" />
> > > > <script language="JavaScript" src="tablecloth/tablecloth.js"
> > > > type="text/javascript"></script>
> > > >
> > > > <sx:head/>
> > > >
> > > > </head>
> > > > <body>
> > > >
> > > > <table>
> > > >      <tr>
> > > >          <th><s:text name="Title"/></th>
> > > >         <th><s:text name="Author"/></th>
> > > >         <th><s:text name="Ending"/></th>
> > > >         <th><s:text name="Energy"/></th>
> > > >         <th><s:text name="Flatness"/></th>
> > > >         <th><s:text name="Validate"/></th>
> > > >         <th><s:text name="Play"/></th>
> > > >     </tr>
> > > >
> > > >       <s:iterator value="songs" status="rowstatus">
> > > >         <tr>
> > > >           <td ><s:property
> value="songs[#rowstatus.index].title"/></td>
> > > >           <td >
> > > >               <s:property value="songs[#rowstatus.index].author"/>
> > > >           </td>
> > > >          <s:hidden name = "songs[%{#rowstatus.index}].id">
> > > >          </s:hidden>
> > > >         </tr>
> > > >
> > > >     </s:iterator>
> > > >
> > > > </table>
> > > >
> > > > </body>
> > > >
> > > > </html>
> > > >
> > > > and I would like to call the Javascript function:
> > > > window.onload = tablecloth;
> > > >
> > > >
> > > > 2009/11/8 Martin Gainty <mg...@hotmail.com>
> > > >
> > > > >
> > > > > then the href should call the javascript function instead of the
> > > supplied
> > > > > URL
> > > > > please post the complete jsp (with the javascript function you want
> to
> > > > > call)
> > > > >
> > > > > Martin Gainty
> > > > > ______________________________________________
> > > > > 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: Sun, 8 Nov 2009 17:37:19 +0100
> > > > > > Subject: Re: sx:div and executeScript
> > > > > > From: irenezeller@gmail.com
> > > > > > To: user@struts.apache.org
> > > > > >
> > > > > > I'm using <sx:head/>. Not theme="ajax", I think the last version
> does
> > > not
> > > > > > support this theme. The href attribute points a working url,
> however
> > > > > > Javascript is not executed when the ajax url is loaded.
> > > > > >
> > > > > > 2009/11/8 Martin Gainty <mg...@hotmail.com>
> > > > > >
> > > > > > >
> > > > > > > assuming theme="ajax"
> > > > > > > then the div href would be
> > > > > > >
> > > > > > > href
> > > > > > >                                        false
> > > > > > >
> > > > > > >
> > > > > > >                                        false
> > > > > > >                                        String
> > > > > > >                                        The URL to call to
> obtain
> > > the
> > > > > > > content. Note: If used with ajax context, the value must be set
> as
> > > an
> > > > > url
> > > > > > > tag value.
> > > > > > > make sure your href attribute points a working url such as what
> is
> > > > > > > illustrated here
> > > > > > > http://struts.apache.org/2.1.8/docs/ajax-div-template.html
> > > > > > >
> > > > > > > Martin Gainty
> > > > > > > ______________________________________________
> > > > > > > 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: Sat, 7 Nov 2009 17:44:28 +0100
> > > > > > > > Subject: sx:div and executeScript
> > > > > > > > From: irenezeller@gmail.com
> > > > > > > > To: user@struts.apache.org
> > > > > > > >
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I'm using sx:div for loading a content after the page is
> loaded.
> > > > > > > > But, I have problems because Javascript is not working in the
> > > page
> > > > > linked
> > > > > > > by
> > > > > > > > <sx:div ..>. I read about a solution with Struts2.1.2 (I'm
> using
> > > > > > > > Struts2.1.8) in this page(
> > > > > > > >
> > > > > > >
> > > > >
> > >
> http://mail-archives.apache.org/mod_mbox/struts-issues/200808.mbox/%3C2107922214.1217595186486.JavaMail.jira@brutus%3E
> > > > > > > ,
> > > > > > > > but it did not work for me.
> > > > > > > > I'm using this code:
> > > > > > > > <sx:div id="tableScroll"label="table" href="%{#table}"
> > > > > > > > separateScripts="false" executeScripts="true">
> > > > > > > >                     Carregant'se
> > > > > > > >  </sx:div>
> > > > > > > > and the returned code is a populated table.
> > > > > > > > I changed the jar struts2-dojo-plugin-2.1.8.jar, how the
> thread
> > > > > > > indicates,
> > > > > > > > but nothing changed.
> > > > > > > > I need Javacript in the returned content. Please, I need
> help.
> > > > > > > >
> > > > > > > >
> > > > > > > > Thanks in advance,
> > > > > > > >
> > > > > > > > Irene
> > > > > > >
> > > > > > >
> _________________________________________________________________
> > > > > > > Find the right PC with Windows 7 and Windows Live.
> > > > > > >
> > > > > > >
> > > > >
> > >
> http://www.microsoft.com/Windows/pc-scout/laptop-set-criteria.aspx?cbid=wl&filt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000&cat=1,2,3,4,5,6&brands=5,6,7,8,9,10,11,12,13,14,15,16&addf=4,5,9&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen2:112009
> > > > > > >
> > > > >
> > > > > _________________________________________________________________
> > > > > Hotmail: Trusted email with Microsoft's powerful SPAM protection.
> > > > > http://clk.atdmt.com/GBL/go/177141664/direct/01/
> > > > > http://clk.atdmt.com/GBL/go/177141664/direct/01/
> > > > >
> > >
> > > _________________________________________________________________
> > > Hotmail: Trusted email with Microsoft's powerful SPAM protection.
> > > http://clk.atdmt.com/GBL/go/177141664/direct/01/
> > > http://clk.atdmt.com/GBL/go/177141664/direct/01/
> > >
>
> _________________________________________________________________
> Hotmail: Trusted email with powerful SPAM protection.
> http://clk.atdmt.com/GBL/go/177141665/direct/01/
>

RE: sx:div and executeScript

Posted by Martin Gainty <mg...@hotmail.com>.
Irene-
the standard onLoad="javascript:function" doesnt seem to work (in IE at least) so use this document.write to replace __ie_onload
/*information courtesy of dean edwards*/
http://dean.edwards.name/weblog/2006/06/again/

<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
<head>
<title>This is the title</title>
<script LANGUAGE="JavaScript" type="text/javascript">
function init() 
{ // if set to true then mouseover a table cell will
alert('inside init()');
//highlight entire column (except sibling headings) 
document.forms[0].Title.value='newTitle';
document.forms[0].Author.value='newAuthor';
document.forms[0].Ending.value='newEnding';
document.forms[0].Energy.value='newEnergy';
document.forms[0].Flatness.value='newFlatness';
document.forms[0].Validate.value='newValidate';
document.forms[0].Play.value='newPlay';
}
/** for Internet Explorer (using conditional comments) **/
/*@cc_on @*/
/*@if (@_win32)
document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
var script = document.getElementById("__ie_onload");
script.onreadystatechange = function() {
  if (this.readyState == "complete") {
    init(); // call the onload handler
  }
};
/*@end @*/
window.onload = init; 
//-->
</script>
</head>
 
<body onLoad="'window.onload = init'">

<p>This is a test for Irene </p>
<s:div href="javascript:tablecloth_function">
</s:div>
<form action="somethingAction" name="theForm" >
<table>
  <tr>
    <th><s:textfield name="Title" label="Title" value="DefaultTitle"/></th>
    <th><s:textfield name="Author" label="Author" value="DefaultAuthor" /></th>
    <th><s:textfield name="Ending" label="Ending" value="DefaultEnding" /></th>
    <th><s:textfield name="Energy" label="Energy" value="DefaultEnergy" /></th>
    <th><s:textfield name="Flatness" label="Flatness" value="DefaultFlatness" /></th>
    <th><s:textfield name="Validate" label="Validate" value="DefaultValidate" /></th>
    <th><s:textfield name="Play" label="Play" value="DefaultPlay" /></th>
  </tr>
<s:iterator value="songs" status="rowstatus">
  <tr>
    <td><s:property value="songs[#rowstatus.index].title" /></td>
    <td><s:property value="songs[#rowstatus.index].author" /> </td>
<s:hidden name="songs[#rowstatus.index].id">
</s:hidden>
  </tr>
</s:iterator>
</table>
<s:submit value="SUBMIT" />
</form>
</body>
</html>

hth
Martin Gainty 
______________________________________________ 
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: Sun, 8 Nov 2009 22:43:09 +0100
> Subject: Re: sx:div and executeScript
> From: irenezeller@gmail.com
> To: user@struts.apache.org
> 
> Yes, it is basically to give style to the table.
> 
> this.tablecloth = function(){
> 
>     // CONFIG
> 
>     // if set to true then mouseover a table cell will highlight entire
> column (except sibling headings)
>     var highlightCols = false;
> 
>     // if set to true then mouseover a table cell will highlight entire
> row    (except sibling headings)
>     var highlightRows = true;
> 
>     // if set to true then click on a table sell will select row or column
> based on config
>     var selectable = true;
> 
>     // this function is called when
>     // add your own code if you want to add action
>     // function receives object that has been clicked
>     this.clickAction = function(obj){
>         //alert(obj.innerHTML);
> 
>     };
> 
> 
> 
>     // END CONFIG (do not edit below this line)
> 
> 
>     var tableover = false;
>     this.start = function(){
>         var tables = document.getElementsByTagName("table");
>         for (var i=0;i<tables.length;i++){
>             tables[i].onmouseover = function(){tableover = true};
>             tables[i].onmouseout = function(){tableover = false};
> 
>             rows(tables[i]);
>         };
>     };
> 
>     this.rows = function(table){
>         var css = "";
>         var tr = table.getElementsByTagName("tr");
>         for (var i=0;i<tr.length;i++){
>             css = (css == "odd") ? "even" : "odd";
>             tr[i].className = css;
>             var arr = new Array();
>             for(var j=0;j<tr[i].childNodes.length;j++){
>                 if(tr[i].childNodes[j].nodeType == 1)
> arr.push(tr[i].childNodes[j]);
>             };
>             for (var j=0;j<arr.length;j++){
>                 arr[j].row = i;
>                 arr[j].col = j;
>                 if(arr[j].innerHTML == "&nbsp;" || arr[j].innerHTML == "")
> arr[j].className += " empty";
>                 arr[j].css = arr[j].className;
>                 arr[j].onmouseover = function(){
>                     over(table,this,this.row,this.col);
>                 };
>                 arr[j].onmouseout = function(){
>                     out(table,this,this.row,this.col);
>                 };
>                 arr[j].onmousedown = function(){
>                     down(table,this,this.row,this.col);
>                 };
>                 arr[j].onmouseup = function(){
>                     up(table,this,this.row,this.col);
>                 };
>                 arr[j].onclick = function(){
>                     click(table,this,this.row,this.col);
>                 };
>             };
>         };
>     };
> 
>     // appyling mouseover state for objects (th or td)
>     this.over = function(table,obj,row,col){
>         if (!highlightCols && !highlightRows) obj.className = obj.css + "
> over";
>         if(check1(obj,col)){
>             if(highlightCols) highlightCol(table,obj,col);
>             if(highlightRows) highlightRow(table,obj,row);
>         };
>     };
>     // appyling mouseout state for objects (th or td)
>     this.out = function(table,obj,row,col){
>         if (!highlightCols && !highlightRows) obj.className = obj.css;
>         unhighlightCol(table,col);
>         unhighlightRow(table,row);
>     };
>     // appyling mousedown state for objects (th or td)
>     this.down = function(table,obj,row,col){
>         obj.className = obj.css + " down";
>     };
>     // appyling mouseup state for objects (th or td)
>     this.up = function(table,obj,row,col){
>         obj.className = obj.css + " over";
>     };
>     // onclick event for objects (th or td)
>     this.click = function(table,obj,row,col){
>         if(check1){
>             if(selectable) {
>                 unselect(table);
>                 if(highlightCols) highlightCol(table,obj,col,true);
>                 if(highlightRows) highlightRow(table,obj,row,true);
>                 document.onclick = unselectAll;
>             }
>         };
>         clickAction(obj);
>     };
> 
>     this.highlightCol = function(table,active,col,sel){
>         var css = (typeof(sel) != "undefined") ? "selected" : "over";
>         var tr = table.getElementsByTagName("tr");
>         for (var i=0;i<tr.length;i++){
>             var arr = new Array();
>             for(j=0;j<tr[i].childNodes.length;j++){
>                 if(tr[i].childNodes[j].nodeType == 1)
> arr.push(tr[i].childNodes[j]);
>             };
>             var obj = arr[col];
>             if (check2(active,obj) && check3(obj)) obj.className = obj.css +
> " " + css;
>         };
>     };
>     this.unhighlightCol = function(table,col){
>         var tr = table.getElementsByTagName("tr");
>         for (var i=0;i<tr.length;i++){
>             var arr = new Array();
>             for(j=0;j<tr[i].childNodes.length;j++){
>                 if(tr[i].childNodes[j].nodeType == 1)
> arr.push(tr[i].childNodes[j])
>             };
>             var obj = arr[col];
>             if(check3(obj)) obj.className = obj.css;
>         };
>     };
>     this.highlightRow = function(table,active,row,sel){
>         var css = (typeof(sel) != "undefined") ? "selected" : "over";
>         var tr = table.getElementsByTagName("tr")[row];
>         for (var i=0;i<tr.childNodes.length;i++){
>             var obj = tr.childNodes[i];
>             if (check2(active,obj) && check3(obj)) obj.className = obj.css +
> " " + css;
>         };
>     };
>     this.unhighlightRow = function(table,row){
>         var tr = table.getElementsByTagName("tr")[row];
>         for (var i=0;i<tr.childNodes.length;i++){
>             var obj = tr.childNodes[i];
>             if(check3(obj)) obj.className = obj.css;
>         };
>     };
>     this.unselect = function(table){
>         tr = table.getElementsByTagName("tr")
>         for (var i=0;i<tr.length;i++){
>             for (var j=0;j<tr[i].childNodes.length;j++){
>                 var obj = tr[i].childNodes[j];
>                 if(obj.className) obj.className =
> obj.className.replace("selected","");
>             };
>         };
>     };
>     this.unselectAll = function(){
>         if(!tableover){
>             tables = document.getElementsByTagName("table");
>             for (var i=0;i<tables.length;i++){
>                 unselect(tables[i])
>             };
>         };
>     };
>     this.check1 = function(obj,col){
>         return (!(col == 0 && obj.className.indexOf("empty") != -1));
>     }
>     this.check2 = function(active,obj){
>         return (!(active.tagName == "TH" && obj.tagName == "TH"));
>     };
>     this.check3 = function(obj){
>         return (obj.className) ? (obj.className.indexOf("selected") == -1) :
> true;
>     };
> 
>     start();
> 
> };
> 
> /* script initiates on page load. */
> 
>     window.onload = tablecloth;
> 
> 
> 2009/11/8 Martin Gainty <mg...@hotmail.com>
> 
> >
> > can you display the function(s) inside tablecloth.js
> >
> > thx
> > Martin Gainty
> > ______________________________________________
> > 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: Sun, 8 Nov 2009 20:49:29 +0100
> > > Subject: Re: sx:div and executeScript
> > > From: irenezeller@gmail.com
> > > To: user@struts.apache.org
> > >
> > > This is the jsp I'm calling:
> > >
> > > <%@ page contentType="text/html; charset=UTF-8" %>
> > > <%@ taglib prefix="s" uri="/struts-tags" %>
> > > <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
> > >
> > > <?xml version="1.0" encoding="UTF-8" ?>
> > > <%@ page language="java" contentType="text/html; charset=UTF-8"
> > >     pageEncoding="UTF-8"%>
> > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> > > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> > > <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="
> > > http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
> > > <head>
> > > <link href="tablecloth/tablecloth.css" rel="stylesheet" type="text/css"
> > > media="screen" />
> > > <script language="JavaScript" src="tablecloth/tablecloth.js"
> > > type="text/javascript"></script>
> > >
> > > <sx:head/>
> > >
> > > </head>
> > > <body>
> > >
> > > <table>
> > >      <tr>
> > >          <th><s:text name="Title"/></th>
> > >         <th><s:text name="Author"/></th>
> > >         <th><s:text name="Ending"/></th>
> > >         <th><s:text name="Energy"/></th>
> > >         <th><s:text name="Flatness"/></th>
> > >         <th><s:text name="Validate"/></th>
> > >         <th><s:text name="Play"/></th>
> > >     </tr>
> > >
> > >       <s:iterator value="songs" status="rowstatus">
> > >         <tr>
> > >           <td ><s:property value="songs[#rowstatus.index].title"/></td>
> > >           <td >
> > >               <s:property value="songs[#rowstatus.index].author"/>
> > >           </td>
> > >          <s:hidden name = "songs[%{#rowstatus.index}].id">
> > >          </s:hidden>
> > >         </tr>
> > >
> > >     </s:iterator>
> > >
> > > </table>
> > >
> > > </body>
> > >
> > > </html>
> > >
> > > and I would like to call the Javascript function:
> > > window.onload = tablecloth;
> > >
> > >
> > > 2009/11/8 Martin Gainty <mg...@hotmail.com>
> > >
> > > >
> > > > then the href should call the javascript function instead of the
> > supplied
> > > > URL
> > > > please post the complete jsp (with the javascript function you want to
> > > > call)
> > > >
> > > > Martin Gainty
> > > > ______________________________________________
> > > > 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: Sun, 8 Nov 2009 17:37:19 +0100
> > > > > Subject: Re: sx:div and executeScript
> > > > > From: irenezeller@gmail.com
> > > > > To: user@struts.apache.org
> > > > >
> > > > > I'm using <sx:head/>. Not theme="ajax", I think the last version does
> > not
> > > > > support this theme. The href attribute points a working url, however
> > > > > Javascript is not executed when the ajax url is loaded.
> > > > >
> > > > > 2009/11/8 Martin Gainty <mg...@hotmail.com>
> > > > >
> > > > > >
> > > > > > assuming theme="ajax"
> > > > > > then the div href would be
> > > > > >
> > > > > > href
> > > > > >                                        false
> > > > > >
> > > > > >
> > > > > >                                        false
> > > > > >                                        String
> > > > > >                                        The URL to call to obtain
> > the
> > > > > > content. Note: If used with ajax context, the value must be set as
> > an
> > > > url
> > > > > > tag value.
> > > > > > make sure your href attribute points a working url such as what is
> > > > > > illustrated here
> > > > > > http://struts.apache.org/2.1.8/docs/ajax-div-template.html
> > > > > >
> > > > > > Martin Gainty
> > > > > > ______________________________________________
> > > > > > 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: Sat, 7 Nov 2009 17:44:28 +0100
> > > > > > > Subject: sx:div and executeScript
> > > > > > > From: irenezeller@gmail.com
> > > > > > > To: user@struts.apache.org
> > > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > I'm using sx:div for loading a content after the page is loaded.
> > > > > > > But, I have problems because Javascript is not working in the
> > page
> > > > linked
> > > > > > by
> > > > > > > <sx:div ..>. I read about a solution with Struts2.1.2 (I'm using
> > > > > > > Struts2.1.8) in this page(
> > > > > > >
> > > > > >
> > > >
> > http://mail-archives.apache.org/mod_mbox/struts-issues/200808.mbox/%3C2107922214.1217595186486.JavaMail.jira@brutus%3E
> > > > > > ,
> > > > > > > but it did not work for me.
> > > > > > > I'm using this code:
> > > > > > > <sx:div id="tableScroll"label="table" href="%{#table}"
> > > > > > > separateScripts="false" executeScripts="true">
> > > > > > >                     Carregant'se
> > > > > > >  </sx:div>
> > > > > > > and the returned code is a populated table.
> > > > > > > I changed the jar struts2-dojo-plugin-2.1.8.jar, how the thread
> > > > > > indicates,
> > > > > > > but nothing changed.
> > > > > > > I need Javacript in the returned content. Please, I need help.
> > > > > > >
> > > > > > >
> > > > > > > Thanks in advance,
> > > > > > >
> > > > > > > Irene
> > > > > >
> > > > > > _________________________________________________________________
> > > > > > Find the right PC with Windows 7 and Windows Live.
> > > > > >
> > > > > >
> > > >
> > http://www.microsoft.com/Windows/pc-scout/laptop-set-criteria.aspx?cbid=wl&filt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000&cat=1,2,3,4,5,6&brands=5,6,7,8,9,10,11,12,13,14,15,16&addf=4,5,9&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen2:112009
> > > > > >
> > > >
> > > > _________________________________________________________________
> > > > Hotmail: Trusted email with Microsoft's powerful SPAM protection.
> > > > http://clk.atdmt.com/GBL/go/177141664/direct/01/
> > > > http://clk.atdmt.com/GBL/go/177141664/direct/01/
> > > >
> >
> > _________________________________________________________________
> > Hotmail: Trusted email with Microsoft's powerful SPAM protection.
> > http://clk.atdmt.com/GBL/go/177141664/direct/01/
> > http://clk.atdmt.com/GBL/go/177141664/direct/01/
> >
 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141665/direct/01/

Re: sx:div and executeScript

Posted by irene zeller sancho <ir...@gmail.com>.
Yes, it is basically to give style to the table.

this.tablecloth = function(){

    // CONFIG

    // if set to true then mouseover a table cell will highlight entire
column (except sibling headings)
    var highlightCols = false;

    // if set to true then mouseover a table cell will highlight entire
row    (except sibling headings)
    var highlightRows = true;

    // if set to true then click on a table sell will select row or column
based on config
    var selectable = true;

    // this function is called when
    // add your own code if you want to add action
    // function receives object that has been clicked
    this.clickAction = function(obj){
        //alert(obj.innerHTML);

    };



    // END CONFIG (do not edit below this line)


    var tableover = false;
    this.start = function(){
        var tables = document.getElementsByTagName("table");
        for (var i=0;i<tables.length;i++){
            tables[i].onmouseover = function(){tableover = true};
            tables[i].onmouseout = function(){tableover = false};

            rows(tables[i]);
        };
    };

    this.rows = function(table){
        var css = "";
        var tr = table.getElementsByTagName("tr");
        for (var i=0;i<tr.length;i++){
            css = (css == "odd") ? "even" : "odd";
            tr[i].className = css;
            var arr = new Array();
            for(var j=0;j<tr[i].childNodes.length;j++){
                if(tr[i].childNodes[j].nodeType == 1)
arr.push(tr[i].childNodes[j]);
            };
            for (var j=0;j<arr.length;j++){
                arr[j].row = i;
                arr[j].col = j;
                if(arr[j].innerHTML == "&nbsp;" || arr[j].innerHTML == "")
arr[j].className += " empty";
                arr[j].css = arr[j].className;
                arr[j].onmouseover = function(){
                    over(table,this,this.row,this.col);
                };
                arr[j].onmouseout = function(){
                    out(table,this,this.row,this.col);
                };
                arr[j].onmousedown = function(){
                    down(table,this,this.row,this.col);
                };
                arr[j].onmouseup = function(){
                    up(table,this,this.row,this.col);
                };
                arr[j].onclick = function(){
                    click(table,this,this.row,this.col);
                };
            };
        };
    };

    // appyling mouseover state for objects (th or td)
    this.over = function(table,obj,row,col){
        if (!highlightCols && !highlightRows) obj.className = obj.css + "
over";
        if(check1(obj,col)){
            if(highlightCols) highlightCol(table,obj,col);
            if(highlightRows) highlightRow(table,obj,row);
        };
    };
    // appyling mouseout state for objects (th or td)
    this.out = function(table,obj,row,col){
        if (!highlightCols && !highlightRows) obj.className = obj.css;
        unhighlightCol(table,col);
        unhighlightRow(table,row);
    };
    // appyling mousedown state for objects (th or td)
    this.down = function(table,obj,row,col){
        obj.className = obj.css + " down";
    };
    // appyling mouseup state for objects (th or td)
    this.up = function(table,obj,row,col){
        obj.className = obj.css + " over";
    };
    // onclick event for objects (th or td)
    this.click = function(table,obj,row,col){
        if(check1){
            if(selectable) {
                unselect(table);
                if(highlightCols) highlightCol(table,obj,col,true);
                if(highlightRows) highlightRow(table,obj,row,true);
                document.onclick = unselectAll;
            }
        };
        clickAction(obj);
    };

    this.highlightCol = function(table,active,col,sel){
        var css = (typeof(sel) != "undefined") ? "selected" : "over";
        var tr = table.getElementsByTagName("tr");
        for (var i=0;i<tr.length;i++){
            var arr = new Array();
            for(j=0;j<tr[i].childNodes.length;j++){
                if(tr[i].childNodes[j].nodeType == 1)
arr.push(tr[i].childNodes[j]);
            };
            var obj = arr[col];
            if (check2(active,obj) && check3(obj)) obj.className = obj.css +
" " + css;
        };
    };
    this.unhighlightCol = function(table,col){
        var tr = table.getElementsByTagName("tr");
        for (var i=0;i<tr.length;i++){
            var arr = new Array();
            for(j=0;j<tr[i].childNodes.length;j++){
                if(tr[i].childNodes[j].nodeType == 1)
arr.push(tr[i].childNodes[j])
            };
            var obj = arr[col];
            if(check3(obj)) obj.className = obj.css;
        };
    };
    this.highlightRow = function(table,active,row,sel){
        var css = (typeof(sel) != "undefined") ? "selected" : "over";
        var tr = table.getElementsByTagName("tr")[row];
        for (var i=0;i<tr.childNodes.length;i++){
            var obj = tr.childNodes[i];
            if (check2(active,obj) && check3(obj)) obj.className = obj.css +
" " + css;
        };
    };
    this.unhighlightRow = function(table,row){
        var tr = table.getElementsByTagName("tr")[row];
        for (var i=0;i<tr.childNodes.length;i++){
            var obj = tr.childNodes[i];
            if(check3(obj)) obj.className = obj.css;
        };
    };
    this.unselect = function(table){
        tr = table.getElementsByTagName("tr")
        for (var i=0;i<tr.length;i++){
            for (var j=0;j<tr[i].childNodes.length;j++){
                var obj = tr[i].childNodes[j];
                if(obj.className) obj.className =
obj.className.replace("selected","");
            };
        };
    };
    this.unselectAll = function(){
        if(!tableover){
            tables = document.getElementsByTagName("table");
            for (var i=0;i<tables.length;i++){
                unselect(tables[i])
            };
        };
    };
    this.check1 = function(obj,col){
        return (!(col == 0 && obj.className.indexOf("empty") != -1));
    }
    this.check2 = function(active,obj){
        return (!(active.tagName == "TH" && obj.tagName == "TH"));
    };
    this.check3 = function(obj){
        return (obj.className) ? (obj.className.indexOf("selected") == -1) :
true;
    };

    start();

};

/* script initiates on page load. */

    window.onload = tablecloth;


2009/11/8 Martin Gainty <mg...@hotmail.com>

>
> can you display the function(s) inside tablecloth.js
>
> thx
> Martin Gainty
> ______________________________________________
> 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: Sun, 8 Nov 2009 20:49:29 +0100
> > Subject: Re: sx:div and executeScript
> > From: irenezeller@gmail.com
> > To: user@struts.apache.org
> >
> > This is the jsp I'm calling:
> >
> > <%@ page contentType="text/html; charset=UTF-8" %>
> > <%@ taglib prefix="s" uri="/struts-tags" %>
> > <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
> >
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <%@ page language="java" contentType="text/html; charset=UTF-8"
> >     pageEncoding="UTF-8"%>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> > <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="
> > http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
> > <head>
> > <link href="tablecloth/tablecloth.css" rel="stylesheet" type="text/css"
> > media="screen" />
> > <script language="JavaScript" src="tablecloth/tablecloth.js"
> > type="text/javascript"></script>
> >
> > <sx:head/>
> >
> > </head>
> > <body>
> >
> > <table>
> >      <tr>
> >          <th><s:text name="Title"/></th>
> >         <th><s:text name="Author"/></th>
> >         <th><s:text name="Ending"/></th>
> >         <th><s:text name="Energy"/></th>
> >         <th><s:text name="Flatness"/></th>
> >         <th><s:text name="Validate"/></th>
> >         <th><s:text name="Play"/></th>
> >     </tr>
> >
> >       <s:iterator value="songs" status="rowstatus">
> >         <tr>
> >           <td ><s:property value="songs[#rowstatus.index].title"/></td>
> >           <td >
> >               <s:property value="songs[#rowstatus.index].author"/>
> >           </td>
> >          <s:hidden name = "songs[%{#rowstatus.index}].id">
> >          </s:hidden>
> >         </tr>
> >
> >     </s:iterator>
> >
> > </table>
> >
> > </body>
> >
> > </html>
> >
> > and I would like to call the Javascript function:
> > window.onload = tablecloth;
> >
> >
> > 2009/11/8 Martin Gainty <mg...@hotmail.com>
> >
> > >
> > > then the href should call the javascript function instead of the
> supplied
> > > URL
> > > please post the complete jsp (with the javascript function you want to
> > > call)
> > >
> > > Martin Gainty
> > > ______________________________________________
> > > 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: Sun, 8 Nov 2009 17:37:19 +0100
> > > > Subject: Re: sx:div and executeScript
> > > > From: irenezeller@gmail.com
> > > > To: user@struts.apache.org
> > > >
> > > > I'm using <sx:head/>. Not theme="ajax", I think the last version does
> not
> > > > support this theme. The href attribute points a working url, however
> > > > Javascript is not executed when the ajax url is loaded.
> > > >
> > > > 2009/11/8 Martin Gainty <mg...@hotmail.com>
> > > >
> > > > >
> > > > > assuming theme="ajax"
> > > > > then the div href would be
> > > > >
> > > > > href
> > > > >                                        false
> > > > >
> > > > >
> > > > >                                        false
> > > > >                                        String
> > > > >                                        The URL to call to obtain
> the
> > > > > content. Note: If used with ajax context, the value must be set as
> an
> > > url
> > > > > tag value.
> > > > > make sure your href attribute points a working url such as what is
> > > > > illustrated here
> > > > > http://struts.apache.org/2.1.8/docs/ajax-div-template.html
> > > > >
> > > > > Martin Gainty
> > > > > ______________________________________________
> > > > > 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: Sat, 7 Nov 2009 17:44:28 +0100
> > > > > > Subject: sx:div and executeScript
> > > > > > From: irenezeller@gmail.com
> > > > > > To: user@struts.apache.org
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I'm using sx:div for loading a content after the page is loaded.
> > > > > > But, I have problems because Javascript is not working in the
> page
> > > linked
> > > > > by
> > > > > > <sx:div ..>. I read about a solution with Struts2.1.2 (I'm using
> > > > > > Struts2.1.8) in this page(
> > > > > >
> > > > >
> > >
> http://mail-archives.apache.org/mod_mbox/struts-issues/200808.mbox/%3C2107922214.1217595186486.JavaMail.jira@brutus%3E
> > > > > ,
> > > > > > but it did not work for me.
> > > > > > I'm using this code:
> > > > > > <sx:div id="tableScroll"label="table" href="%{#table}"
> > > > > > separateScripts="false" executeScripts="true">
> > > > > >                     Carregant'se
> > > > > >  </sx:div>
> > > > > > and the returned code is a populated table.
> > > > > > I changed the jar struts2-dojo-plugin-2.1.8.jar, how the thread
> > > > > indicates,
> > > > > > but nothing changed.
> > > > > > I need Javacript in the returned content. Please, I need help.
> > > > > >
> > > > > >
> > > > > > Thanks in advance,
> > > > > >
> > > > > > Irene
> > > > >
> > > > > _________________________________________________________________
> > > > > Find the right PC with Windows 7 and Windows Live.
> > > > >
> > > > >
> > >
> http://www.microsoft.com/Windows/pc-scout/laptop-set-criteria.aspx?cbid=wl&filt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000&cat=1,2,3,4,5,6&brands=5,6,7,8,9,10,11,12,13,14,15,16&addf=4,5,9&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen2:112009
> > > > >
> > >
> > > _________________________________________________________________
> > > Hotmail: Trusted email with Microsoft's powerful SPAM protection.
> > > http://clk.atdmt.com/GBL/go/177141664/direct/01/
> > > http://clk.atdmt.com/GBL/go/177141664/direct/01/
> > >
>
> _________________________________________________________________
> Hotmail: Trusted email with Microsoft's powerful SPAM protection.
> http://clk.atdmt.com/GBL/go/177141664/direct/01/
> http://clk.atdmt.com/GBL/go/177141664/direct/01/
>

RE: sx:div and executeScript

Posted by Martin Gainty <mg...@hotmail.com>.
can you display the function(s) inside tablecloth.js

thx
Martin Gainty 
______________________________________________ 
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: Sun, 8 Nov 2009 20:49:29 +0100
> Subject: Re: sx:div and executeScript
> From: irenezeller@gmail.com
> To: user@struts.apache.org
> 
> This is the jsp I'm calling:
> 
> <%@ page contentType="text/html; charset=UTF-8" %>
> <%@ taglib prefix="s" uri="/struts-tags" %>
> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> <%@ page language="java" contentType="text/html; charset=UTF-8"
>     pageEncoding="UTF-8"%>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="
> http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
> <head>
> <link href="tablecloth/tablecloth.css" rel="stylesheet" type="text/css"
> media="screen" />
> <script language="JavaScript" src="tablecloth/tablecloth.js"
> type="text/javascript"></script>
> 
> <sx:head/>
> 
> </head>
> <body>
> 
> <table>
>      <tr>
>          <th><s:text name="Title"/></th>
>         <th><s:text name="Author"/></th>
>         <th><s:text name="Ending"/></th>
>         <th><s:text name="Energy"/></th>
>         <th><s:text name="Flatness"/></th>
>         <th><s:text name="Validate"/></th>
>         <th><s:text name="Play"/></th>
>     </tr>
> 
>       <s:iterator value="songs" status="rowstatus">
>         <tr>
>           <td ><s:property value="songs[#rowstatus.index].title"/></td>
>           <td >
>               <s:property value="songs[#rowstatus.index].author"/>
>           </td>
>          <s:hidden name = "songs[%{#rowstatus.index}].id">
>          </s:hidden>
>         </tr>
> 
>     </s:iterator>
> 
> </table>
> 
> </body>
> 
> </html>
> 
> and I would like to call the Javascript function:
> window.onload = tablecloth;
> 
> 
> 2009/11/8 Martin Gainty <mg...@hotmail.com>
> 
> >
> > then the href should call the javascript function instead of the supplied
> > URL
> > please post the complete jsp (with the javascript function you want to
> > call)
> >
> > Martin Gainty
> > ______________________________________________
> > 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: Sun, 8 Nov 2009 17:37:19 +0100
> > > Subject: Re: sx:div and executeScript
> > > From: irenezeller@gmail.com
> > > To: user@struts.apache.org
> > >
> > > I'm using <sx:head/>. Not theme="ajax", I think the last version does not
> > > support this theme. The href attribute points a working url, however
> > > Javascript is not executed when the ajax url is loaded.
> > >
> > > 2009/11/8 Martin Gainty <mg...@hotmail.com>
> > >
> > > >
> > > > assuming theme="ajax"
> > > > then the div href would be
> > > >
> > > > href
> > > >                                        false
> > > >
> > > >
> > > >                                        false
> > > >                                        String
> > > >                                        The URL to call to obtain the
> > > > content. Note: If used with ajax context, the value must be set as an
> > url
> > > > tag value.
> > > > make sure your href attribute points a working url such as what is
> > > > illustrated here
> > > > http://struts.apache.org/2.1.8/docs/ajax-div-template.html
> > > >
> > > > Martin Gainty
> > > > ______________________________________________
> > > > 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: Sat, 7 Nov 2009 17:44:28 +0100
> > > > > Subject: sx:div and executeScript
> > > > > From: irenezeller@gmail.com
> > > > > To: user@struts.apache.org
> > > > >
> > > > > Hi,
> > > > >
> > > > > I'm using sx:div for loading a content after the page is loaded.
> > > > > But, I have problems because Javascript is not working in the page
> > linked
> > > > by
> > > > > <sx:div ..>. I read about a solution with Struts2.1.2 (I'm using
> > > > > Struts2.1.8) in this page(
> > > > >
> > > >
> > http://mail-archives.apache.org/mod_mbox/struts-issues/200808.mbox/%3C2107922214.1217595186486.JavaMail.jira@brutus%3E
> > > > ,
> > > > > but it did not work for me.
> > > > > I'm using this code:
> > > > > <sx:div id="tableScroll"label="table" href="%{#table}"
> > > > > separateScripts="false" executeScripts="true">
> > > > >                     Carregant'se
> > > > >  </sx:div>
> > > > > and the returned code is a populated table.
> > > > > I changed the jar struts2-dojo-plugin-2.1.8.jar, how the thread
> > > > indicates,
> > > > > but nothing changed.
> > > > > I need Javacript in the returned content. Please, I need help.
> > > > >
> > > > >
> > > > > Thanks in advance,
> > > > >
> > > > > Irene
> > > >
> > > > _________________________________________________________________
> > > > Find the right PC with Windows 7 and Windows Live.
> > > >
> > > >
> > http://www.microsoft.com/Windows/pc-scout/laptop-set-criteria.aspx?cbid=wl&filt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000&cat=1,2,3,4,5,6&brands=5,6,7,8,9,10,11,12,13,14,15,16&addf=4,5,9&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen2:112009
> > > >
> >
> > _________________________________________________________________
> > Hotmail: Trusted email with Microsoft's powerful SPAM protection.
> > http://clk.atdmt.com/GBL/go/177141664/direct/01/
> > http://clk.atdmt.com/GBL/go/177141664/direct/01/
> >
 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with Microsoft's powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141664/direct/01/
http://clk.atdmt.com/GBL/go/177141664/direct/01/

Re: sx:div and executeScript

Posted by irene zeller sancho <ir...@gmail.com>.
This is the jsp I'm calling:

<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>

<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="
http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
<head>
<link href="tablecloth/tablecloth.css" rel="stylesheet" type="text/css"
media="screen" />
<script language="JavaScript" src="tablecloth/tablecloth.js"
type="text/javascript"></script>

<sx:head/>

</head>
<body>

<table>
     <tr>
         <th><s:text name="Title"/></th>
        <th><s:text name="Author"/></th>
        <th><s:text name="Ending"/></th>
        <th><s:text name="Energy"/></th>
        <th><s:text name="Flatness"/></th>
        <th><s:text name="Validate"/></th>
        <th><s:text name="Play"/></th>
    </tr>

      <s:iterator value="songs" status="rowstatus">
        <tr>
          <td ><s:property value="songs[#rowstatus.index].title"/></td>
          <td >
              <s:property value="songs[#rowstatus.index].author"/>
          </td>
         <s:hidden name = "songs[%{#rowstatus.index}].id">
         </s:hidden>
        </tr>

    </s:iterator>

</table>

</body>

</html>

and I would like to call the Javascript function:
window.onload = tablecloth;


2009/11/8 Martin Gainty <mg...@hotmail.com>

>
> then the href should call the javascript function instead of the supplied
> URL
> please post the complete jsp (with the javascript function you want to
> call)
>
> Martin Gainty
> ______________________________________________
> 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: Sun, 8 Nov 2009 17:37:19 +0100
> > Subject: Re: sx:div and executeScript
> > From: irenezeller@gmail.com
> > To: user@struts.apache.org
> >
> > I'm using <sx:head/>. Not theme="ajax", I think the last version does not
> > support this theme. The href attribute points a working url, however
> > Javascript is not executed when the ajax url is loaded.
> >
> > 2009/11/8 Martin Gainty <mg...@hotmail.com>
> >
> > >
> > > assuming theme="ajax"
> > > then the div href would be
> > >
> > > href
> > >                                        false
> > >
> > >
> > >                                        false
> > >                                        String
> > >                                        The URL to call to obtain the
> > > content. Note: If used with ajax context, the value must be set as an
> url
> > > tag value.
> > > make sure your href attribute points a working url such as what is
> > > illustrated here
> > > http://struts.apache.org/2.1.8/docs/ajax-div-template.html
> > >
> > > Martin Gainty
> > > ______________________________________________
> > > 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: Sat, 7 Nov 2009 17:44:28 +0100
> > > > Subject: sx:div and executeScript
> > > > From: irenezeller@gmail.com
> > > > To: user@struts.apache.org
> > > >
> > > > Hi,
> > > >
> > > > I'm using sx:div for loading a content after the page is loaded.
> > > > But, I have problems because Javascript is not working in the page
> linked
> > > by
> > > > <sx:div ..>. I read about a solution with Struts2.1.2 (I'm using
> > > > Struts2.1.8) in this page(
> > > >
> > >
> http://mail-archives.apache.org/mod_mbox/struts-issues/200808.mbox/%3C2107922214.1217595186486.JavaMail.jira@brutus%3E
> > > ,
> > > > but it did not work for me.
> > > > I'm using this code:
> > > > <sx:div id="tableScroll"label="table" href="%{#table}"
> > > > separateScripts="false" executeScripts="true">
> > > >                     Carregant'se
> > > >  </sx:div>
> > > > and the returned code is a populated table.
> > > > I changed the jar struts2-dojo-plugin-2.1.8.jar, how the thread
> > > indicates,
> > > > but nothing changed.
> > > > I need Javacript in the returned content. Please, I need help.
> > > >
> > > >
> > > > Thanks in advance,
> > > >
> > > > Irene
> > >
> > > _________________________________________________________________
> > > Find the right PC with Windows 7 and Windows Live.
> > >
> > >
> http://www.microsoft.com/Windows/pc-scout/laptop-set-criteria.aspx?cbid=wl&filt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000&cat=1,2,3,4,5,6&brands=5,6,7,8,9,10,11,12,13,14,15,16&addf=4,5,9&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen2:112009
> > >
>
> _________________________________________________________________
> Hotmail: Trusted email with Microsoft's powerful SPAM protection.
> http://clk.atdmt.com/GBL/go/177141664/direct/01/
> http://clk.atdmt.com/GBL/go/177141664/direct/01/
>

RE: sx:div and executeScript

Posted by Martin Gainty <mg...@hotmail.com>.
then the href should call the javascript function instead of the supplied URL
please post the complete jsp (with the javascript function you want to call)

Martin Gainty 
______________________________________________ 
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: Sun, 8 Nov 2009 17:37:19 +0100
> Subject: Re: sx:div and executeScript
> From: irenezeller@gmail.com
> To: user@struts.apache.org
> 
> I'm using <sx:head/>. Not theme="ajax", I think the last version does not
> support this theme. The href attribute points a working url, however
> Javascript is not executed when the ajax url is loaded.
> 
> 2009/11/8 Martin Gainty <mg...@hotmail.com>
> 
> >
> > assuming theme="ajax"
> > then the div href would be
> >
> > href
> >                                        false
> >
> >
> >                                        false
> >                                        String
> >                                        The URL to call to obtain the
> > content. Note: If used with ajax context, the value must be set as an url
> > tag value.
> > make sure your href attribute points a working url such as what is
> > illustrated here
> > http://struts.apache.org/2.1.8/docs/ajax-div-template.html
> >
> > Martin Gainty
> > ______________________________________________
> > 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: Sat, 7 Nov 2009 17:44:28 +0100
> > > Subject: sx:div and executeScript
> > > From: irenezeller@gmail.com
> > > To: user@struts.apache.org
> > >
> > > Hi,
> > >
> > > I'm using sx:div for loading a content after the page is loaded.
> > > But, I have problems because Javascript is not working in the page linked
> > by
> > > <sx:div ..>. I read about a solution with Struts2.1.2 (I'm using
> > > Struts2.1.8) in this page(
> > >
> > http://mail-archives.apache.org/mod_mbox/struts-issues/200808.mbox/%3C2107922214.1217595186486.JavaMail.jira@brutus%3E
> > ,
> > > but it did not work for me.
> > > I'm using this code:
> > > <sx:div id="tableScroll"label="table" href="%{#table}"
> > > separateScripts="false" executeScripts="true">
> > >                     Carregant'se
> > >  </sx:div>
> > > and the returned code is a populated table.
> > > I changed the jar struts2-dojo-plugin-2.1.8.jar, how the thread
> > indicates,
> > > but nothing changed.
> > > I need Javacript in the returned content. Please, I need help.
> > >
> > >
> > > Thanks in advance,
> > >
> > > Irene
> >
> > _________________________________________________________________
> > Find the right PC with Windows 7 and Windows Live.
> >
> > http://www.microsoft.com/Windows/pc-scout/laptop-set-criteria.aspx?cbid=wl&filt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000&cat=1,2,3,4,5,6&brands=5,6,7,8,9,10,11,12,13,14,15,16&addf=4,5,9&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen2:112009
> >
 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with Microsoft's powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141664/direct/01/
http://clk.atdmt.com/GBL/go/177141664/direct/01/

Re: sx:div and executeScript

Posted by irene zeller sancho <ir...@gmail.com>.
I'm using <sx:head/>. Not theme="ajax", I think the last version does not
support this theme. The href attribute points a working url, however
Javascript is not executed when the ajax url is loaded.

2009/11/8 Martin Gainty <mg...@hotmail.com>

>
> assuming theme="ajax"
> then the div href would be
>
> href
>                                        false
>
>
>                                        false
>                                        String
>                                        The URL to call to obtain the
> content. Note: If used with ajax context, the value must be set as an url
> tag value.
> make sure your href attribute points a working url such as what is
> illustrated here
> http://struts.apache.org/2.1.8/docs/ajax-div-template.html
>
> Martin Gainty
> ______________________________________________
> 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: Sat, 7 Nov 2009 17:44:28 +0100
> > Subject: sx:div and executeScript
> > From: irenezeller@gmail.com
> > To: user@struts.apache.org
> >
> > Hi,
> >
> > I'm using sx:div for loading a content after the page is loaded.
> > But, I have problems because Javascript is not working in the page linked
> by
> > <sx:div ..>. I read about a solution with Struts2.1.2 (I'm using
> > Struts2.1.8) in this page(
> >
> http://mail-archives.apache.org/mod_mbox/struts-issues/200808.mbox/%3C2107922214.1217595186486.JavaMail.jira@brutus%3E
> ,
> > but it did not work for me.
> > I'm using this code:
> > <sx:div id="tableScroll"label="table" href="%{#table}"
> > separateScripts="false" executeScripts="true">
> >                     Carregant'se
> >  </sx:div>
> > and the returned code is a populated table.
> > I changed the jar struts2-dojo-plugin-2.1.8.jar, how the thread
> indicates,
> > but nothing changed.
> > I need Javacript in the returned content. Please, I need help.
> >
> >
> > Thanks in advance,
> >
> > Irene
>
> _________________________________________________________________
> Find the right PC with Windows 7 and Windows Live.
>
> http://www.microsoft.com/Windows/pc-scout/laptop-set-criteria.aspx?cbid=wl&filt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000&cat=1,2,3,4,5,6&brands=5,6,7,8,9,10,11,12,13,14,15,16&addf=4,5,9&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen2:112009
>

RE: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

Posted by Fernandes Celinio <cf...@sopragroup.com>.
Thanks a lot Lukasz Lenart. It worked :)

I cleaned up my lib folder, removed a lot of libraries and kept only the ones that are really needed.
That means the ones in your list and also these one :

struts2-tiles-plugin-2.1.8.jar
commons-beanutils-1.7.0.jar
commons-digester-2.0.jar 


-----Message d'origine-----
De : Lukasz Lenart [mailto:lukasz.lenart@googlemail.com] 
Envoyé : lundi 9 novembre 2009 20:53
À : Struts Users Mailing List
Objet : Re: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

2009/11/9 Fernandes Celinio <cf...@sopragroup.com>:
> Any idea ? Thanks

Dozen! First of all - remove all jars from server/default/lib - you shouldn't mix your jars between apps. As I remember only jdbc drivers should be shared. As you can see, you have duplicated ognl.jar and freemarker.jar.

Put only those files in application lib folder:
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
commons-logging-1.1.jar
freemarker-2.3.15.jar
log4j-1.2.12.jar
logkit-1.0.1.jar
ognl-2.7.3.jar
struts2-convention-plugin-2.1.8.jar
struts2-core-2.1.8.jar
xwork-core-2.1.6.jar

The minimal set needed for Convention plugin to work. You're mixing Convention plugin with Codebehind plugin - either one can be used at the same time.


Regards
--
Lukasz
http://www.lenart.org.pl/

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


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


Re: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/11/9 Fernandes Celinio <cf...@sopragroup.com>:
> Any idea ? Thanks

Dozen! First of all - remove all jars from server/default/lib - you
shouldn't mix your jars between apps. As I remember only jdbc drivers
should be shared. As you can see, you have duplicated ognl.jar and
freemarker.jar.

Put only those files in application lib folder:
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
commons-logging-1.1.jar
freemarker-2.3.15.jar
log4j-1.2.12.jar
logkit-1.0.1.jar
ognl-2.7.3.jar
struts2-convention-plugin-2.1.8.jar
struts2-core-2.1.8.jar
xwork-core-2.1.6.jar

The minimal set needed for Convention plugin to work. You're mixing
Convention plugin with Codebehind plugin - either one can be used at
the same time.


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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


RE: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

Posted by Fernandes Celinio <cf...@sopragroup.com>.
It works if i use an exploded EAR and an exploded WAR.

However I get an HTTP 404 error on all actions I try to call.

Has there been any change in actions handling between Struts 2.0 and Struts 2.1.8 ?




-----Message d'origine-----
De : Fernandes Celinio [mailto:cfernandes@sopragroup.com] 
Envoyé : lundi 9 novembre 2009 13:38
À : Struts Users Mailing List
Objet : RE: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?


 ----------------  web.xml full content :---------------- 

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>VenteEnLigneWebStruts2</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
  
  <jsp-config>
    <taglib>
<taglib-uri>/s</taglib-uri>
<taglib-location>/WEB-INF/struts-tags.tld</taglib-location>
</taglib>
  </jsp-config>
  
    <filter>  
    <filter-name>struts2</filter-name>  
	   <filter-class>  
	    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
	   </filter-class> 
	   	   <init-param>
		<param-name>actionPackages</param-name>
		<param-value>com.eni.dvtejb.clientStruts2.action</param-value>
	   </init-param>
  </filter> 
  
 <filter-mapping>  
   <filter-name>struts2</filter-name>  
   <url-pattern>/*</url-pattern>
  </filter-mapping>
  
  <listener>
    	<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
  </listener>
  
</web-app>



---------------- struts.xml full content : ---------------- 

<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC  
        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"  
        "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>  

    <include file="login.xml" />
    <include file="accueil.xml" />
    <include file="magasin.xml" />
    <include file="inscription.xml" />
    
    <constant name="struts.convention.action.packages" value="com.eni.dvtejb.clientStruts2.action" />    
  
</struts>


I do not have any jars in my WEB-INF/lib folder, everything points to the lib folder from the Struts 2.1.8 distribution, and I copied everything to K:\ENI\DeveloppementEJB3\jboss-5.1.0.GA.jdk6\server\default\lib

I removed a few plugins.

----------------  Full content of K:\ENI\DeveloppementEJB3\jboss-5.1.0.GA.jdk6\server\default\lib : ---------------- 

09/11/2009  13:36    <REP>          .
09/11/2009  13:36    <REP>          ..
26/12/2008  02:43           358ÿ273 antlr-2.7.2.jar
26/12/2008  02:32             4ÿ467 aopalliance-1.0.jar
26/12/2008  03:12            37ÿ854 classworlds-1.1.jar
26/12/2008  02:03           188ÿ671 commons-beanutils-1.7.0.jar
05/01/2009  16:27            91ÿ699 commons-chain-1.2.jar
26/12/2008  02:09           571ÿ259 commons-collections-3.2.jar
05/01/2009  19:36           148ÿ783 commons-digester-2.0.jar
26/12/2008  02:05            57ÿ779 commons-fileupload-1.2.1.jar
26/12/2008  02:05            87ÿ776 commons-io-1.3.2.jar
26/12/2008  03:00           245ÿ274 commons-lang-2.3.jar
26/12/2008  02:03            38ÿ015 commons-logging-1.0.4.jar
26/12/2008  02:39            44ÿ598 commons-logging-api-1.1.jar
26/12/2008  02:05           138ÿ956 commons-validator-1.3.1.jar
26/12/2008  02:36           184ÿ569 dwr-1.1.1.jar
26/12/2008  03:00            77ÿ826 ezmorph-1.0.3.jar
01/05/2008  21:33           863ÿ477 freemarker-2.3.12.jar
20/07/2009  16:23           879ÿ259 freemarker-2.3.15.jar
03/06/2008  08:32           302ÿ352 jsf-facelets.jar
26/12/2008  03:00           124ÿ932 json-lib-2.1.jar
22/05/2009  15:38           393ÿ290 mail.jar
01/05/2008  21:33           168ÿ081 ognl-2.6.11.jar
23/07/2009  17:52           239ÿ803 ognl-2.7.3.jar
07/12/2007  06:08         1ÿ545ÿ954 ojdbc14.jar
22/09/2009  17:36           135ÿ820 org.apache.felix.bundlerepository-1.2.1.jar
22/09/2009  17:36           361ÿ268 org.apache.felix.framework-1.4.1.jar
22/09/2009  17:36           369ÿ804 org.apache.felix.main-1.4.1.jar
22/09/2009  17:36            51ÿ390 org.apache.felix.shell-1.0.2.jar
22/09/2009  17:36            12ÿ237 org.apache.felix.shell.tui-1.0.2.jar
26/12/2008  02:03            65ÿ261 oro-2.0.8.jar
15/07/2009  17:20           289ÿ911 oval-1.31.jar
30/11/2003  18:45           106ÿ577 p6spy.jar
26/12/2008  03:12           219ÿ380 plexus-container-default-1.0-alpha-10.jar
26/12/2008  02:04           172ÿ956 plexus-utils-1.2.jar
01/07/2009  21:43           181ÿ259 sitemesh-2.4.2.jar
17/06/2009  21:25           488ÿ282 spring-beans-2.5.6.jar
17/06/2009  21:25           476ÿ940 spring-context-2.5.6.jar
17/06/2009  21:25           285ÿ491 spring-core-2.5.6.jar
26/12/2008  02:05           180ÿ924 spring-test-2.5.6.jar
09/06/2009  19:46           194ÿ577 spring-web-2.5.6.jar
26/12/2008  02:05            26ÿ215 sslext-1.2-0.jar
05/01/2009  16:27           329ÿ441 struts-core-1.3.10.jar
23/09/2009  01:04            29ÿ553 struts2-codebehind-plugin-2.1.8.jar
23/09/2009  01:02            39ÿ265 struts2-config-browser-plugin-2.1.8.jar
23/09/2009  01:07            61ÿ007 struts2-convention-plugin-2.1.8.jar
23/09/2009  00:49           756ÿ085 struts2-core-2.1.8.jar
23/09/2009  01:00         1ÿ728ÿ624 struts2-dojo-plugin-2.1.8.jar
23/09/2009  00:56             5ÿ820 struts2-dwr-plugin-2.1.8.jar
23/09/2009  01:17           540ÿ399 struts2-embeddedjsp-plugin-2.1.8.jar
23/09/2009  01:10            17ÿ070 struts2-jasperreports-plugin-2.1.8.jar
23/09/2009  01:09            45ÿ735 struts2-javatemplates-plugin-2.1.8.jar
23/09/2009  01:11            10ÿ454 struts2-jfreechart-plugin-2.1.8.jar
23/09/2009  01:01            28ÿ603 struts2-jsf-plugin-2.1.8.jar
23/09/2009  01:16            51ÿ609 struts2-json-plugin-2.1.8.jar
23/09/2009  00:53             8ÿ317 struts2-junit-plugin-2.1.8.jar
23/09/2009  01:19            93ÿ140 struts2-osgi-admin-bundle-2.1.8.jar
23/09/2009  01:15            22ÿ744 struts2-oval-plugin-2.1.8.jar
23/09/2009  01:11            10ÿ201 struts2-pell-multipart-plugin-2.1.8.jar
23/09/2009  01:06            29ÿ110 struts2-rest-plugin-2.1.8.jar
23/09/2009  01:13            37ÿ177 struts2-sitegraph-plugin-2.1.8.jar
23/09/2009  01:02            16ÿ889 struts2-sitemesh-plugin-2.1.8.jar
23/09/2009  00:59            27ÿ758 struts2-struts1-plugin-2.1.8.jarOLD
23/09/2009  01:14             4ÿ392 struts2-testng-plugin-2.1.8.jar
23/09/2009  01:03            16ÿ584 struts2-tiles-plugin-2.1.8.jar
26/12/2008  02:05           692ÿ205 testng-5.1.jar
26/12/2008  02:52            17ÿ026 tiles-api-2.0.6.jar
26/12/2008  02:52           128ÿ136 tiles-core-2.0.6.jar
26/12/2008  02:52            41ÿ587 tiles-jsp-2.0.6.jar
22/09/2009  17:36           392ÿ124 velocity-1.5.jar
22/09/2009  17:36           134ÿ881 velocity-tools-1.3.jar
26/12/2008  02:28            24ÿ677 xpp3_min-1.1.3.4.O.jar
26/12/2008  02:28           373ÿ194 xstream-1.2.2.jar
01/05/2008  21:33           521ÿ827 xwork-2.1.1.jarOLD
22/09/2009  17:36         1ÿ557ÿ320 xwork-core-2.1.6.jar


Any idea ? Thanks


-----Message d'origine-----
De : Lukasz Lenart [mailto:lukasz.lenart@googlemail.com]
Envoyé : lundi 9 novembre 2009 13:29
À : Struts Users Mailing List
Objet : Re: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

2009/11/9 Fernandes Celinio <cf...@sopragroup.com>:
> It still does not work. It is still looking for that actionPackages 
> parameter. And if i add it, I get an error related to the path.

Strange, you have something messed up with a configuration. Could you list what kind of jars do you have in WEB-INF/lib folder? Then could you show content of your configuration files?


Regards
--
Lukasz
http://www.lenart.org.pl/

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


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


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


RE: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

Posted by Fernandes Celinio <cf...@sopragroup.com>.
 ----------------  web.xml full content :---------------- 

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>VenteEnLigneWebStruts2</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
  
  <jsp-config>
    <taglib>
<taglib-uri>/s</taglib-uri>
<taglib-location>/WEB-INF/struts-tags.tld</taglib-location>
</taglib> 
  </jsp-config>
  
    <filter>  
    <filter-name>struts2</filter-name>  
	   <filter-class>  
	    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
	   </filter-class> 
	   	   <init-param>
		<param-name>actionPackages</param-name>
		<param-value>com.eni.dvtejb.clientStruts2.action</param-value>
	   </init-param>  
  </filter> 
  
 <filter-mapping>  
   <filter-name>struts2</filter-name>  
   <url-pattern>/*</url-pattern>  
  </filter-mapping>
  
  <listener>
    	<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
  </listener>
  
</web-app>



---------------- struts.xml full content : ---------------- 

<?xml version="1.0" encoding="UTF-8" ?>  
<!DOCTYPE struts PUBLIC  
        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"  
        "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>  

    <include file="login.xml" />
    <include file="accueil.xml" />
    <include file="magasin.xml" />
    <include file="inscription.xml" />
    
    <constant name="struts.convention.action.packages" value="com.eni.dvtejb.clientStruts2.action" />    
  
</struts>


I do not have any jars in my WEB-INF/lib folder, everything points to the lib folder from the Struts 2.1.8 distribution,
and I copied everything to K:\ENI\DeveloppementEJB3\jboss-5.1.0.GA.jdk6\server\default\lib

I removed a few plugins.

----------------  Full content of K:\ENI\DeveloppementEJB3\jboss-5.1.0.GA.jdk6\server\default\lib : ---------------- 

09/11/2009  13:36    <REP>          .
09/11/2009  13:36    <REP>          ..
26/12/2008  02:43           358ÿ273 antlr-2.7.2.jar
26/12/2008  02:32             4ÿ467 aopalliance-1.0.jar
26/12/2008  03:12            37ÿ854 classworlds-1.1.jar
26/12/2008  02:03           188ÿ671 commons-beanutils-1.7.0.jar
05/01/2009  16:27            91ÿ699 commons-chain-1.2.jar
26/12/2008  02:09           571ÿ259 commons-collections-3.2.jar
05/01/2009  19:36           148ÿ783 commons-digester-2.0.jar
26/12/2008  02:05            57ÿ779 commons-fileupload-1.2.1.jar
26/12/2008  02:05            87ÿ776 commons-io-1.3.2.jar
26/12/2008  03:00           245ÿ274 commons-lang-2.3.jar
26/12/2008  02:03            38ÿ015 commons-logging-1.0.4.jar
26/12/2008  02:39            44ÿ598 commons-logging-api-1.1.jar
26/12/2008  02:05           138ÿ956 commons-validator-1.3.1.jar
26/12/2008  02:36           184ÿ569 dwr-1.1.1.jar
26/12/2008  03:00            77ÿ826 ezmorph-1.0.3.jar
01/05/2008  21:33           863ÿ477 freemarker-2.3.12.jar
20/07/2009  16:23           879ÿ259 freemarker-2.3.15.jar
03/06/2008  08:32           302ÿ352 jsf-facelets.jar
26/12/2008  03:00           124ÿ932 json-lib-2.1.jar
22/05/2009  15:38           393ÿ290 mail.jar
01/05/2008  21:33           168ÿ081 ognl-2.6.11.jar
23/07/2009  17:52           239ÿ803 ognl-2.7.3.jar
07/12/2007  06:08         1ÿ545ÿ954 ojdbc14.jar
22/09/2009  17:36           135ÿ820 org.apache.felix.bundlerepository-1.2.1.jar
22/09/2009  17:36           361ÿ268 org.apache.felix.framework-1.4.1.jar
22/09/2009  17:36           369ÿ804 org.apache.felix.main-1.4.1.jar
22/09/2009  17:36            51ÿ390 org.apache.felix.shell-1.0.2.jar
22/09/2009  17:36            12ÿ237 org.apache.felix.shell.tui-1.0.2.jar
26/12/2008  02:03            65ÿ261 oro-2.0.8.jar
15/07/2009  17:20           289ÿ911 oval-1.31.jar
30/11/2003  18:45           106ÿ577 p6spy.jar
26/12/2008  03:12           219ÿ380 plexus-container-default-1.0-alpha-10.jar
26/12/2008  02:04           172ÿ956 plexus-utils-1.2.jar
01/07/2009  21:43           181ÿ259 sitemesh-2.4.2.jar
17/06/2009  21:25           488ÿ282 spring-beans-2.5.6.jar
17/06/2009  21:25           476ÿ940 spring-context-2.5.6.jar
17/06/2009  21:25           285ÿ491 spring-core-2.5.6.jar
26/12/2008  02:05           180ÿ924 spring-test-2.5.6.jar
09/06/2009  19:46           194ÿ577 spring-web-2.5.6.jar
26/12/2008  02:05            26ÿ215 sslext-1.2-0.jar
05/01/2009  16:27           329ÿ441 struts-core-1.3.10.jar
23/09/2009  01:04            29ÿ553 struts2-codebehind-plugin-2.1.8.jar
23/09/2009  01:02            39ÿ265 struts2-config-browser-plugin-2.1.8.jar
23/09/2009  01:07            61ÿ007 struts2-convention-plugin-2.1.8.jar
23/09/2009  00:49           756ÿ085 struts2-core-2.1.8.jar
23/09/2009  01:00         1ÿ728ÿ624 struts2-dojo-plugin-2.1.8.jar
23/09/2009  00:56             5ÿ820 struts2-dwr-plugin-2.1.8.jar
23/09/2009  01:17           540ÿ399 struts2-embeddedjsp-plugin-2.1.8.jar
23/09/2009  01:10            17ÿ070 struts2-jasperreports-plugin-2.1.8.jar
23/09/2009  01:09            45ÿ735 struts2-javatemplates-plugin-2.1.8.jar
23/09/2009  01:11            10ÿ454 struts2-jfreechart-plugin-2.1.8.jar
23/09/2009  01:01            28ÿ603 struts2-jsf-plugin-2.1.8.jar
23/09/2009  01:16            51ÿ609 struts2-json-plugin-2.1.8.jar
23/09/2009  00:53             8ÿ317 struts2-junit-plugin-2.1.8.jar
23/09/2009  01:19            93ÿ140 struts2-osgi-admin-bundle-2.1.8.jar
23/09/2009  01:15            22ÿ744 struts2-oval-plugin-2.1.8.jar
23/09/2009  01:11            10ÿ201 struts2-pell-multipart-plugin-2.1.8.jar
23/09/2009  01:06            29ÿ110 struts2-rest-plugin-2.1.8.jar
23/09/2009  01:13            37ÿ177 struts2-sitegraph-plugin-2.1.8.jar
23/09/2009  01:02            16ÿ889 struts2-sitemesh-plugin-2.1.8.jar
23/09/2009  00:59            27ÿ758 struts2-struts1-plugin-2.1.8.jarOLD
23/09/2009  01:14             4ÿ392 struts2-testng-plugin-2.1.8.jar
23/09/2009  01:03            16ÿ584 struts2-tiles-plugin-2.1.8.jar
26/12/2008  02:05           692ÿ205 testng-5.1.jar
26/12/2008  02:52            17ÿ026 tiles-api-2.0.6.jar
26/12/2008  02:52           128ÿ136 tiles-core-2.0.6.jar
26/12/2008  02:52            41ÿ587 tiles-jsp-2.0.6.jar
22/09/2009  17:36           392ÿ124 velocity-1.5.jar
22/09/2009  17:36           134ÿ881 velocity-tools-1.3.jar
26/12/2008  02:28            24ÿ677 xpp3_min-1.1.3.4.O.jar
26/12/2008  02:28           373ÿ194 xstream-1.2.2.jar
01/05/2008  21:33           521ÿ827 xwork-2.1.1.jarOLD
22/09/2009  17:36         1ÿ557ÿ320 xwork-core-2.1.6.jar


Any idea ? Thanks


-----Message d'origine-----
De : Lukasz Lenart [mailto:lukasz.lenart@googlemail.com] 
Envoyé : lundi 9 novembre 2009 13:29
À : Struts Users Mailing List
Objet : Re: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

2009/11/9 Fernandes Celinio <cf...@sopragroup.com>:
> It still does not work. It is still looking for that actionPackages 
> parameter. And if i add it, I get an error related to the path.

Strange, you have something messed up with a configuration. Could you list what kind of jars do you have in WEB-INF/lib folder? Then could you show content of your configuration files?


Regards
--
Lukasz
http://www.lenart.org.pl/

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


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


Re: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/11/9 Fernandes Celinio <cf...@sopragroup.com>:
> It still does not work. It is still looking for that actionPackages parameter. And if i add it, I get an error
> related to the path.

Strange, you have something messed up with a configuration. Could you
list what kind of jars do you have in WEB-INF/lib folder? Then could
you show content of your configuration files?


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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


RE: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

Posted by Fernandes Celinio <cf...@sopragroup.com>.
 
It still does not work. It is still looking for that actionPackages parameter. And if i add it, I get an error related to the path.

----------- web.xml content :-----------

    <filter>  
    <filter-name>struts2</filter-name>  
	   <filter-class>  
	    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
	   </filter-class> 
<!--	   	   <init-param>-->
<!--		<param-name>actionPackages</param-name>-->
<!--		<param-value>com.eni.dvtejb.clientStruts2.action</param-value>-->
<!--	   </init-param>  -->
  </filter> 



---------- struts.xml content :--------------

<constant name="struts.convention.action.packages" value="com.eni.dvtejb.clientStruts2.action" />  


----------- error :----------

Caused by: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='actionPackages'] in public void org.apache.struts2.config.ClasspathPackageProvider.setActionPackages(java.lang.String).

I have the struts2-convention-plugin-2.1.8.jar library in JBoss classpath of course.


-----Message d'origine-----
De : Lukasz Lenart [mailto:lukasz.lenart@googlemail.com] 
Envoyé : lundi 9 novembre 2009 13:15
À : Struts Users Mailing List
Objet : Re: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

2009/11/9 Fernandes Celinio <cf...@sopragroup.com>:
> Is that latest filter implementation part of the Struts 2.1.8 distribution ?

Sorry, tiny mistake, should be
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter


Regards
--
Lukasz
http://www.lenart.org.pl/

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


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


Re: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/11/9 Fernandes Celinio <cf...@sopragroup.com>:
> Is that latest filter implementation part of the Struts 2.1.8 distribution ?

Sorry, tiny mistake, should be
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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


RE: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

Posted by Fernandes Celinio <cf...@sopragroup.com>.
java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)


Is that latest filter implementation part of the Struts 2.1.8 distribution ?


-----Message d'origine-----
De : Lukasz Lenart [mailto:lukasz.lenart@googlemail.com] 
Envoyé : lundi 9 novembre 2009 13:03
À : Struts Users Mailing List
Objet : Re: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

2009/11/9 Fernandes Celinio <cf...@sopragroup.com>:
> 12:48:52,978 ERROR [Dispatcher] Dispatcher initialization failed
> java.lang.RuntimeException: java.lang.RuntimeException: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='actionPackages'] in public void org.apache.struts2.config.ClasspathPackageProvider.setActionPackages(java.lang.String).

Used latest filter implementation:
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter


Regards
--
Lukasz
http://www.lenart.org.pl/

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


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


Re: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/11/9 Fernandes Celinio <cf...@sopragroup.com>:
> 12:48:52,978 ERROR [Dispatcher] Dispatcher initialization failed
> java.lang.RuntimeException: java.lang.RuntimeException: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='actionPackages'] in public void org.apache.struts2.config.ClasspathPackageProvider.setActionPackages(java.lang.String).

Used latest filter implementation:
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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


RE: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

Posted by Fernandes Celinio <cf...@sopragroup.com>.
 
Well, the problem now is that if I remove that param  from the web.xml file, it complains about it :

<!--	   <init-param>-->
<!--		<param-name>actionPackages</param-name>-->
<!--		<param-value>com.eni.dvtejb.clientStruts2.action</param-value>-->
<!--	   </init-param> -->


12:48:52,978 ERROR [Dispatcher] Dispatcher initialization failed
java.lang.RuntimeException: java.lang.RuntimeException: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='actionPackages'] in public void org.apache.struts2.config.ClasspathPackageProvider.setActionPackages(java.lang.String).

In struts.xml I put : 

    <constant name="struts.convention.action.packages"
value="com.eni.dvtejb.clientStruts2.action" />   

Any idea ? You also removed it from the web.xml file ?
Thanks.



-----Message d'origine-----
De : Lukasz Lenart [mailto:lukasz.lenart@googlemail.com] 
Envoyé : lundi 9 novembre 2009 12:25
À : Struts Users Mailing List
Objet : Re: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

2009/11/9 Fernandes Celinio <cf...@sopragroup.com>:
> However I am using JBOSS 5.1.0 GA JDK 6, not Jboss 5.0.1 GA.

I downloaded and checked also with 5.1 - no problems spotted

> Anyays, I added a constant in struts.xml :
>  <constant name="actionPackages" 
> value="com.eni.dvtejb.clientStruts2.action" />

You have to define it like this:
<constant name="struts.convention.action.packages"
value="com.eni.dvtejb.clientStruts2.action" />


Regards
--
Lukasz
http://www.lenart.org.pl/

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


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


Re: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/11/9 Fernandes Celinio <cf...@sopragroup.com>:
> However I am using JBOSS 5.1.0 GA JDK 6, not Jboss 5.0.1 GA.

I downloaded and checked also with 5.1 - no problems spotted

> Anyays, I added a constant in struts.xml :
>  <constant name="actionPackages" value="com.eni.dvtejb.clientStruts2.action" />

You have to define it like this:
<constant name="struts.convention.action.packages"
value="com.eni.dvtejb.clientStruts2.action" />


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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


RE: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

Posted by Fernandes Celinio <cf...@sopragroup.com>.
 
Thanks Likasz.
However I am using JBOSS 5.1.0 GA JDK 6, not Jboss 5.0.1 GA.

Anyays, I added a constant in struts.xml :
  <constant name="actionPackages" value="com.eni.dvtejb.clientStruts2.action" />

And removed the  <init-param> <param-name> <param-value> tags from the web.xml file.


It still does not work, I still get that java.io.FileNotFoundException exception.

Someone from Jboss suggested that I try deploying with the exploded EAR and WAR files, to resolve that Path problem.

Any suggestion ? 


-----Message d'origine-----
De : Lukasz Lenart [mailto:lukasz.lenart@googlemail.com] 
Envoyé : lundi 9 novembre 2009 08:39
À : Struts Users Mailing List
Objet : Re: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

2009/11/8 Celinio Fernandes <ce...@yahoo.com>:
> I am facing the same problem as described in this JIRA issue :
> http://issues.apache.org/struts/browse/WW-2948

I tested that with JBoss 5.0.1 GA and I used example application based on new struts2-archetype-convention archetype. I didn't spot any problems.

> If i remove the <init-param> attribute then it complains about actionPackages missing.
> Of course I changed   <param-value> to point to the package where my 
> Action classes are (under WEB-INF/classes)

Did you try to set up constant either in struts.xml or struts.properties?
struts.convention.action.packages = example

where you should specify the full names of packages with actions, like below struts.convention.action.packages = com.demo.web.actions


Regards
--
Lukasz
http://www.lenart.org.pl/

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


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


Re: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/11/8 Celinio Fernandes <ce...@yahoo.com>:
> I am facing the same problem as described in this JIRA issue :
> http://issues.apache.org/struts/browse/WW-2948

I tested that with JBoss 5.0.1 GA and I used example application based
on new struts2-archetype-convention archetype. I didn't spot any
problems.

> If i remove the <init-param> attribute then it complains about actionPackages missing.
> Of course I changed   <param-value> to point to the package where my Action classes are
> (under WEB-INF/classes)

Did you try to set up constant either in struts.xml or struts.properties?
struts.convention.action.packages = example

where you should specify the full names of packages with actions, like below
struts.convention.action.packages = com.demo.web.actions


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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


Re: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

Posted by Celinio Fernandes <ce...@yahoo.com>.
Can someone provide a patch for it asap ?
http://jira.opensymphony.com/browse/XW-678


JBoss 5.1.0 GA users are stuck without it. 
Thanks in advance.


From: Celinio Fernandes <ce...@yahoo.com>
Subject: [Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?
To: "Struts Users Mailing List" <us...@struts.apache.org>
Date: Sunday, November 8, 2009, 7:09 AM

Hi,
this is my configuration :
Struts 2.1.8
JBoss AS 5.1.0 GA jdk6

I am facing the same problem as described in this JIRA issue :
http://issues.apache.org/struts/browse/WW-2948

I am stuck on this, can anyone suggest a work around ?

This is the part in web.xml that causes the trouble :

    <filter>

        <filter-name>struts2</filter-name>

        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>

        <init-param>

            <param-name>actionPackages</param-name>

            <param-value>example</param-value>

        </init-param>

    </filter>


If i remove the <init-param> attribute then it complains about actionPackages missing.
Of course I changed   <param-value> to point to the package where my Action classes are (under WEB-INF/classes)

So, does it really come from the Virtual File System in JBoss 5 ?

Any work around in the meantime ? Thanks for helping.



      


      

[Struts 2.1.8] Filter init parameter "actionPackages" fails on JBoss5.1.0: workaround ?

Posted by Celinio Fernandes <ce...@yahoo.com>.
Hi,
this is my configuration :
Struts 2.1.8
JBoss AS 5.1.0 GA jdk6

I am facing the same problem as described in this JIRA issue :
http://issues.apache.org/struts/browse/WW-2948

I am stuck on this, can anyone suggest a work around ?

This is the part in web.xml that causes the trouble :

    <filter>

        <filter-name>struts2</filter-name>

        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>

		<init-param>

            <param-name>actionPackages</param-name>

            <param-value>example</param-value>

        </init-param>

    </filter>


If i remove the <init-param> attribute then it complains about actionPackages missing.
Of course I changed   <param-value> to point to the package where my Action classes are (under WEB-INF/classes)

So, does it really come from the Virtual File System in JBoss 5 ?

Any work around in the meantime ? Thanks for helping.



      

RE: sx:div and executeScript

Posted by Martin Gainty <mg...@hotmail.com>.
assuming theme="ajax"
then the div href would be

href
					false
					

					false
					String
					The URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.
make sure your href attribute points a working url such as what is illustrated here
http://struts.apache.org/2.1.8/docs/ajax-div-template.html

Martin Gainty 
______________________________________________ 
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: Sat, 7 Nov 2009 17:44:28 +0100
> Subject: sx:div and executeScript
> From: irenezeller@gmail.com
> To: user@struts.apache.org
> 
> Hi,
> 
> I'm using sx:div for loading a content after the page is loaded.
> But, I have problems because Javascript is not working in the page linked by
> <sx:div ..>. I read about a solution with Struts2.1.2 (I'm using
> Struts2.1.8) in this page(
> http://mail-archives.apache.org/mod_mbox/struts-issues/200808.mbox/%3C2107922214.1217595186486.JavaMail.jira@brutus%3E,
> but it did not work for me.
> I'm using this code:
> <sx:div id="tableScroll"label="table" href="%{#table}"
> separateScripts="false" executeScripts="true">
>                     Carregant'se
>  </sx:div>
> and the returned code is a populated table.
> I changed the jar struts2-dojo-plugin-2.1.8.jar, how the thread indicates,
> but nothing changed.
> I need Javacript in the returned content. Please, I need help.
> 
> 
> Thanks in advance,
> 
> Irene
 		 	   		  
_________________________________________________________________
Find the right PC with Windows 7 and Windows Live. 
http://www.microsoft.com/Windows/pc-scout/laptop-set-criteria.aspx?cbid=wl&filt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000&cat=1,2,3,4,5,6&brands=5,6,7,8,9,10,11,12,13,14,15,16&addf=4,5,9&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen2:112009