Re: Struts Chain... seams similar to HiveMind ?EOM

2003-10-30 Thread Ted Husted
It's possible that there is some overlap. You might be able to register 
Commands as HiveMind services. But HiveMind has a much broader scope 
than Commons Chain.

Commons Chain is an implementation of the classic Chain of Command 
pattern. Period. It has no other scope or aspirations. People can drop 
it in wherever you might want to implement a Chain of Command. No muss, 
no fuss.

HiveMind is a configuration framework that you could use throughout an 
application and within a Command. You might, for example, register the 
Catalog as a HiveMind service, and the Commands might use HiveMind to 
find the Catalog(s). But, that would be up to the developer. Commons 
Chain does not need to decided how the Catalog is discovered. People 
might also use HiveMind to load the Chain configuration file as an 
alternative to the Digester.

Struts Chain is whiteboard reimplementation of the Request Processor 
using Commons Chain. I don't believe that the Request Processor would be 
easier to implement as a nest of HiveMind services.

-Ted.

Vic Cekvenich wrote:
Struts Chain... seams similar to HiveMind ?
Am I wrong?
.V


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

--
Ted Husted,
  Junit in Action  - http://www.manning.com/massol/,
  Struts in Action - http://husted.com/struts/book.html,
  JSP Site Design  - http://www.amazon.com/exec/obidos/ISBN=1861005512.


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


RE: Tiles Advanced Features by Cedric Dumoulin

2003-10-30 Thread Norm Deane
I've got a copy posted on my poor excuse for a website. Also on my site is a
presentation I gave at our Java Users Group on Tiles.  I based my
presentation on Cedric's examples with some changes to eliminate/minimize
scriptlets and rt expressions.  You can check out the presentation and the
war file that went with the presentation @
http://people.vanderbilt.edu/~norment.deane/

-- 
Norm Deane
MIS Consultant
Vanderbilt University
(615) 322-7855
[EMAIL PROTECTED] 

 -Original Message-
 From: Sean Gunn [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, October 29, 2003 8:29 PM
 To: [EMAIL PROTECTED]
 Subject: Tiles Advanced Features by Cedric Dumoulin
 
 
 
 
 Anyone know of a mirror for tilesAdvancedFeatures.pdf?
 It is referenced in the tiles guide: 
 http://jakarta.apache.org/struts/userGuide/dev_tiles.html
 as being at 
 http://www.lifl.fr/ ~dumoulin/tiles/tilesAdvancedFeatures.pdf
 
 but I constantly 
 get no connection.
 
 Or, if you could send me a copy to sean(at)downplay(dot)org
 I would really appreciate it.
 
 
 PS  Are there any other good forums for struts and/or tiles 
 development?
 
 THANKS!!!
 
 -
 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: Tiles Advanced Features by Cedric Dumoulin

2003-10-30 Thread Greg Reddin
Check here:

http://jakarta.apache.org/struts/userGuide/dev_tiles.html

Look at the bottom of the page.

Greg

Sean Gunn wrote:
Anyone know of a mirror for tilesAdvancedFeatures.pdf?
It is referenced in the tiles guide:
http://jakarta.apache.org/struts/userGuide/dev_tiles.html
as being at
http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf
but I constantly get no connection.
Or, if you could send me a copy to sean(at)downplay(dot)org
I would really appreciate it.
PS  Are there any other good forums for struts and/or tiles
development?
THANKS!!!

-
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: Session-scoped forms and synchronization...

2003-10-30 Thread Jing Zhou

- Original Message - 
From: Bob Lee [EMAIL PROTECTED]
To: Struts Developers List [EMAIL PROTECTED]
Sent: Tuesday, October 28, 2003 10:00 AM
Subject: Re: Session-scoped forms and synchronization...


 Craig R. McClanahan wrote:

  Well, you can get more than one *created*, but only one will actually
  be stored as a session attribute if the attribute name is the same.
  Synchronizing the session.setAttribute() method would be pointless;
  the container guarantees that this won't break anything.  So, exactly
  what portion of the code would you propose to synchronize?

 One will overwrite the other in the session, yes, but the
 RequestProcessor doesn't pull it back out of the session. It uses the
 instance it created, so both could be used concurrently.

The problem you are describing here is a real one. But synchronizing
a portion of RequestProcessor would not *cleanly* solve the problem:

1) Two concurrent threads could still corrupt the same session scoped
form bean after the threads leave the synchronized section.

2) The problem is due to concurrent threads from ONE user and
synchronizing a portion of RequestProcessor might have
impact to ALL users' threads. (You do not want to wait because
someone else is creating his/her form bean).

We just have this considered but our codes have not been
released with Carrier yet. The idea is to use a filter to synchronize
on a *personal* session scoped object. So nothing need to
be changed in the RequestProcessor.

