Re: Checkstyle (was svn commit: r360442 [1/3] )

2006-02-04 Thread Frank W. Zammetti

Wendy Smoak wrote:

Frank W. Zammetti <[EMAIL PROTECTED]> wrote:

I haven't been able to get Jalopy to cooperate in the least.  A big part
of it is that the documentation leaves a great deal to be desired in
explaining how to configure it,


I have the same problem with the documentation.  Is the XML config
universal, or is that only for the Maven plugin?


AFAICT, the XML config is universal... it should work for any Jalopy 
plug-in in any IDE, build tool or what have you.


The other problem I faced when I was still looking at this is that there 
seems to be some substantial differences in the config format from one 
version of Jalopy to the next.  I may be wrong about that, I could have 
gotten that impression incorrectly, but it did look to be the case. 
Because of this, when I finally did get one plug-in or another to 
generate a baseline rules file, it didn't work with the other plug-in 
because of a version difference.



As a starting point, the default config file that comes with the Maven
Jalopy Plugin is here:
  http://svn.apache.org/repos/asf/struts/build/trunk/jalopy_struts.xml


At one point I think you pointed me at that (or I found it on my own) 
and I tried to use it as a baseline... that's when Jalopy didn't seem to 
be making changes that it should have (or that I at least *thought* it 
should be making) and that's when I kind of gave up on it... that was 
also about the time it was starting to sound like everyone was happy 
with letting IDEA do it anyway, so I didn't explore this any further.



Wendy


Frank

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



Re: Checkstyle (was svn commit: r360442 [1/3] )

2006-02-04 Thread Wendy Smoak
Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> I haven't been able to get Jalopy to cooperate in the least.  A big part
> of it is that the documentation leaves a great deal to be desired in
> explaining how to configure it,

I have the same problem with the documentation.  Is the XML config
universal, or is that only for the Maven plugin?

As a starting point, the default config file that comes with the Maven
Jalopy Plugin is here:
  http://svn.apache.org/repos/asf/struts/build/trunk/jalopy_struts.xml

Ted wrote:
> My suggestion is to run the automatic reformatting toolds on the
> remaining Action Library subproject, wrap up the  notes, and call it a
> release.

Jalopy's changes look okay from here, but I need help making sure that
it conforms to our modified Checkstyle rules.  I'll post some diffs
for review tomorrow.

I'm not so sure about IDEA-- it did fix additional complaints, but I'm
inclined to blame it for the more unpopular changes like reformatting
the Javadoc into 'paragraphs' regardless of markup.

--
Wendy

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



DO NOT REPLY [Bug 38487] - [Tiger] Heap memory error when a lot of jars in WEB-INF/lib

2006-02-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38487


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-02-05 04:51 ---
As of nightly build 20060205, Shale Tiger Extensions will only examine classes
in the following locations for "interesting" annotations:
* Classes under /WEB-INF/classes
* Classes in JAR files under /WEB-INF/lib, but only
  if those JAR files include a META-INF/faces-config.xml
  resource.  The contents of the resource is not examined;
  it is simply used as an indicator that this JAR file
  contains JavaServer Faces related artifacts.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 38321] - changed constants from clazz to interfaces

2006-02-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38321





--- Additional Comments From [EMAIL PROTECTED]  2006-02-05 04:26 ---
(In reply to comment #3)
> (In reply to comment #2)
> > Hmm ... a lot of the reading I've done lately says declaring manifest 
> > constants
> > in an interface is an antipattern because it creates a leaky abstraction.  
> > What
> 
> ah, ok I see. Well I am using (until now ;)) interfaces for kind of this.
> So, that is the reason for UIcomponent is an abstract class?
> 
> > is the motivation for this?
> 
> I was reading the source, so I *easily* changed ;)
> 
> ok, I closed it :-)

(In reply to comment #3)
> (In reply to comment #2)
> > Hmm ... a lot of the reading I've done lately says declaring manifest 
> > constants
> > in an interface is an antipattern because it creates a leaky abstraction.  
> > What
> 
> ah, ok I see. Well I am using (until now ;)) interfaces for kind of this.
> So, that is the reason for UIcomponent is an abstract class?
> 

Actually, that was done for a different reason.

Consider what would have happened if we had just defined UIComponent (an
interface) but not UIComponentBase (an abstract class).  Now, assume that JSF
1.2 wanted to add some additional methods to UIComponent.  This would break
every single third party component in the world -- not a good thing.  That's why
nearly all of the APIs in JavaServer Faces are abstract classes rather than
interfaces.


> > is the motivation for this?
> 
> I was reading the source, so I *easily* changed ;)
> 
> ok, I closed it :-)



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 38494] - [Shale] Messages should log error if resourcebundle not found

