Re: Help:validation is not working with struts1.2

2006-05-31 Thread M.Liang Liu

Thanks to all of you.

I learned a lot from this chain of letters.

You fellows are so kind that I am sure struts is a beautiful struts :)

Many questions are coming as I will pay a lot of time to study struts as a
freshman.

Thank you again.


Re: [OT] Re: multiple html:select

2006-05-31 Thread Medicherla Lakshmi
Thanks All of you.  Finally, i could implement it with ajax.
   
  Lakshmi.

Dave Newton [EMAIL PROTECTED] wrote:
  Medicherla Lakshmi wrote:
 Am using struts and my requirement is i have two selects i a jsp. On change 
 of value in the first select, the values in the secon select should pop up. 
 Is there any way to do this using remote scripting. 
 

What's remote scripting?

Anyway, there are several ways to deal with this, the most obvious being
to set up a javascript handler for the master select box such that
when a value is selected the second select is populated. This requires
some chunks of javascript initialization code (usually arrays containing
value/text pairs).

You could also use AJAX and do things a bit more dynamically, and then
you get to say you used AJAX: long live resume-oriented programming.

Dave



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
  Yahoo! India Answers: Share what you know. Learn something new Click here
 Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now

RE: Maven + Struts

2006-05-31 Thread Marco Mistroni
Hello,  
   I have one that I can mail you privately.. I m just curious on
Why you mention 'Struts with Maven'..

Do you need it for creating webapp or are you particularly interested
In special features (I m not aware of them) that Maven offers for struts?

Thx and regards
 Marco

-Original Message-
From: marcus biel (innoWake gmbh) [mailto:[EMAIL PROTECTED] 
Sent: 31 May 2006 13:22
To: Struts Users Mailing List
Subject: Maven + Struts

Does anyone of you have an example project.xml and project.properties
file
to use Struts with Maven?

Thanks,

Marcus


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



html:link question

2006-05-31 Thread rukka

Hello,

I do have a  jsp tag like this:

html:link href=my.link.1  tabindex=3 something /html:link

I want to pull href link my.link from Message.resources 
(Application.properties).


how do I do that?

Thanks in advance to any replies...

rukka

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Disable submit button

2006-05-31 Thread rukka


As a part of solution  to multiple reloads and to block the multiple 
submit requests in long running service layer methods, we like to
disable submit button once user hit that once. Does html:submit button 
tag has java scripts associated with it?


If you do have any links on client side fix, I appriciate that.

thanks

rukka


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Maven + Struts

2006-05-31 Thread marcus biel \(innoWake gmbh\)
To be honest, I was forced to convert my struts project
that I created in eclipse using a nice eclipse plugin, to
Maven. The only problems are:
1) I have no much of an idea of Maven
2) I created the necessary project.properties and project.xml files,
but in order to make them work I had to adjust my folder structure,
and this was necessary for the tomcat eclipse plugin I am using.

Now when running the Maven Goal, a war file is created, but
is put in my eclipse project folder and not into my webapps folder
of my tomcat server.
Also, after the struts project war file is deployed, 
My first jsp file:
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
logic:redirect forward=startForwardName /

Throws this error:
org.apache.jasper.JasperException: Failed to load or instantiate
TagExtraInfo class: org.apache.struts.taglib.logic.IterateTei

Seems like it can't find the tld file! But struts-logic.tld is included
in WEB-INF!



Thanks,

Marcus


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts Dialog question...

2006-05-31 Thread rukka
We use Struts Dialog to run a wizard. One problem we have is in long 
running transaction (3-4 seconds) user can hit submit button multiple times.

In turn struts controller originates multiple service requests.

with  isTokenValid() method, we are going to lose the response coming 
back from service layer.


Is there any other solution that anyone implemets to fix this sort of 
problem??


thanks

rukka


By the Struts ialog is very good to use on wizard situation.. Thanks to 
Michael Jouravlev


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:link question

2006-05-31 Thread Samere, Adam J
You could use the message tag from JSTL to lookup and store the message
from your resource bundle. Then use the EL version of the Struts HTML
tag library to output the saved value.

%-- This stores the value of my.link.1 in myLink1 --%
fmt:message var=myLink1 key=my.link.1/

%-- now plug it in for the href attribute --%
html-el:link href=${myLink1} tabindex=3 something /html-el:link

-Adam

-Original Message-
From: rukka [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 31, 2006 10:32 AM
To: Struts Users Mailing List
Subject: html:link question

Hello,

I do have a  jsp tag like this:

html:link href=my.link.1  tabindex=3 something /html:link

I want to pull href link my.link from Message.resources
(Application.properties).

how do I do that?

Thanks in advance to any replies...

rukka

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
The information contained in this message may be privileged,
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or any employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution, or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.

Thank you. Paychex, Inc.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Disable submit button

2006-05-31 Thread Jorge Martín Cuervo
i've not tested but i think it should work:


html:submit onclick=this.disabled=true/


El mié, 31 de 05 de 2006 a las 16:36, rukka escribió:

 As a part of solution  to multiple reloads and to block the multiple 
 submit requests in long running service layer methods, we like to
 disable submit button once user hit that once. Does html:submit button 
 tag has java scripts associated with it?
 
 If you do have any links on client side fix, I appriciate that.
 
 thanks
 
 rukka
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
;-)

Jorge Martin Cuervo
Analista Programador

Outsourcing Emarketplace
deFacto Powered by Standards

email [EMAIL PROTECTED]
voz +34 985 129 820
voz +34 660 026 384



RE: Disable submit button

2006-05-31 Thread Miller, Andy
You should attach the event to the form and not the button.  If the user
clicks the enter key on the keyboard and you have used an onClick
event, then the event will not fire if the user hits enter.

