cvs commit: jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain AbstractExecuteAction.java AbstractSelectInput.java AbstractValidateActionForm.java Constants.java CreateAction.java

2003-10-09 Thread craigmcc
craigmcc2003/10/09 21:26:16

  Modified:contrib/struts-chain/src/conf chain-config.xml
   contrib/struts-chain/src/java/org/apache/struts/chain
AbstractExecuteAction.java AbstractSelectInput.java
AbstractValidateActionForm.java Constants.java
CreateAction.java
  Log:
  As discussed on STRUTS-DEV, flatten the standard request processing chain
  so that validation failures store a success/failure state in the Context,
  which is then used by the SelectInput, CreateAction, and ExecuteAction
  commands to determine whether they should actually be performed or not.
  
  At the moment, the processing chain for exception handling is still
  modelled as a branch, because it seems likely that users will want to
  customize this path without wanting to mess with the normal lifecycle.
  
  Revision  ChangesPath
  1.5   +7 -25 jakarta-struts/contrib/struts-chain/src/conf/chain-config.xml
  
  Index: chain-config.xml
  ===
  RCS file: /home/cvs/jakarta-struts/contrib/struts-chain/src/conf/chain-config.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- chain-config.xml  31 Aug 2003 22:42:45 -  1.4
  +++ chain-config.xml  10 Oct 2003 04:26:16 -  1.5
  @@ -135,8 +135,12 @@
   
 
 
  +  className="org.apache.struts.chain.servlet.ValidateActionForm"/>
  +
  +
  +  
  +  
   
   
 
  @@ -173,28 +177,6 @@
 
 
  -
  -  
  -  
  -
  -
  -
  -
  -
  -
  -
  -
  -  
  -
  -  
  -  
   
 
 Return the context attribute key under which the
  + * validity flag for this request is stored.
  + */
  +public String getValidKey() {
  +
  +return (this.validKey);
  +
  +}
  +
  +
  +/**
  + * Set the context attribute key under which the
  + * validity flag for this request is stored.
  + *
  + * @param validKey The new context attribute key
  + */
  +public void setValidKey(String validKey) {
  +
  +this.validKey = validKey;
  +
  +}
  +
  +
   // -- Public Methods
   
   
  @@ -213,6 +238,12 @@
* @return false so that processing continues
*/
   public boolean execute(Context context) throws Exception {
  +
  +// Skip processing if the current request is not valid
  +Boolean valid = (Boolean) context.get(getValidKey());
  +if ((valid == null) || !valid.booleanValue()) {
  +return (false);
  +}
   
   // Acquire the resources we will need to send to the Action
   Action action = (Action)
  
  
  
  1.3   +36 -4 
jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractSelectInput.java
  
  Index: AbstractSelectInput.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/contrib/struts-chain/src/java/org/apache/struts/chain/AbstractSelectInput.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractSelectInput.java  29 Sep 2003 06:55:07 -  1.2
  +++ AbstractSelectInput.java  10 Oct 2003 04:26:16 -  1.3
  @@ -88,6 +88,7 @@
   
   private String actionConfigKey = Constants.ACTION_CONFIG_KEY;
   private String forwardConfigKey = Constants.FORWARD_CONFIG_KEY;
  +private String validKey = Constants.VALID_KEY;
   
   private static final Log log = LogFactory.getLog(AbstractSelectInput.class);
   
  @@ -147,6 +148,30 @@
   }
   
   
  +/**
  + * Return the context attribute key under which the
  + * validity flag for this request is stored.
  + */
  +public String getValidKey() {
  +
  +return (this.validKey);
  +
  +}
  +
  +
  +/**
  + * Set the context attribute key under which the
  + * validity flag for this request is stored.
  + *
  + * @param validKey The new context attribute key
  + */
  +public void setValidKey(String validKey) {
  +
  +this.validKey = validKey;
  +
  +}
  +
  +
   // -- Public Methods
   
   
  @@ -160,6 +185,13 @@