2006-02-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38494


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-02-05 04:24 ---
Yep ... we need this one too.  Added in nightly build 20060205.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



svn commit: r374968 - /struts/shale/trunk/core-library/src/java/org/apache/shale/util/Messages.java

2006-02-04 Thread craigmcc
Author: craigmcc
Date: Sat Feb  4 19:23:48 2006
New Revision: 374968

URL: http://svn.apache.org/viewcvs?rev=374968&view=rev
Log:
Add a warning if a specified resource bundle cannot be found as well.

PR:  Bugzilla #38494
Submitted by:  Hermod Opstvedt 

Modified:
struts/shale/trunk/core-library/src/java/org/apache/shale/util/Messages.java

Modified: 
struts/shale/trunk/core-library/src/java/org/apache/shale/util/Messages.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/java/org/apache/shale/util/Messages.java?rev=374968&r1=374967&r2=374968&view=diff
==
--- 
struts/shale/trunk/core-library/src/java/org/apache/shale/util/Messages.java 
(original)
+++ 
struts/shale/trunk/core-library/src/java/org/apache/shale/util/Messages.java 
Sat Feb  4 19:23:48 2006
@@ -294,7 +294,14 @@
 } catch (MissingResourceException e) {
 rb = ResourceBundle.getBundle(name, defaultLocale, cl);
 }
-bundles.put(locale, rb);
+if (rb == null) {
+if (log().isWarnEnabled()) {
+log().warn("Resource bundle '" + getName() +
+   "' was not found for locale '" + locale + 
"'");
+}
+} else {
+bundles.put(locale, rb);
+}
 }
 return rb;
 }



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



DO NOT REPLY [Bug 38510] - new method for AbstractFacesBean

2006-02-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38510


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-02-05 04:13 ---
Added this accessor, plus one for the request headers, in nightly build 
20060205.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



svn commit: r374967 - /struts/shale/trunk/core-library/src/java/org/apache/shale/view/AbstractFacesBean.java

2006-02-04 Thread craigmcc
Author: craigmcc
Date: Sat Feb  4 19:13:02 2006
New Revision: 374967

URL: http://svn.apache.org/viewcvs?rev=374967&view=rev
Log:
Add convenience accessors for maps of request headers and request parameters
included in the current request.

PR:  Bugzilla #38510.
Submitted by:  Matthias Wessendorf 

Modified:

struts/shale/trunk/core-library/src/java/org/apache/shale/view/AbstractFacesBean.java

Modified: 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/AbstractFacesBean.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/java/org/apache/shale/view/AbstractFacesBean.java?rev=374967&r1=374966&r2=374967&view=diff
==
--- 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/AbstractFacesBean.java
 (original)
+++ 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/AbstractFacesBean.java
 Sat Feb  4 19:13:02 2006
@@ -105,12 +105,36 @@
 
 
 /**
+ * Return a Map of the request headers included in this
+ * request.  If there is more than one header for a particular header
+ * name, only the first value is included in this map.
+ */
+protected Map getRequestHeaderMap() {
+
+return getExternalContext().getRequestHeaderMap();
+
+}
+
+
+/**
  * Return a Map of the request scope attributes
  * for this request.
  */
 protected Map getRequestMap() {
 
 return getExternalContext().getRequestMap();
+
+}
+
+
+/**
+ * Return a Map of the request parameters included in this
+ * request.  If there is more than one value for a particular parameter
+ * name, only the first value is included in this map.
+ */
+protected Map getRequestParameterMap() {
+
+return getExternalContext().getRequestParameterMap();
 
 }
 



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



DO NOT REPLY [Bug 38496] - [Shale] Messages should log warning if name not found

2006-02-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38496


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-02-05 04:04 ---
Good idea.  Fixed in nightly build 20060205.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



svn commit: r374964 - /struts/shale/trunk/core-library/src/java/org/apache/shale/util/Messages.java