But it requires Servlet 2.3 in place and could be *very* application 
specific due to our requirements. For example, we do not allow
the second thread to enter the RequestProcessor if the first one
has not been finished yet (very conservative except for cancel event).
We also have to deal with cases when the first thread is a long
running job.

I would suggest people consider filters when solving this problem 
in proposals. Filters can be used as options to protect system's
integrity.

Any other alternatives or ideas?


 Bob



Jing
Netspread Carrier
http://www.netspread.com


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



DO NOT REPLY [Bug 24263] New: - warn if a form is not declared but later used in struts-config.xml

2003-10-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24263.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24263

warn if a form is not declared but later used in struts-config.xml

   Summary: warn if a form is not declared but later used in struts-
config.xml
   Product: Struts
   Version: 1.0 Final
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


by a cvs merge, a form declaration dropped out.

No complaint while parsing the the config even though a action  ... name=
later referenced the missing form.

Only, once the form is executed, it is found missing.

It would save programmers a lot of time if such errors would be raised at load
and not only at the end of lenghty, often manual test runs.

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



DO NOT REPLY [Bug 24202] - Javascript validation fails for single radio and single checkbox

2003-10-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24202.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24202

Javascript validation fails for single radio and single checkbox

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-10-31 06:10 ---
I have fixed the checkbox but not the radio button.
For the single checkbox I could see a use such as
I have read this license agreement.
However, I know of no use case for the radio button.

This will be in the Nov 1 Nightly build.

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



cvs commit: jakarta-struts/conf/share validator-rules.xml

2003-10-30 Thread rleland
rleland 2003/10/30 22:09:13

  Modified:conf/share validator-rules.xml
  Log:
  Add required check for single checkbox,
  Bug report by Saul Q Yuan
  
  Revision  ChangesPath
  1.44  +18 -13jakarta-struts/conf/share/validator-rules.xml
  
  Index: validator-rules.xml
  ===
  RCS file: /home/cvs/jakarta-struts/conf/share/validator-rules.xml,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- validator-rules.xml   1 Oct 2003 15:43:11 -   1.43
  +++ validator-rules.xml   31 Oct 2003 06:09:13 -  1.44
  @@ -39,7 +39,7 @@
  errors.range={0} is not in the range {1} through {2}.
  errors.creditcard={0} is an invalid credit card number.
  errors.email={0} is an invalid e-mail address.
  -   
  +
  Note: Starting in Struts 1.2.0 the default javascript definitions have
been consolidated to commons-validator. The default can be overridden
by supplying a javascript element with a CDATA section, just as
  @@ -71,13 +71,14 @@
   
   for (x in oRequired) {
   var field = form[oRequired[x][0]];
  -
  +
   if (field.type == 'text' ||
   field.type == 'textarea' ||
   field.type == 'file' ||
  +field.type == 'checkbox' ||
   field.type == 'select-one' ||
   field.type == 'password') {
  -
  +
   var value = '';
   // get field's value
   if (field.type == select-one) {
  @@ -85,19 +86,23 @@
   if (si = 0) {
   value = field.options[si].value;
   }
  -} else {
  +} else if (field.type == checkbox) {
  + if (field.checked) {
  + value = field.value;
  + } 
  +} else {
   value = field.value;
   }
  -
  +
   if (trim(value).length == 0) {
  -
  +
   if (i == 0) {
   focusField = field;
   }
   fields[i++] = oRequired[x][1];
   isValid = false;
   }
  -} else if (field.type == select-multiple) { 
  +} else if (field.type == select-multiple) {
   var numOptions = field.options.length;
   lastSelected=-1;
   for(loop=numOptions-1;loop=0;loop--) {
  @@ -137,12 +142,12 @@
   }
   return isValid;
   }
  -
  +
   // Trim whitespace from left and right sides of s.
   function trim(s) {
   return s.replace( /^\s*/,  ).replace( /\s*$/,  );
   }
  -
  +
   ]]
/javascript
   
  @@ -194,7 +199,7 @@
 depends=
 msg=errors.invalid/
   
  - 
  +
   
 validator name=mask
   classname=org.apache.struts.validator.FieldChecks
  
  
  

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



cvs commit: jakarta-struts/src/validator/org/apache/struts/webapp/validator ApplicationResources.properties TypeForm.java

2003-10-30 Thread rleland
rleland 2003/10/30 22:10:17

  Modified:src/validator/org/apache/struts/webapp/validator
ApplicationResources.properties TypeForm.java
  Log:
  Bug 24202
  Add required check for single checkbox,
  Bug report/patch by Saul Q Yuan
  
  Revision  ChangesPath
  1.6   +1 -0  
