You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2008/05/07 16:56:06 UTC
svn commit: r654133 [1/3] - in /tapestry/tapestry5/trunk:
tapestry-core/src/main/java/org/apache/tapestry/corelib/data/
tapestry-core/src/main/java/org/apache/tapestry/corelib/internal/
tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/ ta...
Author: hlship
Date: Wed May 7 07:55:59 2008
New Revision: 654133
URL: http://svn.apache.org/viewvc?rev=654133&view=rev
Log:
Remove leading underscores from field names
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/data/GridPagerPosition.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/internal/FormSupportAdapter.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/internal/FormSupportImpl.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/internal/WrappedComponentAction.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/Autocomplete.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/RenderDisabled.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/RenderInformals.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/TriggerFragment.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/ExceptionReport.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/PropertyDisplayBlocks.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/PropertyEditBlocks.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/ServiceStatus.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/CData.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Comment.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/DTD.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/DefaultMarkupModel.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Document.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Element.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Node.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Raw.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Text.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/grid/SortConstraint.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/DefaultValidationDecorator.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/InternalConstants.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/KeyValue.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/OptionGroupModelImpl.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/OptionModelImpl.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SelectModelImpl.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/ServletContextSymbolProvider.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SingleKeySymbolProvider.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SyntheticModuleDef.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SyntheticSymbolSourceContributionDef.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/TapestryAppInitializer.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/TapestryInternalUtils.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/URLEventContext.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/beaneditor/BeanModelImpl.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/beaneditor/PropertyModelImpl.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/bindings/AssetBindingFactory.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/bindings/BlockBinding.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/bindings/ComponentBinding.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/bindings/LiteralBinding.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/bindings/NullFieldStrategyBindingFactory.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/bindings/PropBinding.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/bindings/PropBindingFactory.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/bindings/RenderVariableBinding.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/bindings/TranslateBindingFactory.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/bindings/ValidateBindingFactory.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/event/InvalidationEventHubImpl.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/grid/CollectionGridDataSource.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/model/MutableComponentModelImpl.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/model/MutableEmbeddedComponentModelImpl.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/model/ParameterModelImpl.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/parser/AttributeToken.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/parser/BlockToken.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/parser/CDATAToken.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/parser/CommentToken.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/parser/ComponentTemplate.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/parser/ComponentTemplateImpl.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/parser/DTDToken.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/parser/DefineNamespacePrefixToken.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/parser/ExpansionToken.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/parser/ParameterToken.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/parser/StartComponentToken.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/parser/StartElementToken.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/parser/TemplateToken.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/parser/TextToken.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/renderers/ComponentResourcesRenderer.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/renderers/EventContextRenderer.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/renderers/ListRenderer.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/renderers/LocationRenderer.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/renderers/ObjectArrayRenderer.java
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/IntegrationTests.java
tapestry/tapestry5/trunk/tapestry-tutorial1/src/site/apt/index.apt
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/data/GridPagerPosition.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/data/GridPagerPosition.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/data/GridPagerPosition.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/data/GridPagerPosition.java Wed May 7 07:55:59 2008
@@ -41,24 +41,24 @@
*/
NONE(false, false);
- private final boolean _matchTop;
+ private final boolean matchTop;
- private final boolean _matchBottom;
+ private final boolean matchBottom;
private GridPagerPosition(boolean matchTop, boolean matchBottom)
{
- _matchTop = matchTop;
- _matchBottom = matchBottom;
+ this.matchTop = matchTop;
+ this.matchBottom = matchBottom;
}
public boolean isMatchBottom()
{
- return _matchBottom;
+ return matchBottom;
}
public boolean isMatchTop()
{
- return _matchTop;
+ return matchTop;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/internal/FormSupportAdapter.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/internal/FormSupportAdapter.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/internal/FormSupportAdapter.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/internal/FormSupportAdapter.java Wed May 7 07:55:59 2008
@@ -24,45 +24,45 @@
*/
public class FormSupportAdapter implements FormSupport
{
- private final FormSupport _delegate;
+ private final FormSupport delegate;
public FormSupportAdapter(FormSupport delegate)
{
- _delegate = delegate;
+ this.delegate = delegate;
}
public String allocateControlName(String id)
{
- return _delegate.allocateControlName(id);
+ return delegate.allocateControlName(id);
}
public <T> void store(T component, ComponentAction<T> action)
{
- _delegate.store(component, action);
+ delegate.store(component, action);
}
public <T> void storeAndExecute(T component, ComponentAction<T> action)
{
- _delegate.storeAndExecute(component, action);
+ delegate.storeAndExecute(component, action);
}
public void defer(Runnable command)
{
- _delegate.defer(command);
+ delegate.defer(command);
}
public void setEncodingType(String encodingType)
{
- _delegate.setEncodingType(encodingType);
+ delegate.setEncodingType(encodingType);
}
public void addValidation(Field field, String validationName, String message, Object constraint)
{
- _delegate.addValidation(field, validationName, message, constraint);
+ delegate.addValidation(field, validationName, message, constraint);
}
public String getClientId()
{
- return _delegate.getClientId();
+ return delegate.getClientId();
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/internal/FormSupportImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/internal/FormSupportImpl.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/internal/FormSupportImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/internal/FormSupportImpl.java Wed May 7 07:55:59 2008
@@ -17,8 +17,8 @@
import org.apache.tapestry.ComponentAction;
import org.apache.tapestry.Field;
import org.apache.tapestry.internal.services.ClientBehaviorSupport;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newList;
-import static org.apache.tapestry.ioc.internal.util.Defense.*;
+import org.apache.tapestry.ioc.internal.util.CollectionFactory;
+import org.apache.tapestry.ioc.internal.util.Defense;
import org.apache.tapestry.ioc.internal.util.IdAllocator;
import org.apache.tapestry.runtime.Component;
import org.apache.tapestry.services.FormSupport;
@@ -35,19 +35,19 @@
*/
public class FormSupportImpl implements FormSupport
{
- private final ClientBehaviorSupport _clientBehaviorSupport;
+ private final ClientBehaviorSupport clientBehaviorSupport;
- private final boolean _clientValidationEnabled;
+ private final boolean clientValidationEnabled;
- private final IdAllocator _idAllocator;
+ private final IdAllocator idAllocator;
- private final String _clientId;
+ private final String clientId;
- private final ObjectOutputStream _actions;
+ private final ObjectOutputStream actions;
- private List<Runnable> _commands;
+ private List<Runnable> commands;
- private String _encodingType;
+ private String encodingType;
/**
* Constructor used when processing a form submission.
@@ -72,27 +72,27 @@
public FormSupportImpl(String clientId, ObjectOutputStream actions, ClientBehaviorSupport clientBehaviorSupport,
boolean clientValidationEnabled, IdAllocator idAllocator)
{
- _clientId = clientId;
- _actions = actions;
- _clientBehaviorSupport = clientBehaviorSupport;
- _clientValidationEnabled = clientValidationEnabled;
- _idAllocator = idAllocator;
+ this.clientId = clientId;
+ this.actions = actions;
+ this.clientBehaviorSupport = clientBehaviorSupport;
+ this.clientValidationEnabled = clientValidationEnabled;
+ this.idAllocator = idAllocator;
}
public String getFormId()
{
- return _clientId;
+ return clientId;
}
public String allocateControlName(String id)
{
- return _idAllocator.allocateId(id);
+ return idAllocator.allocateId(id);
}
public <T> void store(T component, ComponentAction<T> action)
{
- Component castComponent = cast(component, Component.class, "component");
- notNull(action, "action");
+ Component castComponent = Defense.cast(component, Component.class, "component");
+ Defense.notNull(action, "action");
String completeId = castComponent.getComponentResources().getCompleteId();
@@ -100,8 +100,8 @@
{
// Writing the complete id is not very efficient, but the GZip filter
// should help out there.
- _actions.writeUTF(completeId);
- _actions.writeObject(action);
+ actions.writeUTF(completeId);
+ actions.writeObject(action);
}
catch (IOException ex)
{
@@ -118,45 +118,45 @@
public void defer(Runnable command)
{
- if (_commands == null) _commands = newList();
+ if (commands == null) commands = CollectionFactory.newList();
- _commands.add(notNull(command, "command"));
+ commands.add(Defense.notNull(command, "command"));
}
public void executeDeferred()
{
- if (_commands == null) return;
+ if (commands == null) return;
- for (Runnable r : _commands)
+ for (Runnable r : commands)
r.run();
- _commands.clear();
+ commands.clear();
}
public String getClientId()
{
- return _clientId;
+ return clientId;
}
public String getEncodingType()
{
- return _encodingType;
+ return encodingType;
}
public void setEncodingType(String encodingType)
{
- notBlank(encodingType, "encodingType");
+ Defense.notBlank(encodingType, "encodingType");
- if (_encodingType != null && !_encodingType.equals(encodingType))
- throw new IllegalStateException(InternalMessages.conflictingEncodingType(_encodingType, encodingType));
+ if (this.encodingType != null && !this.encodingType.equals(encodingType))
+ throw new IllegalStateException(InternalMessages.conflictingEncodingType(this.encodingType, encodingType));
- _encodingType = encodingType;
+ this.encodingType = encodingType;
}
public void addValidation(Field field, String validationName, String message, Object constraint)
{
- if (_clientValidationEnabled)
- _clientBehaviorSupport.addValidation(field, validationName, message, constraint);
+ if (clientValidationEnabled)
+ clientBehaviorSupport.addValidation(field, validationName, message, constraint);
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/internal/WrappedComponentAction.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/internal/WrappedComponentAction.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/internal/WrappedComponentAction.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/internal/WrappedComponentAction.java Wed May 7 07:55:59 2008
@@ -27,9 +27,9 @@
*/
public class WrappedComponentAction implements Serializable
{
- private final String _componentId;
+ private final String componentId;
- private final ComponentAction _action;
+ private final ComponentAction action;
public WrappedComponentAction(Component component, ComponentAction action)
{
@@ -42,8 +42,8 @@
*/
public WrappedComponentAction(String componentId, ComponentAction action)
{
- _componentId = componentId;
- _action = action;
+ this.componentId = componentId;
+ this.action = action;
}
/**
@@ -53,8 +53,8 @@
*/
public void execute(ComponentSource source)
{
- Component component = source.getComponent(_componentId);
+ Component component = source.getComponent(componentId);
- _action.execute(component);
+ action.execute(component);
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/Autocomplete.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/Autocomplete.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/Autocomplete.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/Autocomplete.java Wed May 7 07:55:59 2008
@@ -62,35 +62,35 @@
* The field component to which this mixin is attached.
*/
@InjectContainer
- private Field _field;
+ private Field field;
@Inject
- private ComponentResources _resources;
+ private ComponentResources resources;
@Environmental
- private PageRenderSupport _pageRenderSupport;
+ private PageRenderSupport pageRenderSupport;
@Inject
- private Request _request;
+ private Request request;
@Inject
- private TypeCoercer _coercer;
+ private TypeCoercer coercer;
@Inject
- private MarkupWriterFactory _factory;
+ private MarkupWriterFactory factory;
@Inject
@Path("classpath:org/apache/tapestry/ajax-loader.gif")
- private Asset _loader;
+ private Asset loader;
/**
* Overwrites the default minimum characters to trigger a server round trip (the default is 1).
*/
@Parameter(defaultPrefix = TapestryConstants.LITERAL_BINDING_PREFIX)
- private int _minChars;
+ private int minChars;
@Inject
- private ResponseRenderer _responseRenderer;
+ private ResponseRenderer responseRenderer;
/**
@@ -98,14 +98,14 @@
* seconds.
*/
@Parameter(defaultPrefix = TapestryConstants.LITERAL_BINDING_PREFIX)
- private double _frequency;
+ private double frequency;
/**
* If given, then the autocompleter will support multiple input values, seperated by any of the individual
* characters in the string.
*/
@Parameter(defaultPrefix = TapestryConstants.LITERAL_BINDING_PREFIX)
- private String _tokens;
+ private String tokens;
/**
* Mixin afterRender phrase occurs after the component itself. This is where we write the <div> element and
@@ -115,7 +115,7 @@
*/
void afterRender(MarkupWriter writer)
{
- String id = _field.getClientId();
+ String id = field.getClientId();
String menuId = id + ":menu";
String loaderId = id + ":loader";
@@ -126,7 +126,7 @@
writer.element("img",
- "src", _loader.toClientURL(),
+ "src", loader.toClientURL(),
"class", TapestryConstants.INVISIBLE_CLASS,
@@ -140,35 +140,35 @@
"class", "t-autocomplete-menu");
writer.end();
- Link link = _resources.createActionLink(EVENT_NAME, false);
+ Link link = resources.createActionLink(EVENT_NAME, false);
JSONObject config = new JSONObject();
config.put("paramName", PARAM_NAME);
config.put("indicator", loaderId);
- if (_resources.isBound("minChars")) config.put("minChars", _minChars);
+ if (resources.isBound("minChars")) config.put("minChars", minChars);
- if (_resources.isBound("frequency")) config.put("frequency", _frequency);
+ if (resources.isBound("frequency")) config.put("frequency", frequency);
- if (_resources.isBound("tokens"))
+ if (resources.isBound("tokens"))
{
- for (int i = 0; i < _tokens.length(); i++)
+ for (int i = 0; i < tokens.length(); i++)
{
- config.accumulate("tokens", _tokens.substring(i, i + 1));
+ config.accumulate("tokens", tokens.substring(i, i + 1));
}
}
// Let subclasses do more.
configure(config);
- _pageRenderSupport.addScript("new Ajax.Autocompleter('%s', '%s', '%s', %s);", id, menuId, link.toAbsoluteURI(),
- config);
+ pageRenderSupport.addScript("new Ajax.Autocompleter('%s', '%s', '%s', %s);", id, menuId, link.toAbsoluteURI(),
+ config);
}
Object onAutocomplete()
{
- String input = _request.getParameter(PARAM_NAME);
+ String input = request.getParameter(PARAM_NAME);
final Holder<List> matchesHolder = Holder.create();
@@ -180,7 +180,7 @@
{
public boolean handleResult(Object result)
{
- List matches = _coercer.coerce(result, List.class);
+ List matches = coercer.coerce(result, List.class);
matchesHolder.put(matches);
@@ -188,11 +188,11 @@
}
};
- _resources.triggerEvent("providecompletions", new Object[] { input }, callback);
+ resources.triggerEvent("providecompletions", new Object[] { input }, callback);
- ContentType contentType = _responseRenderer.findContentType(this);
+ ContentType contentType = responseRenderer.findContentType(this);
- MarkupWriter writer = _factory.newMarkupWriter(contentType);
+ MarkupWriter writer = factory.newMarkupWriter(contentType);
generateResponseMarkup(writer, matchesHolder.get());
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/RenderDisabled.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/RenderDisabled.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/RenderDisabled.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/RenderDisabled.java Wed May 7 07:55:59 2008
@@ -26,11 +26,11 @@
public class RenderDisabled
{
@InjectContainer
- private Field _field;
+ private Field field;
void beginRender(MarkupWriter writer)
{
- if (_field.isDisabled())
+ if (field.isDisabled())
writer.attributes("disabled", "disabled");
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/RenderInformals.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/RenderInformals.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/RenderInformals.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/RenderInformals.java Wed May 7 07:55:59 2008
@@ -38,10 +38,10 @@
public class RenderInformals
{
@Inject
- private ComponentResources _resources;
+ private ComponentResources resources;
void beginRender(MarkupWriter writer)
{
- _resources.renderInformalParameters(writer);
+ resources.renderInformalParameters(writer);
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/TriggerFragment.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/TriggerFragment.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/TriggerFragment.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/mixins/TriggerFragment.java Wed May 7 07:55:59 2008
@@ -17,6 +17,7 @@
import org.apache.tapestry.ClientElement;
import org.apache.tapestry.Field;
import org.apache.tapestry.PageRenderSupport;
+import org.apache.tapestry.TapestryConstants;
import org.apache.tapestry.annotations.Environmental;
import org.apache.tapestry.annotations.InjectContainer;
import org.apache.tapestry.annotations.Parameter;
@@ -37,14 +38,14 @@
/**
* The {@link org.apache.tapestry.corelib.components.FormFragment} instance to make dynamically visible or hidden.
*/
- @Parameter(required = true, defaultPrefix = "component")
- private ClientElement _fragment;
+ @Parameter(required = true, defaultPrefix = TapestryConstants.COMPONENT_BINDING_PREFIX)
+ private ClientElement fragment;
@Environmental
- private PageRenderSupport _pageRenderSupport;
+ private PageRenderSupport pageRenderSupport;
@Environmental
- private Heartbeat _heartbeat;
+ private Heartbeat heartbeat;
void beginRender()
{
@@ -54,15 +55,15 @@
{
JSONArray spec = new JSONArray();
spec.put(_container.getClientId());
- spec.put(_fragment.getClientId());
+ spec.put(fragment.getClientId());
- _pageRenderSupport.addInit("linkTriggerToFormFragment", spec);
+ pageRenderSupport.addInit("linkTriggerToFormFragment", spec);
}
};
// Defer generating the script to ensure that the FormFragment has rendered
// and generated its client id.
- _heartbeat.defer(r);
+ heartbeat.defer(r);
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/ExceptionReport.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/ExceptionReport.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/ExceptionReport.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/ExceptionReport.java Wed May 7 07:55:59 2008
@@ -38,47 +38,48 @@
private static final String PATH_SEPARATOR_PROPERTY = "path.separator";
@Property
- private String _attributeName;
+ private String attributeName;
@Inject
@Property
- private Request _request;
+ private Request request;
@Inject
@Symbol(TapestryConstants.PRODUCTION_MODE_SYMBOL)
@Property(write = false)
- private boolean _productionMode;
+ private boolean productionMode;
@Inject
@Symbol(TapestryConstants.TAPESTRY_VERSION_SYMBOL)
@Property(write = false)
- private String _tapestryVersion;
+ private String tapestryVersion;
@Property(write = false)
- private Throwable _rootException;
+ private Throwable rootException;
@Property
- private String _propertyName;
- private final String _pathSeparator = System.getProperty(PATH_SEPARATOR_PROPERTY);
+ private String propertyName;
+
+ private final String pathSeparator = System.getProperty(PATH_SEPARATOR_PROPERTY);
public void reportException(Throwable exception)
{
- _rootException = exception;
+ rootException = exception;
}
public boolean getHasSession()
{
- return _request.getSession(false) != null;
+ return request.getSession(false) != null;
}
public Session getSession()
{
- return _request.getSession(false);
+ return request.getSession(false);
}
public Object getAttributeValue()
{
- return getSession().getAttribute(_attributeName);
+ return getSession().getAttribute(attributeName);
}
/**
@@ -91,21 +92,21 @@
public String getPropertyValue()
{
- return System.getProperty(_propertyName);
+ return System.getProperty(propertyName);
}
public boolean isSimpleProperty()
{
- if (_propertyName.equals(PATH_SEPARATOR_PROPERTY)) return true;
+ if (propertyName.equals(PATH_SEPARATOR_PROPERTY)) return true;
- return !getPropertyValue().contains(_pathSeparator);
+ return !getPropertyValue().contains(pathSeparator);
}
public String[] getComplexPropertyValue()
{
// Neither : nor ; is a regexp character.
- return getPropertyValue().split(_pathSeparator);
+ return getPropertyValue().split(pathSeparator);
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/PropertyDisplayBlocks.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/PropertyDisplayBlocks.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/PropertyDisplayBlocks.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/PropertyDisplayBlocks.java Wed May 7 07:55:59 2008
@@ -27,20 +27,20 @@
public class PropertyDisplayBlocks
{
@Environmental
- private PropertyOutputContext _context;
+ private PropertyOutputContext context;
@Inject
- private Locale _locale;
+ private Locale locale;
- private final DateFormat _dateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM, _locale);
+ private final DateFormat _dateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM, locale);
public String getConvertedEnumValue()
{
- Enum value = (Enum) _context.getPropertyValue();
+ Enum value = (Enum) context.getPropertyValue();
if (value == null) return null;
- return TapestryInternalUtils.getLabelForEnum(_context.getMessages(), value);
+ return TapestryInternalUtils.getLabelForEnum(context.getMessages(), value);
}
public DateFormat getDateFormat()
@@ -50,7 +50,7 @@
public PropertyOutputContext getContext()
{
- return _context;
+ return context;
}
public Renderable getPasswordRenderer()
@@ -60,7 +60,7 @@
public void render(MarkupWriter writer)
{
- Object value = _context.getPropertyValue();
+ Object value = context.getPropertyValue();
int length = value == null ? 0 : value.toString().length();
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/PropertyEditBlocks.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/PropertyEditBlocks.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/PropertyEditBlocks.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/PropertyEditBlocks.java Wed May 7 07:55:59 2008
@@ -36,76 +36,76 @@
public class PropertyEditBlocks
{
@Environmental
- private PropertyEditContext _context;
+ private PropertyEditContext context;
@Component(
parameters = { "value=context.propertyValue", "label=prop:context.label", "translate=prop:context.translator", "validate=prop:textFieldValidator", "clientId=prop:context.propertyId", "annotationProvider=context" })
- private TextField _textField;
+ private TextField textField;
@Component(
parameters = { "value=context.propertyValue", "label=prop:context.label", "translate=prop:context.translator", "validate=prop:numberFieldValidator", "clientId=prop:context.propertyId", "annotationProvider=context" })
- private TextField _numberField;
+ private TextField numberField;
@Component(
parameters = { "value=context.propertyValue", "label=prop:context.label", "encoder=valueEncoderForProperty", "model=selectModelForProperty", "validate=prop:selectValidator", "clientId=prop:context.propertyId" })
- private Select _select;
+ private Select select;
@SuppressWarnings("unused")
@Component(
parameters = { "value=context.propertyValue", "label=prop:context.label", "clientId=prop:context.propertyId" })
- private Checkbox _checkboxField;
+ private Checkbox checkboxField;
@SuppressWarnings("unused")
@Component(
parameters = { "value=context.propertyValue", "label=prop:context.label", "clientId=prop:context.propertyid", "validate=prop:dateFieldValidator" })
- private DateField _dateField;
+ private DateField dateField;
@Component(
parameters = { "value=context.propertyValue", "label=prop:context.label", "translate=prop:context.translator", "validate=prop:passwordFieldValidator", "clientId=prop:context.propertyId", "annotationProvider=context" })
- private PasswordField _passwordField;
+ private PasswordField passwordField;
@Component(
parameters = { "value=context.propertyValue", "label=prop:context.label", "translate=prop:context.translator", "validate=prop:textAreaValidator", "clientId=prop:context.propertyId", "annotationProvider=context" })
- private TextArea _textArea;
+ private TextArea textArea;
public PropertyEditContext getContext()
{
- return _context;
+ return context;
}
public FieldValidator getTextFieldValidator()
{
- return _context.getValidator(_textField);
+ return context.getValidator(textField);
}
public FieldValidator getNumberFieldValidator()
{
- return _context.getValidator(_numberField);
+ return context.getValidator(numberField);
}
public FieldValidator getPasswordFieldValidator()
{
- return _context.getValidator(_passwordField);
+ return context.getValidator(passwordField);
}
public FieldValidator getTextAreaValidator()
{
- return _context.getValidator(_textArea);
+ return context.getValidator(textArea);
}
public FieldValidator getDateFieldValidator()
{
- return _context.getValidator(_dateField);
+ return context.getValidator(dateField);
}
public FieldValidator getSelectValidator()
{
- return _context.getValidator(_select);
+ return context.getValidator(select);
}
/**
@@ -114,7 +114,7 @@
@SuppressWarnings("unchecked")
public ValueEncoder getValueEncoderForProperty()
{
- return new EnumValueEncoder(_context.getPropertyType());
+ return new EnumValueEncoder(context.getPropertyType());
}
/**
@@ -123,6 +123,6 @@
@SuppressWarnings("unchecked")
public SelectModel getSelectModelForProperty()
{
- return new EnumSelectModel(_context.getPropertyType(), _context.getContainerMessages());
+ return new EnumSelectModel(context.getPropertyType(), context.getContainerMessages());
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/ServiceStatus.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/ServiceStatus.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/ServiceStatus.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/pages/ServiceStatus.java Wed May 7 07:55:59 2008
@@ -15,8 +15,8 @@
package org.apache.tapestry.corelib.pages;
import org.apache.tapestry.ComponentResources;
-import org.apache.tapestry.annotations.Property;
import org.apache.tapestry.annotations.Meta;
+import org.apache.tapestry.annotations.Property;
import org.apache.tapestry.beaneditor.BeanModel;
import org.apache.tapestry.ioc.Registry;
import org.apache.tapestry.ioc.annotations.Inject;
@@ -37,37 +37,36 @@
public class ServiceStatus
{
@Inject
- private ServiceActivityScoreboard _scoreboard;
+ private ServiceActivityScoreboard scoreboard;
@Property
- private List<ServiceActivity> _activity;
+ private List<ServiceActivity> activity;
@Property
- private ServiceActivity _row;
+ private ServiceActivity row;
@Inject
- private BeanModelSource _source;
+ private BeanModelSource source;
@Property
- private final BeanModel _model;
+ private final BeanModel model;
@Inject
- private ComponentResources _resources;
+ private ComponentResources resources;
- public ServiceStatus()
{
- _model = _source.create(ServiceActivity.class, false, _resources);
+ model = source.create(ServiceActivity.class, false, resources);
- _model.add("serviceInterface", null);
+ model.add("serviceInterface", null);
// There's no line number information for interfaces, so we'll reorder the
// propreties manually.
- _model.reorder("serviceId", "serviceInterface", "scope", "status");
+ model.reorder("serviceId", "serviceInterface", "scope", "status");
}
void setupRender()
{
- _activity = _scoreboard.getServiceActivity();
+ activity = scoreboard.getServiceActivity();
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/CData.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/CData.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/CData.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/CData.java Wed May 7 07:55:59 2008
@@ -22,26 +22,27 @@
*/
public class CData extends Node
{
- private final String _content;
- private final Document _document;
+ private final String content;
+
+ private final Document document;
public CData(Node container, Document document, String content)
{
super(container);
- _document = document;
- _content = content;
+ this.document = document;
+ this.content = content;
}
public void toMarkup(PrintWriter writer)
{
- MarkupModel model = _document.getMarkupModel();
+ MarkupModel model = document.getMarkupModel();
if (model.isXML())
{
writer.print("<![CDATA[");
- writer.print(_content);
+ writer.print(content);
writer.print("]]>");
return;
}
@@ -49,9 +50,9 @@
// CDATA not supported, so write it normally, with entities escaped. Create a working
// buffer that's plenty big even if a lot of characters need escaping.
- StringBuilder builder = new StringBuilder(2 * _content.length());
+ StringBuilder builder = new StringBuilder(2 * content.length());
- model.encode(_content, builder);
+ model.encode(content, builder);
writer.print(builder.toString());
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Comment.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Comment.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Comment.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Comment.java Wed May 7 07:55:59 2008
@@ -21,20 +21,20 @@
*/
public final class Comment extends Node
{
- private final String _comment;
+ private final String comment;
Comment(Node container, String comment)
{
super(container);
- _comment = comment;
+ this.comment = comment;
}
@Override
public void toMarkup(PrintWriter writer)
{
writer.print("<!-- ");
- writer.print(_comment);
+ writer.print(comment);
writer.print(" -->");
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/DTD.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/DTD.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/DTD.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/DTD.java Wed May 7 07:55:59 2008
@@ -22,35 +22,35 @@
*/
public class DTD
{
- private final String _name;
+ private final String name;
- private final String _publicId;
+ private final String publicId;
- private final String _systemId;
+ private final String systemId;
public DTD(String name, String publicId, String systemId)
{
- _name = name;
- _publicId = publicId;
- _systemId = systemId;
+ this.name = name;
+ this.publicId = publicId;
+ this.systemId = systemId;
}
public void toMarkup(PrintWriter writer)
{
- if (_publicId != null)
+ if (publicId != null)
{
- if (_systemId != null)
+ if (systemId != null)
{
- writer.printf("<!DOCTYPE %s PUBLIC \"%s\" \"%s\">", _name, _publicId, _systemId);
+ writer.printf("<!DOCTYPE %s PUBLIC \"%s\" \"%s\">", name, publicId, systemId);
}
else
{
- writer.printf("<!DOCTYPE %s PUBLIC \"%s\">", _name, _publicId);
+ writer.printf("<!DOCTYPE %s PUBLIC \"%s\">", name, publicId);
}
}
- else if (_systemId != null)
+ else if (systemId != null)
{
- writer.printf("<!DOCTYPE %s SYSTEM \"%s\">", _name, _systemId);
+ writer.printf("<!DOCTYPE %s SYSTEM \"%s\">", name, systemId);
}
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/DefaultMarkupModel.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/DefaultMarkupModel.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/DefaultMarkupModel.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/DefaultMarkupModel.java Wed May 7 07:55:59 2008
@@ -14,7 +14,7 @@
package org.apache.tapestry.dom;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newSet;
+import org.apache.tapestry.ioc.internal.util.CollectionFactory;
import java.util.Set;
@@ -25,8 +25,9 @@
*/
public class DefaultMarkupModel implements MarkupModel
{
- private final Set<String> EMPTY_ELEMENTS = newSet("base", "br", "col", "frame", "hr", "img", "input", "link",
- "meta", "option", "param");
+ private final Set<String> EMPTY_ELEMENTS = CollectionFactory.newSet("base", "br", "col", "frame", "hr", "img",
+ "input", "link",
+ "meta", "option", "param");
/**
* Passes all characters but '<', '>' and '&' through unchanged.
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Document.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Document.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Document.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Document.java Wed May 7 07:55:59 2008
@@ -23,13 +23,13 @@
*/
public final class Document extends Node
{
- private Element _rootElement;
+ private Element rootElement;
- private DTD _dtd;
+ private DTD dtd;
- private final MarkupModel _model;
+ private final MarkupModel model;
- private final String _encoding;
+ private final String encoding;
public Document(MarkupModel model)
{
@@ -40,8 +40,8 @@
{
super(null);
- _model = model;
- _encoding = encoding;
+ this.model = model;
+ this.encoding = encoding;
}
Document getDocument()
@@ -60,15 +60,15 @@
{
Defense.notBlank(path, "path");
- if (_rootElement == null) return null;
+ if (rootElement == null) return null;
int slashx = path.indexOf("/");
String rootElementName = slashx < 0 ? path : path.substring(0, slashx);
- if (!_rootElement.getName().equals(rootElementName)) return null;
+ if (!rootElement.getName().equals(rootElementName)) return null;
- return slashx < 0 ? _rootElement : _rootElement.find(path.substring(slashx + 1));
+ return slashx < 0 ? rootElement : rootElement.find(path.substring(slashx + 1));
}
/**
@@ -81,7 +81,7 @@
public MarkupModel getMarkupModel()
{
- return _model;
+ return model;
}
/**
@@ -89,9 +89,9 @@
*/
public Element newRootElement(String name)
{
- _rootElement = new Element(this, null, name);
+ rootElement = new Element(this, null, name);
- return _rootElement;
+ return rootElement;
}
/**
@@ -103,46 +103,46 @@
*/
public Element newRootElement(String namespace, String name)
{
- _rootElement = new Element(this, namespace, name);
+ rootElement = new Element(this, namespace, name);
- return _rootElement;
+ return rootElement;
}
@Override
public void toMarkup(PrintWriter writer)
{
- if (_rootElement == null) throw new IllegalStateException(DomMessages.noRootElement());
+ if (rootElement == null) throw new IllegalStateException(DomMessages.noRootElement());
- if (_model.isXML())
+ if (model.isXML())
{
writer.print("<?xml version=\"1.0\"");
- if (_encoding != null) writer.printf(" encoding=\"%s\"", _encoding);
+ if (encoding != null) writer.printf(" encoding=\"%s\"", encoding);
writer.print("?>\n");
}
// TODO: lead-in comments, directives.
- if (_dtd != null)
+ if (dtd != null)
{
- _dtd.toMarkup(writer);
+ dtd.toMarkup(writer);
}
- _rootElement.toMarkup(writer);
+ rootElement.toMarkup(writer);
}
@Override
public String toString()
{
- if (_rootElement == null) return "[empty Document]";
+ if (rootElement == null) return "[empty Document]";
return super.toString();
}
public Element getRootElement()
{
- return _rootElement;
+ return rootElement;
}
/**
@@ -153,11 +153,11 @@
*/
public Element getElementById(String id)
{
- return _rootElement.getElementById(id);
+ return rootElement.getElementById(id);
}
public void dtd(String name, String publicId, String systemId)
{
- _dtd = new DTD(name, publicId, systemId);
+ dtd = new DTD(name, publicId, systemId);
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Element.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Element.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Element.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Element.java Wed May 7 07:55:59 2008
@@ -37,39 +37,39 @@
{
class Attribute
{
- private final String _namespace;
- private final String _name;
- private final String _value;
+ private final String namespace;
+ private final String name;
+ private final String value;
public Attribute(String namespace, String name, String value)
{
- _namespace = namespace;
- _name = name;
- _value = value;
+ this.namespace = namespace;
+ this.name = name;
+ this.value = value;
}
public String getValue()
{
- return _value;
+ return value;
}
void render(MarkupModel model, StringBuilder builder)
{
builder.append(" ");
- builder.append(toPrefixedName(_namespace, _name));
+ builder.append(toPrefixedName(namespace, name));
builder.append("=\"");
- model.encodeQuoted(_value, builder);
+ model.encodeQuoted(value, builder);
builder.append('"');
}
}
- private final String _name;
+ private final String name;
- private Map<String, Attribute> _attributes;
+ private Map<String, Attribute> attributes;
- private Element _parent;
+ private Element parent;
- private final Document _document;
+ private final Document document;
private static final String CLASS_ATTRIBUTE = "class";
@@ -78,9 +78,9 @@
* defines itself, so resolving the namespace to a prefix must wait until render time (since the Element is created
* before the namespaces for it are defined).
*/
- private final String _namespace;
+ private final String namespace;
- private Map<String, String> _namespaceToPrefix;
+ private Map<String, String> namespaceToPrefix;
/**
* Constructor for a root element.
@@ -89,9 +89,9 @@
{
super(container);
- _document = container;
- _namespace = namespace;
- _name = name;
+ document = container;
+ this.namespace = namespace;
+ this.name = name;
}
/**
@@ -101,16 +101,16 @@
{
super(parent);
- _parent = parent;
- _namespace = namespace;
- _name = name;
+ this.parent = parent;
+ this.namespace = namespace;
+ this.name = name;
- _document = parent.getDocument();
+ document = parent.getDocument();
}
public Document getDocument()
{
- return _document;
+ return document;
}
/**
@@ -118,7 +118,7 @@
*/
public Element getParent()
{
- return _parent;
+ return parent;
}
/**
@@ -147,9 +147,9 @@
if (value == null) return;
- if (_attributes == null) _attributes = newMap();
+ if (attributes == null) attributes = newMap();
- if (!_attributes.containsKey(name)) _attributes.put(name, new Attribute(namespace, name, value));
+ if (!attributes.containsKey(name)) attributes.put(name, new Attribute(namespace, name, value));
}
@@ -175,7 +175,7 @@
*/
public void forceAttributes(String... namesAndValues)
{
- if (_attributes == null) _attributes = newMap();
+ if (attributes == null) attributes = newMap();
int i = 0;
@@ -186,11 +186,11 @@
if (value == null)
{
- _attributes.remove(name);
+ attributes.remove(name);
continue;
}
- _attributes.put(name, new Attribute(null, name, value));
+ attributes.put(name, new Attribute(null, name, value));
}
}
@@ -266,7 +266,7 @@
*/
public Text text(String text)
{
- return newChild(new Text(this, _document, text));
+ return newChild(new Text(this, document, text));
}
/**
@@ -277,7 +277,7 @@
*/
public CData cdata(String content)
{
- return newChild(new CData(this, _document, content));
+ return newChild(new CData(this, document, content));
}
@@ -293,19 +293,19 @@
{
StringBuilder builder = new StringBuilder();
- String prefixedElementName = toPrefixedName(_namespace, _name);
+ String prefixedElementName = toPrefixedName(namespace, name);
builder.append("<").append(prefixedElementName);
- MarkupModel markupModel = _document.getMarkupModel();
+ MarkupModel markupModel = document.getMarkupModel();
- if (_attributes != null)
+ if (attributes != null)
{
- List<String> keys = InternalUtils.sortedKeys(_attributes);
+ List<String> keys = InternalUtils.sortedKeys(attributes);
for (String key : keys)
{
- Attribute attribute = _attributes.get(key);
+ Attribute attribute = attributes.get(key);
attribute.render(markupModel, builder);
}
@@ -313,13 +313,13 @@
// Next, emit namespace declarations for each namespace.
- if (_namespaceToPrefix != null)
+ if (namespaceToPrefix != null)
{
- List<String> namespaces = InternalUtils.sortedKeys(_namespaceToPrefix);
+ List<String> namespaces = InternalUtils.sortedKeys(namespaceToPrefix);
for (String namespace : namespaces)
{
- String prefix = _namespaceToPrefix.get(namespace);
+ String prefix = namespaceToPrefix.get(namespace);
builder.append(" xmlns");
@@ -336,7 +336,7 @@
}
}
- EndTagStyle style = markupModel.getEndTagStyle(_name);
+ EndTagStyle style = markupModel.getEndTagStyle(name);
boolean hasChildren = hasChildren();
@@ -444,14 +444,14 @@
public String getAttribute(String attributeName)
{
- Attribute attribute = InternalUtils.get(_attributes, attributeName);
+ Attribute attribute = InternalUtils.get(attributes, attributeName);
return attribute == null ? null : attribute.getValue();
}
public String getName()
{
- return _name;
+ return name;
}
/**
@@ -492,13 +492,13 @@
String toNamespacePrefix(String namespaceURI)
{
- String prefix = InternalUtils.get(_namespaceToPrefix, namespaceURI);
+ String prefix = InternalUtils.get(namespaceToPrefix, namespaceURI);
if (prefix != null) return prefix;
- if (_parent == null) throw new RuntimeException(DomMessages.namespaceURINotMappedToPrefix(namespaceURI));
+ if (parent == null) throw new RuntimeException(DomMessages.namespaceURINotMappedToPrefix(namespaceURI));
- return _parent.toNamespacePrefix(namespaceURI);
+ return parent.toNamespacePrefix(namespaceURI);
}
/**
@@ -515,9 +515,9 @@
Defense.notNull(namespace, "namespace");
Defense.notNull(namespacePrefix, "namespacePrefix");
- if (_namespaceToPrefix == null) _namespaceToPrefix = CollectionFactory.newMap();
+ if (namespaceToPrefix == null) namespaceToPrefix = CollectionFactory.newMap();
- _namespaceToPrefix.put(namespace, namespacePrefix);
+ namespaceToPrefix.put(namespace, namespacePrefix);
return this;
}
@@ -527,6 +527,6 @@
*/
public String getNamespace()
{
- return _namespace;
+ return namespace;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Node.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Node.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Node.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Node.java Wed May 7 07:55:59 2008
@@ -26,9 +26,9 @@
*/
public abstract class Node
{
- private Node _container;
+ private Node container;
- private List<Node> _children;
+ private List<Node> children;
/**
* Creates a new node, setting its container to the provided value. Container may also be null, but that is only
@@ -38,12 +38,12 @@
*/
protected Node(Node container)
{
- _container = container;
+ this.container = container;
}
public Node getContainer()
{
- return _container;
+ return container;
}
/**
@@ -56,28 +56,28 @@
void addChild(Node child)
{
- if (_children == null) _children = newList();
+ if (children == null) children = newList();
- _children.add(child);
+ children.add(child);
}
void insertChildAt(int index, Node child)
{
- if (_children == null) _children = newList();
+ if (children == null) children = newList();
- _children.add(index, child);
+ children.add(index, child);
}
boolean hasChildren()
{
- return _children != null && !_children.isEmpty();
+ return children != null && !children.isEmpty();
}
void writeChildMarkup(PrintWriter writer)
{
- if (_children == null) return;
+ if (children == null) return;
- for (Node child : _children)
+ for (Node child : children)
child.toMarkup(writer);
}
@@ -107,7 +107,7 @@
@SuppressWarnings("unchecked")
public List<Node> getChildren()
{
- return _children == null ? Collections.EMPTY_LIST : _children;
+ return children == null ? Collections.EMPTY_LIST : children;
}
/**
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Raw.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Raw.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Raw.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Raw.java Wed May 7 07:55:59 2008
@@ -21,13 +21,13 @@
*/
public final class Raw extends Node
{
- private final String _text;
+ private final String text;
Raw(Node container, String text)
{
super(container);
- _text = text;
+ this.text = text;
}
/**
@@ -36,7 +36,7 @@
@Override
public void toMarkup(PrintWriter writer)
{
- writer.print(_text);
+ writer.print(text);
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Text.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Text.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Text.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/dom/Text.java Wed May 7 07:55:59 2008
@@ -1,17 +1,17 @@
-// Copyright 2006 The Apache Software Foundation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
+// Copyright 2006 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package org.apache.tapestry.dom;
import java.io.PrintWriter;
@@ -21,17 +21,17 @@
*/
public final class Text extends Node
{
- private final StringBuilder _buffer;
+ private final StringBuilder buffer;
- private final Document _document;
+ private final Document document;
Text(Node container, Document document, String text)
{
super(container);
- _document = document;
+ this.document = document;
- _buffer = new StringBuilder();
+ buffer = new StringBuilder(text.length());
write(text);
}
@@ -41,7 +41,7 @@
*/
public void write(String text)
{
- _document.getMarkupModel().encode(text, _buffer);
+ document.getMarkupModel().encode(text, buffer);
}
public void writef(String format, Object... args)
@@ -52,7 +52,7 @@
@Override
public void toMarkup(PrintWriter writer)
{
- writer.print(_buffer.toString());
+ writer.print(buffer.toString());
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/grid/SortConstraint.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/grid/SortConstraint.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/grid/SortConstraint.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/grid/SortConstraint.java Wed May 7 07:55:59 2008
@@ -22,27 +22,27 @@
*/
public class SortConstraint
{
- private final PropertyModel _propertyModel;
+ private final PropertyModel propertyModel;
- private final ColumnSort _columnSort;
+ private final ColumnSort columnSort;
public SortConstraint(PropertyModel propertyModel, ColumnSort columnSort)
{
Defense.notNull(propertyModel, "propertyModel");
Defense.notNull(columnSort, "columnSort");
- _propertyModel = propertyModel;
- _columnSort = columnSort;
+ this.propertyModel = propertyModel;
+ this.columnSort = columnSort;
}
public PropertyModel getPropertyModel()
{
- return _propertyModel;
+ return propertyModel;
}
public ColumnSort getColumnSort()
{
- return _columnSort;
+ return columnSort;
}
// equals() is useful for testing
@@ -56,8 +56,8 @@
SortConstraint that = (SortConstraint) o;
- if (_columnSort != that._columnSort) return false;
+ if (columnSort != that.columnSort) return false;
- return _propertyModel.equals(that._propertyModel);
+ return propertyModel.equals(that.propertyModel);
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/DefaultValidationDecorator.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/DefaultValidationDecorator.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/DefaultValidationDecorator.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/DefaultValidationDecorator.java Wed May 7 07:55:59 2008
@@ -24,13 +24,13 @@
*/
public final class DefaultValidationDecorator extends BaseValidationDecorator
{
- private final Environment _environment;
+ private final Environment environment;
- private final Asset _iconAsset;
+ private final Asset iconAsset;
- private final Messages _validationMessages;
+ private final Messages validationMessages;
- private final MarkupWriter _markupWriter;
+ private final MarkupWriter markupWriter;
/**
* @param environment used to locate objects and services during the render
@@ -42,10 +42,10 @@
public DefaultValidationDecorator(Environment environment, Messages validationMessages, Asset iconAsset,
MarkupWriter markupWriter)
{
- _environment = environment;
- _validationMessages = validationMessages;
- _iconAsset = iconAsset;
- _markupWriter = markupWriter;
+ this.environment = environment;
+ this.validationMessages = validationMessages;
+ this.iconAsset = iconAsset;
+ this.markupWriter = markupWriter;
}
@Override
@@ -69,27 +69,27 @@
String cssClass = inError(field) ? "t-error-icon" : "t-error-icon t-invisible";
- _markupWriter.element("img",
+ markupWriter.element("img",
- "src", _iconAsset.toClientURL(),
+ "src", iconAsset.toClientURL(),
- "alt", _validationMessages.get("icon-label"),
+ "alt", validationMessages.get("icon-label"),
- "class", cssClass,
+ "class", cssClass,
- "id", iconId);
- _markupWriter.end();
+ "id", iconId);
+ markupWriter.end();
}
private boolean inError(Field field)
{
- ValidationTracker tracker = _environment.peekRequired(ValidationTracker.class);
+ ValidationTracker tracker = environment.peekRequired(ValidationTracker.class);
return tracker.inError(field);
}
private void addErrorClassToCurrentElement()
{
- _markupWriter.getElement().addClassName(TapestryConstants.ERROR_CLASS);
+ markupWriter.getElement().addClassName(TapestryConstants.ERROR_CLASS);
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/InternalConstants.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/InternalConstants.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/InternalConstants.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/InternalConstants.java Wed May 7 07:55:59 2008
@@ -67,16 +67,19 @@
public static final String OBJECT_RENDER_DIV_SECTION = "t-env-data-section";
public static final String MIXINS_SUBPACKAGE = "mixins";
+
public static final String COMPONENTS_SUBPACKAGE = "components";
+
public static final String PAGES_SUBPACKAGE = "pages";
- public static final String BASE_SUBPACKAGE = "base";
+ public static final String BASE_SUBPACKAGE = "base";
/**
* Used in some Ajax scenarios to set the content type for the response early, when the Page instance (the authority
* on content types) is known. The value is of type {@link org.apache.tapestry.ContentType}.
*/
public static final String CONTENT_TYPE_ATTRIBUTE_NAME = "content-type";
+
public static final String CHARSET_CONTENT_TYPE_PARAMETER = "charset";
/**
@@ -91,8 +94,4 @@
* recognize the response as JSON, and the Ajax.Response.responseJSON property will be null.
*/
public static final String JSON_MIME_TYPE = "application/json";
-
- private InternalConstants()
- {
- }
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/KeyValue.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/KeyValue.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/KeyValue.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/KeyValue.java Wed May 7 07:55:59 2008
@@ -19,24 +19,24 @@
*/
public class KeyValue
{
- private final String _key;
+ private final String key;
- private final String _value;
+ private final String value;
public KeyValue(final String key, final String value)
{
- _key = key;
- _value = value;
+ this.key = key;
+ this.value = value;
}
public String getKey()
{
- return _key;
+ return key;
}
public String getValue()
{
- return _value;
+ return value;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/OptionGroupModelImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/OptionGroupModelImpl.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/OptionGroupModelImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/OptionGroupModelImpl.java Wed May 7 07:55:59 2008
@@ -22,13 +22,13 @@
public final class OptionGroupModelImpl implements OptionGroupModel
{
- private final String _label;
+ private final String label;
- private final boolean _disabled;
+ private final boolean disabled;
- private final List<OptionModel> _options;
+ private final List<OptionModel> options;
- private final Map<String, String> _attributes;
+ private final Map<String, String> attributes;
public OptionGroupModelImpl(String label, boolean disabled, List<OptionModel> options,
String... attributeKeysAndValues)
@@ -40,36 +40,36 @@
public OptionGroupModelImpl(String label, boolean disabled, List<OptionModel> options,
Map<String, String> attributes)
{
- _label = label;
- _disabled = disabled;
- _options = options;
- _attributes = attributes;
+ this.label = label;
+ this.disabled = disabled;
+ this.options = options;
+ this.attributes = attributes;
}
public Map<String, String> getAttributes()
{
- return _attributes;
+ return attributes;
}
public String getLabel()
{
- return _label;
+ return label;
}
public List<OptionModel> getOptions()
{
- return _options;
+ return options;
}
public boolean isDisabled()
{
- return _disabled;
+ return disabled;
}
@Override
public String toString()
{
- return String.format("OptionGroupModel[%s]", _label);
+ return String.format("OptionGroupModel[%s]", label);
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/OptionModelImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/OptionModelImpl.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/OptionModelImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/OptionModelImpl.java Wed May 7 07:55:59 2008
@@ -18,9 +18,9 @@
public class OptionModelImpl extends AbstractOptionModel
{
- private final String _label;
+ private final String label;
- private final Object _value;
+ private final Object value;
/**
* Constructor for when the value and the label are the same.
@@ -32,23 +32,23 @@
public OptionModelImpl(String label, Object value)
{
- _label = label;
- _value = value;
+ this.label = label;
+ this.value = value;
}
public String getLabel()
{
- return _label;
+ return label;
}
public Object getValue()
{
- return _value;
+ return value;
}
@Override
public String toString()
{
- return String.format("OptionModel[%s %s]", _label, _value);
+ return String.format("OptionModel[%s %s]", label, value);
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SelectModelImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SelectModelImpl.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SelectModelImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SelectModelImpl.java Wed May 7 07:55:59 2008
@@ -23,15 +23,15 @@
public final class SelectModelImpl extends AbstractSelectModel
{
- private final List<OptionGroupModel> _optionGroups;
+ private final List<OptionGroupModel> optionGroups;
- private final List<OptionModel> _optionModels;
+ private final List<OptionModel> optionModels;
public SelectModelImpl(final List<OptionGroupModel> optionGroups,
final List<OptionModel> optionModels)
{
- _optionGroups = optionGroups;
- _optionModels = optionModels;
+ this.optionGroups = optionGroups;
+ this.optionModels = optionModels;
}
public SelectModelImpl(OptionModel... optionModels)
@@ -46,12 +46,12 @@
public List<OptionGroupModel> getOptionGroups()
{
- return _optionGroups;
+ return optionGroups;
}
public List<OptionModel> getOptions()
{
- return _optionModels;
+ return optionModels;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/ServletContextSymbolProvider.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/ServletContextSymbolProvider.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/ServletContextSymbolProvider.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/ServletContextSymbolProvider.java Wed May 7 07:55:59 2008
@@ -26,19 +26,19 @@
*/
public class ServletContextSymbolProvider implements SymbolProvider
{
- private final Map<String, String> _properties = CollectionFactory.newCaseInsensitiveMap();
+ private final Map<String, String> properties = CollectionFactory.newCaseInsensitiveMap();
public ServletContextSymbolProvider(ServletContext context)
{
for (String name : InternalUtils.toList(context.getInitParameterNames()))
{
- _properties.put(name, context.getInitParameter(name));
+ properties.put(name, context.getInitParameter(name));
}
}
public String valueForSymbol(String symbolName)
{
- return _properties.get(symbolName);
+ return properties.get(symbolName);
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SingleKeySymbolProvider.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SingleKeySymbolProvider.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SingleKeySymbolProvider.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SingleKeySymbolProvider.java Wed May 7 07:55:59 2008
@@ -21,19 +21,19 @@
*/
public class SingleKeySymbolProvider implements SymbolProvider
{
- private final String _symbolName;
+ private final String symbolName;
- private final String _value;
+ private final String value;
public SingleKeySymbolProvider(final String symbolName, final String value)
{
- _symbolName = symbolName;
- _value = value;
+ this.symbolName = symbolName;
+ this.value = value;
}
public String valueForSymbol(String symbolName)
{
- if (_symbolName.equalsIgnoreCase(symbolName)) return _value;
+ if (this.symbolName.equalsIgnoreCase(symbolName)) return value;
return null;
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SyntheticModuleDef.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SyntheticModuleDef.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SyntheticModuleDef.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SyntheticModuleDef.java Wed May 7 07:55:59 2008
@@ -28,11 +28,11 @@
*/
public class SyntheticModuleDef implements ModuleDef
{
- private final Set<ContributionDef> _contributionDefs;
+ private final Set<ContributionDef> contributionDefs;
public SyntheticModuleDef(ContributionDef... contributionDefs)
{
- _contributionDefs = CollectionFactory.newSet(contributionDefs);
+ this.contributionDefs = CollectionFactory.newSet(contributionDefs);
}
/**
@@ -48,7 +48,7 @@
*/
public Set<ContributionDef> getContributionDefs()
{
- return _contributionDefs;
+ return contributionDefs;
}
/**
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SyntheticSymbolSourceContributionDef.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SyntheticSymbolSourceContributionDef.java?rev=654133&r1=654132&r2=654133&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SyntheticSymbolSourceContributionDef.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/SyntheticSymbolSourceContributionDef.java Wed May 7 07:55:59 2008
@@ -23,18 +23,18 @@
*/
public class SyntheticSymbolSourceContributionDef implements ContributionDef
{
- private final String _contributionName;
+ private final String contributionName;
- private final SymbolProvider _provider;
+ private final SymbolProvider provider;
- private final String[] _constraints;
+ private final String[] constraints;
public SyntheticSymbolSourceContributionDef(String contributionName, SymbolProvider provider,
String... constraints)
{
- _contributionName = contributionName;
- _provider = provider;
- _constraints = constraints;
+ this.contributionName = contributionName;
+ this.provider = provider;
+ this.constraints = constraints;
}
public void contribute(ModuleBuilderSource moduleBuilderSource, ObjectLocator locator,
@@ -46,7 +46,7 @@
public void contribute(ModuleBuilderSource moduleBuilderSource, ObjectLocator locator,
OrderedConfiguration configuration)
{
- configuration.add(_contributionName, _provider, _constraints);
+ configuration.add(contributionName, provider, constraints);
}
public void contribute(ModuleBuilderSource moduleBuilderSource, ObjectLocator locator,