sx:div and executeScript

2009-11-08 Thread irene zeller sancho
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.j...@brutus%3e,
but it did not work for me.
I'm using this code:
sx:div id=tableScrolllabel=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

2009-11-08 Thread Martin Gainty

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: irenezel...@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.j...@brutus%3e,
 but it did not work for me.
 I'm using this code:
 sx:div id=tableScrolllabel=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=wlfilt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000cat=1,2,3,4,5,6brands=5,6,7,8,9,10,11,12,13,14,15,16addf=4,5,9ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen2:112009

advice on building front-end rapidly

2009-11-08 Thread Farshad Rabbani

Hello:

 

I am currently building all my JSPs using notepad.  It is a very slow and 
tedius process to get the struts tags to align and show exactly as I want and 
also to format the page so it looks good.  Is there a tool - something that 
will allow me to quickly build well-designed pages by providing me with a 
WYSIWYG interface where I can drag and drop struts elements, format them and 
the page easily and then see what the outcome will look like?  If there is such 
a tool that you are using (and it is easy to configure etc. :-) ) can you 
please let me know.  If there isn't, how exactly are you all building your 
pages?  I apologize if this is an absurd question but I find myself spending 
unnecessary time on this issue.  Thank you all in advance, any advice is very 
much appreciated.

 

Regards,

Farshad

  
_
Find the right PC with Windows 7 and Windows Live. 
http://www.microsoft.com/Windows/pc-scout/laptop-set-criteria.aspx?cbid=wlfilt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000cat=1,2,3,4,5,6brands=5,6,7,8,9,10,11,12,13,14,15,16addf=4,5,9ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen2:112009

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

2009-11-08 Thread Celinio Fernandes
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-namestruts2/filter-name

filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class

init-param

param-nameactionPackages/param-name

param-valueexample/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: S2: how to deal with NULL value with s:text tag?

2009-11-08 Thread Burton Rhodes
Thanks for the reply.  There should definately be some sort of
enhancment to the s:text tag.  I found a more susinct solution with
the fmt:formatNumber tag - it doesn't display the null text if the
value is null.  Anyone know if there is a request to add a null
feature to s:text?  The s:date tag handles null without
displaying null text.  Wonder why s:text is different?  I can't
think of many situations where the UI calls for displaying null when
a value being displayed is in fact null.

%@ taglib uri=http://java.sun.com/jsp/jstl/fmt; prefix=fmt %
fmt:formatNumber value=${xaction.listPrice} type=currency
maxFractionDigits=0/

s:date name=#xaction.closingDate format=MMM dd,  /