2006-02-04 Thread craigmcc
Author: craigmcc
Date: Sat Feb  4 19:04:15 2006
New Revision: 374964

URL: http://svn.apache.org/viewcvs?rev=374964&view=rev
Log:
Log a warning when Messages.getMessage(String,Locale) cannot find a string
for the specified key.

PR:  Bugzilla #38496
Submitted by:  Hermod Opstveldt 

Modified:
struts/shale/trunk/core-library/src/java/org/apache/shale/util/Messages.java

Modified: 
struts/shale/trunk/core-library/src/java/org/apache/shale/util/Messages.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/java/org/apache/shale/util/Messages.java?rev=374964&r1=374963&r2=374964&view=diff
==
--- 
struts/shale/trunk/core-library/src/java/org/apache/shale/util/Messages.java 
(original)
+++ 
struts/shale/trunk/core-library/src/java/org/apache/shale/util/Messages.java 
Sat Feb  4 19:04:15 2006
@@ -22,6 +22,8 @@
 import java.util.Map;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * Utility wrapper around resource bundles that provides locale-specific
@@ -116,6 +118,12 @@
 private MessageFormat format = new MessageFormat("");
 
 
+/**
+ * Log instance for this class.
+ */
+private transient Log log = null;
+
+
 // -- 
Properties
 
 
@@ -227,6 +235,10 @@
 try {
 return rb.getString(key);
 } catch (MissingResourceException e) {
+if (log().isWarnEnabled()) {
+log().warn("Key " + key + " was not found in resource bundle 
'" +
+   getName() + "' for locale '" + locale + "'");
+}
 return null;
 }
 
@@ -286,6 +298,19 @@
 }
 return rb;
 }
+
+}
+
+
+/**
+ * Return the Log instance for this class.
+ */
+private Log log() {
+
+if (log == null) {
+log = LogFactory.getLog(Messages.class);
+}
+return log;
 
 }
 



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



svn commit: r374961 - in /struts/build/trunk: jalopy_struts.xml project.properties

2006-02-04 Thread wsmoak
Author: wsmoak
Date: Sat Feb  4 19:03:15 2006
New Revision: 374961

URL: http://svn.apache.org/viewcvs?rev=374961&view=rev
Log:
Added custom config file for the Maven Jalopy Plugin.  
This is the default as shipped with the plugin; it needs to be modified to 
match our Checkstyle rules before use.

Added:
struts/build/trunk/jalopy_struts.xml   (with props)
Modified:
struts/build/trunk/project.properties

Added: struts/build/trunk/jalopy_struts.xml
URL: 
http://svn.apache.org/viewcvs/struts/build/trunk/jalopy_struts.xml?rev=374961&view=auto
==
--- struts/build/trunk/jalopy_struts.xml (added)
+++ struts/build/trunk/jalopy_struts.xml Sat Feb  4 19:03:15 2006
@@ -0,0 +1,254 @@
+
+
+
+
+
+false
+false
+false
+false
+false
+
+
+false
+false
+
+false
+
+false
+Static Variables/Initializers,Instance Variables,Instance 
Initializers,Constructors,Methods,Interfaces,Classes
+true
+false
+
public,protected,private,abstract,static,final,synchronized,transient,volatile,native,strictfp
+false
+
+
+0
+1
+1
+1
+1
+1
+0
+1
+1
+1
+1
+1
+1
+1
+1
+1
+0
+1
+0
+1
+0
+
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+5
+The Apache Software License
+false
+
+
+true
+
false
+false
+true
+true
+true
+false
+false
+true
+true
+true
+true
+false
+true
+true
+false
+true
+false
+false
+true
+false
+
+
+false
+0
+-1
+-1
+0
+false
+-1
+4
+1
+true
+false
+
+4
+false
+
+false
+-1
+1
+30
+0
+false
+4
+1
+
+
+
+0
+false
+
+
+ * @return DOCUMENT ME!
+ * @throws $exceptionType$ DOCUMENT 
ME!
+/**| * DOCUMENT ME!
+ */
+ * @param $paramType$ DOCUMENT ME!
+
+
+
+
+
+
+0
+false
+0
+0
+false
+false
+
+
+Methods
+Static 
variables/initializers
+Constructors
+·
+Interfaces
+Instance initializers
+Instance variables
+Classes
+
+false
+false
+false
+false
+false
+
+
+
+
+false
+0
+
+
+0
+false
+false
+false
+false
+false
+false
+80
+false
+true
+false
+false
+false
+true
+true
+
+
+true
+false
+false
+true
+false
+true
+false
+true
+false
+false
+true
+false
+false
+true
+
+
+History.Policy [disabled]
+
+
+
+true
+true
+
+
+
+   