Andy Miller
IS Designer
Butte College
530.895.2946
-Original Message-
From: rukka [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 31, 2006 7:37 AM
To: Struts Users Mailing List
Subject: Disable submit button


As a part of solution  to multiple reloads and to block the multiple 
submit requests in long running service layer methods, we like to
disable submit button once user hit that once. Does html:submit button 
tag has java scripts associated with it?

If you do have any links on client side fix, I appriciate that.

thanks

rukka


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Maven + Struts

2006-05-31 Thread David Friedman
Your error suggests your war file doesn't have the appropriate struts .jar
file(s) in /WEB-INF/lib.  I had a similar Maven problem until I double
checked I was using the proper Maven directory structure AND had appropriate
pom.xml project dependencies.  Have you double checked that Maven put your
.war and target directories for the Struts jars?  If not check the structure
of your Maven setup because the files weren't copied into my LIB directory
until I had the correct structure.

This is an interesting coincidence because I started trying to add Maven to
my Eclipse + Tomcat setup just YESTERDAY.  It took me all day to get
everything to build 'normally.'  I am using Eclipse (3.1.2) with the Eclipse
Maven PlugIn (http://maven.apache.org/eclipse-plugin.html) and the Sysdeo
Tomcat plugIn (my choice for over a year now).

Regards,
David

-Original Message-
From: marcus biel (innoWake gmbh) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 31, 2006 9:37 AM
To: Struts Users Mailing List
Subject: AW: Maven + Struts


To be honest, I was forced to convert my struts project
that I created in eclipse using a nice eclipse plugin, to
Maven. The only problems are:
1) I have no much of an idea of Maven
2) I created the necessary project.properties and project.xml files,
but in order to make them work I had to adjust my folder structure,
and this was necessary for the tomcat eclipse plugin I am using.

Now when running the Maven Goal, a war file is created, but
is put in my eclipse project folder and not into my webapps folder
of my tomcat server.
Also, after the struts project war file is deployed,
My first jsp file:
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
logic:redirect forward=startForwardName /

Throws this error:
org.apache.jasper.JasperException: Failed to load or instantiate
TagExtraInfo class: org.apache.struts.taglib.logic.IterateTei

Seems like it can't find the tld file! But struts-logic.tld is included
in WEB-INF!



Thanks,

Marcus


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Maven + Struts

2006-05-31 Thread marcus biel \(innoWake gmbh\)
Maven takes the jar file like struts-1.2.9.jar and puts em into
\WEB-INF\lib - I am just not sure if the 1.2.9 ending is fine -
before it was just struts.jar. Could this be the problem?
If so, how to avoid it?


Marcus

-Ursprüngliche Nachricht-
Von: David Friedman [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 31. Mai 2006 16:23
An: Struts Users Mailing List
Betreff: RE: Maven + Struts

Your error suggests your war file doesn't have the appropriate struts .jar
file(s) in /WEB-INF/lib.  I had a similar Maven problem until I double
checked I was using the proper Maven directory structure AND had appropriate
pom.xml project dependencies.  Have you double checked that Maven put your
.war and target directories for the Struts jars?  If not check the structure
of your Maven setup because the files weren't copied into my LIB directory
until I had the correct structure.

This is an interesting coincidence because I started trying to add Maven to
my Eclipse + Tomcat setup just YESTERDAY.  It took me all day to get
everything to build 'normally.'  I am using Eclipse (3.1.2) with the Eclipse
Maven PlugIn (http://maven.apache.org/eclipse-plugin.html) and the Sysdeo
Tomcat plugIn (my choice for over a year now).

Regards,
David


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Maven + Struts

2006-05-31 Thread Marco Mistroni
Hello,
My 2 c ents again..
Maybe everything has worked perferctly for me cos I m still
Developing in Notepad :)

Rgds
 marco

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED] 
Sent: 31 May 2006 15:23
To: Struts Users Mailing List
Subject: RE: Maven + Struts

Your error suggests your war file doesn't have the appropriate struts .jar
file(s) in /WEB-INF/lib.  I had a similar Maven problem until I double
checked I was using the proper Maven directory structure AND had appropriate
pom.xml project dependencies.  Have you double checked that Maven put your
.war and target directories for the Struts jars?  If not check the structure
of your Maven setup because the files weren't copied into my LIB directory
until I had the correct structure.

This is an interesting coincidence because I started trying to add Maven to
my Eclipse + Tomcat setup just YESTERDAY.  It took me all day to get
everything to build 'normally.'  I am using Eclipse (3.1.2) with the Eclipse
Maven PlugIn (http://maven.apache.org/eclipse-plugin.html) and the Sysdeo
Tomcat plugIn (my choice for over a year now).

Regards,
David

-Original Message-
From: marcus biel (innoWake gmbh) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 31, 2006 9:37 AM
To: Struts Users Mailing List
Subject: AW: Maven + Struts


To be honest, I was forced to convert my struts project
that I created in eclipse using a nice eclipse plugin, to
Maven. The only problems are:
1) I have no much of an idea of Maven
2) I created the necessary project.properties and project.xml files,
but in order to make them work I had to adjust my folder structure,
and this was necessary for the tomcat eclipse plugin I am using.

Now when running the Maven Goal, a war file is created, but
is put in my eclipse project folder and not into my webapps folder
of my tomcat server.
Also, after the struts project war file is deployed,
My first jsp file:
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
logic:redirect forward=startForwardName /

Throws this error:
org.apache.jasper.JasperException: Failed to load or instantiate
TagExtraInfo class: org.apache.struts.taglib.logic.IterateTei

Seems like it can't find the tld file! But struts-logic.tld is included
in WEB-INF!



Thanks,

Marcus


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: forms in struts-layout tabs ??

2006-05-31 Thread Monkeyden