*/
   public boolean execute(Context context) throws Exception {
   
  +// Skip processing if the current request is valid
  +Boolean valid = (Boolean) context.get(getValidKey());
  +if ((valid != null) && valid.booleanValue()) {
  +return (false);
  +}
  +
  +// Acquire configuration objects that we need
   ActionConfig actionConfig = (ActionConfig)
   context.get(getActionConfigKey());
   ModuleConfig moduleConfig = actionConfig.getModuleConfig();
  
  
  
  1.4   +21 -30
jakarta-struts/contrib/struts-ch

Re: Adding to the user guide

2003-10-09 Thread James Mitchell
Sorry, I meant modifying the original struts-example.  Or did you already do
that?  I can't seem to find anything in cvs.


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017
770.822.3359
AIM:jmitchtx



- Original Message - 
From: "Don Brown" <[EMAIL PROTECTED]>
To: "Struts Developers List" <[EMAIL PROTECTED]>
Sent: Thursday, October 09, 2003 10:38 PM
Subject: Re: Adding to the user guide


> I did that when it was released as an extension here:
> http://www.twdata.org/struts-wildcard
>
> I modified the editSubscription mapping to edit*.  Since "Subscription" is
> being mapped and replaced in the form name and jsp name, I had to change
> instances of "subscription" to "Subscription".  Thats it though.
>
> Don
>
> On Thu, 9 Oct 2003, James Mitchell wrote:
>
> > +1
> >
> > Looks good to me.  I'll probably take a look at adding it into the
> > struts-example at some point in the near future (time permitting).
> >
> >
> > --
> > James Mitchell
> > Software Engineer / Struts Evangelist
> > http://www.struts-atlanta.org
> > 678.910.8017
> > 770.822.3359
> > AIM:jmitchtx
> >
> >
> >
> > - Original Message -
> > From: "Don Brown" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, October 09, 2003 10:03 PM
> > Subject: Adding to the user guide
> >
> >
> > > I added a section in the user guide about wildcards in action
mappings,
> > > however before I commit it, I'd like to make sure it follows
documentation
> > > conventions as this is my first time writing Struts docs.  I've put
the
> > > section up here for review:
> > >
> > >
> >
http://www.twdata.org/dakine/site/userGuide/building_controller.html#action_mapping_wildcards
> > >
> > > If I don't hear anything in a day or so, I'll take it as a "thumbs up"
and
> > > commit it.  Thanks.
> > >
> > > Don
> > >
> > >
> > > -
> > > 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]


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



Re: Adding to the user guide

2003-10-09 Thread Don Brown
I did that when it was released as an extension here:
http://www.twdata.org/struts-wildcard

I modified the editSubscription mapping to edit*.  Since "Subscription" is
being mapped and replaced in the form name and jsp name, I had to change
instances of "subscription" to "Subscription".  Thats it though.

Don

On Thu, 9 Oct 2003, James Mitchell wrote:

> +1
>
> Looks good to me.  I'll probably take a look at adding it into the
> struts-example at some point in the near future (time permitting).
>
>
> --
> James Mitchell
> Software Engineer / Struts Evangelist
> http://www.struts-atlanta.org
> 678.910.8017
> 770.822.3359
> AIM:jmitchtx
>
>
>
> - Original Message -
> From: "Don Brown" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, October 09, 2003 10:03 PM
> Subject: Adding to the user guide
>
>
> > I added a section in the user guide about wildcards in action mappings,
> > however before I commit it, I'd like to make sure it follows documentation
> > conventions as this is my first time writing Struts docs.  I've put the
> > section up here for review:
> >
> >
> http://www.twdata.org/dakine/site/userGuide/building_controller.html#action_mapping_wildcards
> >
> > If I don't hear anything in a day or so, I'll take it as a "thumbs up" and
> > commit it.  Thanks.
> >
> > Don
> >
> >
> > -
> > 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: Adding to the user guide

2003-10-09 Thread Craig R. McClanahan
Don Brown wrote:

I added a section in the user guide about wildcards in action mappings,
however before I commit it, I'd like to make sure it follows documentation
conventions as this is my first time writing Struts docs.  I've put the
section up here for review:
http://www.twdata.org/dakine/site/userGuide/building_controller.html#action_mapping_wildcards

If I don't hear anything in a day or so, I'll take it as a "thumbs up" and
commit it.  Thanks.
 

