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 [13/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/Compone...
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/components/ForBean.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/components/ForBean.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/components/ForBean.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/components/ForBean.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.
@@ -40,23 +40,20 @@
*/
public abstract class ForBean extends AbstractFormComponent
{
-
// constants
/**
- * Prefix on the hidden value stored into the field to indicate the the
- * actual value is stored (this is used when there is no primary key
- * converter). The remainder of the string is a
+ * Prefix on the hidden value stored into the field to indicate the the actual value is stored
+ * (this is used when there is no primary key converter). The remainder of the string is a
* {@link DataSqueezer squeezed} representation of the value.
*/
private static final char DESC_VALUE = 'V';
/**
- * Prefix on the hidden value stored into the field that indicates the
- * primary key of the iterated value is stored; the remainder of the string
- * is a {@link DataSqueezer squeezed} representation of the primary key. The
- * {@link IPrimaryKeyConverter converter} is used to obtain the value from
- * this key.
+ * Prefix on the hidden value stored into the field that indicates the primary key of the
+ * iterated value is stored; the remainder of the string is a {@link DataSqueezer squeezed}
+ * representation of the primary key. The {@link IPrimaryKeyConverter converter} is used to
+ * obtain the value from this key.
*/
private static final char DESC_PRIMARY_KEY = 'P';
@@ -92,25 +89,27 @@
private boolean _rendering;
/**
- * Gets the source binding and iterates through its values. For each, it
- * updates the value binding and render's its wrapped elements.
+ * Gets the source binding and iterates through its values. For each, it updates the value
+ * binding and render's its wrapped elements.
*/
protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
{
// form may be null if component is not located in a form
- IForm form = (IForm)cycle.getAttribute(TapestryUtils.FORM_ATTRIBUTE);
+ IForm form = (IForm) cycle.getAttribute(TapestryUtils.FORM_ATTRIBUTE);
// If the cycle is rewinding, but not this particular form,
// then do nothing (don't even render the body).
boolean cycleRewinding = cycle.isRewinding();
- if (cycleRewinding && form != null && !form.isRewinding()) return;
+ if (cycleRewinding && form != null && !form.isRewinding())
+ return;
// Get the data to be iterated upon. Store in form if needed.
Iterator dataSource = getData(cycle, form);
// Do not iterate if dataSource is null.
// The dataSource was either not convertable to Iterator, or was empty.
- if (dataSource == null) return;
+ if (dataSource == null)
+ return;
String element = getElement();
@@ -120,7 +119,7 @@
_index = 0;
_rendering = true;
- while(dataSource.hasNext())
+ while (dataSource.hasNext())
{
// Get current value
_value = dataSource.next();
@@ -137,7 +136,8 @@
renderBody(writer, cycle);
- if (element != null) writer.end();
+ if (element != null)
+ writer.end();
_index++;
}
@@ -158,14 +158,14 @@
public final Object getValue()
{
- if (!_rendering) throw Tapestry.createRenderOnlyPropertyException(this, "value");
+ if (!_rendering)
+ throw Tapestry.createRenderOnlyPropertyException(this, "value");
return _value;
}
/**
- * The index number, within the {@link #getSource() source}, of the the
- * current value.
+ * The index number, within the {@link #getSource() source}, of the the current value.
*
* @throws org.apache.tapestry.ApplicationRuntimeException
* if the For is not currently rendering.
@@ -173,7 +173,8 @@
public int getIndex()
{
- if (!_rendering) throw Tapestry.createRenderOnlyPropertyException(this, "index");
+ if (!_rendering)
+ throw Tapestry.createRenderOnlyPropertyException(this, "index");
return _index;
}
@@ -189,10 +190,12 @@
protected void updateOutputParameters()
{
IBinding indexBinding = getBinding("index");
- if (indexBinding != null) indexBinding.setObject(new Integer(_index));
+ if (indexBinding != null)
+ indexBinding.setObject(new Integer(_index));
IBinding valueBinding = getBinding("value");
- if (valueBinding != null) valueBinding.setObject(_value);
+ if (valueBinding != null)
+ valueBinding.setObject(_value);
}
/**
@@ -201,16 +204,18 @@
protected void updatePrimaryKeysParameter(String[] stringReps)
{
IBinding primaryKeysBinding = getBinding("primaryKeys");
- if (primaryKeysBinding == null) return;
+ if (primaryKeysBinding == null)
+ return;
DataSqueezer squeezer = getDataSqueezer();
int repsCount = stringReps.length;
List primaryKeys = new ArrayList(repsCount);
- for(int i = 0; i < stringReps.length; i++)
+ for (int i = 0; i < stringReps.length; i++)
{
String rep = stringReps[i];
- if (rep.length() == 0 || rep.charAt(0) != DESC_PRIMARY_KEY) continue;
+ if (rep.length() == 0 || rep.charAt(0) != DESC_PRIMARY_KEY)
+ continue;
Object primaryKey = squeezer.unsqueeze(rep.substring(1));
primaryKeys.add(primaryKey);
}
@@ -228,14 +233,12 @@
}
/**
- * Returns a list with the values to be iterated upon. The list is obtained
- * in different ways: - If the component is not located in a form or
- * 'volatile' is set to true, then the simply the values passed to 'source'
- * are returned (same as Foreach) - If the component is in a form, and the
- * form is rewinding, the values stored in the form are returned -- rewind
- * is then always the same as render. - If the component is in a form, and
- * the form is being rendered, the values are stored in the form as Hidden
- * fields.
+ * Returns a list with the values to be iterated upon. The list is obtained in different ways: -
+ * If the component is not located in a form or 'volatile' is set to true, then the simply the
+ * values passed to 'source' are returned (same as Foreach) - If the component is in a form, and
+ * the form is rewinding, the values stored in the form are returned -- rewind is then always
+ * the same as render. - If the component is in a form, and the form is being rendered, the
+ * values are stored in the form as Hidden fields.
*
* @param cycle
* The current request cycle
@@ -245,16 +248,18 @@
*/
private Iterator getData(IRequestCycle cycle, IForm form)
{
- if (form == null || getVolatile()) return evaluateSourceIterator();
+ if (form == null || getVolatile())
+ return evaluateSourceIterator();
String name = form.getElementId(this);
- if (cycle.isRewinding()) return getStoredData(cycle, name);
+ if (cycle.isRewinding())
+ return getStoredData(cycle, name);
return storeSourceData(form, name);
}
/**
- * Returns a list of the values stored as Hidden fields in the form. A
- * conversion is performed if the primary key of the value is stored.
+ * Returns a list of the values stored as Hidden fields in the form. A conversion is performed
+ * if the primary key of the value is stored.
*
* @param cycle
* The current request cycle
@@ -265,7 +270,8 @@
protected Iterator getStoredData(IRequestCycle cycle, String name)
{
String[] stringReps = cycle.getParameters(name);
- if (stringReps == null) return null;
+ if (stringReps == null)
+ return null;
updatePrimaryKeysParameter(stringReps);
@@ -273,12 +279,11 @@
}
/**
- * Pulls data from successive strings (posted by client-side hidden fields);
- * each string representation may be either a value or a primary key.
+ * Pulls data from successive strings (posted by client-side hidden fields); each string
+ * representation may be either a value or a primary key.
*/
private class ReadSourceDataIterator implements Iterator
{
-
private final Iterator _sourceIterator = evaluateSourceIterator();
private final Iterator _fullSourceIterator = evaluateFullSourceIterator();
@@ -314,9 +319,8 @@
}
/**
- * Stores the provided data in the form and then returns the data as an
- * iterator. If the primary key of the value can be determined, then that
- * primary key is saved instead.
+ * Stores the provided data in the form and then returns the data as an iterator. If the primary
+ * key of the value can be determined, then that primary key is saved instead.
*
* @param form
* The form where the data will be stored
@@ -330,14 +334,12 @@
}
/**
- * Iterates over a set of values, using
- * {@link ForBean#getStringRepFromValue(Object)} to obtain the correct
- * client-side string representation, and working with the form to store
- * each successive value into the form.
+ * Iterates over a set of values, using {@link ForBean#getStringRepFromValue(Object)} to obtain
+ * the correct client-side string representation, and working with the form to store each
+ * successive value into the form.
*/
private class StoreSourceDataIterator implements Iterator
{
-
private final IForm _form;
private final String _name;
@@ -374,9 +376,8 @@
}
/**
- * Returns the string representation of the value. The first letter of the
- * string representation shows whether a value or a primary key is being
- * described.
+ * Returns the string representation of the value. The first letter of the string representation
+ * shows whether a value or a primary key is being described.
*
* @param value
* @return
@@ -392,187 +393,196 @@
// Primary key was extracted successfully.
rep = DESC_PRIMARY_KEY + squeezer.squeeze(pk);
else
- // primary key could not be extracted. squeeze value.
- rep = DESC_VALUE + squeezer.squeeze(value);
+ // primary key could not be extracted. squeeze value.
+ rep = DESC_VALUE + squeezer.squeeze(value);
return rep;
}
/**
- * Returns the primary key of the given value. Uses the 'keyExpression' or
- * the 'converter' (if either is provided).
+ * Returns the primary key of the given value. Uses the 'keyExpression' or the 'converter' (if
+ * either is provided).
*
* @param value
* The value from which the primary key should be extracted
- * @return The primary key of the value, or null if such cannot be
- * extracted.
+ * @return The primary key of the value, or null if such cannot be extracted.
*/
protected Object getPrimaryKeyFromValue(Object value)
{
- if (value == null) return null;
+ if (value == null)
+ return null;
Object primaryKey = getKeyExpressionFromValue(value);
- if (primaryKey == null) primaryKey = getConverterFromValue(value);
+ if (primaryKey == null)
+ primaryKey = getConverterFromValue(value);
return primaryKey;
}
/**
- * Uses the 'keyExpression' parameter to determine the primary key of the
- * given value
+ * Uses the 'keyExpression' parameter to determine the primary key of the given value
*
* @param value
* The value from which the primary key should be extracted
- * @return The primary key of the value as defined by 'keyExpression', or
- * null if such cannot be extracted.
+ * @return The primary key of the value as defined by 'keyExpression', or null if such cannot be
+ * extracted.
*/
protected Object getKeyExpressionFromValue(Object value)
{
String keyExpression = getKeyExpression();
- if (keyExpression == null) return null;
+ if (keyExpression == null)
+ return null;
Object primaryKey = getExpressionEvaluator().read(value, keyExpression);
return primaryKey;
}
/**
- * Uses the 'converter' parameter to determine the primary key of the given
- * value
+ * Uses the 'converter' parameter to determine the primary key of the given value
*
* @param value
* The value from which the primary key should be extracted
- * @return The primary key of the value as provided by the converter, or
- * null if such cannot be extracted.
+ * @return The primary key of the value as provided by the converter, or null if such cannot be
+ * extracted.
*/
protected Object getConverterFromValue(Object value)
{
IPrimaryKeyConverter converter = getConverter();
- if (converter == null) return null;
+ if (converter == null)
+ return null;
Object primaryKey = converter.getPrimaryKey(value);
return primaryKey;
}
/**
- * Determines the value that corresponds to the given string representation.
- * If the 'match' parameter is true, attempt to find a value in 'source' or
- * 'fullSource' that generates the same string representation. Otherwise,
- * create a new value from the string representation.
+ * Determines the value that corresponds to the given string representation. If the 'match'
+ * parameter is true, attempt to find a value in 'source' or 'fullSource' that generates the
+ * same string representation. Otherwise, create a new value from the string representation.
*
* @param rep
* the string representation for which a value should be returned
* @return the value that corresponds to the provided string representation
*/
- protected Object getValueFromStringRep(Iterator sourceIterator, Iterator fullSourceIterator, Map repToValueMap,
- String rep)
+ protected Object getValueFromStringRep(Iterator sourceIterator, Iterator fullSourceIterator,
+ Map repToValueMap, String rep)
{
Object value = null;
DataSqueezer squeezer = getDataSqueezer();
- // Check if the string rep is empty. If so, just return the default
- // value.
- if (rep == null || rep.length() == 0) return getDefaultValue();
+ // Check if the string rep is empty. If so, just return the default value.
+ if (rep == null || rep.length() == 0)
+ return getDefaultValue();
- // If required, find a value with an equivalent string representation
- // and return it
+ // If required, find a value with an equivalent string representation and return it
boolean match = getMatch();
if (match)
{
- value = findValueWithStringRep(sourceIterator, fullSourceIterator, repToValueMap, rep, COMPLETE_REP_SOURCE);
- if (value != null) return value;
+ value = findValueWithStringRep(
+ sourceIterator,
+ fullSourceIterator,
+ repToValueMap,
+ rep,
+ COMPLETE_REP_SOURCE);
+ if (value != null)
+ return value;
}
- // Matching of the string representation was not successful or was
- // disabled.
+ // Matching of the string representation was not successful or was disabled.
// Use the standard approaches to obtain the value from the rep.
char desc = rep.charAt(0);
String squeezed = rep.substring(1);
- switch(desc)
+ switch (desc)
{
- case DESC_VALUE:
- // If the string rep is just the value itself, unsqueeze it
- value = squeezer.unsqueeze(squeezed);
- break;
-
- case DESC_PRIMARY_KEY:
- // Perform keyExpression match if not already attempted
- if (!match && getKeyExpression() != null)
- value = findValueWithStringRep(sourceIterator, fullSourceIterator, repToValueMap, rep,
- KEY_EXPRESSION_REP_SOURCE);
-
- // If 'converter' is defined, try to perform conversion from primary
- // key to value
- if (value == null)
- {
- IPrimaryKeyConverter converter = getConverter();
- if (converter != null)
+ case DESC_VALUE:
+ // If the string rep is just the value itself, unsqueeze it
+ value = squeezer.unsqueeze(squeezed);
+ break;
+
+ case DESC_PRIMARY_KEY:
+ // Perform keyExpression match if not already attempted
+ if (!match && getKeyExpression() != null)
+ value = findValueWithStringRep(
+ sourceIterator,
+ fullSourceIterator,
+ repToValueMap,
+ rep,
+ KEY_EXPRESSION_REP_SOURCE);
+
+ // If 'converter' is defined, try to perform conversion from primary key to value
+ if (value == null)
{
- Object pk = squeezer.unsqueeze(squeezed);
- value = converter.getValue(pk);
+ IPrimaryKeyConverter converter = getConverter();
+ if (converter != null)
+ {
+ Object pk = squeezer.unsqueeze(squeezed);
+ value = converter.getValue(pk);
+ }
}
- }
- default:
- break;
+ break;
}
- if (value == null) value = getDefaultValue();
+ if (value == null)
+ value = getDefaultValue();
return value;
}
/**
- * Attempt to find a value in 'source' or 'fullSource' that generates the
- * provided string representation. Use the RepSource interface to determine
- * what the string representation of a particular value is.
+ * Attempt to find a value in 'source' or 'fullSource' that generates the provided string
+ * representation. Use the RepSource interface to determine what the string representation of a
+ * particular value is.
*
* @param rep
* the string representation for which a value should be returned
* @param repSource
- * an interface providing the string representation of a given
- * value
- * @return the value in 'source' or 'fullSource' that corresponds to the
- * provided string representation
+ * an interface providing the string representation of a given value
+ * @return the value in 'source' or 'fullSource' that corresponds to the provided string
+ * representation
*/
- protected Object findValueWithStringRep(Iterator sourceIterator, Iterator fullSourceIterator, Map repToValueMap,
- String rep, RepSource repSource)
+ protected Object findValueWithStringRep(Iterator sourceIterator, Iterator fullSourceIterator,
+ Map repToValueMap, String rep, RepSource repSource)
{
Object value = repToValueMap.get(rep);
- if (value != null) return value;
+ if (value != null)
+ return value;
value = findValueWithStringRepInIterator(sourceIterator, repToValueMap, rep, repSource);
- if (value != null) return value;
+ if (value != null)
+ return value;
value = findValueWithStringRepInIterator(fullSourceIterator, repToValueMap, rep, repSource);
return value;
}
/**
- * Attempt to find a value in the provided collection that generates the
- * required string representation. Use the RepSource interface to determine
- * what the string representation of a particular value is.
+ * Attempt to find a value in the provided collection that generates the required string
+ * representation. Use the RepSource interface to determine what the string representation of a
+ * particular value is.
*
* @param rep
* the string representation for which a value should be returned
* @param repSource
- * an interface providing the string representation of a given
- * value
+ * an interface providing the string representation of a given value
* @param it
- * the iterator of the collection in which a value should be
- * searched
- * @return the value in the provided collection that corresponds to the
- * required string representation
+ * the iterator of the collection in which a value should be searched
+ * @return the value in the provided collection that corresponds to the required string
+ * representation
*/
- protected Object findValueWithStringRepInIterator(Iterator it, Map repToValueMap, String rep, RepSource repSource)
+ protected Object findValueWithStringRepInIterator(Iterator it, Map repToValueMap, String rep,
+ RepSource repSource)
{
- while(it.hasNext())
+ while (it.hasNext())
{
Object sourceValue = it.next();
- if (sourceValue == null) continue;
+ if (sourceValue == null)
+ continue;
String sourceRep = repSource.getStringRep(sourceValue);
repToValueMap.put(sourceRep, sourceValue);
- if (rep.equals(sourceRep)) return sourceValue;
+ if (rep.equals(sourceRep))
+ return sourceValue;
}
return null;
@@ -589,11 +599,14 @@
Object source = null;
IBinding sourceBinding = getBinding("source");
- if (sourceBinding != null) source = sourceBinding.getObject();
+ if (sourceBinding != null)
+ source = sourceBinding.getObject();
- if (source != null) it = (Iterator)getValueConverter().coerceValue(source, Iterator.class);
+ if (source != null)
+ it = (Iterator) getValueConverter().coerceValue(source, Iterator.class);
- if (it == null) it = Collections.EMPTY_LIST.iterator();
+ if (it == null)
+ it = Collections.EMPTY_LIST.iterator();
return it;
}
@@ -609,11 +622,14 @@
Object fullSource = null;
IBinding fullSourceBinding = getBinding("fullSource");
- if (fullSourceBinding != null) fullSource = fullSourceBinding.getObject();
+ if (fullSourceBinding != null)
+ fullSource = fullSourceBinding.getObject();
- if (fullSource != null) it = (Iterator)getValueConverter().coerceValue(fullSource, Iterator.class);
+ if (fullSource != null)
+ it = (Iterator) getValueConverter().coerceValue(fullSource, Iterator.class);
- if (it == null) it = Collections.EMPTY_LIST.iterator();
+ if (it == null)
+ it = Collections.EMPTY_LIST.iterator();
return it;
}
@@ -623,17 +639,15 @@
*/
protected interface RepSource
{
-
String getStringRep(Object value);
}
/**
- * An implementation of RepSource that provides the string representation of
- * the given value using all methods.
+ * An implementation of RepSource that provides the string representation of the given value
+ * using all methods.
*/
protected class CompleteRepSource implements RepSource
{
-
public String getStringRep(Object value)
{
return getStringRepFromValue(value);
@@ -641,12 +655,11 @@
}
/**
- * An implementation of RepSource that provides the string representation of
- * the given value using just the 'keyExpression' parameter.
+ * An implementation of RepSource that provides the string representation of the given value
+ * using just the 'keyExpression' parameter.
*/
protected class KeyExpressionRepSource implements RepSource
{
-
public String getStringRep(Object value)
{
Object pk = getKeyExpressionFromValue(value);
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/components/Foreach.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/components/Foreach.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/components/Foreach.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/components/Foreach.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.
@@ -24,44 +24,42 @@
import org.apache.tapestry.coerce.ValueConverter;
/**
- * Repeatedly renders its wrapped contents while iterating through a list of
- * values. [ <a href="../../../../../ComponentReference/Foreach.html">Component
- * Reference </a>]
+ * Repeatedly renders its wrapped contents while iterating through a list of values. [ <a
+ * href="../../../../../ComponentReference/Foreach.html">Component Reference </a>]
* <p>
- * While the component is rendering, the property {@link #getValue() value}(accessed
- * as <code>components.<i>foreach</i>.value</code> is set to each successive
- * value from the source, and the property {@link #getIndex() index}is set to
- * each successive index into the source (starting with zero).
+ * While the component is rendering, the property {@link #getValue() value}(accessed as
+ * <code>components.<i>foreach</i>.value</code> is set to each successive value from the source,
+ * and the property {@link #getIndex() index}is set to each successive index into the source
+ * (starting with zero).
*
* @author Howard Lewis Ship
*/
public abstract class Foreach extends AbstractComponent
{
-
private Object _value;
private int _index;
/**
- * Gets the source binding and returns an {@link Iterator}representing the
- * values identified by the source. Returns an empty {@link Iterator}if the
- * binding, or the binding value, is null.
+ * Gets the source binding and returns an {@link Iterator}representing the values identified by
+ * the source. Returns an empty {@link Iterator}if the binding, or the binding value, is null.
* <p>
- * Invokes {@link Tapestry#coerceToIterator(Object)}to perform the actual
- * conversion.
+ * Invokes {@link Tapestry#coerceToIterator(Object)}to perform the actual conversion.
*/
protected Iterator getSourceData()
{
- Object source = null;
-
- IBinding sourceBinding = getBinding("source");
- if (sourceBinding != null) source = sourceBinding.getObject();
+ Object source = null;
+
+ IBinding sourceBinding = getBinding("source");
+ if (sourceBinding != null)
+ source = sourceBinding.getObject();
- if (source == null) return null;
+ if (source == null)
+ return null;
- return (Iterator)getValueConverter().coerceValue(source, Iterator.class);
+ return (Iterator) getValueConverter().coerceValue(source, Iterator.class);
}
protected void prepareForRender(IRequestCycle cycle)
@@ -76,8 +74,8 @@
}
/**
- * Gets the source binding and iterates through its values. For each, it
- * updates the value binding and render's its wrapped elements.
+ * Gets the source binding and iterates through its values. For each, it updates the value
+ * binding and render's its wrapped elements.
*/
protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
@@ -86,7 +84,8 @@
// The dataSource was either not convertable, or was empty.
- if (dataSource == null) return;
+ if (dataSource == null)
+ return;
boolean indexBound = isParameterBound("index");
boolean valueBound = isParameterBound("value");
@@ -95,14 +94,16 @@
boolean hasNext = dataSource.hasNext();
- while(hasNext)
+ while (hasNext)
{
_value = dataSource.next();
hasNext = dataSource.hasNext();
- if (indexBound) setIndexParameter(_index);
+ if (indexBound)
+ setIndexParameter(_index);
- if (valueBound) setValueParameter(_value);
+ if (valueBound)
+ setValueParameter(_value);
if (element != null)
{
@@ -112,7 +113,8 @@
renderBody(writer, cycle);
- if (element != null) writer.end();
+ if (element != null)
+ writer.end();
_index++;
}
@@ -128,14 +130,14 @@
public Object getValue()
{
- if (!isRendering()) throw Tapestry.createRenderOnlyPropertyException(this, "value");
+ if (!isRendering())
+ throw Tapestry.createRenderOnlyPropertyException(this, "value");
return _value;
}
/**
- * The index number, within the {@link #getSource() source}, of the the
- * current value.
+ * The index number, within the {@link #getSource() source}, of the the current value.
*
* @throws org.apache.tapestry.ApplicationRuntimeException
* if the Foreach is not currently rendering.
@@ -144,11 +146,12 @@
public int getIndex()
{
- if (!isRendering()) throw Tapestry.createRenderOnlyPropertyException(this, "index");
+ if (!isRendering())
+ throw Tapestry.createRenderOnlyPropertyException(this, "index");
return _index;
}
-
+
public abstract String getElement();
/** @since 4.0 */
@@ -159,4 +162,4 @@
/** @since 4.0 */
public abstract ValueConverter getValueConverter();
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/components/ILinkComponent.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/components/ILinkComponent.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/components/ILinkComponent.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/components/ILinkComponent.java Sat Mar 11 12:54:27 2006
@@ -40,6 +40,15 @@
public String getScheme();
/**
+ * Returns the desired port (i.e., "80" or "443") for the link, or null to not output a
+ * specific port (in which case the URL will fall under the incoming request's port).
+ *
+ * @since 4.1
+ */
+
+ public Integer getPort();
+
+ /**
* Returns whether this service link component is enabled or disabled.
*
* @since 0.2.9
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/components/LinkEventType.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/components/LinkEventType.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/components/LinkEventType.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/components/LinkEventType.java Sat Mar 11 12:54:27 2006
@@ -23,6 +23,10 @@
public class LinkEventType
{
+ private final String _name;
+
+ private final String _attributeName;
+
/**
* Type for <code>onMouseOver</code>. This may also be called "focus".
*/
@@ -67,10 +71,6 @@
public static final LinkEventType MOUSE_UP = new LinkEventType("MOUSE_UP", "onMouseUp");
- private final String _name;
-
- private final String _attributeName;
-
/**
* Constructs a new type of event. The name should match the static final variable (i.e.,
* MOUSE_OVER) and the attributeName is the name of the HTML attribute to be managed (i.e.,
@@ -100,4 +100,4 @@
{
return "LinkEventType[" + _name + "]";
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/describe/DescribeMessages.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/describe/DescribeMessages.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/describe/DescribeMessages.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/describe/DescribeMessages.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,28 +20,22 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
-final class DescribeMessages
+class DescribeMessages
{
-
- private final static MessageFormatter MESSAGES = new MessageFormatter(DescribeMessages.class);
-
- /** @since 4.1 */
- private DescribeMessages()
- {
- }
+ private final static MessageFormatter _formatter = new MessageFormatter(DescribeMessages.class);
static String mustSetTitleBeforeSection()
{
- return MESSAGES.getMessage("must-set-title-before-section");
+ return _formatter.getMessage("must-set-title-before-section");
}
static String setTitleOnce()
{
- return MESSAGES.getMessage("set-title-once");
+ return _formatter.getMessage("set-title-once");
}
static String mustSetTitleBeforeProperty()
{
- return MESSAGES.getMessage("must-set-title-before-property");
+ return _formatter.getMessage("must-set-title-before-property");
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/AbstractEngine.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/AbstractEngine.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/AbstractEngine.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/AbstractEngine.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.
@@ -41,72 +41,55 @@
import org.apache.tapestry.web.WebResponse;
/**
- * Basis for building real Tapestry applications. Immediate subclasses provide
- * different strategies for managing page state and other resources between
- * request cycles.
+ * Basis for building real Tapestry applications. Immediate subclasses provide different strategies
+ * for managing page state and other resources between request cycles.
* <p>
- * Note: much of this description is <em>in transition</em> as part of
- * Tapestry 4.0. All ad-hoc singletons and such are being replaced with HiveMind
- * services.
+ * Note: much of this description is <em>in transition</em> as part of Tapestry 4.0. All ad-hoc
+ * singletons and such are being replaced with HiveMind services.
* <p>
* Uses a shared instance of {@link ITemplateSource},{@link ISpecificationSource},
- * {@link IScriptSource}and {@link IComponentMessagesSource}stored as
- * attributes of the {@link ServletContext}(they will be shared by all
- * sessions).
+ * {@link IScriptSource}and {@link IComponentMessagesSource}stored as attributes of the
+ * {@link ServletContext}(they will be shared by all sessions).
* <p>
- * An engine is designed to be very lightweight. Particularily, it should
- * <b>never </b> hold references to any {@link IPage}or
- * {@link org.apache.tapestry.IComponent}objects. The entire system is based
- * upon being able to quickly rebuild the state of any page(s).
+ * An engine is designed to be very lightweight. Particularily, it should <b>never </b> hold
+ * references to any {@link IPage}or {@link org.apache.tapestry.IComponent}objects. The entire
+ * system is based upon being able to quickly rebuild the state of any page(s).
* <p>
- * Where possible, instance variables should be transient. They can be restored
- * inside {@link #setupForRequest(RequestContext)}.
+ * Where possible, instance variables should be transient. They can be restored inside
+ * {@link #setupForRequest(RequestContext)}.
* <p>
- * In practice, a subclass (usually {@link BaseEngine}) is used without
- * subclassing. Instead, a visit object is specified. To facilitate this, the
- * application specification may include a property,
- * <code>org.apache.tapestry.visit-class</code> which is the class name to
- * instantiate when a visit object is first needed. See
- * {@link #createVisit(IRequestCycle)}for more details.
+ * In practice, a subclass (usually {@link BaseEngine}) is used without subclassing. Instead, a
+ * visit object is specified. To facilitate this, the application specification may include a
+ * property, <code>org.apache.tapestry.visit-class</code> which is the class name to instantiate
+ * when a visit object is first needed. See {@link #createVisit(IRequestCycle)}for more details.
* <p>
- * Some of the classes' behavior is controlled by JVM system properties
- * (typically only used during development): <table border=1>
+ * Some of the classes' behavior is controlled by JVM system properties (typically only used during
+ * development): <table border=1>
* <tr>
* <th>Property</th>
* <th>Description</th>
* </tr>
* <tr>
* <td>org.apache.tapestry.enable-reset-service</td>
- * <td>If true, enabled an additional service, reset, that allow page,
- * specification and template caches to be cleared on demand. See
- * {@link #isResetServiceEnabled()}.</td>
+ * <td>If true, enabled an additional service, reset, that allow page, specification and template
+ * caches to be cleared on demand. See {@link #isResetServiceEnabled()}.</td>
* </tr>
* <tr>
* <td>org.apache.tapestry.disable-caching</td>
- * <td>If true, then the page, specification, template and script caches will
- * be cleared after each request. This slows things down, but ensures that the
- * latest versions of such files are used. Care should be taken that the source
- * directories for the files preceeds any versions of the files available in
- * JARs or WARs.</td>
+ * <td>If true, then the page, specification, template and script caches will be cleared after each
+ * request. This slows things down, but ensures that the latest versions of such files are used.
+ * Care should be taken that the source directories for the files preceeds any versions of the files
+ * available in JARs or WARs.</td>
* </tr>
* </table>
*
* @author Howard Lewis Ship
*/
-public abstract class AbstractEngine implements IEngine {
-
- /**
- * The name of the application specification property used to specify the
- * class of the visit object.
- */
- public static final String VISIT_CLASS_PROPERTY_NAME = "org.apache.tapestry.visit-class";
-
+public abstract class AbstractEngine implements IEngine
+{
private static final Log LOG = LogFactory.getLog(AbstractEngine.class);
- /** @since 4.1 */
- private static final String VISIT_OBJECT_NAME = "visit";
-
/**
* The link to the world of HiveMind services.
*
@@ -123,6 +106,13 @@
private Locale _locale;
/**
+ * The name of the application specification property used to specify the class of the visit
+ * object.
+ */
+
+ public static final String VISIT_CLASS_PROPERTY_NAME = "org.apache.tapestry.visit-class";
+
+ /**
* @see org.apache.tapestry.error.ExceptionPresenter
*/
@@ -139,14 +129,12 @@
public void reportException(String reportTitle, Throwable ex)
{
- _infrastructure.getRequestExceptionReporter().reportRequestException(
- reportTitle, ex);
+ _infrastructure.getRequestExceptionReporter().reportRequestException(reportTitle, ex);
}
/**
- * Invoked at the end of the request cycle to release any resources specific
- * to the request cycle. This implementation does nothing and may be
- * overriden freely.
+ * Invoked at the end of the request cycle to release any resources specific to the request
+ * cycle. This implementation does nothing and may be overriden freely.
*/
protected void cleanupAfterRequest(IRequestCycle cycle)
@@ -155,8 +143,8 @@
}
/**
- * Returns the locale for the engine. This is initially set by the
- * {@link ApplicationServlet} but may be updated by the application.
+ * Returns the locale for the engine. This is initially set by the {@link ApplicationServlet}
+ * but may be updated by the application.
*/
public Locale getLocale()
@@ -191,13 +179,12 @@
}
/**
- * Invoked, typically, when an exception occurs while servicing the request.
- * This method resets the output, sets the new page and renders it.
+ * Invoked, typically, when an exception occurs while servicing the request. This method resets
+ * the output, sets the new page and renders it.
*/
protected void redirect(String pageName, IRequestCycle cycle,
- ApplicationRuntimeException exception)
- throws IOException
+ ApplicationRuntimeException exception) throws IOException
{
IPage page = cycle.getPage(pageName);
@@ -211,8 +198,7 @@
* {@link org.apache.tapestry.services.ResponseRenderer#renderResponse(IRequestCycle)}.
*/
- public void renderResponse(IRequestCycle cycle)
- throws IOException
+ public void renderResponse(IRequestCycle cycle) throws IOException
{
_infrastructure.getResponseRenderer().renderResponse(cycle);
}
@@ -221,71 +207,90 @@
* Delegate method for the servlet. Services the request.
*/
- public void service(WebRequest request, WebResponse response)
- throws IOException
+ public void service(WebRequest request, WebResponse response) throws IOException
{
IRequestCycle cycle = null;
IMonitor monitor = null;
IEngineService service = null;
if (_infrastructure == null)
- _infrastructure = (Infrastructure)request
- .getAttribute(Constants.INFRASTRUCTURE_KEY);
+ _infrastructure = (Infrastructure) request.getAttribute(Constants.INFRASTRUCTURE_KEY);
- // Create the request cycle; if this fails, there's not much that can be
- // done ... everything
+ // Create the request cycle; if this fails, there's not much that can be done ... everything
// else in Tapestry relies on the RequestCycle.
- try {
- cycle = _infrastructure.getRequestCycleFactory().newRequestCycle(
- this);
- } catch (RuntimeException ex) {
+ try
+ {
+ cycle = _infrastructure.getRequestCycleFactory().newRequestCycle(this);
+ }
+ catch (RuntimeException ex)
+ {
throw ex;
- } catch (Exception ex) {
+ }
+ catch (Exception ex)
+ {
throw new IOException(ex.getMessage());
}
- try {
- try {
+ try
+ {
+ try
+ {
monitor = cycle.getMonitor();
service = cycle.getService();
- monitor.serviceBegin(service.getName(), _infrastructure
- .getRequest().getRequestURI());
+ monitor.serviceBegin(service.getName(), _infrastructure.getRequest()
+ .getRequestURI());
// Let the service handle the rest of the request.
service.service(cycle);
return;
- } catch (PageRedirectException ex) {
+ }
+ catch (PageRedirectException ex)
+ {
handlePageRedirectException(cycle, ex);
- } catch (RedirectException ex) {
+ }
+ catch (RedirectException ex)
+ {
handleRedirectException(cycle, ex);
- } catch (StaleLinkException ex) {
+ }
+ catch (StaleLinkException ex)
+ {
handleStaleLinkException(cycle, ex);
- } catch (StaleSessionException ex) {
+ }
+ catch (StaleSessionException ex)
+ {
handleStaleSessionException(cycle, ex);
}
- } catch (Exception ex) {
+ }
+ catch (Exception ex)
+ {
monitor.serviceException(ex);
// Attempt to switch to the exception page. However, this may itself
- // fail for a number of reasons, in which case an
- // ApplicationRuntimeException is
+ // fail for a number of reasons, in which case an ApplicationRuntimeException is
// thrown.
- if (LOG.isDebugEnabled()) LOG.debug("Uncaught exception", ex);
+ if (LOG.isDebugEnabled())
+ LOG.debug("Uncaught exception", ex);
activateExceptionPage(cycle, ex);
- } finally {
- if (service != null) monitor.serviceEnd(service.getName());
+ }
+ finally
+ {
+ if (service != null)
+ monitor.serviceEnd(service.getName());
- try {
+ try
+ {
cycle.cleanup();
_infrastructure.getApplicationStateManager().flush();
- } catch (Exception ex) {
+ }
+ catch (Exception ex)
+ {
reportException(EngineMessages.exceptionDuringCleanup(ex), ex);
}
}
@@ -293,42 +298,44 @@
/**
* Handles {@link PageRedirectException} which involves executing
- * {@link IRequestCycle#activate(IPage)} on the target page (of the
- * exception), until either a loop is found, or a page succesfully
- * activates.
+ * {@link IRequestCycle#activate(IPage)} on the target page (of the exception), until either a
+ * loop is found, or a page succesfully activates.
* <p>
* This should generally not be overriden in subclasses.
*
* @since 3.0
*/
- protected void handlePageRedirectException(IRequestCycle cycle,
- PageRedirectException exception)
- throws IOException
+ protected void handlePageRedirectException(IRequestCycle cycle, PageRedirectException exception)
+ throws IOException
{
List pageNames = new ArrayList();
String pageName = exception.getTargetPageName();
- while(true) {
- if (pageNames.contains(pageName)) {
+ while (true)
+ {
+ if (pageNames.contains(pageName))
+ {
pageNames.add(pageName);
- throw new ApplicationRuntimeException(EngineMessages
- .validateCycle(pageNames));
+ throw new ApplicationRuntimeException(EngineMessages.validateCycle(pageNames));
}
// Record that this page has been a target.
pageNames.add(pageName);
- try {
+ try
+ {
// Attempt to activate the new page.
cycle.activate(pageName);
break;
- } catch (PageRedirectException secondRedirectException) {
+ }
+ catch (PageRedirectException secondRedirectException)
+ {
pageName = secondRedirectException.getTargetPageName();
}
}
@@ -337,60 +344,52 @@
}
/**
- * Invoked by {@link #service(WebRequest, WebResponse)} if a
- * {@link StaleLinkException} is thrown by the
- * {@link IEngineService service}. This implementation sets the message
- * property of the StaleLink page to the message provided in the exception,
- * then invokes
- * {@link #redirect(String, IRequestCycle, ApplicationRuntimeException)} to
- * render the StaleLink page.
+ * Invoked by {@link #service(WebRequest, WebResponse)} if a {@link StaleLinkException} is
+ * thrown by the {@link IEngineService service}. This implementation sets the message property
+ * of the StaleLink page to the message provided in the exception, then invokes
+ * {@link #redirect(String, IRequestCycle, ApplicationRuntimeException)} to render the StaleLink
+ * page.
* <p>
- * Subclasses may overide this method (without invoking this
- * implementation). A better practice is to contribute an alternative
- * implementation of
+ * Subclasses may overide this method (without invoking this implementation). A better practice
+ * is to contribute an alternative implementation of
* {@link org.apache.tapestry.error.StaleLinkExceptionPresenter} to the
* tapestry.InfrastructureOverrides configuration point.
* <p>
- * A common practice is to present an error message on the application's
- * Home page. Alternately, the application may provide its own version of
- * the StaleLink page, overriding the framework's implementation (probably a
- * good idea, because the default page hints at "application errors" and
- * isn't localized). The overriding StaleLink implementation must implement
- * a message property of type String.
+ * A common practice is to present an error message on the application's Home page. Alternately,
+ * the application may provide its own version of the StaleLink page, overriding the framework's
+ * implementation (probably a good idea, because the default page hints at "application errors"
+ * and isn't localized). The overriding StaleLink implementation must implement a message
+ * property of type String.
*
* @since 0.2.10
*/
- protected void handleStaleLinkException(IRequestCycle cycle,
- StaleLinkException exception)
- throws IOException
+ protected void handleStaleLinkException(IRequestCycle cycle, StaleLinkException exception)
+ throws IOException
{
_infrastructure.getStaleLinkExceptionPresenter()
.presentStaleLinkException(cycle, exception);
}
/**
- * Invoked by {@link #service(WebRequest, WebResponse)} if a
- * {@link StaleSessionException} is thrown by the
- * {@link IEngineService service}. This implementation uses the
- * {@link org.apache.tapestry.error.StaleSessionExceptionPresenter} to
- * render the StaleSession page.
+ * Invoked by {@link #service(WebRequest, WebResponse)} if a {@link StaleSessionException} is
+ * thrown by the {@link IEngineService service}. This implementation uses the
+ * {@link org.apache.tapestry.error.StaleSessionExceptionPresenter} to render the StaleSession
+ * page.
* <p>
- * Subclasses may overide this method (without invoking this
- * implementation), but it is better to override the
- * tapestry.error.StaleSessionExceptionReporter service instead (or
- * contribute a replacement to the tapestry.InfrastructureOverrides
- * configuration point).
+ * Subclasses may overide this method (without invoking this implementation), but it is better
+ * to override the tapestry.error.StaleSessionExceptionReporter service instead (or contribute a
+ * replacement to the tapestry.InfrastructureOverrides configuration point).
*
* @since 0.2.10
*/
- protected void handleStaleSessionException(IRequestCycle cycle,
- StaleSessionException exception)
- throws IOException
+ protected void handleStaleSessionException(IRequestCycle cycle, StaleSessionException exception)
+ throws IOException
{
- _infrastructure.getStaleSessionExceptionPresenter()
- .presentStaleSessionException(cycle, exception);
+ _infrastructure.getStaleSessionExceptionPresenter().presentStaleSessionException(
+ cycle,
+ exception);
}
/**
@@ -403,10 +402,10 @@
_locale = value;
- // The locale may be set before the engine is initialized with the
- // Infrastructure.
+ // The locale may be set before the engine is initialized with the Infrastructure.
- if (_infrastructure != null) _infrastructure.setLocale(value);
+ if (_infrastructure != null)
+ _infrastructure.setLocale(value);
}
/**
@@ -419,9 +418,8 @@
}
/**
- * Generates a description of the instance. Invokes
- * {@link #extendDescription(ToStringBuilder)} to fill in details about the
- * instance.
+ * Generates a description of the instance. Invokes {@link #extendDescription(ToStringBuilder)}
+ * to fill in details about the instance.
*
* @see #extendDescription(ToStringBuilder)
*/
@@ -437,29 +435,27 @@
/**
* Gets the visit object from the
- * {@link org.apache.tapestry.engine.state.ApplicationStateManager},
- * creating it if it does not already exist.
+ * {@link org.apache.tapestry.engine.state.ApplicationStateManager}, creating it if it does not
+ * already exist.
* <p>
- * As of Tapestry 4.0, this will always create the visit object, possibly
- * creating a new session in the process.
+ * As of Tapestry 4.0, this will always create the visit object, possibly creating a new session
+ * in the process.
*/
public Object getVisit()
{
- return _infrastructure.getApplicationStateManager().get(
- VISIT_OBJECT_NAME);
+ return _infrastructure.getApplicationStateManager().get("visit");
}
public void setVisit(Object visit)
{
- _infrastructure.getApplicationStateManager().store(VISIT_OBJECT_NAME,
- visit);
+ _infrastructure.getApplicationStateManager().store("visit", visit);
}
/**
* Gets the visit object from the
- * {@link org.apache.tapestry.engine.state.ApplicationStateManager}, which
- * will create it as necessary.
+ * {@link org.apache.tapestry.engine.state.ApplicationStateManager}, which will create it as
+ * necessary.
*/
public Object getVisit(IRequestCycle cycle)
@@ -469,17 +465,16 @@
public boolean getHasVisit()
{
- return _infrastructure.getApplicationStateManager().exists(
- VISIT_OBJECT_NAME);
+ return _infrastructure.getApplicationStateManager().exists("visit");
}
/**
- * Returns the global object for the application. The global object is
- * created at the start of the request ({@link #setupForRequest(RequestContext)}invokes
+ * Returns the global object for the application. The global object is created at the start of
+ * the request ({@link #setupForRequest(RequestContext)}invokes
* {@link #createGlobal(RequestContext)}if needed), and is stored into the
- * {@link ServletContext}. All instances of the engine for the application
- * share the global object; however, the global object is explicitly
- * <em>not</em> replicated to other servers within a cluster.
+ * {@link ServletContext}. All instances of the engine for the application share the global
+ * object; however, the global object is explicitly <em>not</em> replicated to other servers
+ * within a cluster.
*
* @since 2.3
*/
@@ -503,29 +498,26 @@
public ListenerMap getListeners()
{
if (_listeners == null)
- _listeners = _infrastructure.getListenerMapSource()
- .getListenerMapForObject(this);
+ _listeners = _infrastructure.getListenerMapSource().getListenerMapForObject(this);
return _listeners;
}
/**
- * Invoked when a {@link RedirectException} is thrown during the processing
- * of a request.
+ * Invoked when a {@link RedirectException} is thrown during the processing of a request.
*
* @throws ApplicationRuntimeException
- * if an {@link IOException},{@link ServletException}is
- * thrown by the redirect, or if no {@link RequestDispatcher}can
- * be found for local resource.
+ * if an {@link IOException},{@link ServletException}is thrown by the redirect,
+ * or if no {@link RequestDispatcher}can be found for local resource.
* @since 2.2
*/
- protected void handleRedirectException(IRequestCycle cycle,
- RedirectException redirectException)
+ protected void handleRedirectException(IRequestCycle cycle, RedirectException redirectException)
{
String location = redirectException.getRedirectLocation();
- if (LOG.isDebugEnabled()) LOG.debug("Redirecting to: " + location);
+ if (LOG.isDebugEnabled())
+ LOG.debug("Redirecting to: " + location);
_infrastructure.getRequest().forward(location);
}
@@ -556,4 +548,4 @@
{
return _infrastructure.getOutputEncoding();
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ActionService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ActionService.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ActionService.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ActionService.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.
@@ -34,8 +34,8 @@
/**
* A context-sensitive service related to {@link org.apache.tapestry.form.Form}and
- * {@link org.apache.tapestry.link.ActionLink}. Encodes the page, component and
- * an action id in the service context.
+ * {@link org.apache.tapestry.link.ActionLink}. Encodes the page, component and an action id in the
+ * service context.
*
* @author Howard Lewis Ship
* @since 1.0.9
@@ -44,10 +44,6 @@
public class ActionService implements IEngineService
{
-
- /** @since 4.0 */
- private static final String ACTION = "action";
-
/** @since 4.0 */
private ResponseRenderer _responseRenderer;
@@ -55,6 +51,9 @@
private LinkFactory _linkFactory;
/** @since 4.0 */
+ private static final String ACTION = "action";
+
+ /** @since 4.0 */
private WebRequest _request;
/** @since 4.0 */
@@ -64,7 +63,7 @@
{
Defense.isAssignable(parameter, ActionServiceParameter.class, "parameter");
- ActionServiceParameter asp = (ActionServiceParameter)parameter;
+ ActionServiceParameter asp = (ActionServiceParameter) parameter;
IComponent component = asp.getComponent();
IPage activePage = _requestCycle.getPage();
@@ -76,15 +75,15 @@
parameters.put(ServiceConstants.COMPONENT, component.getIdPath());
parameters.put(ServiceConstants.PAGE, activePage.getPageName());
- parameters.put(ServiceConstants.CONTAINER, activePage == componentPage ? null : componentPage.getPageName());
+ parameters.put(ServiceConstants.CONTAINER, activePage == componentPage ? null
+ : componentPage.getPageName());
parameters.put(ACTION, asp.getActionId());
parameters.put(ServiceConstants.SESSION, stateful ? "T" : null);
return _linkFactory.constructLink(this, post, parameters, true);
}
- public void service(IRequestCycle cycle)
- throws IOException
+ public void service(IRequestCycle cycle) throws IOException
{
String componentId = cycle.getParameter(ServiceConstants.COMPONENT);
String componentPageName = cycle.getParameter(ServiceConstants.CONTAINER);
@@ -106,12 +105,13 @@
try
{
- action = (IAction)component;
+ action = (IAction) component;
}
catch (ClassCastException ex)
{
- throw new ApplicationRuntimeException(EngineMessages.wrongComponentType(component, IAction.class),
- component, null, ex);
+ throw new ApplicationRuntimeException(EngineMessages.wrongComponentType(
+ component,
+ IAction.class), component, null, ex);
}
// Only perform the stateful check if the application was stateful
@@ -122,7 +122,8 @@
WebSession session = _request.getSession(false);
if (session == null || session.isNew())
- throw new StaleSessionException(EngineMessages.requestStateSession(component), componentPage);
+ throw new StaleSessionException(EngineMessages.requestStateSession(component),
+ componentPage);
}
@@ -164,4 +165,4 @@
{
_requestCycle = requestCycle;
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ActionServiceParameter.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ActionServiceParameter.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ActionServiceParameter.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ActionServiceParameter.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.
@@ -49,4 +49,4 @@
{
return _component;
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/BaseEngine.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/BaseEngine.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/BaseEngine.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/BaseEngine.java Sat Mar 11 12:54:27 2006
@@ -39,4 +39,4 @@
return Collections.EMPTY_LIST;
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/DefaultMonitorFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/DefaultMonitorFactory.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/DefaultMonitorFactory.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/DefaultMonitorFactory.java Sat Mar 11 12:54:27 2006
@@ -34,4 +34,4 @@
{
return _shared;
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/DefaultScriptSource.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/DefaultScriptSource.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/DefaultScriptSource.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/DefaultScriptSource.java Sat Mar 11 12:54:27 2006
@@ -116,4 +116,4 @@
{
_serviceId = serviceId;
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/DirectService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/DirectService.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/DirectService.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/DirectService.java Sat Mar 11 12:54:27 2006
@@ -52,12 +52,8 @@
protected WebRequest _request;
/** @since 4.0 */
- protected IRequestCycle _requestCycle;
+ private IRequestCycle _requestCycle;
- /**
- *
- * {@inheritDoc}
- */
public ILink getLink(boolean post, Object parameter)
{
Defense.isAssignable(parameter, DirectServiceParameter.class, "parameter");
@@ -76,25 +72,21 @@
IPage activePage = _requestCycle.getPage();
IPage componentPage = component.getPage();
-
+
Map parameters = new HashMap();
-
+
boolean stateful = _request.getSession(false) != null;
-
+
parameters.put(ServiceConstants.PAGE, activePage.getPageName());
parameters.put(ServiceConstants.COMPONENT, component.getIdPath());
parameters.put(ServiceConstants.CONTAINER, componentPage == activePage ? null
: componentPage.getPageName());
parameters.put(ServiceConstants.SESSION, stateful ? "T" : null);
parameters.put(ServiceConstants.PARAMETER, dsp.getServiceParameters());
-
+
return _linkFactory.constructLink(this, post, parameters, true);
}
- /**
- *
- * {@inheritDoc}
- */
public void service(IRequestCycle cycle) throws IOException
{
String componentId = cycle.getParameter(ServiceConstants.COMPONENT);
@@ -182,4 +174,4 @@
{
_requestCycle = requestCycle;
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/DirectServiceParameter.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/DirectServiceParameter.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/DirectServiceParameter.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/DirectServiceParameter.java Sat Mar 11 12:54:27 2006
@@ -51,4 +51,4 @@
{
return _serviceParameters;
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/EngineMessages.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/EngineMessages.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/EngineMessages.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/EngineMessages.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.
@@ -16,7 +16,6 @@
import java.util.List;
-import org.apache.hivemind.Messages;
import org.apache.hivemind.impl.MessageFormatter;
import org.apache.tapestry.IComponent;
import org.apache.tapestry.IPage;
@@ -25,39 +24,34 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
-public final class EngineMessages
+public class EngineMessages
{
-
- private static final Messages MESSAGES = new MessageFormatter(EngineMessages.class);
-
- /** @since 4.1 */
- private EngineMessages()
- {
- }
+ private final static MessageFormatter _formatter = new MessageFormatter(EngineMessages.class);
public static String serviceNoParameter(IEngineService service)
{
- return MESSAGES.format("service-no-parameter", service.getName());
+ return _formatter.format("service-no-parameter", service.getName());
}
public static String wrongComponentType(IComponent component, Class expectedType)
{
- return MESSAGES.format("wrong-component-type", component.getExtendedId(), expectedType.getName());
+ return _formatter.format("wrong-component-type", component.getExtendedId(), expectedType
+ .getName());
}
public static String requestStateSession(IComponent component)
{
- return MESSAGES.format("request-stale-session", component.getExtendedId());
+ return _formatter.format("request-stale-session", component.getExtendedId());
}
public static String pageNotCompatible(IPage page, Class expectedType)
{
- return MESSAGES.format("page-not-compatible", page.getPageName(), expectedType.getName());
+ return _formatter.format("page-not-compatible", page.getPageName(), expectedType.getName());
}
static String exceptionDuringCleanup(Throwable cause)
{
- return MESSAGES.format("exception-during-cleanup", cause);
+ return _formatter.format("exception-during-cleanup", cause);
}
static String validateCycle(List pageNames)
@@ -65,13 +59,14 @@
StringBuffer buffer = new StringBuffer();
int count = pageNames.size();
- for(int i = 0; i < count; i++)
+ for (int i = 0; i < count; i++)
{
- if (i > 0) buffer.append("; ");
+ if (i > 0)
+ buffer.append("; ");
buffer.append(pageNames.get(i));
}
- return MESSAGES.format("validate-cycle", buffer);
+ return _formatter.format("validate-cycle", buffer);
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/EngineServiceLink.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/EngineServiceLink.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/EngineServiceLink.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/EngineServiceLink.java Sat Mar 11 12:54:27 2006
@@ -39,6 +39,7 @@
public class EngineServiceLink implements ILink
{
private static final int DEFAULT_HTTP_PORT = 80;
+ private static final int DEFAULT_HTTPS_PORT = 443;
private final IRequestCycle _cycle;
@@ -123,28 +124,25 @@
boolean includeParameters)
{
StringBuffer buffer = new StringBuffer();
- String schemeParm = scheme;
- String serverParm = server;
- int portParm = port;
-
- if (schemeParm == null)
- schemeParm = _request.getScheme();
- buffer.append(schemeParm);
+ if (scheme == null)
+ scheme = _request.getScheme();
+
+ buffer.append(scheme);
buffer.append("://");
- if (serverParm == null)
- serverParm = _request.getServerName();
+ if (server == null)
+ server = _request.getServerName();
- buffer.append(serverParm);
+ buffer.append(server);
- if (portParm == 0)
- portParm = _request.getServerPort();
+ if (port == 0)
+ port = _request.getServerPort();
- if (!(schemeParm.equals("http") && portParm == DEFAULT_HTTP_PORT))
+ if (!(scheme.equals("http") && port == DEFAULT_HTTP_PORT))
{
buffer.append(':');
- buffer.append(portParm);
+ buffer.append(port);
}
// Add the servlet path and the rest of the URL & query parameters.
@@ -168,8 +166,7 @@
String result = buffer.toString();
- if (_stateful)
- result = _cycle.encodeURL(result);
+ result = _cycle.encodeURL(result);
return result;
}
@@ -223,4 +220,4 @@
{
return _parameters.getParameterValues(name);
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/EngineUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/EngineUtils.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/EngineUtils.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/EngineUtils.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,11 +22,9 @@
* @author Howard M. Lewis Ship
* @since 4.0
*/
-public final class EngineUtils
+public class EngineUtils
{
- /** @since 4.1 */
- private EngineUtils(){}
-
+
/**
* Invoked by {@link #getURL(String, String, int, String, boolean)} to see if an absolute URL is
* needed (because a specific scheme, server or port was indicated that does not match the
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ExternalService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ExternalService.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ExternalService.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ExternalService.java Sat Mar 11 12:54:27 2006
@@ -92,7 +92,7 @@
* <td> other chars</td>
* <td> <tt>String</tt> without truncation of first char</td>
* </tr>
- * </table>
+ * <table>
* <p>
* <p>
* A good rule of thumb is to keep the information encoded in the URL short and simple, and restrict
@@ -179,4 +179,4 @@
{
_linkFactory = linkFactory;
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ExternalServiceParameter.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ExternalServiceParameter.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ExternalServiceParameter.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ExternalServiceParameter.java Sat Mar 11 12:54:27 2006
@@ -50,4 +50,4 @@
{
return _serviceParameters;
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/HomeService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/HomeService.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/HomeService.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/HomeService.java Sat Mar 11 12:54:27 2006
@@ -93,4 +93,4 @@
{
return _pageName;
}
-}
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IComponentClassEnhancer.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IComponentClassEnhancer.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IComponentClassEnhancer.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IComponentClassEnhancer.java Sat Mar 11 12:54:27 2006
@@ -44,5 +44,5 @@
* if the class does not exist, is invalid, or may not be enhanced.
*/
- Class getEnhancedClass(IComponentSpecification specification, String className);
-}
+ public Class getEnhancedClass(IComponentSpecification specification, String className);
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IEngineService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IEngineService.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IEngineService.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IEngineService.java Sat Mar 11 12:54:27 2006
@@ -48,7 +48,7 @@
* {@link javax.servlet.http.HttpServletResponse#encodeURL(java.lang.String)}.
*/
- ILink getLink(boolean post, Object parameter);
+ public ILink getLink(boolean post, Object parameter);
/**
* Perform the service, interpreting the URL (from the
@@ -60,7 +60,7 @@
* @see org.apache.tapestry.IEngine#service(org.apache.tapestry.request.RequestContext)
*/
- void service(IRequestCycle cycle) throws IOException;
+ public void service(IRequestCycle cycle) throws IOException;
/**
* Returns the name of the service.
@@ -68,5 +68,5 @@
* @since 1.0.1
*/
- String getName();
-}
+ public String getName();
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ILink.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ILink.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ILink.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ILink.java Sat Mar 11 12:54:27 2006
@@ -38,7 +38,7 @@
* @return the relative URL, with no anchor, but including query parameters.
*/
- String getURL();
+ public String getURL();
/**
* Returns the relative URL as a String. This is used for most links.
@@ -49,14 +49,14 @@
* if true, parameters are included
*/
- String getURL(String anchor, boolean includeParameters);
+ public String getURL(String anchor, boolean includeParameters);
/**
* Returns the absolute URL as a String, using default scheme, server and port, including
* parameters, and no anchor.
*/
- String getAbsoluteURL();
+ public String getAbsoluteURL();
/**
* Returns the absolute URL as a String.
@@ -73,7 +73,7 @@
* if true, parameters are included
*/
- String getAbsoluteURL(String scheme, String server, int port, String anchor,
+ public String getAbsoluteURL(String scheme, String server, int port, String anchor,
boolean includeParameters);
/**
@@ -95,7 +95,7 @@
* @since 4.0
*/
- String getURL(String scheme, String server, int port, String anchor,
+ public String getURL(String scheme, String server, int port, String anchor,
boolean includeParameters);
/**
@@ -104,12 +104,12 @@
* @see #getParameterValues(String)
*/
- String[] getParameterNames();
+ public String[] getParameterNames();
/**
* Returns the values for the named parameter. Will return null if the no value is defined for
* the parameter.
*/
- String[] getParameterValues(String name);
-}
+ public String[] getParameterValues(String name);
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IMonitor.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IMonitor.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IMonitor.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IMonitor.java Sat Mar 11 12:54:27 2006
@@ -28,63 +28,63 @@
* Invoked before constructing a page.
*/
- void pageCreateBegin(String pageName);
+ public void pageCreateBegin(String pageName);
/**
* Invoked after successfully constructing a page and all of its components.
*/
- void pageCreateEnd(String pageName);
+ public void pageCreateEnd(String pageName);
/**
* Invoked when a page is loaded. This includes time to locate or create an instance of the page
* and rollback its state (to any previously recorded value).
*/
- void pageLoadBegin(String pageName);
+ public void pageLoadBegin(String pageName);
/**
* Invoked once a page is completely loaded and rolled back to its prior state.
*/
- void pageLoadEnd(String pageName);
+ public void pageLoadEnd(String pageName);
/**
* Invoked before a page render begins.
*/
- void pageRenderBegin(String pageName);
+ public void pageRenderBegin(String pageName);
/**
* Invoked after a page has succesfully rendered.
*/
- void pageRenderEnd(String pageName);
+ public void pageRenderEnd(String pageName);
/**
* Invoked before a page rewind (to respond to an action) begins.
*/
- void pageRewindBegin(String pageName);
+ public void pageRewindBegin(String pageName);
/**
* Invoked after a page has succesfully been rewound (which includes any activity related to the
* action listener).
*/
- void pageRewindEnd(String pageName);
+ public void pageRewindEnd(String pageName);
/**
* Invoked when a service begins processing.
*/
- void serviceBegin(String serviceName, String detailMessage);
+ public void serviceBegin(String serviceName, String detailMessage);
/**
* Invoked when a service successfully ends.
*/
- void serviceEnd(String serviceName);
+ public void serviceEnd(String serviceName);
/**
* Invoked when a service throws an exception rather than completing normally. Processing of the
@@ -93,12 +93,12 @@
* serviceException() is always invoked <em>before</em> {@link #serviceEnd(String)}.
*/
- void serviceException(Throwable exception);
+ public void serviceException(Throwable exception);
/**
* Invoked when a session is initiated. This is typically done from the implementation of the
* home service.
*/
- void sessionBegin();
-}
+ public void sessionBegin();
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IMonitorFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IMonitorFactory.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IMonitorFactory.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IMonitorFactory.java Sat Mar 11 12:54:27 2006
@@ -33,5 +33,5 @@
* may be invoked by multiple threads.
*/
- IMonitor createMonitor(WebRequest request);
-}
+ public IMonitor createMonitor(WebRequest request);
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IPageLoader.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IPageLoader.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IPageLoader.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IPageLoader.java Sat Mar 11 12:54:27 2006
@@ -40,7 +40,7 @@
* @since 3.0
*/
- IComponent createImplicitComponent(IRequestCycle cycle, IComponent container, String componentId,
+ public IComponent createImplicitComponent(IRequestCycle cycle, IComponent container, String componentId,
String componentType, Location location);
/**
@@ -60,7 +60,7 @@
* the specification for the page
*/
- IPage loadPage(String name, INamespace namespace, IRequestCycle cycle, IComponentSpecification specification);
+ public IPage loadPage(String name, INamespace namespace, IRequestCycle cycle, IComponentSpecification specification);
/**
* Invoked by a component (from within its
@@ -71,5 +71,5 @@
* @see ITemplateComponent
* @since 4.0
*/
- void loadTemplateForComponent(IRequestCycle cycle, ITemplateComponent component);
-}
+ public void loadTemplateForComponent(IRequestCycle cycle, ITemplateComponent component);
+}
\ No newline at end of file
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IPageRecorder.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IPageRecorder.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IPageRecorder.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IPageRecorder.java Sat Mar 11 12:54:27 2006
@@ -37,7 +37,7 @@
* After commiting, a page recorder automatically locks itself.
*/
- void commit();
+ public void commit();
/**
* Rolls back the page to the currently persisted state.
@@ -47,5 +47,5 @@
* {@link org.apache.tapestry.event.PageDetachListener#pageDetached(org.apache.tapestry.event.PageEvent)}.
*/
- void rollback(IPage page);
-}
+ public void rollback(IPage page);
+}
\ 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