Whether or not you persist the data between screens is dependent on whether
or not the screens make up a single transaction.  Suppose you have an HR
system that allows the user to enter all new employee information.  That
system may require that the user enter all the employee's information or
he/she cannot be an employee (contact info, benefits, dependents,
opt-in/out, non-discolosure, emergency contact, etc).  In this case, none of
the information is valid without all the information, and you would save it
in session until all the data is validated and the user has confirmed that
it's accurate, before you persist.

On 5/25/06, A. Lotfi [EMAIL PROTECTED] wrote:


Thank you Chaudhary for your time, this is realy a good explaination, what
I will do is to have 8 forms  :

form1 has a NEXT button that when submitted go to form2 and insert data in
a table.

form2 has two has two buttons NEXT and PREVIOUS, NEXT , submit to form3
and insert data.
..
and so forth.

Please correct me if I am wrong.

Please if there is an article or an example like this , I would appreciate
if you can help.

Thank you.

Chaudhary, Harsh [EMAIL PROTECTED] wrote:
What you say is definitely doable but consider this. You would need to
save the data from each screen till the end of the screens i.e. the 8th
screen. You can do this by saving the data in the session (not advisable as
the session object will be huge). Or you could pass data as hidden fields
onto each subsequent page. A lot of work. Plus this ties your data to your
front end. So, e.g. if you change the name of a field representing a piece
of data, you would need to make the corresponding changes on every JSP page
too. Ugh!

Also, if the user decides to navigate away from the screen while filling
oout the forms, his session is timed out or he closes the browser. If he was
on the 8th screen, he would lose all 7 screens of previous data.

An alternative design would be to have separate actions and struts forms
for each page or even have 1 big struts form for all the pages and multiple
actions accessing that form. And save the data on each submit, tab etc.

Harsh.

-Original Message-
From: A. Lotfi [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 3:53 PM
To: user@struts.apache.org
Subject: forms in struts-layout tabs ??


Hi,
I have 8 forms (every form will be stored in a separate table), I am
wondering if it is possible to have one jsp page with 8 tabs , fill up the
form in the first tab, move to other tabs and fill forms and at the end
press a one submit button to save data ( from these forms) to the database.

Thank you.


-
Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just
2¢/min with Yahoo! Messenger with Voice.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Do you Yahoo!?
Everyone is raving about the  all-new Yahoo! Mail Beta.



Re: Maven + Struts

2006-05-31 Thread Monkeyden

Ok, joke's over.  That was funny...notepad.  You had me going for a sec.

On 5/31/06, Marco Mistroni [EMAIL PROTECTED] wrote:


Hello,
   My 2 c ents again..
Maybe everything has worked perferctly for me cos I m still
Developing in Notepad :)

Rgds
marco

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED]
Sent: 31 May 2006 15:23
To: Struts Users Mailing List
Subject: RE: Maven + Struts

Your error suggests your war file doesn't have the appropriate struts .jar
file(s) in /WEB-INF/lib.  I had a similar Maven problem until I double
checked I was using the proper Maven directory structure AND had
appropriate
pom.xml project dependencies.  Have you double checked that Maven put your
.war and target directories for the Struts jars?  If not check the
structure
of your Maven setup because the files weren't copied into my LIB directory
until I had the correct structure.

This is an interesting coincidence because I started trying to add Maven
to
my Eclipse + Tomcat setup just YESTERDAY.  It took me all day to get
everything to build 'normally.'  I am using Eclipse (3.1.2) with the
Eclipse
Maven PlugIn (http://maven.apache.org/eclipse-plugin.html) and the Sysdeo
Tomcat plugIn (my choice for over a year now).

Regards,
David

-Original Message-
From: marcus biel (innoWake gmbh) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 31, 2006 9:37 AM
To: Struts Users Mailing List
Subject: AW: Maven + Struts


To be honest, I was forced to convert my struts project
that I created in eclipse using a nice eclipse plugin, to
Maven. The only problems are:
1) I have no much of an idea of Maven
2) I created the necessary project.properties and project.xml files,
but in order to make them work I had to adjust my folder structure,
and this was necessary for the tomcat eclipse plugin I am using.

Now when running the Maven Goal, a war file is created, but
is put in my eclipse project folder and not into my webapps folder
of my tomcat server.
Also, after the struts project war file is deployed,
My first jsp file:
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
logic:redirect forward=startForwardName /

Throws this error:
org.apache.jasper.JasperException: Failed to load or instantiate
TagExtraInfo class: org.apache.struts.taglib.logic.IterateTei

Seems like it can't find the tld file! But struts-logic.tld is included
in WEB-INF!



Thanks,

Marcus


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Maven + Struts

2006-05-31 Thread Wendy Smoak

On 5/31/06, marcus biel (innoWake gmbh) [EMAIL PROTECTED] wrote:

To be honest, I was forced to convert my struts project
that I created in eclipse using a nice eclipse plugin, to
Maven. The only problems are:
1) I have no much of an idea of Maven
2) I created the necessary project.properties and project.xml files,
but in order to make them work I had to adjust my folder structure,
and this was necessary for the tomcat eclipse plugin I am using.


This isn't so much a Struts question as 'How do I get Maven 1 and
Eclipse to work together?'  If you haven't already, ask on the Maven
users list.  There are still a few people answering Maven 1 questions,
though most of the list traffic is devoted to Maven 2.

You can also look around old revisions of the Struts repository.  We
used to use Maven 1, and the build files for the example apps might
help:
  http://svn.apache.org/viewvc/struts/apps/trunk/?pathrev=390900

--
Wendy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Disable submit button

2006-05-31 Thread A Amarakoon
Thank you for quick reply.. This does not work for me..