+1 ... looks good to me.  The only suggestion I might make is to also 
put a forward reference to this somewhere in the initial description of 
what an action mapping is.

Don

Craig



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


Re: Adding to the user guide

2003-10-09 Thread James Mitchell
+1

Looks good to me.  I'll probably take a look at adding it into the
struts-example at some point in the near future (time permitting).


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017
770.822.3359
AIM:jmitchtx



- Original Message - 
From: "Don Brown" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 09, 2003 10:03 PM
Subject: Adding to the user guide


> I added a section in the user guide about wildcards in action mappings,
> however before I commit it, I'd like to make sure it follows documentation
> conventions as this is my first time writing Struts docs.  I've put the
> section up here for review:
>
>
http://www.twdata.org/dakine/site/userGuide/building_controller.html#action_mapping_wildcards
>
> If I don't hear anything in a day or so, I'll take it as a "thumbs up" and
> commit it.  Thanks.
>
> Don
>
>
> -
> 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]



Adding to the user guide

2003-10-09 Thread Don Brown
I added a section in the user guide about wildcards in action mappings,
however before I commit it, I'd like to make sure it follows documentation
conventions as this is my first time writing Struts docs.  I've put the
section up here for review:

http://www.twdata.org/dakine/site/userGuide/building_controller.html#action_mapping_wildcards

If I don't hear anything in a day or so, I'll take it as a "thumbs up" and
commit it.  Thanks.

Don


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



Re: XMLEncoder class [OT]

2003-10-09 Thread Guido
¿Are you using JDK1.4?

Zakaria khabot wrote:

the problem still persisting, after I adds tools.jar in the classpath