svn commit: r374959 - /struts/shale/trunk/build.xml

2006-02-04 Thread craigmcc
Author: craigmcc
Date: Sat Feb  4 18:22:54 2006
New Revision: 374959

URL: http://svn.apache.org/viewcvs?rev=374959&view=rev
Log:
Add the "sql-browser" example to the set of examples built by "ant release"
and included in the nightly build artifacts.

WARNING:  There is a bug in the MyFaces 1.1.1 implementation of the
renderer for the  component that causes it to render zero
rows, even though the executed SQL query returns a nonzero number of
rows.  The example app works fine with the JSF RI (to see it in action,
execute "select * from zip_codes").  This has been reported to the
MyFaces issue tracking system ... see the following for current status
on this issue:

  http://issues.apache.org/jira/browse/MYFACES-1092


Modified:
struts/shale/trunk/build.xml

Modified: struts/shale/trunk/build.xml
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/build.xml?rev=374959&r1=374958&r2=374959&view=diff
==
--- struts/shale/trunk/build.xml (original)
+++ struts/shale/trunk/build.xml Sat Feb  4 18:22:54 2006
@@ -789,9 +789,12 @@
   
 
 
-  
+  
   
 
+
+
   
 
 
@@ -922,6 +925,10 @@
 
   
   
+
+
+
 
   
 



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



svn commit: r374957 - in /struts/shale/trunk/sql-browser/src: java/org/apache/shale/examples/sqlbrowser/Listener.java java/org/apache/shale/examples/sqlbrowser/Query.java web/WEB-INF/faces-config.xml

2006-02-04 Thread craigmcc
Author: craigmcc
Date: Sat Feb  4 18:11:17 2006
New Revision: 374957

URL: http://svn.apache.org/viewcvs?rev=374957&view=rev
Log:
Clean up the debugging print statements, and add a bit more data to the
demo data source.

Removed:
struts/shale/trunk/sql-browser/src/web/messages.jspf
struts/shale/trunk/sql-browser/src/web/welcome.jsp
Modified:

struts/shale/trunk/sql-browser/src/java/org/apache/shale/examples/sqlbrowser/Listener.java

struts/shale/trunk/sql-browser/src/java/org/apache/shale/examples/sqlbrowser/Query.java
struts/shale/trunk/sql-browser/src/web/WEB-INF/faces-config.xml
struts/shale/trunk/sql-browser/src/web/query.jsp

Modified: 
struts/shale/trunk/sql-browser/src/java/org/apache/shale/examples/sqlbrowser/Listener.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/sql-browser/src/java/org/apache/shale/examples/sqlbrowser/Listener.java?rev=374957&r1=374956&r2=374957&view=diff
==
--- 
struts/shale/trunk/sql-browser/src/java/org/apache/shale/examples/sqlbrowser/Listener.java
 (original)
+++ 
struts/shale/trunk/sql-browser/src/java/org/apache/shale/examples/sqlbrowser/Listener.java
 Sat Feb  4 18:11:17 2006
@@ -137,11 +137,37 @@
   "state  varchar(2)" +
   ")",
 "insert into zip_codes (zip_code, city, state) " +
-  "values ('97062', 'Tualatin', 'OR')",
+  "values ('97005', 'Beaverton', 'OR')",
+"insert into zip_codes (zip_code, city, state) " +
+  "values ('97006', 'Beaverton', 'OR')",
+"insert into zip_codes (zip_code, city, state) " +
+  "values ('97007', 'Beaverton', 'OR')",
+"insert into zip_codes (zip_code, city, state) " +
+  "values ('97008', 'Beaverton', 'OR')",
+"insert into zip_codes (zip_code, city, state) " +
+  "values ('97075', 'Beaverton', 'OR')",
+"insert into zip_codes (zip_code, city, state) " +
+  "values ('97076', 'Beaverton', 'OR')",
+"insert into zip_codes (zip_code, city, state) " +
+  "values ('97077', 'Beaverton', 'OR')",
+"insert into zip_codes (zip_code, city, state) " +
+  "values ('97078', 'Beaverton', 'OR')",
 "insert into zip_codes (zip_code, city, state) " +
   "values ('97034', 'Lake Oswego', 'OR')",
 "insert into zip_codes (zip_code, city, state) " +
   "values ('97035', 'Lake Oswego', 'OR')",