once you click the submit button it disables button. but does not submit action 
to
the server. May be I am missing something??

thanks

rukka
- Original Message -
From: Jorge Mart�n Cuervo [EMAIL PROTECTED]
Date: Wednesday, May 31, 2006 9:19 am
Subject: Re: Disable submit button

 input type=submit  onclick=this.disabled=true/
 
 this works well
 
 
 PD: i've tested in firefox
 
 El mi�, 31 de 05 de 2006 a las 16:36, rukka escribi�:
 
  As a part of solution  to multiple reloads and to block the 
 multiple 
  submit requests in long running service layer methods, we like to
  disable submit button once user hit that once. Does html:submit 
 button 
  tag has java scripts associated with it?
  
  If you do have any links on client side fix, I appriciate that.
  
  thanks
  
  rukka
  
  
  -
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 -- 
 ;-)
 
 Jorge Martin Cuervo
 Analista Programador
 
 Outsourcing Emarketplace
 deFacto Powered by Standards
 
 email [EMAIL PROTECTED]
 voz +34 985 129 820
 voz +34 660 026 384
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Disable submit button

2006-05-31 Thread Monkeyden

Is it nested within the html:form tag?  What browser are you using?  Any
JS errors on the client?

On 5/31/06, A Amarakoon [EMAIL PROTECTED] wrote:


Thank you for quick reply.. This does not work for me..

once you click the submit button it disables button. but does not submit
action to
the server. May be I am missing something??

thanks

rukka
- Original Message -
From: Jorge Mart�n Cuervo [EMAIL PROTECTED]
Date: Wednesday, May 31, 2006 9:19 am
Subject: Re: Disable submit button

 input type=submit  onclick=this.disabled=true/

 this works well


 PD: i've tested in firefox

 El mi�, 31 de 05 de 2006 a las 16:36, rukka escribi�:

  As a part of solution  to multiple reloads and to block the
 multiple
  submit requests in long running service layer methods, we like to
  disable submit button once user hit that once. Does html:submit
 button
  tag has java scripts associated with it?
 
  If you do have any links on client side fix, I appriciate that.
 
  thanks
 
  rukka
 
 
  -
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

 --
 ;-)
 
 Jorge Martin Cuervo
 Analista Programador

 Outsourcing Emarketplace
 deFacto Powered by Standards

 email [EMAIL PROTECTED]
 voz +34 985 129 820
 voz +34 660 026 384
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Disable submit button

2006-05-31 Thread Gareth Evans

Hi,

I use the following script to do this, it requires the prototype 
javascript library:


function disableOnClick ( className ) {
var elements = document.getElementsByClassName( className );
for ( var index = 0; index  elements.length; index ++ ) {
Event.observe( elements[index] , 'click', buttonOnClick );
}
}

function buttonOnClick( e ) {
Try.these(
function() {
e.srcElement.disabled = true;
e.srcElement.form.submit();
} ,
function() {
e.target.disabled = true;
}
);
}


e.g. in your html/jsp page

input type=submit class=submitButton /
script type=text/javascript
disableOnClick( 'submitButton' );
/script



Some docs on the prototype.js

http://www.sergiopereira.com/articles/prototype.js.html




Hope that helps

Gareth

A Amarakoon wrote:

Thank you for quick reply.. This does not work for me..

once you click the submit button it disables button. but does not submit action 
to
the server. May be I am missing something??

thanks

rukka
- Original Message -
From: Jorge Mart�n Cuervo [EMAIL PROTECTED]
Date: Wednesday, May 31, 2006 9:19 am
Subject: Re: Disable submit button


input type=submit  onclick=this.disabled=true/

this works well


PD: i've tested in firefox

El mi�, 31 de 05 de 2006 a las 16:36, rukka escribi�:

As a part of solution  to multiple reloads and to block the 
multiple 

submit requests in long running service layer methods, we like to
disable submit button once user hit that once. Does html:submit 
button 

tag has java scripts associated with it?

If you do have any links on client side fix, I appriciate that.

thanks

rukka


-



To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
;-)

Jorge Martin Cuervo
Analista Programador

Outsourcing Emarketplace
deFacto Powered by Standards

email [EMAIL PROTECTED]
voz +34 985 129 820
voz +34 660 026 384




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help:validation is not working with struts1.2

2006-05-31 Thread M Hollyer
!DOCTYPE form-validation PUBLIC
  -//Apache Software Foundation//DTD Commons Validator Rules 
Configuration 1.1.3//EN
  http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd;

I am experiencing the same issue when my network connection is off.  The 
validator cannot reference 
the http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd; when there is 
no network connection.

 This is bad because validator rules won't work when this is the case.

I believe the solution is to either change 
the http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd; to a local 
server reference to the validator_1_1_3.dtd or placing placing 
the validator_1_1_3.dtd in a location such as WEB-INF.

So far I do not yet have a solution.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Disable submit button

2006-05-31 Thread A Amarakoon

Gareth, Monkeyden, Jorge, Andy Thank you..

This js lib looks good.

this code fixes it: onclick=this.disabled=true;submit()

rukka


