You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shale.apache.org by ra...@apache.org on 2006/10/13 16:16:05 UTC
svn commit: r463687 - in /shale/framework/trunk:
shale-core/src/main/java/org/apache/shale/taglib/
shale-validator/src/main/java/org/apache/shale/validator/
shale-validator/src/test/java/org/apache/shale/validator/
Author: rahul
Date: Fri Oct 13 07:16:04 2006
New Revision: 463687
URL: http://svn.apache.org/viewvc?view=rev&rev=463687
Log:
Static methods accessed in non-static way.
SHALE-310
Modified:
shale/framework/trunk/shale-core/src/main/java/org/apache/shale/taglib/TokenTag.java
shale/framework/trunk/shale-validator/src/main/java/org/apache/shale/validator/CommonsValidator.java
shale/framework/trunk/shale-validator/src/test/java/org/apache/shale/validator/CommonsValidatorTestCase.java
Modified: shale/framework/trunk/shale-core/src/main/java/org/apache/shale/taglib/TokenTag.java
URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-core/src/main/java/org/apache/shale/taglib/TokenTag.java?view=diff&rev=463687&r1=463686&r2=463687
==============================================================================
--- shale/framework/trunk/shale-core/src/main/java/org/apache/shale/taglib/TokenTag.java (original)
+++ shale/framework/trunk/shale-core/src/main/java/org/apache/shale/taglib/TokenTag.java Fri Oct 13 07:16:04 2006
@@ -43,7 +43,7 @@
FacesContext context = getFacesContext();
if (messageSummary != null) {
- if (this.isValueReference(messageSummary)) {
+ if (UIComponentTag.isValueReference(messageSummary)) {
ValueBinding vb = context.getApplication().createValueBinding(messageSummary);
component.setValueBinding("messageSummary", vb);
} else {
@@ -52,7 +52,7 @@
}
if (messageDetail != null) {
- if (this.isValueReference(messageDetail)) {
+ if (UIComponentTag.isValueReference(messageDetail)) {
ValueBinding vb = context.getApplication().createValueBinding(messageDetail);
component.setValueBinding("messageDetail", vb);
} else {
Modified: shale/framework/trunk/shale-validator/src/main/java/org/apache/shale/validator/CommonsValidator.java
URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-validator/src/main/java/org/apache/shale/validator/CommonsValidator.java?view=diff&rev=463687&r1=463686&r2=463687
==============================================================================
--- shale/framework/trunk/shale-validator/src/main/java/org/apache/shale/validator/CommonsValidator.java (original)
+++ shale/framework/trunk/shale-validator/src/main/java/org/apache/shale/validator/CommonsValidator.java Fri Oct 13 07:16:04 2006
@@ -834,7 +834,7 @@
}
String[] types = getDependencies(getType());
for (int j = 0; j < types.length; j++) {
- ValidatorAction validatorAction = this.getValidatorAction(types[j]);
+ ValidatorAction validatorAction = CommonsValidator.getValidatorAction(types[j]);
try {
vars.put(SUBMITTED_VALUE_VARNAME, value);
Modified: shale/framework/trunk/shale-validator/src/test/java/org/apache/shale/validator/CommonsValidatorTestCase.java
URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-validator/src/test/java/org/apache/shale/validator/CommonsValidatorTestCase.java?view=diff&rev=463687&r1=463686&r2=463687
==============================================================================
--- shale/framework/trunk/shale-validator/src/test/java/org/apache/shale/validator/CommonsValidatorTestCase.java (original)
+++ shale/framework/trunk/shale-validator/src/test/java/org/apache/shale/validator/CommonsValidatorTestCase.java Fri Oct 13 07:16:04 2006
@@ -30,6 +30,7 @@
import javax.faces.component.html.HtmlInputText;
import javax.faces.context.ResponseWriter;
+import junit.framework.Assert;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -1295,7 +1296,7 @@
private void checkScript(StringBuffer htmlSnippet, String[] searchTokens) {
for (int i = 0; i < searchTokens.length; i++) {
- this.assertTrue("Not Found: " + searchTokens[i], (htmlSnippet.indexOf(searchTokens[i]) > -1));
+ Assert.assertTrue("Not Found: " + searchTokens[i], (htmlSnippet.indexOf(searchTokens[i]) > -1));
}
}
Re: svn commit: r463687 - in /shale/framework/trunk: shale-core/src/main/java/org/apache/shale/taglib/ shale-validator/src/main/java/org/apache/shale/validator/ shale-validator/src/test/java/org/apache/shale/validator/
Posted by Rahul Akolkar <ra...@gmail.com>.
On 10/13/06, Craig McClanahan <cr...@apache.org> wrote:
> See embedded comment below.
>
> On 10/13/06, rahul@apache.org <ra...@apache.org> wrote:
> >
> > Author: rahul
> > Date: Fri Oct 13 07:16:04 2006
> > New Revision: 463687
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=463687
> > Log:
> > Static methods accessed in non-static way.
> > SHALE-310
> >
> > Modified:
> >
> > shale/framework/trunk/shale-core/src/main/java/org/apache/shale/taglib/TokenTag.java
> >
> > shale/framework/trunk/shale-validator/src/main/java/org/apache/shale/validator/CommonsValidator.java
> >
> > shale/framework/trunk/shale-validator/src/test/java/org/apache/shale/validator/CommonsValidatorTestCase.java
> >
> > Modified:
> > shale/framework/trunk/shale-core/src/main/java/org/apache/shale/taglib/TokenTag.java
> > URL:
> > http://svn.apache.org/viewvc/shale/framework/trunk/shale-core/src/main/java/org/apache/shale/taglib/TokenTag.java?view=diff&rev=463687&r1=463686&r2=463687
> >
> > ==============================================================================
> > ---
> > shale/framework/trunk/shale-core/src/main/java/org/apache/shale/taglib/TokenTag.java
> > (original)
> > +++
> > shale/framework/trunk/shale-core/src/main/java/org/apache/shale/taglib/TokenTag.java
> > Fri Oct 13 07:16:04 2006
> > @@ -43,7 +43,7 @@
> > FacesContext context = getFacesContext();
> >
> > if (messageSummary != null) {
> > - if (this.isValueReference(messageSummary)) {
> > + if (UIComponentTag.isValueReference(messageSummary)) {
>
>
> We need to not be calling UIComponentTag.isValueReference() ... this breaks
> in JSF 1.2 because the underlying class had an incompatible change. I
> applied a patch on this to a bunch of other classes yesterday.
>
<snip/>
Ah, I see, I event read that commit message, sorry!
I'll revert the two changes associated with UIComponentTag, but I'll
assume its OK the keep the rest of the changes in this commit, unless
I hear more in this thread.
-Rahul
> Craig
>
> ValueBinding vb = context.getApplication
> > ().createValueBinding(messageSummary);
> > component.setValueBinding("messageSummary", vb);
> > } else {
> > @@ -52,7 +52,7 @@
> > }
> >
> > if (messageDetail != null) {
> > - if (this.isValueReference(messageDetail)) {
> > + if (UIComponentTag.isValueReference(messageDetail)) {
> > ValueBinding vb = context.getApplication
> > ().createValueBinding(messageDetail);
> > component.setValueBinding("messageDetail", vb);
> > } else {
> >
<snap/>
Re: svn commit: r463687 - in /shale/framework/trunk: shale-core/src/main/java/org/apache/shale/taglib/ shale-validator/src/main/java/org/apache/shale/validator/ shale-validator/src/test/java/org/apache/shale/validator/
Posted by Craig McClanahan <cr...@apache.org>.
See embedded comment below.
On 10/13/06, rahul@apache.org <ra...@apache.org> wrote:
>
> Author: rahul
> Date: Fri Oct 13 07:16:04 2006
> New Revision: 463687
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=463687
> Log:
> Static methods accessed in non-static way.
> SHALE-310
>
> Modified:
>
> shale/framework/trunk/shale-core/src/main/java/org/apache/shale/taglib/TokenTag.java
>
> shale/framework/trunk/shale-validator/src/main/java/org/apache/shale/validator/CommonsValidator.java
>
> shale/framework/trunk/shale-validator/src/test/java/org/apache/shale/validator/CommonsValidatorTestCase.java
>
> Modified:
> shale/framework/trunk/shale-core/src/main/java/org/apache/shale/taglib/TokenTag.java
> URL:
> http://svn.apache.org/viewvc/shale/framework/trunk/shale-core/src/main/java/org/apache/shale/taglib/TokenTag.java?view=diff&rev=463687&r1=463686&r2=463687
>
> ==============================================================================
> ---
> shale/framework/trunk/shale-core/src/main/java/org/apache/shale/taglib/TokenTag.java
> (original)
> +++
> shale/framework/trunk/shale-core/src/main/java/org/apache/shale/taglib/TokenTag.java
> Fri Oct 13 07:16:04 2006
> @@ -43,7 +43,7 @@
> FacesContext context = getFacesContext();
>
> if (messageSummary != null) {
> - if (this.isValueReference(messageSummary)) {
> + if (UIComponentTag.isValueReference(messageSummary)) {
We need to not be calling UIComponentTag.isValueReference() ... this breaks
in JSF 1.2 because the underlying class had an incompatible change. I
applied a patch on this to a bunch of other classes yesterday.
Craig
ValueBinding vb = context.getApplication
> ().createValueBinding(messageSummary);
> component.setValueBinding("messageSummary", vb);
> } else {
> @@ -52,7 +52,7 @@
> }
>
> if (messageDetail != null) {
> - if (this.isValueReference(messageDetail)) {
> + if (UIComponentTag.isValueReference(messageDetail)) {
> ValueBinding vb = context.getApplication
> ().createValueBinding(messageDetail);
> component.setValueBinding("messageDetail", vb);
> } else {
>
> Modified:
> shale/framework/trunk/shale-validator/src/main/java/org/apache/shale/validator/CommonsValidator.java
> URL:
> http://svn.apache.org/viewvc/shale/framework/trunk/shale-validator/src/main/java/org/apache/shale/validator/CommonsValidator.java?view=diff&rev=463687&r1=463686&r2=463687
>
> ==============================================================================
> ---
> shale/framework/trunk/shale-validator/src/main/java/org/apache/shale/validator/CommonsValidator.java
> (original)
> +++
> shale/framework/trunk/shale-validator/src/main/java/org/apache/shale/validator/CommonsValidator.java
> Fri Oct 13 07:16:04 2006
> @@ -834,7 +834,7 @@
> }
> String[] types = getDependencies(getType());
> for (int j = 0; j < types.length; j++) {
> - ValidatorAction validatorAction = this.getValidatorAction
> (types[j]);
> + ValidatorAction validatorAction =
> CommonsValidator.getValidatorAction(types[j]);
>
> try {
> vars.put(SUBMITTED_VALUE_VARNAME, value);
>
> Modified:
> shale/framework/trunk/shale-validator/src/test/java/org/apache/shale/validator/CommonsValidatorTestCase.java
> URL:
> http://svn.apache.org/viewvc/shale/framework/trunk/shale-validator/src/test/java/org/apache/shale/validator/CommonsValidatorTestCase.java?view=diff&rev=463687&r1=463686&r2=463687
>
> ==============================================================================
> ---
> shale/framework/trunk/shale-validator/src/test/java/org/apache/shale/validator/CommonsValidatorTestCase.java
> (original)
> +++
> shale/framework/trunk/shale-validator/src/test/java/org/apache/shale/validator/CommonsValidatorTestCase.java
> Fri Oct 13 07:16:04 2006
> @@ -30,6 +30,7 @@
> import javax.faces.component.html.HtmlInputText;
> import javax.faces.context.ResponseWriter;
>
> +import junit.framework.Assert;
> import junit.framework.Test;
> import junit.framework.TestSuite;
>
> @@ -1295,7 +1296,7 @@
>
> private void checkScript(StringBuffer htmlSnippet, String[]
> searchTokens) {
> for (int i = 0; i < searchTokens.length; i++) {
> - this.assertTrue("Not Found: " + searchTokens[i], (
> htmlSnippet.indexOf(searchTokens[i]) > -1));
> + Assert.assertTrue("Not Found: " + searchTokens[i], (
> htmlSnippet.indexOf(searchTokens[i]) > -1));
> }
> }
>
>
>
>