On Sat, Nov 7, 2009 at 4:02 PM, Samuel Robert
samuelrobert@gmail.com wrote:
 Hi,

 I have had same problems when displaying dates.
 The only solution I found was quite similar but maybe a little more flexible
 since you can choose to display nothing:
 s:property value=#item.referenceDate != null ?
 getText('format.date',{#item.referenceDate}) : 'nbsp;' escape=false/

 Samuel

 2009/11/7 Burton Rhodes burtonrho...@gmail.com

 The following entry works fine, but when xaction.contractPrice is
 NULL it prints out null on my web page.
 s:text name=format.moneys:param
 value=#xaction.contractPrice//s:text

 This sort of fixes the issue, but I would prefer to not display a $0.
 s:text name=format.moneys:param
 value=%{#xaction.contractPrice==null ? 0 :
 #xaction.contractPrice}//s:text
 This does not work as I get an error: cannot forward object as a number
 s:text name=format.moneys:param
 value=%{#xaction.contractPrice==null ? ' ' :
 #xaction.contractPrice}//s:text

 Properties file entry:
 format.money = {0,number,\u00A4###,##0}

 Is there something simple I am missing or a better way to do this? Is
 there a $! like freemarker or a default value parameter?

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




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



Re: sx:div and executeScript

2009-11-08 Thread irene zeller sancho
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 mgai...@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: irenezel...@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.j...@brutus%3e
 ,
  but it did not work for me.
  I'm using this code:
  sx:div id=tableScrolllabel=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=wlfilt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000cat=1,2,3,4,5,6brands=5,6,7,8,9,10,11,12,13,14,15,16addf=4,5,9ocid=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 ?

2009-11-08 Thread Celinio Fernandes
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 cel...@yahoo.com
Subject: [Struts 2.1.8] Filter init parameter actionPackages fails on 
JBoss5.1.0: workaround ?
To: Struts Users Mailing List user@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-namestruts2/filter-name

filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class

        init-param

param-nameactionPackages/param-name

param-valueexample/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: Blank archtype not working?

2009-11-08 Thread Lukasz Lenart
2009/11/7 Sanjaya Kumar Patel skpate...@hotmail.com:
 Need clue on creating a blank struts 2.1.8 maven project.

You can try that way:

mvn archetype:generate -DarchetypeCatalog=http://www.lenart.org.pl/maven/

I'm working on the rest and hopefully they will be released soon ;-)


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

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



RE: sx:div and executeScript

2009-11-08 Thread Martin Gainty

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: irenezel...@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 mgai...@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: irenezel...@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.j...@brutus%3e
  ,
   but it did not work for me.
   I'm using this code:
   sx:div id=tableScrolllabel=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=wlfilt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000cat=1,2,3,4,5,6brands=5,6,7,8,9,10,11,12,13,14,15,16addf=4,5,9ocid=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

2009-11-08 Thread irene zeller sancho
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
 ths:text name=Title//th
ths:text name=Author//th
ths:text name=Ending//th
ths:text name=Energy//th
ths:text name=Flatness//th
ths:text name=Validate//th
ths: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 mgai...@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: irenezel...@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 mgai...@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: irenezel...@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

RE: sx:div and executeScript

2009-11-08 Thread Martin Gainty

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: irenezel...@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
  ths:text name=Title//th
 ths:text name=Author//th
 ths:text name=Ending//th
 ths:text name=Energy//th
 ths:text name=Flatness//th
 ths:text name=Validate//th
 ths: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 mgai...@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: irenezel...@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 mgai...@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

Re: advice on building front-end rapidly

2009-11-08 Thread Dave Newton

Farshad Rabbani wrote:

I am currently building all my JSPs using notepad.


Why?! At the very least why wouldn't you use something that can edit and 
understand JSP, custom tags, etc.?



It is a very slow
and tedius process to get the struts tags to align and show exactly
as I want and also to format the page so it looks good.


That's what themes and templates are for.


 Is there a
tool - something that will allow me to quickly build well-designed
pages by providing me with a WYSIWYG interface where I can drag and
drop struts elements, format them and the page easily and then see
what the outcome will look like?  If there is such a tool that you
are using (and it is easy to configure etc. :-) ) can you please let
me know.  If there isn't, how exactly are you all building your
pages?  I apologize if this is an absurd question but I find myself
spending unnecessary time on this issue.


No, there's no WYSIWYG tool. Nor do I believe you should want one--they 
almost never work well.



Dave

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



Re: query regarding Input Validation

2009-11-08 Thread Dave Newton

gaurav nigam wrote:

Do I need to add this interceptor for each action mapping?
Is it possible to have only single entry of this interceptor in the struts.xml ?


Make your own default interceptor stack, but it's already in the 
defaultStack.


Dave


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



RE: advice on building front-end rapidly

2009-11-08 Thread Farshad Rabbani


 Hi Dave,

 
 Why?! At the very least why wouldn't you use something that can edit and 
 understand JSP, custom tags, etc.?


So, what would your recommend as something to edit and understand JSP, custom 
tags etc.?

 

 That's what themes and templates are for.

 

Do you have any specific resources you can guide me to with regards to themes 
and templates?

 

Thanks,

Farshad

 
  
_
Windows 7: Unclutter your desktop.
http://go.microsoft.com/?linkid=9690331ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen:112009

Re: sx:div and executeScript

2009-11-08 Thread irene zeller sancho
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;itables.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;itr.length;i++){
css = (css == odd) ? even : odd;
tr[i].className = css;
var arr = new Array();
for(var j=0;jtr[i].childNodes.length;j++){
if(tr[i].childNodes[j].nodeType == 1)
arr.push(tr[i].childNodes[j]);
};
for (var j=0;jarr.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;itr.length;i++){
var arr = new Array();
for(j=0;jtr[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;itr.length;i++){
var arr = new Array();
for(j=0;jtr[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;itr.childNodes.length;i++){
var obj = tr.childNodes[i];
if (check2(active,obj)  check3(obj)) obj.className = obj.css +
  + css;
 

Re: advice on building front-end rapidly

2009-11-08 Thread Bill Bohnenberger
I use Eclipse enterprise edition:

http://eclipse.org/home/categories/index.php?category=enterprise

- Bill

On Sun, Nov 8, 2009 at 1:32 PM, Farshad Rabbani
farshadrabb...@hotmail.comwrote:



  Hi Dave,


  Why?! At the very least why wouldn't you use something that can edit and
  understand JSP, custom tags, etc.?


 So, what would your recommend as something to edit and understand JSP,
 custom tags etc.?



  That's what themes and templates are for.



 Do you have any specific resources you can guide me to with regards to
 themes and templates?



 Thanks,

 Farshad



 _
 Windows 7: Unclutter your desktop.

 http://go.microsoft.com/?linkid=9690331ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen:112009


Re: struts 2 helloWorld example not properly working in tomcat 5.5

2009-11-08 Thread reason

many thanks for both responses.

the web.xml looks as follows:
?xml version=1.0 encoding=UTF-8?
web-app id=WebApp_ID version=2.4
xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
display-namehelloStruts/display-name
welcome-file-list
welcome-fileHelloWorld.jsp/welcome-file
/welcome-file-list

servlet
servlet-nameHelloWorld/servlet-name
servlet-classtutorial.HelloWorld/servlet-class
/servlet

filter
  filter-namestruts2/filter-name
 
filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class
/filter

 filter-mapping
filter-namestruts2/filter-name
url-pattern/*/url-pattern
 /filter-mapping


/web-app

i've removed references to the  deprecated class but the result is still the
same.

it would appear that the execute method is not being called as i added the
following code in there but saw nothing in the filesystem:
try {
BufferedWriter out = new BufferedWriter(new
FileWriter(helloWorld));
out.write(MESSAGE);
out.close();
} catch (IOException e) {
}

cheers,
kostis


gau...@nabble wrote:
 
 Hello,
 
 it seems to me that problem could exist at any of the two place.
 
 #Either action class's execute method is not getting called. Add SOPs
 with message variable in execute method to verify that.
 #Either your action class's execute method is getting called but the
 value of the message variable is not getting retained while jsp is
 getting called.
 
 Lets first check out of these two which is the cause of error, only
 then we can investigate further.
 if you can provide snippets from struts.xml  and web.xml , that would
 be really helpful...
 
 
 Regards
 
 Gaurav
 
 On Sat, Nov 7, 2009 at 9:19 AM, reason k...@pop.gr wrote:

 i'm trying to get the example outlined in
 http://struts.apache.org/2.1.8/docs/ready-set-go.html to work

 i managed to compile the project in eclipse and it seems to be working
 with
 the exception that the output page is blank.

 i.e. the

    body
        h2s:property value=message //h2
    /body

 directive in the jsp doesn't seem to be outputing anything

 below are my struts.xml HelloWorld.java and HelloWorld.jsp

 struts.xml
 !DOCTYPE struts PUBLIC
    -//Apache Software Foundation//DTD Struts Configuration 2.0//EN
    http://struts.apache.org/dtds/struts-2.0.dtd;
 struts
    package name=tutorial extends=struts-default
        action name=HelloWorld class=tutorial.HelloWorld
            result/HelloWorld.jsp/result
        /action
        !-- Add your actions here --
    /package
 /struts

 HelloWorld.java
 package tutorial;
 import com.opensymphony.xwork2.ActionSupport;
 public class HelloWorld extends ActionSupport {

    public static final String MESSAGE = Struts is up and running ...;

    public String execute() throws Exception {
        setMessage(MESSAGE);
        return SUCCESS;
    }

    private String message;

    public void setMessage(String message){
        this.message = message;
    }

    public String getMessage() {
        return message;
    }
 }

 HelloWorld.jsp
 %@ taglib prefix=s uri=/struts-tags %

 html
    head
        titleHello World!/title
    /head
    body
        h2s:property value=message //h2
    /body
 /html


 all i'm getting is a blank page with Hello World as the title

 thanks for any replies,
 k
 --
 View this message in context:
 http://old.nabble.com/struts-2-helloWorld-example-not-properly-working-in-tomcat-5.5-tp26240890p26240890.html
 Sent from the Struts - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://old.nabble.com/struts-2-helloWorld-example-not-properly-working-in-tomcat-5.5-tp26240890p26259905.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



RE: advice on building front-end rapidly

2009-11-08 Thread Farshad Rabbani

Thanks Bill, I will definitely look into it!


 I use Eclipse enterprise edition:
 
 http://eclipse.org/home/categories/index.php?category=enterprise
 
 - Bill
 
 On Sun, Nov 8, 2009 at 1:32 PM, Farshad Rabbani
 farshadrabb...@hotmail.comwrote:
 
 
 
  Hi Dave,
 
 
   Why?! At the very least why wouldn't you use something that can edit and
   understand JSP, custom tags, etc.?
 
 
  So, what would your recommend as something to edit and understand JSP,
  custom tags etc.?
 
 
 
   That's what themes and templates are for.
 
 
 
  Do you have any specific resources you can guide me to with regards to
  themes and templates?
 
 
 
  Thanks,
 
  Farshad
 
 
 
  _
  Windows 7: Unclutter your desktop.
 
  http://go.microsoft.com/?linkid=9690331ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen:112009

  
_
Find the right PC with Windows 7 and Windows Live. 
http://www.microsoft.com/Windows/pc-scout/laptop-set-criteria.aspx?cbid=wlfilt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000cat=1,2,3,4,5,6brands=5,6,7,8,9,10,11,12,13,14,15,16addf=4,5,9ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen2:112009

RE: sx:div and executeScript

2009-11-08 Thread Martin Gainty

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
titleThis 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'

pThis is a test for Irene /p
s:div href=javascript:tablecloth_function
/s:div
form action=somethingAction name=theForm 
table
  tr
ths:textfield name=Title label=Title value=DefaultTitle//th
ths:textfield name=Author label=Author value=DefaultAuthor //th
ths:textfield name=Ending label=Ending value=DefaultEnding //th
ths:textfield name=Energy label=Energy value=DefaultEnergy //th
ths:textfield name=Flatness label=Flatness value=DefaultFlatness 
//th
ths:textfield name=Validate label=Validate value=DefaultValidate 
//th
ths:textfield name=Play label=Play value=DefaultPlay //th
  /tr
s:iterator value=songs status=rowstatus
  tr
tds:property value=songs[#rowstatus.index].title //td
tds: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: irenezel...@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;itables.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;itr.length;i++){
 css = (css == odd) ? even : odd;
 tr[i].className = css;
 var arr = new Array();
 for(var j=0;jtr[i].childNodes.length;j++){
 if(tr[i].childNodes[j].nodeType == 1)
 

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

2009-11-08 Thread Lukasz Lenart
2009/11/8 Celinio Fernandes cel...@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-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org