- Original Message -
From: Gareth Evans [EMAIL PROTECTED]
Date: Wednesday, May 31, 2006 11:02 am
Subject: Re: Disable submit button

 Hi,
 
 I use the following script to do this, it requires the prototype 
 javascript library:
 
 function disableOnClick ( className ) {
 var elements = document.getElementsByClassName( className );
 for ( var index = 0; index  elements.length; index ++ ) {
 Event.observe( elements[index] , 'click', buttonOnClick );
 }
 }
 
 function buttonOnClick( e ) {
 Try.these(
 function() {
 e.srcElement.disabled = true;
 e.srcElement.form.submit();
 } ,
 function() {
e.target.disabled = true;
 }
 );
 }
 
 
 e.g. in your html/jsp page
 
 input type=submit class=submitButton /
 script type=text/javascript
   disableOnClick( 'submitButton' );
 /script
 
 
 
 Some docs on the prototype.js
 
 http://www.sergiopereira.com/articles/prototype.js.html
 
 
 
 
 Hope that helps
 
 Gareth
 
 A Amarakoon wrote:
  Thank you for quick reply.. This does not work for me..
  
  once you click the submit button it disables button. but does 
 not submit action to
  the server. May be I am missing something??
  
  thanks
  
  rukka
  - Original Message -
  From: Jorge Mart#65533;n Cuervo [EMAIL PROTECTED]
  Date: Wednesday, May 31, 2006 9:19 am
  Subject: Re: Disable submit button
  
  input type=submit  onclick=this.disabled=true/
 
  this works well
 
 
  PD: i've tested in firefox
 
  El mi#65533;, 31 de 05 de 2006 a las 16:36, rukka escribi#65533;:
 
  As a part of solution  to multiple reloads and to block the 
  multiple 
  submit requests in long running service layer methods, we like to
  disable submit button once user hit that once. Does 
 html:submit 
  button 
  tag has java scripts associated with it?
 
  If you do have any links on client side fix, I appriciate that.
 
  thanks
 
  rukka
 
 
  ---
 --
  
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  -- 
  ;-)
  
  Jorge Martin Cuervo
  Analista Programador
 
  Outsourcing Emarketplace
  deFacto Powered by Standards
 
  email [EMAIL PROTECTED]
  voz +34 985 129 820
  voz +34 660 026 384
  
 
  
  -
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 ---
 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: struts not forwarding after action

2006-05-31 Thread Homero Cardoso de Almeida

Just replying to say that using execute instead of perform made it work fine.
Thanks. =)

On 5/30/06, Homero Cardoso de Almeida [EMAIL PROTECTED] wrote:

Thanks for the help, David.

Yeah, I really think the book is a little outdated (i'm really using
perform() instead of execute()). I think the version I got is the same
as yours, since it mentions the execute() method and Struts 1.1.

I'm not able to test it right now (i'm at work), but when I got home
I'll see what I can get.
Thanks again. =)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help:validation is not working with struts1.2

2006-05-31 Thread Gareth Evans

Hi,

If your application tries to connect to the web for any reason on 
startup, either to jakarta.apache.org or struts.apache.org it is because 
the digester is unable to find a local copy of the dtd.


This can happen for a number of reasons:

1) There is a typo in your doctype declaration
2) You are referencing a version that does not exists

One of the best ways to check it to extract the struts jars file to a 
temporary folder and see which ones it contains.


Note: The public identifier is an exact string match i.e.

-//Apache Software Foundation//DTD Commons Validator Rules Configuration 
1.1.3//EN


is not the same as:

-//Apache Software Foundation/DTD Commons Validator Rules Configuration 
1.1.3//EN


(/ instead of //)

Gareth

M Hollyer wrote:

!DOCTYPE form-validation PUBLIC
  -//Apache Software Foundation//DTD Commons Validator Rules 
Configuration 1.1.3//EN

  http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd;

I am experiencing the same issue when my network connection is off.  The 
validator cannot reference 
the http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd; when there is 
no network connection.


 This is bad because validator rules won't work when this is the case.

I believe the solution is to either change 
the http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd; to a local 
server reference to the validator_1_1_3.dtd or placing placing 
the validator_1_1_3.dtd in a location such as WEB-INF.


So far I do not yet have a solution.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help:validation is not working with struts1.2

2006-05-31 Thread M Hollyer
Gareth Evans gareth.evans at msoft.co.uk writes:

 One of the best ways to check it to extract the struts jars file to a 
 temporary folder and see which ones it contains.
 
 Note: The public identifier is an exact string match i.e.
 
 -//Apache Software Foundation//DTD Commons Validator Rules Configuration 
 1.1.3//EN
 
 is not the same as:
 
 -//Apache Software Foundation/DTD Commons Validator Rules Configuration 
 1.1.3//EN
 
 (/ instead of //)
 


This actually makes sense.  We are in the midst of upgrading struts versions 
as well as introducing the validator to our application.  I most likely used 
the dtd for 1.2 while our struts version is still 1.1.  I'll examine dtds in 
the unzipped struts.jar.

Thanks.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Disable submit button

2006-05-31 Thread Jorge Martín Cuervo
i was going to say you try...


onclick=this.disabled=true;this.form.submit()


 sorry for the delay

El mié, 31 de 05 de 2006 a las 18:14, A Amarakoon escribió:

 Gareth, Monkeyden, Jorge, Andy Thank you..
 
 This js lib looks good.
 
 this code fixes it: onclick=this.disabled=true;submit()
 
 rukka
 
 
 - Original Message -
 From: Gareth Evans [EMAIL PROTECTED]
 Date: Wednesday, May 31, 2006 11:02 am
 Subject: Re: Disable submit button
 
  Hi,
  
  I use the following script to do this, it requires the prototype 
  javascript library:
  
  function disableOnClick ( className ) {
  var elements = document.getElementsByClassName( className );
  for ( var index = 0; index  elements.length; index ++ ) {
  Event.observe( elements[index] , 'click', buttonOnClick );
  }
  }
  
  function buttonOnClick( e ) {
  Try.these(
  function() {
  e.srcElement.disabled = true;
  e.srcElement.form.submit();
  } ,
  function() {
 e.target.disabled = true;
  }
  );
  }
  
  
  e.g. in your html/jsp page
  
  input type=submit class=submitButton /
  script type=text/javascript
  disableOnClick( 'submitButton' );
  /script
  
  
  
  Some docs on the prototype.js
  
  http://www.sergiopereira.com/articles/prototype.js.html
  
  
  
  
  Hope that helps
  
  Gareth
  
  A Amarakoon wrote:
   Thank you for quick reply.. This does not work for me..
   
   once you click the submit button it disables button. but does 
  not submit action to
   the server. May be I am missing something??
   
   thanks
   
   rukka
   - Original Message -
   From: Jorge Mart#65533;n Cuervo [EMAIL PROTECTED]
   Date: Wednesday, May 31, 2006 9:19 am
   Subject: Re: Disable submit button
   
   input type=submit  onclick=this.disabled=true/
  
   this works well
  
  
   PD: i've tested in firefox
  
   El mi#65533;, 31 de 05 de 2006 a las 16:36, rukka escribi#65533;:
  
   As a part of solution  to multiple reloads and to block the 
   multiple 
   submit requests in long running service layer methods, we like to
   disable submit button once user hit that once. Does 
  html:submit 
   button 
   tag has java scripts associated with it?
  
   If you do have any links on client side fix, I appriciate that.
  
   thanks
  
   rukka
  
  
   ---
  --
   
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
   -- 
   ;-)
   
   Jorge Martin Cuervo
   Analista Programador
  
   Outsourcing Emarketplace
   deFacto Powered by Standards
  
   email [EMAIL PROTECTED]
   voz +34 985 129 820
   voz +34 660 026 384
   
  
   
   -
  
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
  
  ---
  --
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
;-)