Zakaria KHABOT
Ingénieur d'état Réseaux informatiques
MFIE/CGED
Tel : +212 62 46 10 29
E_mail : [EMAIL PROTECTED]
- Original Message -
From: "Mike Jasnowski" <[EMAIL PROTECTED]>
To: "Struts Developers List" <[EMAIL PROTECTED]>
Sent: Thursday, October 09, 2003 4:35 PM
Subject: RE: XMLEncoder class
oh you meant jar, according to my JDK1.4 docs, this package/class resides
JDK, tools.jar archive. I dunno about the J2EE dist.
-Original Message-
From: Zakaria khabot [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 12:38 PM
To: Struts Developers List
Subject: Re: XMLEncoder class


i got this error message :
Error: cannot access class java.beans.XMLEncoder; file
java\beans\XMLEncoder.class not found
and I thougth I have to add a (.jar) in the classpath

- Original Message -
From: "Mike Jasnowski" <[EMAIL PROTECTED]>
To: "Struts Developers List" <[EMAIL PROTECTED]>
Sent: Thursday, October 09, 2003 4:24 PM
Subject: RE: XMLEncoder class
Didn't you just answer your own question?

-Original Message-
From: Zakaria khabot [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 11:52 AM
To: Struts Developers List
Subject: XMLEncoder class
Hi
wich package contains the class "java.beans.XMLEncoder"
thanks


Zakaria KHABOT
Ingénieur d'état Réseaux informatiques
MFIE/CGED
Tel : +212 62 46 10 29
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]


-
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: XMLEncoder class

2003-10-09 Thread David Graham
http://www.google.com/search?q=java.beans.XMLEncoder

David

--- Mike Jasnowski <[EMAIL PROTECTED]> wrote:
> Didn't you just answer your own question?
> 
> -Original Message-
> From: Zakaria khabot [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 09, 2003 11:52 AM
> To: Struts Developers List
> Subject: XMLEncoder class
> 
> 
> Hi
> wich package contains the class "java.beans.XMLEncoder"
> thanks
> 
> 
> 
> Zakaria KHABOT
> Ingénieur d'état Réseaux informatiques
> MFIE/CGED
> Tel : +212 62 46 10 29
> E_mail : [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



Re: XMLEncoder class

2003-10-09 Thread Zakaria khabot
the problem still persisting, after I adds tools.jar in the classpath


Zakaria KHABOT
Ingénieur d'état Réseaux informatiques
MFIE/CGED
Tel : +212 62 46 10 29
E_mail : [EMAIL PROTECTED]

- Original Message -
From: "Mike Jasnowski" <[EMAIL PROTECTED]>
To: "Struts Developers List" <[EMAIL PROTECTED]>
Sent: Thursday, October 09, 2003 4:35 PM
Subject: RE: XMLEncoder class


oh you meant jar, according to my JDK1.4 docs, this package/class resides
JDK, tools.jar archive. I dunno about the J2EE dist.

-Original Message-
From: Zakaria khabot [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 12:38 PM
To: Struts Developers List
Subject: Re: XMLEncoder class



i got this error message :
Error: cannot access class java.beans.XMLEncoder; file
java\beans\XMLEncoder.class not found

and I thougth I have to add a (.jar) in the classpath

- Original Message -
From: "Mike Jasnowski" <[EMAIL PROTECTED]>
To: "Struts Developers List" <[EMAIL PROTECTED]>
Sent: Thursday, October 09, 2003 4:24 PM
Subject: RE: XMLEncoder class


Didn't you just answer your own question?

-Original Message-
From: Zakaria khabot [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 11:52 AM
To: Struts Developers List
Subject: XMLEncoder class


Hi
wich package contains the class "java.beans.XMLEncoder"
thanks



Zakaria KHABOT
Ingénieur d'état Réseaux informatiques
MFIE/CGED
Tel : +212 62 46 10 29
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]



-
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: XMLEncoder class

2003-10-09 Thread Mike Jasnowski
oh you meant jar, according to my JDK1.4 docs, this package/class resides
JDK, tools.jar archive. I dunno about the J2EE dist.

-Original Message-
From: Zakaria khabot [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 12:38 PM
To: Struts Developers List
Subject: Re: XMLEncoder class



i got this error message :
Error: cannot access class java.beans.XMLEncoder; file
java\beans\XMLEncoder.class not found

and I thougth I have to add a (.jar) in the classpath

- Original Message -
From: "Mike Jasnowski" <[EMAIL PROTECTED]>
To: "Struts Developers List" <[EMAIL PROTECTED]>
Sent: Thursday, October 09, 2003 4:24 PM
Subject: RE: XMLEncoder class


Didn't you just answer your own question?

-Original Message-
From: Zakaria khabot [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 11:52 AM
To: Struts Developers List
Subject: XMLEncoder class


Hi
wich package contains the class "java.beans.XMLEncoder"
thanks



Zakaria KHABOT
Ingénieur d'état Réseaux informatiques
MFIE/CGED
Tel : +212 62 46 10 29
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]



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



Re: XMLEncoder class

2003-10-09 Thread Zakaria khabot

i got this error message :
Error: cannot access class java.beans.XMLEncoder; file
java\beans\XMLEncoder.class not found

and I thougth I have to add a (.jar) in the classpath

- Original Message -
From: "Mike Jasnowski" <[EMAIL PROTECTED]>
To: "Struts Developers List" <[EMAIL PROTECTED]>
Sent: Thursday, October 09, 2003 4:24 PM
Subject: RE: XMLEncoder class


Didn't you just answer your own question?

-Original Message-
From: Zakaria khabot [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 11:52 AM
To: Struts Developers List
Subject: XMLEncoder class


Hi
wich package contains the class "java.beans.XMLEncoder"
thanks



Zakaria KHABOT
Ingénieur d'état Réseaux informatiques
MFIE/CGED
Tel : +212 62 46 10 29
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: XMLEncoder class

2003-10-09 Thread Mike Jasnowski
Didn't you just answer your own question?

-Original Message-
From: Zakaria khabot [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 11:52 AM
To: Struts Developers List
Subject: XMLEncoder class


Hi
wich package contains the class "java.beans.XMLEncoder"
thanks



Zakaria KHABOT
Ingénieur d'état Réseaux informatiques
MFIE/CGED
Tel : +212 62 46 10 29
E_mail : [EMAIL PROTECTED]



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



XMLEncoder class

2003-10-09 Thread Zakaria khabot
Hi 
wich package contains the class "java.beans.XMLEncoder"
thanks


 
Zakaria KHABOT
Ingénieur d'état Réseaux informatiques
MFIE/CGED
Tel : +212 62 46 10 29
E_mail : [EMAIL PROTECTED]