+"insert into zip_codes (zip_code, city, state) " +
+  "values ('97062', 'Tualatin', 'OR')",
+"insert into zip_codes (zip_code, city, state) " +
+  "values ('97068', 'West Linn', 'OR')",
+"insert into zip_codes (zip_code, city, state) " +
+  "values ('97140', 'Sherwood', 'OR')",
+"insert into zip_codes (zip_code, city, state) " +
+  "values ('97223', 'Tigard', 'OR')",
+"insert into zip_codes (zip_code, city, state) " +
+  "values ('97224', 'Tigard', 'OR')",
+"insert into zip_codes (zip_code, city, state) " +
+  "values ('97281', 'Tigard', 'OR')",
 };
 
 

Modified: 
struts/shale/trunk/sql-browser/src/java/org/apache/shale/examples/sqlbrowser/Query.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/sql-browser/src/java/org/apache/shale/examples/sqlbrowser/Query.java?rev=374957&r1=374956&r2=374957&view=diff
==
--- 
struts/shale/trunk/sql-browser/src/java/org/apache/shale/examples/sqlbrowser/Query.java
 (original)
+++ 
struts/shale/trunk/sql-browser/src/java/org/apache/shale/examples/sqlbrowser/Query.java
 Sat Feb  4 18:11:17 2006
@@ -23,7 +23,6 @@
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
 import java.sql.SQLException;
-import java.util.Iterator;
 import java.util.List;
 import javax.faces.application.FacesMessage;
 import javax.faces.component.UIColumn;
@@ -153,7 +152,6 @@
 }
 
 
-
 // - View Controller 
Methods
 
 
@@ -174,36 +172,25 @@
 
 // Look up the appropriate data source
 // FIXME - add JNDI lookup support for non-internal