Jorge Martin Cuervo
Analista Programador

Outsourcing Emarketplace
deFacto Powered by Standards

email [EMAIL PROTECTED]
voz +34 985 129 820
voz +34 660 026 384



Displaying and error

2006-05-31 Thread John Hutchinson

Anyone know why this doesn't work in a JSP error page:

%@ page isErrorPage=true %
...
 c:choose
   c:when test=${not empty
requestScope.org.apache.struts.action.EXCEPTION}
 test br /
 ${requestScope.org.apache.struts.action.EXCEPTION}
   /c:when
  c:otherwise
   no error found
  /c:otherwise
 /c:choose

I've forced an exception, and I see org.apache.struts.action.EXCEPTION in
the request attributes (with a value), but I always get 'no error found'

Thanks!


RE: Displaying and error

2006-05-31 Thread Samere, Adam J
Try ${requestScope['org.apache.struts.action.EXCEPTION']}

-Original Message-
From: John Hutchinson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 31, 2006 1:41 PM
To: user@struts.apache.org
Subject: Displaying and error

Anyone know why this doesn't work in a JSP error page:

%@ page isErrorPage=true %

  c:choose
c:when test=${not empty
requestScope.org.apache.struts.action.EXCEPTION}
  test br /
  ${requestScope.org.apache.struts.action.EXCEPTION}
/c:when
   c:otherwise
no error found
   /c:otherwise
  /c:choose

I've forced an exception, and I see org.apache.struts.action.EXCEPTION
in the request attributes (with a value), but I always get 'no error
found'

Thanks!

-
The information contained in this message may be privileged,
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or any employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution, or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.

Thank you. Paychex, Inc.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Displaying and error

2006-05-31 Thread John Hutchinson

Bingo. Thanks. That's weird.

On 5/31/06, Samere, Adam J [EMAIL PROTECTED] wrote:


Try ${requestScope['org.apache.struts.action.EXCEPTION']}

-Original Message-
From: John Hutchinson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 31, 2006 1:41 PM
To: user@struts.apache.org
Subject: Displaying and error

Anyone know why this doesn't work in a JSP error page:

%@ page isErrorPage=true %

  c:choose
c:when test=${not empty
requestScope.org.apache.struts.action.EXCEPTION}
  test br /
  ${requestScope.org.apache.struts.action.EXCEPTION}
/c:when
   c:otherwise
no error found
   /c:otherwise
  /c:choose

I've forced an exception, and I see org.apache.struts.action.EXCEPTION
in the request attributes (with a value), but I always get 'no error
found'

Thanks!

-
The information contained in this message may be privileged,
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or any employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution, or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.

Thank you. Paychex, Inc.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Displaying and error

2006-05-31 Thread Monkeyden

It's no more weird than request.getAttribute(
org.apache.struts.action.EXCEPTION'), which is what that EL snippet is
equivalant to.  Either way you need to tell the request which named
attribute to give you.

On 5/31/06, John Hutchinson [EMAIL PROTECTED] wrote:


Bingo. Thanks. That's weird.

