You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by jk...@apache.org on 2006/03/11 21:55:35 UTC
svn commit: r385164 [2/32] - in /jakarta/tapestry/trunk: ./ .settings/
annotations/src/java/org/apache/tapestry/annotations/
annotations/src/test/org/apache/tapestry/annotations/ config/
contrib/src/documentation/content/xdocs/tapestry-contrib/Componen...
Modified: jakarta/tapestry/trunk/.classpath
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/.classpath?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
Binary files - no diff available.
Modified: jakarta/tapestry/trunk/.project
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/.project?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
Binary files - no diff available.
Modified: jakarta/tapestry/trunk/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/.settings/org.eclipse.jdt.core.prefs?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/.settings/org.eclipse.jdt.core.prefs (original)
+++ jakarta/tapestry/trunk/.settings/org.eclipse.jdt.core.prefs Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-#Sat Jan 14 12:53:17 EST 2006
+#Sat Mar 11 12:41:59 EST 2006
=\=\=\=\=\=\=
<<<<<<<=.working
>>>>>>>=.merge-right.r368223
@@ -21,8 +21,8 @@
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=ignore
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=error
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
@@ -63,7 +63,7 @@
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=ignore
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
Modified: jakarta/tapestry/trunk/.settings/org.eclipse.jdt.ui.prefs
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/.settings/org.eclipse.jdt.ui.prefs?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/.settings/org.eclipse.jdt.ui.prefs (original)
+++ jakarta/tapestry/trunk/.settings/org.eclipse.jdt.ui.prefs Sat Mar 11 12:54:27 2006
@@ -1,17 +1,7 @@
-#Sun Jan 15 15:15:58 EST 2006
-=\=\=\=\=\=\=
-<<<<<<<=.working
->>>>>>>=.merge-right.r368223
+#Wed Jun 08 16:11:32 EDT 2005
eclipse.preferences.version=1
-formatter_profile=_tapestry
-formatter_settings_version=9
internal.default.compliance=default
org.eclipse.jdt.ui.exception.name=ex
org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;
-org.eclipse.jdt.ui.javadoc=true
org.eclipse.jdt.ui.keywordthis=false
-org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.overrideannotation=true
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return Returns the ${bare_field_name}.\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} The ${bare_field_name} to set.\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_contex
t" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">// Copyright 2004, 2005 The Apache Software Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the "License");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http\://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an "AS IS" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name
\="typecomment">/**\n * <p>This class </p>\n * <ul>\n * <li></li> \n * </ul>\n *\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/** ${field} */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * {@inheritDoc}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description
\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">// Copyright 2004, 2005 The Apache Software Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the "License");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http\://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an "AS IS" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.cla
ssbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exceptio
n_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.ec
lipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
Modified: jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/AnnotationMessages.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/AnnotationMessages.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/AnnotationMessages.java (original)
+++ jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/AnnotationMessages.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// Copyright 2005 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.
@@ -17,7 +17,6 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
-import org.apache.hivemind.Messages;
import org.apache.hivemind.impl.MessageFormatter;
import org.apache.hivemind.service.ClassFabUtils;
@@ -26,78 +25,78 @@
* @since 4.0
*/
-final class AnnotationMessages
+class AnnotationMessages
{
-
- private static final Messages MESSAGES = new MessageFormatter(AnnotationMessages.class);
-
- /** @since 4.1 */
- private AnnotationMessages()
- {
- }
+ private static final MessageFormatter _formatter = new MessageFormatter(
+ AnnotationMessages.class);
static String noParametersExpected(Method m)
{
- return MESSAGES.format("no-parameters-expected", m);
+ return _formatter.format("no-parameters-expected", m);
}
static String notAccessor(Method method)
{
- return MESSAGES.format("no-accessor", method);
+ return _formatter.format("no-accessor", method);
}
static String voidAccessor(Method method)
{
- return MESSAGES.format("void-accessor", method);
+ return _formatter.format("void-accessor", method);
}
static String nonVoidMutator(Method method)
{
- return MESSAGES.format("non-void-mutator", method);
+ return _formatter.format("non-void-mutator", method);
}
static String wrongParameterCount(Method method)
{
- return MESSAGES.format("wrong-parameter-count", method);
+ return _formatter.format("wrong-parameter-count", method);
}
static String failureProcessingAnnotation(Annotation annotation, Method method, Throwable cause)
{
- return MESSAGES.format("failure-processing-annotation", annotation, method, cause);
+ return _formatter.format("failure-processing-annotation", annotation, method, cause);
}
- static String failureProcessingClassAnnotation(Annotation annotation, Class clazz, Throwable cause)
+ static String failureProcessingClassAnnotation(Annotation annotation, Class clazz,
+ Throwable cause)
{
- return MESSAGES.format("failure-processing-class-annotation", annotation, clazz.getName(), cause);
+ return _formatter.format(
+ "failure-processing-class-annotation",
+ annotation,
+ clazz.getName(),
+ cause);
}
static String returnStringOnly(Class returnType)
{
- return MESSAGES.format("return-string-only", ClassFabUtils.getJavaClassName(returnType));
+ return _formatter.format("return-string-only", ClassFabUtils.getJavaClassName(returnType));
}
static String bindingWrongFormat(String binding)
{
- return MESSAGES.format("binding-wrong-format", binding);
+ return _formatter.format("binding-wrong-format", binding);
}
static String methodAnnotation(Annotation annotation, Method method)
{
- return MESSAGES.format("method-annotation", annotation, method);
+ return _formatter.format("method-annotation", annotation, method);
}
static String classAnnotation(Annotation annotation, Class clazz)
{
- return MESSAGES.format("class-annotation", annotation, clazz.getName());
+ return _formatter.format("class-annotation", annotation, clazz.getName());
}
static String missingEqualsInMeta(String value)
{
- return MESSAGES.format("missing-equals-in-meta", value);
+ return _formatter.format("missing-equals-in-meta", value);
}
static String failureEnhancingMethod(Method method, Exception cause)
{
- return MESSAGES.format("failure-enhancing-method", method, cause);
+ return _formatter.format("failure-enhancing-method", method, cause);
}
}
Modified: jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/AnnotationUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/AnnotationUtils.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/AnnotationUtils.java (original)
+++ jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/AnnotationUtils.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// Copyright 2005 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.
@@ -28,16 +28,11 @@
* @since 4.0
*/
-public final class AnnotationUtils {
-
- /** @since 4.1 */
- private AnnotationUtils()
- {
- }
-
+public class AnnotationUtils
+{
/**
- * Determines the property name for a method, by stripping off the
- * is/get/set prefix and decapitalizing the first name.
+ * Determines the property name for a method, by stripping off the is/get/set prefix and
+ * decapitalizing the first name.
*
* @param method
* accessor method (get/set/is)
@@ -49,52 +44,51 @@
{
String name = method.getName();
- if (name.startsWith("is")) {
+ if (name.startsWith("is"))
+ {
checkGetter(method);
return Introspector.decapitalize(name.substring(2));
}
- if (name.startsWith("get")) {
+ if (name.startsWith("get"))
+ {
checkGetter(method);
return Introspector.decapitalize(name.substring(3));
}
- if (name.startsWith("set")) {
+ if (name.startsWith("set"))
+ {
checkSetter(method);
return Introspector.decapitalize(name.substring(3));
}
- throw new ApplicationRuntimeException(AnnotationMessages
- .notAccessor(method));
+ throw new ApplicationRuntimeException(AnnotationMessages.notAccessor(method));
}
private static void checkGetter(Method method)
{
if (method.getParameterTypes().length > 0)
- throw new ApplicationRuntimeException(AnnotationMessages
- .noParametersExpected(method));
+ throw new ApplicationRuntimeException(AnnotationMessages.noParametersExpected(method));
if (method.getReturnType().equals(void.class))
- throw new ApplicationRuntimeException(AnnotationMessages
- .voidAccessor(method));
+ throw new ApplicationRuntimeException(AnnotationMessages.voidAccessor(method));
}
private static void checkSetter(Method method)
{
if (!method.getReturnType().equals(void.class))
- throw new ApplicationRuntimeException(AnnotationMessages
- .nonVoidMutator(method));
+ throw new ApplicationRuntimeException(AnnotationMessages.nonVoidMutator(method));
if (method.getParameterTypes().length != 1)
- throw new ApplicationRuntimeException(AnnotationMessages
- .wrongParameterCount(method));
+ throw new ApplicationRuntimeException(AnnotationMessages.wrongParameterCount(method));
}
- public static Location buildLocationForAnnotation(Method method,
- Annotation annotation, Resource classResource)
+ public static Location buildLocationForAnnotation(Method method, Annotation annotation,
+ Resource classResource)
{
- return new DescribedLocation(classResource, AnnotationMessages
- .methodAnnotation(annotation, method));
+ return new DescribedLocation(classResource, AnnotationMessages.methodAnnotation(
+ annotation,
+ method));
}
}
Modified: jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/ClassAnnotationEnhancementWorker.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/ClassAnnotationEnhancementWorker.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/ClassAnnotationEnhancementWorker.java (original)
+++ jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/ClassAnnotationEnhancementWorker.java Sat Mar 11 12:54:27 2006
@@ -40,7 +40,7 @@
* the location associated with the annotation
*/
- void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
+ public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
Class baseClass, Location location);
}
Modified: jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/ComponentAnnotationWorker.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/ComponentAnnotationWorker.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/ComponentAnnotationWorker.java (original)
+++ jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/ComponentAnnotationWorker.java Sat Mar 11 12:54:27 2006
@@ -90,4 +90,4 @@
{
throw new ApplicationRuntimeException(AnnotationMessages.bindingWrongFormat(binding));
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/InjectStateFlag.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/InjectStateFlag.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/InjectStateFlag.java (original)
+++ jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/InjectStateFlag.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// Copyright 2005 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.
@@ -20,25 +20,15 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-/**
- * Annotation related to {@link org.apache.tapestry.annotations.InjectState};
- * injects a read-only boolean property that determines if a particular
- * Application State Object exists or not; this is useful when trying to avoid
- * creating it (which can help keep the application stateless as long as
- * possible).
- *
- * @author Howard M. Lewis Ship
- * @since 4.0
- */
-@Target( { ElementType.METHOD })
+@Target(
+{ ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface InjectStateFlag {
/**
- * The id of the Application State Object; the boolean accessor method to
- * which the annotation is attached will return true when the ASO exists,
- * false when it does not.
+ * The id of the Application State Object; the boolean accessor method to which the annotation
+ * is attached will return true when the ASO exists, false when it does not.
*/
String value();
Modified: jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/InjectStateFlagAnnotationWorker.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/InjectStateFlagAnnotationWorker.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/InjectStateFlagAnnotationWorker.java (original)
+++ jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/InjectStateFlagAnnotationWorker.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// Copyright 2005 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.
@@ -22,19 +22,11 @@
import org.apache.tapestry.spec.InjectSpecification;
import org.apache.tapestry.spec.InjectSpecificationImpl;
-/**
- * Converts an {@link org.apache.tapestry.annotations.InjectStateFlag}
- * annotation into a {@link org.apache.tapestry.spec.InjectSpecification} (of
- * type "state-flag") attached to the component specification.
- *
- * @author Howard M. Lewis Ship
- * @since 4.0
- */
-public class InjectStateFlagAnnotationWorker implements
- MethodAnnotationEnhancementWorker {
+public class InjectStateFlagAnnotationWorker implements MethodAnnotationEnhancementWorker
+{
- public void performEnhancement(EnhancementOperation op,
- IComponentSpecification spec, Method method, Location location)
+ public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
+ Method method, Location location)
{
InjectStateFlag isv = method.getAnnotation(InjectStateFlag.class);
Modified: jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/MethodAnnotationEnhancementWorker.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/MethodAnnotationEnhancementWorker.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/MethodAnnotationEnhancementWorker.java (original)
+++ jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/MethodAnnotationEnhancementWorker.java Sat Mar 11 12:54:27 2006
@@ -42,6 +42,6 @@
* @param location TODO
*/
- void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
+ public void performEnhancement(EnhancementOperation op, IComponentSpecification spec,
Method method, Location location);
}
Modified: jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/SecondaryAnnotationWorker.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/SecondaryAnnotationWorker.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/SecondaryAnnotationWorker.java (original)
+++ jakarta/tapestry/trunk/annotations/src/java/org/apache/tapestry/annotations/SecondaryAnnotationWorker.java Sat Mar 11 12:54:27 2006
@@ -36,7 +36,7 @@
* to check
* @return true if the worker should be invoked, false otherwise
*/
- boolean canEnhance(Method method);
+ public boolean canEnhance(Method method);
/**
* Invoked an <em>all</em> workers in the command chain, if <em>any</em> worker returns true
@@ -52,6 +52,6 @@
* a resource representing the class; combined with the method a
* {@link org.apache.hivemind.Location} can be created
*/
- void peformEnhancement(EnhancementOperation op, IComponentSpecification spec,
+ public void peformEnhancement(EnhancementOperation op, IComponentSpecification spec,
Method method, Resource classResource);
}
Modified: jakarta/tapestry/trunk/annotations/src/test/org/apache/tapestry/annotations/AnnotationEnhancementWorkerTest.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/annotations/src/test/org/apache/tapestry/annotations/AnnotationEnhancementWorkerTest.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/annotations/src/test/org/apache/tapestry/annotations/AnnotationEnhancementWorkerTest.java (original)
+++ jakarta/tapestry/trunk/annotations/src/test/org/apache/tapestry/annotations/AnnotationEnhancementWorkerTest.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// Copyright 2005 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.
@@ -34,12 +34,12 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
-@SuppressWarnings("deprecation")
-public class AnnotationEnhancementWorkerTest extends BaseAnnotationTestCase {
+public class AnnotationEnhancementWorkerTest extends BaseAnnotationTestCase
+{
protected EnhancementOperation newOp(Class baseClass)
{
- EnhancementOperation op = (EnhancementOperation)newMock(EnhancementOperation.class);
+ EnhancementOperation op = (EnhancementOperation) newMock(EnhancementOperation.class);
op.getBaseClass();
setReturnValue(op, baseClass);
@@ -52,17 +52,15 @@
return Collections.singletonMap(annotationClass, worker);
}
- /** Test fixture. */
- private class NoOp implements SecondaryAnnotationWorker {
-
+ private class NoOp implements SecondaryAnnotationWorker
+ {
public boolean canEnhance(Method method)
{
return false;
}
- public void peformEnhancement(EnhancementOperation op,
- IComponentSpecification spec, Method method,
- Resource classResource)
+ public void peformEnhancement(EnhancementOperation op, IComponentSpecification spec,
+ Method method, Resource classResource)
{
}
}
@@ -97,8 +95,7 @@
Method m = findMethod(AnnotatedPage.class, "getInjectedObject");
- Location location = newMethodLocation(AnnotatedPage.class, m,
- InjectObject.class);
+ Location location = newMethodLocation(AnnotatedPage.class, m, InjectObject.class);
methodWorker.performEnhancement(op, spec, m, location);
@@ -116,17 +113,17 @@
protected MethodAnnotationEnhancementWorker newMethodAnnotationEnhancementWorker()
{
- return (MethodAnnotationEnhancementWorker)newMock(MethodAnnotationEnhancementWorker.class);
+ return (MethodAnnotationEnhancementWorker) newMock(MethodAnnotationEnhancementWorker.class);
}
- private DescribedLocation newClassLocation(Class baseClass,
- Class annotationClass)
+ private DescribedLocation newClassLocation(Class baseClass, Class annotationClass)
{
Resource classResource = newResource(baseClass);
Annotation annotation = baseClass.getAnnotation(annotationClass);
- return new DescribedLocation(classResource, AnnotationMessages
- .classAnnotation(annotation, baseClass));
+ return new DescribedLocation(classResource, AnnotationMessages.classAnnotation(
+ annotation,
+ baseClass));
}
public void testAnnotationWithSubclass()
@@ -140,8 +137,7 @@
Method m = findMethod(AnnotatedPageSubclass.class, "getInjectedObject");
- Location location = newMethodLocation(AnnotatedPageSubclass.class, m,
- InjectObject.class);
+ Location location = newMethodLocation(AnnotatedPageSubclass.class, m, InjectObject.class);
methodWorker.performEnhancement(op, spec, m, location);
@@ -171,8 +167,7 @@
Method m = findMethod(AnnotatedPage.class, "getInjectedObject");
- Location location = newMethodLocation(AnnotatedPage.class, m,
- InjectObject.class);
+ Location location = newMethodLocation(AnnotatedPage.class, m, InjectObject.class);
methodWorker.performEnhancement(op, spec, m, location);
setThrowable(methodWorker, t);
@@ -182,7 +177,8 @@
"An error occured processing annotation "
+ "@org.apache.tapestry.annotations.InjectObject(value=barney) of "
+ "public abstract java.lang.Object org.apache.tapestry.annotations.AnnotatedPage.getInjectedObject(): Woops!",
- null, t);
+ null,
+ t);
replayControls();
@@ -204,13 +200,11 @@
EnhancementOperation op = newOp(DeprecatedBean.class);
IComponentSpecification spec = newSpec();
- ClassAnnotationEnhancementWorker classWorker = (ClassAnnotationEnhancementWorker)newMock(ClassAnnotationEnhancementWorker.class);
+ ClassAnnotationEnhancementWorker classWorker = (ClassAnnotationEnhancementWorker) newMock(ClassAnnotationEnhancementWorker.class);
- DescribedLocation location = newClassLocation(DeprecatedBean.class,
- Deprecated.class);
+ DescribedLocation location = newClassLocation(DeprecatedBean.class, Deprecated.class);
- classWorker
- .performEnhancement(op, spec, DeprecatedBean.class, location);
+ classWorker.performEnhancement(op, spec, DeprecatedBean.class, location);
replayControls();
@@ -232,22 +226,21 @@
EnhancementOperation op = newOp(DeprecatedBean.class);
IComponentSpecification spec = newSpec();
- ClassAnnotationEnhancementWorker classWorker = (ClassAnnotationEnhancementWorker)newMock(ClassAnnotationEnhancementWorker.class);
+ ClassAnnotationEnhancementWorker classWorker = (ClassAnnotationEnhancementWorker) newMock(ClassAnnotationEnhancementWorker.class);
Throwable t = new RuntimeException("Simulated failure.");
- DescribedLocation location = newClassLocation(DeprecatedBean.class,
- Deprecated.class);
+ DescribedLocation location = newClassLocation(DeprecatedBean.class, Deprecated.class);
- classWorker
- .performEnhancement(op, spec, DeprecatedBean.class, location);
+ classWorker.performEnhancement(op, spec, DeprecatedBean.class, location);
setThrowable(classWorker, t);
log
.error(
"An error occured processing annotation @java.lang.Deprecated() of "
+ "class org.apache.tapestry.annotations.DeprecatedBean: Simulated failure.",
- null, t);
+ null,
+ t);
replayControls();
@@ -284,8 +277,7 @@
EnhancementOperation op = newOp();
IComponentSpecification spec = newSpec();
- Method method = findMethod(AnnotatedPage.class,
- "getPropertyWithInitialValue");
+ Method method = findMethod(AnnotatedPage.class, "getPropertyWithInitialValue");
Resource classResource = newResource(AnnotatedPage.class);
@@ -313,8 +305,7 @@
IComponentSpecification spec = newSpec();
ErrorLog log = newLog();
- Method method = findMethod(AnnotatedPage.class,
- "getPropertyWithInitialValue");
+ Method method = findMethod(AnnotatedPage.class, "getPropertyWithInitialValue");
Resource classResource = newResource(AnnotatedPage.class);
@@ -323,8 +314,7 @@
secondary.canEnhance(method);
setThrowable(secondary, cause);
- log.error(AnnotationMessages.failureEnhancingMethod(method, cause),
- null, cause);
+ log.error(AnnotationMessages.failureEnhancingMethod(method, cause), null, cause);
replayControls();
@@ -340,6 +330,6 @@
protected SecondaryAnnotationWorker newSecondaryAnnotationWorker()
{
- return (SecondaryAnnotationWorker)newMock(SecondaryAnnotationWorker.class);
+ return (SecondaryAnnotationWorker) newMock(SecondaryAnnotationWorker.class);
}
}
Modified: jakarta/tapestry/trunk/annotations/src/test/org/apache/tapestry/annotations/MessagesTarget.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/annotations/src/test/org/apache/tapestry/annotations/MessagesTarget.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/annotations/src/test/org/apache/tapestry/annotations/MessagesTarget.java (original)
+++ jakarta/tapestry/trunk/annotations/src/test/org/apache/tapestry/annotations/MessagesTarget.java Sat Mar 11 12:54:27 2006
@@ -14,6 +14,7 @@
package org.apache.tapestry.annotations;
import org.apache.tapestry.AbstractComponent;
+import org.apache.tapestry.annotations.Message;
/**
* Target "component" used to test the
Modified: jakarta/tapestry/trunk/annotations/src/test/org/apache/tapestry/annotations/TestComponentAnnotationWorker.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/annotations/src/test/org/apache/tapestry/annotations/TestComponentAnnotationWorker.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/annotations/src/test/org/apache/tapestry/annotations/TestComponentAnnotationWorker.java (original)
+++ jakarta/tapestry/trunk/annotations/src/test/org/apache/tapestry/annotations/TestComponentAnnotationWorker.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// Copyright 2005 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.
@@ -25,14 +25,13 @@
import org.apache.tapestry.spec.IContainedComponent;
/**
- * Tests for {@link org.apache.tapestry.annotations.ComponentAnnotationWorker}.
+ * Tests for {@link org.apache.tapestry.annotations.ComponentAnnotationWorker}
*
* @author Howard Lewis Ship
* @since 4.0
*/
public class TestComponentAnnotationWorker extends BaseAnnotationTestCase
{
-
private IContainedComponent run(String id, String methodName, Location location)
{
Method method = findMethod(AnnotatedPage.class, methodName);
Modified: jakarta/tapestry/trunk/annotations/src/test/org/apache/tapestry/annotations/TestMessageAnnotationWorker.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/annotations/src/test/org/apache/tapestry/annotations/TestMessageAnnotationWorker.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/annotations/src/test/org/apache/tapestry/annotations/TestMessageAnnotationWorker.java (original)
+++ jakarta/tapestry/trunk/annotations/src/test/org/apache/tapestry/annotations/TestMessageAnnotationWorker.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// Copyright 2005 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.
@@ -31,15 +31,8 @@
import org.easymock.MockControl;
import org.easymock.internal.ArrayMatcher;
-/**
- * Test suite for
- * {@link org.apache.tapestry.annotations.MessageAnnotationWorker}.
- *
- * @author Howard M. Lewis Ship
- * @since 4.0
- */
-public class TestMessageAnnotationWorker extends BaseAnnotationTestCase {
-
+public class TestMessageAnnotationWorker extends BaseAnnotationTestCase
+{
public void testConvertMethodNameToKeyName()
{
MessageAnnotationWorker w = new MessageAnnotationWorker();
@@ -52,36 +45,30 @@
public void testNoArgsMessage()
{
- attempt("noArgsMessage",
- "{\n return getMessages().getMessage(\"no-args-message\");\n}\n");
+ attempt("noArgsMessage", "{\n return getMessages().getMessage(\"no-args-message\");\n}\n");
}
public void testMessageWithSpecificKey()
{
- attempt("messageWithSpecificKey",
+ attempt(
+ "messageWithSpecificKey",
"{\n return getMessages().getMessage(\"message-key\");\n}\n");
}
public void testMessageWithParameters()
{
- attempt(
- "messageWithParameters",
- "{\n"
- + " java.lang.Object[] params = new java.lang.Object[2];\n"
- + " params[0] = $1;\n"
- + " params[1] = $2;\n"
- + " return getMessages().format(\"message-with-parameters\", params);\n}\n");
+ attempt("messageWithParameters", "{\n"
+ + " java.lang.Object[] params = new java.lang.Object[2];\n"
+ + " params[0] = $1;\n" + " params[1] = $2;\n"
+ + " return getMessages().format(\"message-with-parameters\", params);\n}\n");
}
public void testMessageWithPrimitiveParameters()
{
- attempt(
- "messageWithPrimitives",
- "{\n"
- + " java.lang.Object[] params = new java.lang.Object[2];\n"
- + " params[0] = ($w) $1;\n"
- + " params[1] = ($w) $2;\n"
- + " return getMessages().format(\"message-with-primitives\", params);\n}\n");
+ attempt("messageWithPrimitives", "{\n"
+ + " java.lang.Object[] params = new java.lang.Object[2];\n"
+ + " params[0] = ($w) $1;\n" + " params[1] = ($w) $2;\n"
+ + " return getMessages().format(\"message-with-primitives\", params);\n}\n");
}
public void testNotStringReturnType()
@@ -93,11 +80,13 @@
replayControls();
- try {
- new MessageAnnotationWorker().performEnhancement(op, spec, method,
- null);
+ try
+ {
+ new MessageAnnotationWorker().performEnhancement(op, spec, method, null);
unreachable();
- } catch (ApplicationRuntimeException ex) {
+ }
+ catch (ApplicationRuntimeException ex)
+ {
assertEquals(
"The method's return type is void; this annotation is only allowed on methods that return java.lang.String.",
ex.getMessage());
@@ -115,7 +104,9 @@
Method method = findMethod(AnnotatedPage.class, "getLikeGetter");
- op.addMethod(Modifier.PUBLIC, new MethodSignature(method),
+ op.addMethod(
+ Modifier.PUBLIC,
+ new MethodSignature(method),
"{\n return getMessages().getMessage(\"like-getter\");\n}\n",
l);
op.claimReadonlyProperty("likeGetter");
@@ -135,9 +126,7 @@
Method method = findMethod(AnnotatedPage.class, methodName);
- op
- .addMethod(Modifier.PUBLIC, new MethodSignature(method),
- codeBlock, l);
+ op.addMethod(Modifier.PUBLIC, new MethodSignature(method), codeBlock, l);
replayControls();
@@ -146,20 +135,17 @@
verifyControls();
}
- private Object construct(Class baseClass, String methodName,
- Messages messages)
+ private Object construct(Class baseClass, String methodName, Messages messages)
{
Location l = newLocation();
ComponentSpecification spec = new ComponentSpecification();
- EnhancementOperationImpl op = new EnhancementOperationImpl(
- getClassResolver(), spec, baseClass, new ClassFactoryImpl(),
- null);
+ EnhancementOperationImpl op = new EnhancementOperationImpl(getClassResolver(), spec,
+ baseClass, new ClassFactoryImpl(), null);
op.addInjectedField("_messages", Messages.class, messages);
- EnhanceUtils.createSimpleAccessor(op, "_messages", "messages",
- Messages.class, l);
+ EnhanceUtils.createSimpleAccessor(op, "_messages", "messages", Messages.class, l);
Method method = findMethod(baseClass, methodName);
@@ -173,13 +159,12 @@
public void testNoParams()
{
MockControl control = newControl(Messages.class);
- Messages messages = (Messages)control.getMock();
+ Messages messages = (Messages) control.getMock();
messages.getMessage("no-params");
control.setReturnValue("<no params>");
- MessagesTarget mt = (MessagesTarget)construct(MessagesTarget.class,
- "noParams", messages);
+ MessagesTarget mt = (MessagesTarget) construct(MessagesTarget.class, "noParams", messages);
replayControls();
@@ -191,16 +176,19 @@
public void testObjectParam()
{
MockControl control = newControl(Messages.class);
- Messages messages = (Messages)control.getMock();
+ Messages messages = (Messages) control.getMock();
- Object[] params = new Object[] { "PinkFloyd" };
+ Object[] params = new Object[]
+ { "PinkFloyd" };
messages.format("object-param", params);
control.setMatcher(new ArrayMatcher());
control.setReturnValue("<object param>");
- MessagesTarget mt = (MessagesTarget)construct(MessagesTarget.class,
- "objectParam", messages);
+ MessagesTarget mt = (MessagesTarget) construct(
+ MessagesTarget.class,
+ "objectParam",
+ messages);
replayControls();
@@ -213,16 +201,19 @@
{
MockControl control = newControl(Messages.class);
- Messages messages = (Messages)control.getMock();
+ Messages messages = (Messages) control.getMock();
- Object[] params = new Object[] { 451 };
+ Object[] params = new Object[]
+ { 451 };
messages.format("primitive-param", params);
control.setMatcher(new ArrayMatcher());
control.setReturnValue("<primitive param>");
- MessagesTarget mt = (MessagesTarget)construct(MessagesTarget.class,
- "primitiveParam", messages);
+ MessagesTarget mt = (MessagesTarget) construct(
+ MessagesTarget.class,
+ "primitiveParam",
+ messages);
replayControls();
@@ -241,12 +232,14 @@
private void invalidBinding(String binding)
{
- try {
+ try
+ {
new ComponentAnnotationWorker().addBinding(null, binding, null);
unreachable();
- } catch (ApplicationRuntimeException ex) {
- assertEquals(AnnotationMessages.bindingWrongFormat(binding), ex
- .getMessage());
+ }
+ catch (ApplicationRuntimeException ex)
+ {
+ assertEquals(AnnotationMessages.bindingWrongFormat(binding), ex.getMessage());
}
}
}
Modified: jakarta/tapestry/trunk/build.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/build.xml?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/build.xml (original)
+++ jakarta/tapestry/trunk/build.xml Sat Mar 11 12:54:27 2006
@@ -26,8 +26,8 @@
portlet/build.xml
contrib/build.xml
annotations/build.xml
+ examples/TimeTracker/build.xml
examples/Workbench/build.xml
- examples/TimeTracker/build.xml
examples/VlibBeans/build.xml
examples/Vlib/build.xml" />
Modified: jakarta/tapestry/trunk/config/build.properties.sample
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/config/build.properties.sample?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/config/build.properties.sample (original)
+++ jakarta/tapestry/trunk/config/build.properties.sample Sat Mar 11 12:54:27 2006
@@ -13,7 +13,6 @@
# Required to execute the run-workbench target.
jetty.dir=
-# The absolute path to the directory containing the dojo build scripts
-# Typically something like dojo/buildscripts
-dojo.dir=
-
+# Absolute path to dojo source installation directory.
+#
+#dojo.dir=
Modified: jakarta/tapestry/trunk/config/common.properties
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/config/common.properties?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/config/common.properties (original)
+++ jakarta/tapestry/trunk/config/common.properties Sat Mar 11 12:54:27 2006
@@ -16,15 +16,15 @@
javassist.version=3.0
ognl.version=2.6.7
codec.version=1.3
-fileupload.version=1.0
+fileupload.version=1.1
logging.version=1.0.4
-dbcp.version=1.2
-pool.version=1.2
-collections.version=3.1
-beanutils.version=1.7.0
oro.version=2.0.8
servlet.version=2.3
log4j.version=1.2.8
jboss-j2ee.version=4.0.0DR4
+io.version=1.1
+beanutils.version=1.7.0
hsqldb.version=1.8.0.1
-io.version=1.1
\ No newline at end of file
+dbcp.version=1.2
+pool.version=1.2
+collections.version=3.1
\ No newline at end of file
Modified: jakarta/tapestry/trunk/contrib/src/documentation/content/xdocs/tapestry-contrib/ComponentReference/TableColumns.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/documentation/content/xdocs/tapestry-contrib/ComponentReference/TableColumns.xml?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/documentation/content/xdocs/tapestry-contrib/ComponentReference/TableColumns.xml (original)
+++ jakarta/tapestry/trunk/contrib/src/documentation/content/xdocs/tapestry-contrib/ComponentReference/TableColumns.xml Sat Mar 11 12:54:27 2006
@@ -41,6 +41,19 @@
The headers are wrapped in 'th' tags by default.
</p>
+ <info>
+ <p>
+ The table header rendered by this component has two main css class definitions. The embedded
+ table html markup within each <code>th</code> element has the class <code>tableHeaderImage</code>.
+ The image used to sort table columns has an embedded style class definition for <code>tableHeaderImage</code>
+ that defines <code>align:center</code>.
+ </p>
+
+ <p>
+ You may override these definitions with your own css rules.
+ </p>
+ </info>
+
<p>
<strong>See also: &Table;, &TableView;, &TablePages;, &TableRows;, &TableValues;</strong>
</p>
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/IXTile.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/IXTile.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/IXTile.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/IXTile.java Sat Mar 11 12:54:27 2006
@@ -20,7 +20,7 @@
* @author mindbridge
* @since 4.0
*/
-public interface IXTile {
-
- void trigger(IRequestCycle cycle);
+public interface IXTile
+{
+ public void trigger(IRequestCycle cycle);
}
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.java Sat Mar 11 12:54:27 2006
@@ -27,63 +27,57 @@
* @since 4.0
*/
public abstract class Timeout extends BaseComponent {
-
- public abstract int getWarningTime();
-
- public abstract int getAutoProlongTime();
-
- public abstract String getWarningMessage();
-
- public abstract String getExpirationMessage();
-
- public abstract boolean getDisableWarning();
-
- public abstract boolean getDisableAutoProlong();
-
- public abstract String getExpirationFunction();
-
- protected HttpSession getSession()
- {
- return getPage().getRequestCycle().getRequestContext().getSession();
- }
-
- protected int getSessionTime()
- {
- return getSession().getMaxInactiveInterval();
- }
-
- public boolean isInSession()
- {
- HttpSession session = getSession();
- return session != null;
- }
-
- public Map getScriptSymbols()
- {
- int nSessionTime = getSessionTime();
- int nTimeToMessage = nSessionTime - getWarningTime();
- if (nTimeToMessage < 0) nTimeToMessage = 0;
- int nRemainingTime = nSessionTime - nTimeToMessage;
- int nAutoProlongTime = nSessionTime - getAutoProlongTime();
-
- Map mapSymbols = new HashMap();
- mapSymbols.put("confirmTimeout", new Integer(nTimeToMessage * 1000));
- mapSymbols.put("expirationTimeout", new Integer(nRemainingTime * 1000));
- mapSymbols.put("prolongSessionPeriod", new Integer(
- nAutoProlongTime * 1000));
- mapSymbols.put("confirmMessage", getWarningMessage());
- mapSymbols.put("expirationMessage", getExpirationMessage());
- mapSymbols.put("disableWarning", new Boolean(getDisableWarning()));
- mapSymbols.put("disableAutoProlong", new Boolean(
- getDisableAutoProlong()));
- mapSymbols.put("expirationFunction", getExpirationFunction());
- return mapSymbols;
- }
-
- public void renewSession(IRequestCycle cycle)
- {
- // calling this method via the XTile service will automatically renew
- // the session
- // System.out.println("Prolonging session...");
- }
+ public abstract int getWarningTime();
+ public abstract int getAutoProlongTime();
+
+ public abstract String getWarningMessage();
+ public abstract String getExpirationMessage();
+
+ public abstract boolean getDisableWarning();
+ public abstract boolean getDisableAutoProlong();
+
+ public abstract String getExpirationFunction();
+
+ protected HttpSession getSession()
+ {
+ return getPage().getRequestCycle().getRequestContext().getSession();
+ }
+
+ protected int getSessionTime()
+ {
+ return getSession().getMaxInactiveInterval();
+ }
+
+ public boolean isInSession()
+ {
+ HttpSession session = getSession();
+ return session != null;
+ }
+
+ public Map getScriptSymbols()
+ {
+ int nSessionTime = getSessionTime();
+ int nTimeToMessage = nSessionTime - getWarningTime();
+ if (nTimeToMessage < 0)
+ nTimeToMessage = 0;
+ int nRemainingTime = nSessionTime - nTimeToMessage;
+ int nAutoProlongTime = nSessionTime - getAutoProlongTime();
+
+ Map mapSymbols = new HashMap();
+ mapSymbols.put("confirmTimeout", new Integer(nTimeToMessage*1000));
+ mapSymbols.put("expirationTimeout", new Integer(nRemainingTime*1000));
+ mapSymbols.put("prolongSessionPeriod", new Integer(nAutoProlongTime*1000));
+ mapSymbols.put("confirmMessage", getWarningMessage());
+ mapSymbols.put("expirationMessage", getExpirationMessage());
+ mapSymbols.put("disableWarning", new Boolean(getDisableWarning()));
+ mapSymbols.put("disableAutoProlong", new Boolean(getDisableAutoProlong()));
+ mapSymbols.put("expirationFunction", getExpirationFunction());
+ return mapSymbols;
+ }
+
+ public void renewSession(IRequestCycle cycle)
+ {
+ // calling this method via the XTile service will automatically renew the session
+ // System.out.println("Prolonging session...");
+ }
}
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.properties
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.properties?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.properties (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.properties Sat Mar 11 12:54:27 2006
@@ -13,4 +13,4 @@
# limitations under the License.
warning=The connection was inactive for more than {0} minutes. Your session will expire at {1}.\\n Please click OK to continue your work or CANCEL to close the session.
-expiration=Your session has expired. Please log in again.
+expiration=Your session has expired. Please log in again.
\ No newline at end of file
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/components/Choose.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/components/Choose.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/components/Choose.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/components/Choose.java Sat Mar 11 12:54:27 2006
@@ -19,41 +19,43 @@
import org.apache.tapestry.components.Conditional;
/**
- * This component is a container for {@link When} or Otherwise components; it
- * provides the context for mutually exclusive conditional evaluation. [<a
- * href="../../../../../../ComponentReference/contrib.Choose.html">Component
- * Reference</a>]
+ * This component is a container for {@link When} or Otherwise components;
+ * it provides the context for mutually exclusive conditional evaluation.
+ *
+ * [<a href="../../../../../../ComponentReference/contrib.Choose.html">Component Reference</a>]
+ *
+ * @author David Solis
*
- * @author David Solis
*/
public abstract class Choose extends Conditional {
- public void addBody(IRender element)
- {
- super.addBody(element);
- if (element instanceof When) ((When)element).setChoose(this);
- }
- protected void cleanupAfterRender(IRequestCycle cycle)
- {
- setConditionMet(false);
- super.cleanupAfterRender(cycle);
- }
-
- protected boolean evaluateCondition()
- {
- return getCondition();
- }
-
- public boolean getInvert()
- {
- // This component doesn't require invert parameter.
- return false;
- }
-
- public abstract boolean getCondition();
-
- public abstract boolean isConditionMet();
-
- public abstract void setConditionMet(boolean value);
+ public void addBody(IRender element)
+ {
+ super.addBody(element);
+ if (element instanceof When)
+ ((When) element).setChoose(this);
+ }
+
+ protected void cleanupAfterRender(IRequestCycle cycle)
+ {
+ setConditionMet(false);
+ super.cleanupAfterRender(cycle);
+ }
+
+ protected boolean evaluateCondition()
+ {
+ return getCondition();
+ }
+
+ public boolean getInvert()
+ {
+ // This component doesn't require invert parameter.
+ return false;
+ }
+
+ public abstract boolean getCondition();
+
+ public abstract boolean isConditionMet();
+ public abstract void setConditionMet(boolean value);
}
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ejb/XCreateException.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ejb/XCreateException.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ejb/XCreateException.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ejb/XCreateException.java Sat Mar 11 12:54:27 2006
@@ -16,38 +16,41 @@
import javax.ejb.CreateException;
+
/**
- * Extended version of {@link CreateException} that includes a root cause.
- *
- * @author Howard Lewis Ship
- */
+ * Extended version of {@link CreateException} that includes a root cause.
+ *
+ * @author Howard Lewis Ship
+ *
+ **/
public class XCreateException extends CreateException
{
-
private static final long serialVersionUID = 6807032467099102587L;
-
- private final Throwable rootCause;
+
+ private Throwable rootCause;
public XCreateException(String message)
{
- this(message, null);
+ super(message);
}
- public XCreateException(String message, Throwable cause)
+ public XCreateException(String message, Throwable rootCause)
{
super(message);
- this.rootCause = cause;
+ this.rootCause = rootCause;
}
- public XCreateException(Throwable cause)
+ public XCreateException(Throwable rootCause)
{
- this(cause.getMessage(), cause);
+ super(rootCause.getMessage());
+
+ this.rootCause = rootCause;
}
public Throwable getRootCause()
{
return rootCause;
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ejb/XEJBException.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ejb/XEJBException.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ejb/XEJBException.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ejb/XEJBException.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2004, 2005, 2006 The Apache Software Foundation
+// Copyright 2004, 2005 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.
@@ -17,42 +17,42 @@
import javax.ejb.EJBException;
/**
- * Extended version of {@link EJBException} that includes a root cause.
- * {@link EJBException} doesn't have quite the right constructor for this ... it
- * has an equivalent to the rootCause property, (causedByException), but doesn't
- * have a constructor that allows us to set a custom message.
- *
- * @author Howard Lewis Ship
- */
+ * Extended version of {@link EJBException} that includes a root cause.
+ * {@link EJBException} doesn't have quite the right constructor for this ...
+ * it has an equivalent to the rootCause property, (causedByException), but
+ * doesn't have a constructor that allows us to set a custom message.
+ *
+ * @author Howard Lewis Ship
+ *
+ **/
public class XEJBException extends EJBException
{
-
private static final long serialVersionUID = 3712108893575174833L;
-
- private final Throwable rootCause;
+
+ private Throwable rootCause;
public XEJBException(String message)
{
- this(message, null);
+ super(message);
}
- public XEJBException(String message, Throwable cause)
+ public XEJBException(String message, Throwable rootCause)
{
super(message);
- this.rootCause = cause;
+ this.rootCause = rootCause;
}
- public XEJBException(Throwable cause)
+ public XEJBException(Throwable rootCause)
{
- super(cause.getMessage());
+ super(rootCause.getMessage());
- this.rootCause = cause;
+ this.rootCause = rootCause;
}
public Throwable getRootCause()
{
return rootCause;
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ejb/XFinderException.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ejb/XFinderException.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ejb/XFinderException.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ejb/XFinderException.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2004, 2005, 2006 The Apache Software Foundation
+// Copyright 2004, 2005 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.
@@ -17,37 +17,39 @@
import javax.ejb.FinderException;
/**
- * Extended version of {@link FinderException} that includes a root cause.
- *
- * @author Howard Lewis Ship
- */
+ * Extended version of {@link FinderException} that includes a root cause.
+ *
+ * @author Howard Lewis Ship
+ *
+ **/
public class XFinderException extends FinderException
{
-
private static final long serialVersionUID = -7761100160348957271L;
-
- private final Throwable rootCause;
+
+ private Throwable rootCause;
public XFinderException(String message)
{
- this(message, null);
+ super(message);
}
- public XFinderException(String message, Throwable cause)
+ public XFinderException(String message, Throwable rootCause)
{
super(message);
- this.rootCause = cause;
+ this.rootCause = rootCause;
}
- public XFinderException(Throwable cause)
+ public XFinderException(Throwable rootCause)
{
- this(cause.getMessage(), cause);
+ super(rootCause.getMessage());
+
+ this.rootCause = rootCause;
}
public Throwable getRootCause()
{
return rootCause;
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ejb/XRemoveException.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ejb/XRemoveException.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ejb/XRemoveException.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ejb/XRemoveException.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2004, 2005, 2006 The Apache Software Foundation
+// Copyright 2004, 2005 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.
@@ -17,37 +17,39 @@
import javax.ejb.RemoveException;
/**
- * Extended version of {@link RemoveException} that includes a root cause.
- *
- * @author Howard Lewis Ship
- */
+ * Extended version of {@link RemoveException} that includes a root cause.
+ *
+ * @author Howard Lewis Ship
+ *
+ **/
public class XRemoveException extends RemoveException
{
-
private static final long serialVersionUID = -8940644648555335217L;
-
- private final Throwable rootCause;
+
+ private Throwable rootCause;
public XRemoveException(String message)
{
- this(message, null);
+ super(message);
}
- public XRemoveException(String message, Throwable cause)
+ public XRemoveException(String message, Throwable rootCause)
{
super(message);
- this.rootCause = cause;
+ this.rootCause = rootCause;
}
- public XRemoveException(Throwable cause)
+ public XRemoveException(Throwable rootCause)
{
- this(cause.getMessage(), cause);
+ super(rootCause.getMessage());
+
+ this.rootCause = rootCause;
}
public Throwable getRootCause()
{
return rootCause;
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/CheckBoxMultiplePropertySelectionRenderer.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/CheckBoxMultiplePropertySelectionRenderer.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/CheckBoxMultiplePropertySelectionRenderer.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/CheckBoxMultiplePropertySelectionRenderer.java Sat Mar 11 12:54:27 2006
@@ -99,4 +99,4 @@
writer.println();
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/FormConditional.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/FormConditional.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/FormConditional.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/FormConditional.java Sat Mar 11 12:54:27 2006
@@ -157,4 +157,4 @@
public abstract ListenerInvoker getListenerInvoker();
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/IMultiplePropertySelectionRenderer.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/IMultiplePropertySelectionRenderer.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/IMultiplePropertySelectionRenderer.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/IMultiplePropertySelectionRenderer.java Sat Mar 11 12:54:27 2006
@@ -33,7 +33,7 @@
*
**/
- void beginRender(
+ public void beginRender(
MultiplePropertySelection component,
IMarkupWriter writer,
IRequestCycle cycle);
@@ -43,7 +43,7 @@
*
**/
- void renderOption(
+ public void renderOption(
MultiplePropertySelection component,
IMarkupWriter writer,
IRequestCycle cycle,
@@ -57,8 +57,8 @@
*
**/
- void endRender(
+ public void endRender(
MultiplePropertySelection component,
IMarkupWriter writer,
IRequestCycle cycle);
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/MaskEdit.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/MaskEdit.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/MaskEdit.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/MaskEdit.java Sat Mar 11 12:54:27 2006
@@ -77,4 +77,4 @@
public abstract boolean isDisabled();
public abstract void setDisabled(boolean disabled);
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/MultiplePropertySelection.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/MultiplePropertySelection.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/MultiplePropertySelection.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/MultiplePropertySelection.java Sat Mar 11 12:54:27 2006
@@ -199,4 +199,4 @@
{
return getValidatableFieldSupport().isRequired(this);
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/CheckboxGroup.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/CheckboxGroup.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/CheckboxGroup.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/CheckboxGroup.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2004, 2005, 2006 The Apache Software Foundation
+// Copyright 2004, 2005 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.
@@ -28,33 +28,29 @@
*/
public abstract class CheckboxGroup extends BaseComponent
{
-
- public static final String CHECKBOX_GROUP_ATTRIBUTE = "org.apache.tapestry.contrib.form.CheckboxGroup";
+ public final static String CHECKBOX_GROUP_ATTRIBUTE = "org.apache.tapestry.contrib.form.CheckboxGroup";
public abstract Collection getCheckboxNames();
-
public abstract String getFunctionName();
-
- public abstract void setFunctionName(String functionName);
+ public abstract void setFunctionName(String functionName);
public void registerControlledCheckbox(ControlledCheckbox checkbox)
{
- String name = checkbox.getCheckboxName();
- String form = checkbox.getForm().getName();
+ String name = checkbox.getCheckboxName();
+ String form = checkbox.getForm().getName();
getCheckboxNames().add(form + "." + name);
}
-
+
/**
- * @see org.apache.tapestry.BaseComponent#renderComponent(org.apache.tapestry.IMarkupWriter,
- * org.apache.tapestry.IRequestCycle)
+ * @see org.apache.tapestry.BaseComponent#renderComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)
*/
protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
{
Object objOtherGroup = cycle.getAttribute(CHECKBOX_GROUP_ATTRIBUTE);
cycle.setAttribute(CHECKBOX_GROUP_ATTRIBUTE, this);
-
+
initialize(cycle);
-
+
super.renderComponent(writer, cycle);
// clear the registered checkbox names after rendering
@@ -68,13 +64,13 @@
{
String functionName = "setCheckboxGroup";
- if (!cycle.isRewinding())
- {
- PageRenderSupport body = TapestryUtils.getPageRenderSupport(cycle, this);
- if (body != null) functionName = body.getUniqueString("setCheckboxGroup");
+ if (!cycle.isRewinding()) {
+ PageRenderSupport body = TapestryUtils.getPageRenderSupport(cycle, this);
+ if (body != null)
+ functionName = body.getUniqueString("setCheckboxGroup");
}
-
+
setFunctionName(functionName);
}
-
+
}
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/ControlledCheckbox.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/ControlledCheckbox.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/ControlledCheckbox.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/ControlledCheckbox.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2004, 2005, 2006 The Apache Software Foundation
+// Copyright 2004, 2005 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.
@@ -27,31 +27,29 @@
*/
public abstract class ControlledCheckbox extends BaseComponent
{
-
public abstract CheckboxGroup getGroup();
-
+
public String getCheckboxName()
{
- Checkbox checkbox = (Checkbox)getComponent("checkbox");
+ Checkbox checkbox = (Checkbox) getComponent("checkbox");
String name = checkbox.getName();
return name;
}
-
+
public IForm getForm()
{
- Checkbox checkbox = (Checkbox)getComponent("checkbox");
- IForm form = checkbox.getForm();
- return form;
+ Checkbox checkbox = (Checkbox) getComponent("checkbox");
+ IForm form = checkbox.getForm();
+ return form;
}
-
+
/**
- * @see org.apache.tapestry.BaseComponent#renderComponent(org.apache.tapestry.IMarkupWriter,
- * org.apache.tapestry.IRequestCycle)
+ * @see org.apache.tapestry.BaseComponent#renderComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)
*/
protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
{
super.renderComponent(writer, cycle);
-
+
registerCheckbox();
}
@@ -59,18 +57,16 @@
{
getCheckboxGroup().registerControlledCheckbox(this);
}
-
+
public CheckboxGroup getCheckboxGroup()
{
CheckboxGroup group = getGroup();
- if (group == null)
- {
+ if (group == null) {
IRequestCycle cycle = getPage().getRequestCycle();
- group = (CheckboxGroup)cycle.getAttribute(CheckboxGroup.CHECKBOX_GROUP_ATTRIBUTE);
+ group = (CheckboxGroup) cycle.getAttribute(CheckboxGroup.CHECKBOX_GROUP_ATTRIBUTE);
}
if (group == null)
- throw new ApplicationRuntimeException("The component " + getExtendedId()
- + " must be wrapped by a CheckboxGroup or the 'group' parameter must be set.");
+ throw new ApplicationRuntimeException("The component " + getExtendedId() + " must be wrapped by a CheckboxGroup or the 'group' parameter must be set.");
return group;
}
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Inspector.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Inspector.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Inspector.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Inspector.java Sat Mar 11 12:54:27 2006
@@ -141,4 +141,4 @@
{
return (Block) _blocks.get(getView());
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/InspectorButton.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/InspectorButton.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/InspectorButton.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/InspectorButton.java Sat Mar 11 12:54:27 2006
@@ -46,4 +46,4 @@
inspector.inspect(getPage().getPageName(), cycle);
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Selector.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Selector.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Selector.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Selector.java Sat Mar 11 12:54:27 2006
@@ -145,4 +145,4 @@
}
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.java Sat Mar 11 12:54:27 2006
@@ -52,4 +52,4 @@
.getAttributeNames());
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowProperties.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowProperties.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowProperties.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowProperties.java Sat Mar 11 12:54:27 2006
@@ -39,7 +39,7 @@
public abstract PropertyChange getChange();
- /** Injected. */
+ /** Injected */
public abstract PropertyPersistenceStrategySource getPropertySource();
@@ -73,4 +73,4 @@
return ClassFabUtils.getJavaClassName(value.getClass());
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2004, 2005, 2006 The Apache Software Foundation
+// Copyright 2004, 2005 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.
@@ -33,15 +33,15 @@
import org.apache.tapestry.spec.IParameterSpecification;
/**
- * Component of the {@link Inspector} page used to display the specification,
- * parameters and bindings and assets of the inspected component.
+ * Component of the {@link Inspector} page used to display the specification, parameters and
+ * bindings and assets of the inspected component.
*
* @author Howard Lewis Ship
*/
-public abstract class ShowSpecification extends BaseComponent implements PageBeginRenderListener, PageEndRenderListener
+public abstract class ShowSpecification extends BaseComponent implements PageBeginRenderListener,
+ PageEndRenderListener
{
-
private IComponent _inspectedComponent;
private IComponentSpecification _inspectedSpecification;
@@ -68,10 +68,8 @@
private IBeanSpecification _beanSpecification;
- /** Sorts two components by their id's. */
private static class ComponentComparitor implements Comparator
{
-
public int compare(Object left, Object right)
{
IComponent leftComponent;
@@ -79,10 +77,11 @@
IComponent rightComponent;
String rightId;
- if (left == right) return 0;
+ if (left == right)
+ return 0;
- leftComponent = (IComponent)left;
- rightComponent = (IComponent)right;
+ leftComponent = (IComponent) left;
+ rightComponent = (IComponent) right;
leftId = leftComponent.getId();
rightId = rightComponent.getId();
@@ -92,8 +91,8 @@
}
/**
- * Clears all cached information about the component and such after each
- * render (including the rewind phase render used to process the tab view).
+ * Clears all cached information about the component and such after each render (including the
+ * rewind phase render used to process the tab view).
*
* @since 1.0.5
*/
@@ -116,15 +115,14 @@
}
/**
- * Gets the inspected component and specification from the {@link Inspector}
- * page.
+ * Gets the inspected component and specification from the {@link Inspector} page.
*
* @since 1.0.5
*/
public void pageBeginRender(PageEvent event)
{
- Inspector inspector = (Inspector)getPage();
+ Inspector inspector = (Inspector) getPage();
_inspectedComponent = inspector.getInspectedComponent();
_inspectedSpecification = _inspectedComponent.getSpecification();
@@ -146,19 +144,21 @@
public List getFormalParameterNames()
{
- if (_formalParameterNames == null) _formalParameterNames = sort(_inspectedSpecification.getParameterNames());
+ if (_formalParameterNames == null)
+ _formalParameterNames = sort(_inspectedSpecification.getParameterNames());
return _formalParameterNames;
}
/**
- * Returns a sorted list of informal parameter names. This is the list of
- * all bindings, with the list of parameter names removed, sorted.
+ * Returns a sorted list of informal parameter names. This is the list of all bindings, with the
+ * list of parameter names removed, sorted.
*/
public List getInformalParameterNames()
{
- if (_informalParameterNames != null) return _informalParameterNames;
+ if (_informalParameterNames != null)
+ return _informalParameterNames;
Collection names = _inspectedComponent.getBindingNames();
if (names != null && names.size() > 0)
@@ -171,7 +171,8 @@
// name).
names = _inspectedSpecification.getParameterNames();
- if (names != null) _informalParameterNames.removeAll(names);
+ if (names != null)
+ _informalParameterNames.removeAll(names);
Collections.sort(_informalParameterNames);
}
@@ -190,8 +191,8 @@
}
/**
- * Returns the {@link org.apache.tapestry.spec.ParameterSpecification}
- * corresponding to the value of the parameterName property.
+ * Returns the {@link org.apache.tapestry.spec.ParameterSpecification} corresponding to the
+ * value of the parameterName property.
*/
public IParameterSpecification getParameterSpecification()
@@ -200,8 +201,7 @@
}
/**
- * Returns the {@link IBinding} corresponding to the value of the
- * parameterName property.
+ * Returns the {@link IBinding} corresponding to the value of the parameterName property.
*/
public IBinding getBinding()
@@ -220,32 +220,32 @@
}
/**
- * Returns the {@link IAsset} corresponding to the value of the assetName
- * property.
+ * Returns the {@link IAsset} corresponding to the value of the assetName property.
*/
public IAsset getAsset()
{
- return (IAsset)_inspectedComponent.getAssets().get(_assetName);
+ return (IAsset) _inspectedComponent.getAssets().get(_assetName);
}
/**
- * Returns a sorted list of asset names, or null if the component contains
- * no assets.
+ * Returns a sorted list of asset names, or null if the component contains no assets.
*/
public List getAssetNames()
{
- if (_assetNames == null) _assetNames = sort(_inspectedComponent.getAssets().keySet());
+ if (_assetNames == null)
+ _assetNames = sort(_inspectedComponent.getAssets().keySet());
return _assetNames;
}
public List getSortedComponents()
{
- if (_sortedComponents != null) return _sortedComponents;
+ if (_sortedComponents != null)
+ return _sortedComponents;
- Inspector inspector = (Inspector)getPage();
+ Inspector inspector = (Inspector) getPage();
IComponent inspectedComponent = inspector.getInspectedComponent();
// Get a Map of the components and simply return null if there
@@ -265,13 +265,14 @@
public abstract IComponent getCurrentComponent();
/**
- * Returns a list of the properties for the component (from its
- * specification), or null if the component has no properties.
+ * Returns a list of the properties for the component (from its specification), or null if the
+ * component has no properties.
*/
public List getSortedPropertyNames()
{
- if (_sortedPropertyNames == null) _sortedPropertyNames = sort(_inspectedSpecification.getPropertyNames());
+ if (_sortedPropertyNames == null)
+ _sortedPropertyNames = sort(_inspectedSpecification.getPropertyNames());
return _sortedPropertyNames;
}
@@ -293,7 +294,8 @@
public List getBeanNames()
{
- if (_beanNames == null) _beanNames = sort(_inspectedSpecification.getBeanNames());
+ if (_beanNames == null)
+ _beanNames = sort(_inspectedSpecification.getBeanNames());
return _beanNames;
}
@@ -316,7 +318,8 @@
private List sort(Collection c)
{
- if (c == null || c.size() == 0) return null;
+ if (c == null || c.size() == 0)
+ return null;
List result = new ArrayList(c);
@@ -324,4 +327,4 @@
return result;
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowTemplate.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowTemplate.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowTemplate.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowTemplate.java Sat Mar 11 12:54:27 2006
@@ -317,4 +317,4 @@
{
return true;
}
-}
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org