-System.err.println("prerender():  Acquire DataSource and 
Connection");
 DataSource ds = (DataSource)
   
context.getExternalContext().getApplicationMap().get(Listener.INTERNAL_DATA_SOURCE);
 conn = ds.getConnection();
 
 // Execute the requested query
-System.err.println("prerender():  Prepare and execute query");
 stmt = conn.prepareStatement(query,
  ResultSet.TYPE_SCROLL_INSENSITIVE,
  ResultSet.CONCUR_READ_ONLY);
 rs = stmt.executeQuery();
 
-// Acquire the result set metadata
-System.err.println("prerender():  Acquiring result set metadata");
-ResultSetMe

svn commit: r374955 - in /struts/shale/trunk/sql-browser/src: java/org/apache/shale/examples/sqlbrowser/Query.java web/query.jsp

2006-02-04 Thread craigmcc
Author: craigmcc
Date: Sat Feb  4 17:06:42 2006
New Revision: 374955

URL: http://svn.apache.org/viewcvs?rev=374955&view=rev
Log:
Example now works with the RI's version of UIData and ResultSetDataModel,
but not with the MyFaces version.  Need to investigate that further.

Modified:

struts/shale/trunk/sql-browser/src/java/org/apache/shale/examples/sqlbrowser/Query.java
struts/shale/trunk/sql-browser/src/web/query.jsp

Modified: 
struts/shale/trunk/sql-browser/src/java/org/apache/shale/examples/sqlbrowser/Query.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/sql-browser/src/java/org/apache/shale/examples/sqlbrowser/Query.java?rev=374955&r1=374954&r2=374955&view=diff
==
--- 
struts/shale/trunk/sql-browser/src/java/org/apache/shale/examples/sqlbrowser/Query.java
 (original)
+++ 
struts/shale/trunk/sql-browser/src/java/org/apache/shale/examples/sqlbrowser/Query.java
 Sat Feb  4 17:06:42 2006
@@ -27,6 +27,7 @@
 import java.util.List;
 import javax.faces.application.FacesMessage;
 import javax.faces.component.UIColumn;
+import javax.faces.component.UIComponent;
 import javax.faces.component.html.HtmlDataTable;
 import javax.faces.component.html.HtmlOutputText;
 import javax.faces.context.FacesContext;
@@ -34,6 +35,7 @@
 import javax.sql.DataSource;
 import org.apache.shale.tiger.managed.Bean;
 import org.apache.shale.tiger.managed.Scope;
+import org.apache.shale.tiger.view.Destroy;
 import org.apache.shale.tiger.view.Prerender;
 import org.apache.shale.tiger.view.View;
 
@@ -48,6 +50,24 @@
 // -- Instance 
Variables
 
 
+/**
+ * The JDBC connection we will be using.
+ */
+private Connection conn = null;
+
+
+/**
+ * The JDBC result set we will be using.
+ */
+private ResultSet rs = null;
+
+
+/**
+ * The JDBC statement we will be using.
+ */
+private PreparedStatement stmt = null;
+
+
 // -- JSF 
Properties
 
 
@@ -150,9 +170,6 @@
 
 // Perform the query and dynamically set up the results
 FacesContext context = FacesContext.getCurrentInstance();
-Connection conn = null;
-PreparedStatement stmt = null;
-ResultSet rs = null;
 try {
 
 // Look up the appropriate data source
@@ -174,13 +191,12 @@
 ResultSetMetaData rsmd = rs.getMetaData();
 System.err.println("prerender():  There are " + 
rsmd.getColumnCount() + " columns");
 
-// Wire up our table binding
-System.err.println("prerender():  Wiring up our table binding");
-resultSetDataModel = new ResultSetDataModel();
-resultSetDataModel.setWrappedData(rs);
-results.setValueBinding("value",
-  
context.getApplication().createValueBinding("#{query.resultSetDataModel}"));
+// Set up the data model for our result set
+System.err.println("prerender():  Wiring up our data model");
+resultSetDataModel = new ResultSetDataModel(rs);
 System.err.println("prerender():  There are " + 
resultSetDataModel.getRowCount() + " rows");
+results.setFirst(0);
+results.setRows(10);
 
 // Dynamically create columns as needed
 System.err.println("prerender():  Dynamically creating columns");
@@ -189,6 +205,7 @@
 for (int i = 1; i <= rsmd.getColumnCount(); i++) { // SQL stuff is 
one-relative
 System.err.println("prerender():  Adding column '" + 
rsmd.getColumnName(i) + "'");
 UIColumn column = new UIColumn();
+column.setId("column" + i);
 children.add(column);
 HtmlOutputText header = new HtmlOutputText();
 String label = rsmd.getColumnLabel(i);
@@ -198,55 +215,110 @@
 header.setValue(label);
 column.setHeader(header);
 HtmlOutputText data = new HtmlOutputText();
-column.getChildren().add(data);
+data.setId("data" + i);
 data.setValueBinding("value",
-  context.getApplication().createValueBinding("#{currentRow['" 
+ rsmd.getColumnName(i) + "']}"));
+  context.getApplication().createValueBinding("#{current['" + 
rsmd.getColumnName(i) + "']}"));
+System.err.println("prerender(): Value binding is " + 
data.getValueBinding("value").getExpressionString());
+column.getChildren().add(data);
+}
+
+// Position to first row to ensure that we can
+System.err.println("prerender():  Check positionability of initial 
rows");
+for (int i = 0; i < 10; i++) {
+resultSetDataModel.setRowIndex(i);
+System.err.println("prerender():  Row " + i + " exists? " + 
resu

svn commit: r374939 - /struts/shale/trunk/clay-plugin/src/conf/clay-config.xml

2006-02-04 Thread gvanmatre
Author: gvanmatre
Date: Sat Feb  4 14:05:35 2006
New Revision: 374939

URL: http://svn.apache.org/viewcvs?rev=374939&view=rev
Log:
Added standard Converter and Validator configuration definitions.

Modified:
struts/shale/trunk/clay-plugin/src/conf/clay-config.xml

Modified: struts/shale/trunk/clay-plugin/src/conf/clay-config.xml
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/clay-plugin/src/conf/clay-config.xml?rev=374939&r1=374938&r2=374939&view=diff
==
--- struts/shale/trunk/clay-plugin/src/conf/clay-config.xml (original)
+++ struts/shale/trunk/clay-plugin/src/conf/clay-config.xml Sat Feb  4 14:05:35 
2006
@@ -529,11 +529,74 @@
   
 

+  
+
+ 
+  
+
+ 
+  
+  
+ 
+  
+
+ 
+  
+  
+ 
+  
+
+ 
+  
+  
+   

 
  
+  
+
+ 
+  
+
+   
+   
+   
+   
+   
+   
+   
+   
+   
+
+  
+
+ 
+  
+
+
+   
   
@@ -541,7 +604,8 @@
   
   
   
-   
+ 
+   
   
   
 
@@ -604,5 +668,33 @@
 

 
+  
+   
+ 
+   
+   
+ 
+  
+
+  
+  
+ 
+   
+   
+   
+  
+
+  
+  
+ 
+   
+   
+ 
+  
 
 



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



DO NOT REPLY [Bug 38510] - new method for AbstractFacesBean

2006-02-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38510





--- Additional Comments From [EMAIL PROTECTED]  2006-02-04 17:22 ---
Created an attachment (id=17588)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17588&action=view)
the patch


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 38510] New: - new method for AbstractFacesBean

2006-02-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38510

   Summary: new method for AbstractFacesBean
   Product: Struts
   Version: Nightly Build
  Platform: Other
OS/Version: other
Status: NEW
  Severity: minor
  Priority: P2
 Component: Shale
AssignedTo: dev@struts.apache.org
ReportedBy: [EMAIL PROTECTED]


I created a new method for the abstractFacesBean to get acces to the http
parameters map *directly* instead of calling
getExternalContext().getRequestParameterMap() inside my *ViewControllers*

Similar to getApplicationMap() method of AbstractFacesBean.

Maybe it is useful for you too.

-Matthias

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



svn commit: r374882 - in /struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component: Clay.java chain/PropertyActionCommand.java

2006-02-04 Thread gvanmatre
Author: gvanmatre
Date: Sat Feb  4 07:31:40 2006
New Revision: 374882

URL: http://svn.apache.org/viewcvs?rev=374882&view=rev
Log:
Corrected indentation and unused import. 

Modified:

struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/Clay.java

struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/PropertyActionCommand.java

Modified: 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/Clay.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/Clay.java?rev=374882&r1=374881&r2=374882&view=diff
==
--- 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/Clay.java
 (original)
+++ 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/Clay.java
 Sat Feb  4 07:31:40 2006
@@ -373,17 +373,17 @@
 Iterator ci = child.getChildren().iterator();
 while (ci.hasNext()) {
 UIComponent c = (UIComponent) ci.next();
-   if (c.isRendered()) {
-   c.encodeBegin(context);
-   
-   if (!c.getRendersChildren())
-   recursiveRenderChildren(c, 
context);
-   else
-   c.encodeChildren(context);
-   
-   c.encodeEnd(context);
-   c = null;
-   }
+if (c.isRendered()) {
+c.encodeBegin(context);
+
+if (!c.getRendersChildren())
+recursiveRenderChildren(c, context);
+else
+c.encodeChildren(context);
+
+c.encodeEnd(context);
+c = null;
+}
 }
 } else {
 // let the component handle iterating over the children

Modified: 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/PropertyActionCommand.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/PropertyActionCommand.java?rev=374882&r1=374881&r2=374882&view=diff
==
--- 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/PropertyActionCommand.java
 (original)
+++ 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/PropertyActionCommand.java
 Sat Feb  4 07:31:40 2006
@@ -21,7 +21,6 @@
 import javax.faces.component.ActionSource;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
-import javax.faces.webapp.UIComponentTag;
 
 import org.apache.commons.chain.Command;
 import org.apache.commons.chain.Context;



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



DO NOT REPLY [Bug 38493] - Rendered attribute does not affect children

2006-02-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38493


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-02-04 16:23 ---
The Clay component was not checking if the child components were capable of 
rendering.  This only seemed to affect components that had children that 
didn't render their children.

The fix will be in the 20060205 nightly build.  Thanks for the help Hermod.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 38492] - Symbol for action attribute on components does not get evaluated

2006-02-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38492


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-02-04 16:16 ---
This limitation was reminiscent of when the managed-bean-name was the only 
Clay symbol.  

The fix will be in the 20060205 nightly build.  Thanks for the help Hermod.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



svn commit: r374881 - /struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/PropertyConverterCommand.java

2006-02-04 Thread gvanmatre
Author: gvanmatre
Date: Sat Feb  4 07:14:42 2006
New Revision: 374881

URL: http://svn.apache.org/viewcvs?rev=374881&view=rev
Log:
Related to Bug 38492.  Reported by Hermod Opstvedt. 

Modified:

struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/PropertyConverterCommand.java

Modified: 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/PropertyConverterCommand.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/PropertyConverterCommand.java?rev=374881&r1=374880&r2=374881&view=diff
==
--- 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/PropertyConverterCommand.java
 (original)
+++ 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/PropertyConverterCommand.java
 Sat Feb  4 07:14:42 2006
@@ -100,10 +100,7 @@
 String expr = null;
 
 boolean isEL = 
UIComponentTag.isValueReference(attributeBean.getValue()); 
-if (isEL) 
-expr = replaceMnemonic(clayContext);
-else
-expr = attributeBean.getValue();
+expr = replaceMnemonic(clayContext);
 
 if (isEL) {
tagUtils.setValueBinding(child, "converter", expr); 



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



svn commit: r374876 - in /struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component: Clay.java chain/PropertyActionCommand.java

2006-02-04 Thread gvanmatre
Author: gvanmatre
Date: Sat Feb  4 06:56:54 2006
New Revision: 374876

URL: http://svn.apache.org/viewcvs?rev=374876&view=rev
Log:
Fixes for Bug 38493 and 38492 reported by Hermod Opstvedt.

Modified:

struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/Clay.java

struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/PropertyActionCommand.java

Modified: 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/Clay.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/Clay.java?rev=374876&r1=374875&r2=374876&view=diff
==
--- 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/Clay.java
 (original)
+++ 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/Clay.java
 Sat Feb  4 06:56:54 2006
@@ -373,15 +373,17 @@
 Iterator ci = child.getChildren().iterator();
 while (ci.hasNext()) {
 UIComponent c = (UIComponent) ci.next();
-c.encodeBegin(context);
-
-if (!c.getRendersChildren())
-recursiveRenderChildren(c, context);
-else
-c.encodeChildren(context);
-
-c.encodeEnd(context);
-c = null;
+   if (c.isRendered()) {
+   c.encodeBegin(context);
+   
+   if (!c.getRendersChildren())
+   recursiveRenderChildren(c, 
context);
+   else
+   c.encodeChildren(context);
+   
+   c.encodeEnd(context);
+   c = null;
+   }
 }
 } else {
 // let the component handle iterating over the children

Modified: 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/PropertyActionCommand.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/PropertyActionCommand.java?rev=374876&r1=374875&r2=374876&view=diff
==
--- 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/PropertyActionCommand.java
 (original)
+++ 
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/PropertyActionCommand.java
 Sat Feb  4 06:56:54 2006
@@ -97,12 +97,7 @@
 
 if (child instanceof ActionSource) {
 String expr = null;
-
-if (UIComponentTag.isValueReference(attributeBean.getValue()))
-expr = replaceMnemonic(clayContext);
-else
-expr = attributeBean.getValue();
-
+expr = replaceMnemonic(clayContext);
 tagUtils.setAction(child, expr);
 } else {
 log.error(messages.getMessage("property.action.error", new 
Object[] {attributeBean}));



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



DO NOT REPLY [Bug 38504] New: - Add valueProperty attribute

2006-02-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38504

   Summary: Add valueProperty attribute
   Product: Struts
   Version: 1.2.8
  Platform: Other
OS/Version: other
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Taglibs
AssignedTo: dev@struts.apache.org
ReportedBy: [EMAIL PROTECTED]


The existing "value" property takes a literal and makes it the property value,
but sometimes the value needs to actually come from another property within the
form. For instance, some developers treat the form as containing both input and
output data (where output data is any piece of information not captured by the
user but to assist in the UI or form processing), and the default input value
may need to come from an output property.

Instead of having to use EL to do value="${formName.property2}" and thereby
exposing the underlying form name in JSP, I propose adding a new attribute
called "valueProperty":



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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