On 5/31/06, Samere, Adam J [EMAIL PROTECTED] wrote:

 Try ${requestScope['org.apache.struts.action.EXCEPTION']}

 -Original Message-
 From: John Hutchinson [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, May 31, 2006 1:41 PM
 To: user@struts.apache.org
 Subject: Displaying and error

 Anyone know why this doesn't work in a JSP error page:

 %@ page isErrorPage=true %
 
   c:choose
 c:when test=${not empty
 requestScope.org.apache.struts.action.EXCEPTION}
   test br /
   ${requestScope.org.apache.struts.action.EXCEPTION}
 /c:when
c:otherwise
 no error found
/c:otherwise
   /c:choose

 I've forced an exception, and I see org.apache.struts.action.EXCEPTION
 in the request attributes (with a value), but I always get 'no error
 found'

 Thanks!

 -
 The information contained in this message may be privileged,
 confidential, and protected from disclosure. If the reader of this
 message is not the intended recipient, or any employee or agent
 responsible for delivering this message to the intended recipient,
 you are hereby notified that any dissemination, distribution, or
 copying of this communication is strictly prohibited. If you have
 received this communication in error, please notify us immediately
 by replying to the message and deleting it from your computer.

 Thank you. Paychex, Inc.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






Re: Disable submit button

2006-05-31 Thread Frank W. Zammetti
As previously mentioned, you'll probably want to use the onSubmit 
handler of the form itself.  But, whether you do that or not, try adding 
return true; to the end of your handler code... I'm not sure what 
every browser will do by default, but for onSubmit at least, you need to 
return true for the form to be submitted to indicate to the browser to 
proceed with the submission (returning false is frequently used to do 
client-side validations and abort the submission if something is 
wrong)... I'd bet that if you don't put any event handler code that the 
browser essentially adds an implicit return true; as the event 
handler... Off the top of my head, I believe the same is true of submit 
buttons... worth a try at least.


Frank

A Amarakoon wrote:

Thank you for quick reply.. This does not work for me..

once you click the submit button it disables button. but does not submit action 
to
the server. May be I am missing something??

thanks

rukka
- Original Message -
From: Jorge Mart�n Cuervo [EMAIL PROTECTED]
Date: Wednesday, May 31, 2006 9:19 am
Subject: Re: Disable submit button


input type=submit  onclick=this.disabled=true/

this works well


PD: i've tested in firefox

El mi�, 31 de 05 de 2006 a las 16:36, rukka escribi�:

As a part of solution  to multiple reloads and to block the 
multiple 

submit requests in long running service layer methods, we like to
disable submit button once user hit that once. Does html:submit 
button 

tag has java scripts associated with it?

If you do have any links on client side fix, I appriciate that.

thanks

rukka


-



To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
;-)

Jorge Martin Cuervo
Analista Programador

Outsourcing Emarketplace
deFacto Powered by Standards

email [EMAIL PROTECTED]
voz +34 985 129 820
voz +34 660 026 384




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



implementing javax.servlet.Filter w/Struts

2006-05-31 Thread CrackheadMillionaire
Hello friends - 
   
  I recently implemented a filter to push some information into the session.  
Great.  However, after filter processing and within my DispatchAction, if I 
make a call to request.getSession().getAttribute(whateverName); the values 
aren't there; in fact, the session attached to my incoming request is null.  
   
  Digging around in the debugger I can find my objects, but it's buried pretty 
deep within a layer of of nested ApplicationHttpRequest objects; I don't even 
appear to have the ability to get to it.  If I put things into the session from 
within my DispatchAction, no problems it's always there.  
   
  Also, can anyone explain why my filter is bypassed if the mapping is for 
*.jsp, but gets hit for *.do?
   
  Any advice is greatly appreciated. 
   
  - brian


-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
countries) for 2¢/min or less.

Re: implementing javax.servlet.Filter w/Struts

2006-05-31 Thread Frank W. Zammetti
On the second point, can you list your web.xml, the portion where you 
map the filter at least?  Chances are you have it mapped incorrectly.


On the first point, can we see your filter?  There's no inherent reason 
you can't do what your trying to do with a filter and Struts, so there 
is some detail wrong somewhere, but what you posted here is most likely 
not sufficient to answer.  Seeing your code, and the associated 
configuration, will probably help.


Frank

CrackheadMillionaire wrote:
Hello friends - 
   
  I recently implemented a filter to push some information into the session.  Great.  However, after filter processing and within my DispatchAction, if I make a call to request.getSession().getAttribute(whateverName); the values aren't there; in fact, the session attached to my incoming request is null.  
   
  Digging around in the debugger I can find my objects, but it's buried pretty deep within a layer of of nested ApplicationHttpRequest objects; I don't even appear to have the ability to get to it.  If I put things into the session from within my DispatchAction, no problems it's always there.  
   
  Also, can anyone explain why my filter is bypassed if the mapping is for *.jsp, but gets hit for *.do?
   
  Any advice is greatly appreciated. 
   
  - brian



-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
countries) for 2¢/min or less.


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Deciding which DispatchAction to use

2006-05-31 Thread David Evans
This page may be helpful:
http://wiki.apache.org/struts/EventActionDispatcher

On Wed, 2006-05-31 at 10:42 -0700, pantichd wrote:
 Hello,
 
 I'm trying to figure out how to decide which flavor of DispatchAction
 (DispatchAction, LookupDispatchAction, MappingDispatchAction, etc) to use in
 which scenario.
 
 I know that there is a lot of personal preference involved but I'm hoping
 there is some kind of documentation that indicates which type is best for
 certain situations.
 
 Any help would be greatly appreciated.
 
 Thanks!
 
 David
 --
 View this message in context: 
 http://www.nabble.com/Deciding+which+DispatchAction+to+use-t1711933.html#a4648278
 Sent from the Struts - User forum at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: implementing javax.servlet.Filter w/Struts

2006-05-31 Thread Wendy Smoak

On 5/31/06, CrackheadMillionaire [EMAIL PROTECTED] wrote:


  I recently implemented a filter to push some information into the session.  Great.  
However, after filter processing and within my DispatchAction, if I make a call to 
request.getSession().getAttribute(whateverName); the values aren't there; in 
fact, the session attached to my incoming request is null.


That would seem to indicate that your Filter isn't being executed, or
isn't doing what you think it's doing.  Without more information, like
sample code, your Filter mapping, etc., it's hard to tell.

I have this code in a Filter, with no problems, and the object is
always there when I retrieve it later in an Action:
   request.getSession().setAttribute( Constants.USER_KEY, webUser );


  Also, can anyone explain why my filter is bypassed if the mapping is for 
*.jsp, but gets hit for *.do?


Probably because the original request was for someAction.do, and then
you're _forwarding_ to the JSP on the server side.  The Servlet 2.4
spec introduced some new options for filter mapping.  What version are
you using (or what version of what container)?

--
Wendy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Deciding which DispatchAction to use

2006-05-31 Thread Wendy Smoak