jakarta-struts/src/validator/org/apache/struts/webapp/validator/ApplicationResources.properties
  
  Index: ApplicationResources.properties
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/validator/org/apache/struts/webapp/validator/ApplicationResources.properties,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ApplicationResources.properties   24 Sep 2003 03:42:03 -  1.5
  +++ ApplicationResources.properties   31 Oct 2003 06:10:17 -  1.6
  @@ -56,6 +56,7 @@
   
   # Type form
   typeForm.byte.displayname=Byte Field
  +typeForm.checkbox.wouldrecommend=I would recommend
   typeForm.checkbox.used.languages=Programming Languages used
   typeForm.creditCard.displayname=Credit Card
   typeForm.date.displayname=Date Field
  
  
  
  1.6   +12 -3 
jakarta-struts/src/validator/org/apache/struts/webapp/validator/TypeForm.java
  
  Index: TypeForm.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/validator/org/apache/struts/webapp/validator/TypeForm.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TypeForm.java 24 Sep 2003 03:42:03 -  1.5
  +++ TypeForm.java 31 Oct 2003 06:10:17 -  1.6
  @@ -90,6 +90,7 @@
   private String sSatisfaction = null;
   private String[] sOsList = null;
   private String sOverallSatisfaction = null;
  +private String sWouldRecommend = null;
   private String[] sUsedLanguages = null;
   
   private List lNames = initNames();
  @@ -204,6 +205,14 @@
   
   public void setOverallSatisfaction(String anOverallSatisfaction) {
this.sOverallSatisfaction = anOverallSatisfaction;
  +}
  +
  +public String getWouldRecommend() {
  +   return sWouldRecommend;
  +}
  +
  +public void setWouldRecommend(String anWouldRecommend) {
  + this.sWouldRecommend = anWouldRecommend;
   }
   
   public String[] getUsedLanguages() {
  
  
  

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



cvs commit: jakarta-struts/web/validator/WEB-INF validation.xml

2003-10-30 Thread rleland
rleland 2003/10/30 22:10:49

  Modified:web/validator jsType.jsp
   web/validator/WEB-INF validation.xml
  Log:
  Bug 24202
  Add required check for single checkbox,
  Bug report/patch by Saul Q Yuan
  
  Revision  ChangesPath
  1.7   +8 -0  jakarta-struts/web/validator/jsType.jsp
  
  Index: jsType.jsp
  ===
  RCS file: /home/cvs/jakarta-struts/web/validator/jsType.jsp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- jsType.jsp24 Sep 2003 03:43:17 -  1.6
  +++ jsType.jsp31 Oct 2003 06:10:49 -  1.7
  @@ -140,6 +140,14 @@
 /tr
 tr
   th align=left
  +  bean:message key=typeForm.checkbox.wouldrecommend/:
  +/th
  +td align=left
  +  html:checkbox property=wouldRecommend /
  +/td
  +  /tr
  +  tr
  +th align=left
 bean:message key=typeForm.checkbox.used.languages/:
   /th
   td align=left
  
  
  
  1.8   +4 -0  jakarta-struts/web/validator/WEB-INF/validation.xml
  
  Index: validation.xml
  ===
  RCS file: /home/cvs/jakarta-struts/web/validator/WEB-INF/validation.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- validation.xml24 Sep 2003 03:43:17 -  1.7
  +++ validation.xml31 Oct 2003 06:10:49 -  1.8
  @@ -289,6 +289,10 @@
 depends=required
arg0 key=typeForm.radio.overall.satisfaction/
/field
  + field   property=wouldRecommend
  +  depends=required
  + arg0 key=typeForm.checkbox.wouldrecommend/
  + /field
field   property=usedLanguages
 depends=required
arg0 key=typeForm.checkbox.used.languages/
  
  
  

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



cvs commit: jakarta-struts/conf/share validator-rules.xml

2003-10-30 Thread rleland
rleland 2003/10/30 22:26:26

  Modified:conf/share validator-rules.xml
  Log:
  Bug 24202
  Add required check for single checkbox,
  Bug report/patch by Saul Q Yuan
  
  Revision  ChangesPath
  1.45  +7 -7  jakarta-struts/conf/share/validator-rules.xml
  
  Index: validator-rules.xml
  ===
  RCS file: /home/cvs/jakarta-struts/conf/share/validator-rules.xml,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- validator-rules.xml   31 Oct 2003 06:09:13 -  1.44
  +++ validator-rules.xml   31 Oct 2003 06:26:26 -  1.45
  @@ -86,10 +86,10 @@
   if (si = 0) {
   value = field.options[si].value;
   }
  -} else if (field.type == checkbox) {
  - if (field.checked) {
  - value = field.value;
  - } 
  +} else if (field.type == 'checkbox') {
  + if (field.checked) {
  + value = field.value;
  + }
   } else {
   value = field.value;
   }
  
  
  

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