On 5/31/06, pantichd [EMAIL PROTECTED] wrote:


I'm trying to figure out how to decide which flavor of DispatchAction
(DispatchAction, LookupDispatchAction, MappingDispatchAction, etc) to use in
which scenario.


I'm now using 'EventDispatchAction' for anything new I write.  It uses
the presence of a request parameter to decide which method to call,
based on a list of parameter-to-method mappings in struts-config.xml.

If you don't want to extend EventDispatchAction, you can use the
EventActionDispatcher that David mentioned to add the same dispatching
functionality in any Action class.

--
Wendy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Deciding which DispatchAction to use

2006-05-31 Thread Lixin Chu

how to handle action chaning in EventDispatchAction, for example, if my
mapping is something like this:

forward name = nextaction path = /nextAction.do?action=true/

When we use: return mapping.findForward(nextaction); the current
parameters, including the event for the current action will be passed on to
the next action class. will this confuse the next Action ?

We could redirect

On 6/1/06, Wendy Smoak [EMAIL PROTECTED] wrote:


On 5/31/06, pantichd [EMAIL PROTECTED] wrote:

 I'm trying to figure out how to decide which flavor of DispatchAction
 (DispatchAction, LookupDispatchAction, MappingDispatchAction, etc) to
use in
 which scenario.

I'm now using 'EventDispatchAction' for anything new I write.  It uses
the presence of a request parameter to decide which method to call,
based on a list of parameter-to-method mappings in struts-config.xml.

If you don't want to extend EventDispatchAction, you can use the
EventActionDispatcher that David mentioned to add the same dispatching
functionality in any Action class.

--
Wendy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: implementing javax.servlet.Filter w/Struts

2006-05-31 Thread CrackheadMillionaire
Hello all - 
   
  This was a pebkac style error.  I have solved the problem.  Thank you for the 
rapid replies.  
   
  Take care.
   
  brian
   
  

Frank W. Zammetti [EMAIL PROTECTED] wrote:
  On the second point, can you list your web.xml, the portion where you 
map the filter at least? Chances are you have it mapped incorrectly.

On the first point, can we see your filter? There's no inherent reason 
you can't do what your trying to do with a filter and Struts, so there 
is some detail wrong somewhere, but what you posted here is most likely 
not sufficient to answer. Seeing your code, and the associated 
configuration, will probably help.

Frank

CrackheadMillionaire wrote:
 Hello friends - 
 
 I recently implemented a filter to push some information into the session. 
 Great. However, after filter processing and within my DispatchAction, if I 
 make a call to request.getSession().getAttribute(whateverName); the values 
 aren't there; in fact, the session attached to my incoming request is null. 
 
 Digging around in the debugger I can find my objects, but it's buried pretty 
 deep within a layer of of nested ApplicationHttpRequest objects; I don't even 
 appear to have the ability to get to it. If I put things into the session 
 from within my DispatchAction, no problems it's always there. 
 
 Also, can anyone explain why my filter is bypassed if the mapping is for 
 *.jsp, but gets hit for *.do?
 
 Any advice is greatly appreciated. 
 
 - brian
 
 
 -
 Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
 countries) for 2¢/min or less.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Do you Yahoo!?
 Get on board. You're invited to try the new Yahoo! Mail Beta.

Global forwards don't support Tiles definitions?

2006-05-31 Thread Scott Van Wart

I have a tiles definition (tiles-defs.xml),

definition name=page.main extends=base.definition
 put name=title value=Main Page /
 put name=centercontent value=/main.jsp /
/definition

   and a global forward (struts-config.xml),

global-forwards
 forward name=main path=page.main /
/global-forwards

When the forward is triggered with this,

logic:forward name=main /

   the browser requests host/context_root/page.main.  This gives a 
Tomcat resource unavailable screen.  HTML links don't seem to work 
either.  When I try something like this,


html:link forward=mainMain Page/html:link

I can see the http://host/context_root/page.main in the status bar 
when I hover over the link.  Am I pretty much out of luck using global 
forwards and html:links with Tiles, or am I just not doing it right?  
The following DOES work, but it might be nice to use global forwards so 
I don't stick ActionForms all over the place (and this still wouldn't 
solve the html:link issue):


action path=/login type=org.nothing.LoginAction name=loginForm 
scope=request validate=true input=/login.jsp

 forward name=success path=page.main redirect=true /
 forward name=failure path=/login.jsp /
/action

Any ideas?  Thanks!

- Scott


PS: Other stuff:
Version: 1.2.9 (bindist)
Container: Apache Tomcat 5.5.17

From struts-config.xml:

 controller 
processorClass=org.apache.struts.tiles.TilesRequestProcessor /


 plug-in className=org.apache.struts.tiles.TilesPlugin
   set-property property=definitions-config 
value=/WEB-INF/tiles-defs.xml /

   set-property property=moduleAware value=true /
 /plug-in


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Disable submit button

2006-05-31 Thread rukka

Thanks for the tip.

rukka

Frank W. Zammetti wrote:

As previously mentioned, you'll probably want to use the onSubmit 
handler of the form itself.  But, whether you do that or not, try 
adding return true; to the end of your handler code... I'm not sure 
what every browser will do by default, but for onSubmit at least, you 
need to return true for the form to be submitted to indicate to the 
browser to proceed with the submission (returning false is frequently 
used to do client-side validations and abort the submission if 
something is wrong)... I'd bet that if you don't put any event handler 
code that the browser essentially adds an implicit return true; as the 
event handler... Off the top of my head, I believe the same is true of 
submit buttons... worth a try at least.


Frank

A Amarakoon wrote:


Thank you for quick reply.. This does not work for me..

once you click the submit button it disables button. but does not 
submit action to

the server. May be I am missing something??

thanks







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]