You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2008/05/07 03:00:09 UTC

svn commit: r653960 [2/3] - in /tapestry/tapestry5/trunk: tapestry-core/src/main/java/org/apache/tapestry/ tapestry-core/src/main/java/org/apache/tapestry/corelib/base/ tapestry-core/src/main/java/org/apache/tapestry/corelib/components/ tapestry-core/s...

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Form.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Form.java?rev=653960&r1=653959&r2=653960&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Form.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Form.java Tue May  6 18:00:03 2008
@@ -99,12 +99,17 @@
     public static final String FAILURE = "failure";
 
     /**
+     * Query parameter name storing form data (the serialized commands needed to process a form submission).
+     */
+    public static final String FORM_DATA = "t:formdata";
+
+    /**
      * The context for the link (optional parameter). This list of values will be converted into strings and included in
      * the URI. The strings will be coerced back to whatever their values are and made available to event handler
      * methods.
      */
     @Parameter
-    private List<?> _context;
+    private List<?> context;
 
     /**
      * The object which will record user input and validation errors. The object must be persistent between requests
@@ -113,12 +118,7 @@
      * nearly all purposes (except when a Form is rendered inside a loop).
      */
     @Parameter("defaultTracker")
-    private ValidationTracker _tracker;
-
-    /**
-     * Query parameter name storing form data (the serialized commands needed to process a form submission).
-     */
-    public static final String FORM_DATA = "t:formdata";
+    private ValidationTracker tracker;
 
     /**
      * If true (the default) then client validation is enabled for the form, and the default set of JavaScript libraries
@@ -127,72 +127,72 @@
      * many validations are used that do not operate on the client side at all.
      */
     @Parameter("true")
-    private boolean _clientValidation;
+    private boolean clientValidation;
 
     /**
      * Binding the zone parameter will cause the form submission to be handled as an Ajax request that updates the
      * indicated zone.  Often a Form will update the same zone that contains it.
      */
     @Parameter(defaultPrefix = TapestryConstants.LITERAL_BINDING_PREFIX)
-    private String _zone;
+    private String zone;
 
     @Inject
-    private Environment _environment;
+    private Environment environment;
 
     @Inject
-    private ComponentResources _resources;
+    private ComponentResources resources;
 
     @Environmental
-    private PageRenderSupport _pageRenderSupport;
+    private PageRenderSupport pageRenderSupport;
 
     @Inject
-    private Request _request;
+    private Request request;
 
     @Inject
-    private ComponentSource _source;
+    private ComponentSource source;
 
     @Persist(TapestryConstants.FLASH_PERSISTENCE_STRATEGY)
-    private ValidationTracker _defaultTracker;
+    private ValidationTracker defaultTracker;
 
     @Inject
-    private ComponentInvocationMap _componentInvocationMap;
+    private ComponentInvocationMap componentInvocationMap;
 
-    private FormSupportImpl _formSupport;
+    private FormSupportImpl formSupport;
 
-    private Element _form;
+    private Element form;
 
-    private Element _div;
+    private Element div;
 
     // Collects a stream of component actions. Each action goes in as a UTF string (the component
     // component id), followed by a ComponentAction
 
-    private Base64ObjectOutputStream _actions;
+    private Base64ObjectOutputStream actions;
 
     @SuppressWarnings("unused")
     @Mixin
-    private RenderInformals _renderInformals;
+    private RenderInformals renderInformals;
 
     /**
      * Set up via the traditional or Ajax component event request handler
      */
     @Environmental
-    private ComponentEventResultProcessor _componentEventResultProcessor;
+    private ComponentEventResultProcessor componentEventResultProcessor;
 
     @Environmental
-    private ClientBehaviorSupport _clientBehaviorSupport;
+    private ClientBehaviorSupport clientBehaviorSupport;
 
-    private String _name;
+    private String name;
 
     public ValidationTracker getDefaultTracker()
     {
-        if (_defaultTracker == null) _defaultTracker = new ValidationTrackerImpl();
+        if (defaultTracker == null) defaultTracker = new ValidationTrackerImpl();
 
-        return _defaultTracker;
+        return defaultTracker;
     }
 
     public void setDefaultTracker(ValidationTracker defaultTracker)
     {
-        _defaultTracker = defaultTracker;
+        this.defaultTracker = defaultTracker;
     }
 
     void beginRender(MarkupWriter writer)
@@ -200,46 +200,46 @@
 
         try
         {
-            _actions = new Base64ObjectOutputStream();
+            actions = new Base64ObjectOutputStream();
         }
         catch (IOException ex)
         {
             throw new RuntimeException(ex);
         }
 
-        _name = _pageRenderSupport.allocateClientId(_resources);
+        name = pageRenderSupport.allocateClientId(resources);
 
-        _formSupport = new FormSupportImpl(_name, _actions, _clientBehaviorSupport, _clientValidation);
+        formSupport = new FormSupportImpl(name, actions, clientBehaviorSupport, clientValidation);
 
-        if (_zone != null) _clientBehaviorSupport.linkZone(_name, _zone);
+        if (zone != null) clientBehaviorSupport.linkZone(name, zone);
 
         // TODO: Forms should not allow to nest. Perhaps a set() method instead of a push() method
         // for this kind of check?  
 
-        _environment.push(FormSupport.class, _formSupport);
-        _environment.push(ValidationTracker.class, _tracker);
+        environment.push(FormSupport.class, formSupport);
+        environment.push(ValidationTracker.class, tracker);
 
         // Now that the environment is setup, inform the component or other listeners that the form
         // is about to render.  
 
-        Object[] contextArray = _context == null ? new Object[0] : _context.toArray();
+        Object[] contextArray = context == null ? new Object[0] : context.toArray();
 
-        _resources.triggerEvent(PREPARE_FOR_RENDER, contextArray, null);
+        resources.triggerEvent(PREPARE_FOR_RENDER, contextArray, null);
 
-        _resources.triggerEvent(PREPARE, contextArray, null);
+        resources.triggerEvent(PREPARE, contextArray, null);
 
-        Link link = _resources.createActionLink(TapestryConstants.ACTION_EVENT, true, contextArray);
+        Link link = resources.createActionLink(TapestryConstants.ACTION_EVENT, true, contextArray);
 
         // Save the form element for later, in case we want to write an encoding type attribute.
 
-        _form = writer
-                .element("form", "name", _name, "id", _name, "method", "post", "action", link);
+        form = writer
+                .element("form", "name", name, "id", name, "method", "post", "action", link);
 
-        _componentInvocationMap.store(_form, link);
+        componentInvocationMap.store(form, link);
 
-        _resources.renderInformalParameters(writer);
+        resources.renderInformalParameters(writer);
 
-        _div = writer.element("div", "class", TapestryConstants.INVISIBLE_CLASS);
+        div = writer.element("div", "class", TapestryConstants.INVISIBLE_CLASS);
 
         for (String parameterName : link.getParameterNames())
         {
@@ -251,19 +251,19 @@
 
         writer.end(); // div
 
-        _environment.peek(Heartbeat.class).begin();
+        environment.peek(Heartbeat.class).begin();
 
     }
 
     void afterRender(MarkupWriter writer)
     {
-        _environment.peek(Heartbeat.class).end();
+        environment.peek(Heartbeat.class).end();
 
-        _formSupport.executeDeferred();
+        formSupport.executeDeferred();
 
-        String encodingType = _formSupport.getEncodingType();
+        String encodingType = formSupport.getEncodingType();
 
-        if (encodingType != null) _form.forceAttributes("enctype", encodingType);
+        if (encodingType != null) form.forceAttributes("enctype", encodingType);
 
         writer.end(); // form
 
@@ -271,46 +271,46 @@
 
         try
         {
-            _actions.close();
+            actions.close();
         }
         catch (IOException ex)
         {
             throw new RuntimeException(ex);
         }
 
-        _div.element("input",
+        div.element("input",
 
-                     "type", "hidden",
+                    "type", "hidden",
 
-                     "name", FORM_DATA,
+                    "name", FORM_DATA,
 
-                     "value", _actions.toBase64());
+                    "value", actions.toBase64());
     }
 
     void cleanupRender()
     {
-        _environment.pop(FormSupport.class);
+        environment.pop(FormSupport.class);
 
-        _formSupport = null;
+        formSupport = null;
 
         // This forces a change to the tracker, which is nice because its internal state has
         // changed.
-        _tracker = _environment.pop(ValidationTracker.class);
+        tracker = environment.pop(ValidationTracker.class);
     }
 
     @SuppressWarnings({ "unchecked", "InfiniteLoopStatement" })
     Object onAction(EventContext context) throws IOException
     {
-        _tracker.clear();
+        tracker.clear();
 
-        _formSupport = new FormSupportImpl();
+        formSupport = new FormSupportImpl();
 
-        _environment.push(ValidationTracker.class, _tracker);
-        _environment.push(FormSupport.class, _formSupport);
+        environment.push(ValidationTracker.class, tracker);
+        environment.push(FormSupport.class, formSupport);
 
         Heartbeat heartbeat = new HeartbeatImpl();
 
-        _environment.push(Heartbeat.class, heartbeat);
+        environment.push(Heartbeat.class, heartbeat);
 
         heartbeat.begin();
 
@@ -318,13 +318,13 @@
         {
 
             ComponentResultProcessorWrapper callback = new ComponentResultProcessorWrapper(
-                    _componentEventResultProcessor);
+                    componentEventResultProcessor);
 
-            _resources.triggerContextEvent(PREPARE_FOR_SUBMIT, context, callback);
+            resources.triggerContextEvent(PREPARE_FOR_SUBMIT, context, callback);
 
             if (callback.isAborted()) return true;
 
-            _resources.triggerContextEvent(PREPARE, context, callback);
+            resources.triggerContextEvent(PREPARE, context, callback);
 
             if (callback.isAborted()) return true;
 
@@ -332,20 +332,20 @@
 
             heartbeat.end();
 
-            ValidationTracker tracker = _environment.peek(ValidationTracker.class);
+            ValidationTracker tracker = environment.peek(ValidationTracker.class);
 
             // Let the listeners peform any final validations
 
             // Update through the parameter because the tracker has almost certainly changed
             // internal state.
 
-            _tracker = tracker;
+            this.tracker = tracker;
 
-            _resources.triggerContextEvent(VALIDATE_FORM, context, callback);
+            resources.triggerContextEvent(VALIDATE_FORM, context, callback);
 
             if (callback.isAborted()) return true;
 
-            _formSupport.executeDeferred();
+            formSupport.executeDeferred();
 
             // Let the listeners know about overall success or failure. Most listeners fall into
             // one of those two camps.
@@ -354,22 +354,22 @@
             // as well, so that the next page render will be "clean" and show
             // true persistent data, not value from the previous form submission.
 
-            if (!_tracker.getHasErrors()) _tracker.clear();
+            if (!this.tracker.getHasErrors()) this.tracker.clear();
 
-            _resources.triggerContextEvent(tracker.getHasErrors() ? FAILURE : SUCCESS, context, callback);
+            resources.triggerContextEvent(tracker.getHasErrors() ? FAILURE : SUCCESS, context, callback);
 
             // Lastly, tell anyone whose interested that the form is completely submitted.
 
             if (callback.isAborted()) return true;
 
-            _resources.triggerContextEvent(SUBMIT, context, callback);
+            resources.triggerContextEvent(SUBMIT, context, callback);
 
             return callback.isAborted();
         }
         finally
         {
-            _environment.pop(Heartbeat.class);
-            _environment.pop(FormSupport.class);
+            environment.pop(Heartbeat.class);
+            environment.pop(FormSupport.class);
         }
     }
 
@@ -379,7 +379,7 @@
      */
     private void executeStoredActions()
     {
-        String[] values = _request.getParameters(FORM_DATA);
+        String[] values = request.getParameters(FORM_DATA);
 
         if (values == null) return;
 
@@ -400,7 +400,7 @@
                     String componentId = ois.readUTF();
                     ComponentAction action = (ComponentAction) ois.readObject();
 
-                    component = _source.getComponent(componentId);
+                    component = source.getComponent(componentId);
 
                     action.execute(component);
 
@@ -426,42 +426,42 @@
 
     public void recordError(String errorMessage)
     {
-        ValidationTracker tracker = _tracker;
+        ValidationTracker tracker = this.tracker;
 
         tracker.recordError(errorMessage);
 
-        _tracker = tracker;
+        this.tracker = tracker;
     }
 
     public void recordError(Field field, String errorMessage)
     {
-        ValidationTracker tracker = _tracker;
+        ValidationTracker tracker = this.tracker;
 
         tracker.recordError(field, errorMessage);
 
-        _tracker = tracker;
+        this.tracker = tracker;
     }
 
     public boolean getHasErrors()
     {
-        return _tracker.getHasErrors();
+        return tracker.getHasErrors();
     }
 
     public boolean isValid()
     {
-        return !_tracker.getHasErrors();
+        return !tracker.getHasErrors();
     }
 
     // For testing:
 
     void setTracker(ValidationTracker tracker)
     {
-        _tracker = tracker;
+        this.tracker = tracker;
     }
 
     public void clearErrors()
     {
-        _tracker.clear();
+        tracker.clear();
     }
 
     /**
@@ -469,6 +469,6 @@
      */
     public String getClientId()
     {
-        return _name;
+        return name;
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/FormFragment.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/FormFragment.java?rev=653960&r1=653959&r2=653960&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/FormFragment.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/FormFragment.java Tue May  6 18:00:03 2008
@@ -50,70 +50,70 @@
      * the fragment should be processed (or ignored if still invisible).
      */
     @Parameter
-    private boolean _visible;
+    private boolean visible;
 
 
     /**
-     * Name of a function on the client-side Tapestry.ElementEffect object that is invoked to make the fragment
-     * visible.  If not specified, then the default "slidedown" function is used.
+     * Name of a function on the client-side Tapestry.ElementEffect object that is invoked to make the fragment visible.
+     * If not specified, then the default "slidedown" function is used.
      */
     @Parameter(defaultPrefix = TapestryConstants.LITERAL_BINDING_PREFIX)
-    private String _show;
+    private String show;
 
     /**
      * Name of a function on the client-side Tapestry.ElementEffect object that is invoked when the fragment is to be
      * hidden. If not specified, the default "slideup" function is used.
      */
     @Parameter(defaultPrefix = TapestryConstants.LITERAL_BINDING_PREFIX)
-    private String _hide;
+    private String hide;
 
     @Inject
-    private Environment _environment;
+    private Environment environment;
 
     @Environmental
-    private PageRenderSupport _pageRenderSupport;
+    private PageRenderSupport pageRenderSupport;
 
 
     @Inject
-    private ComponentSource _componentSource;
+    private ComponentSource componentSource;
 
     @Inject
-    private ComponentResources _resources;
+    private ComponentResources resources;
 
     @Environmental
-    private ClientBehaviorSupport _clientBehaviorSupport;
+    private ClientBehaviorSupport clientBehaviorSupport;
 
-    private String _clientId;
+    private String clientId;
 
-    private String _controlName;
+    private String controlName;
 
-    private List<WrappedComponentAction> _componentActions;
+    private List<WrappedComponentAction> componentActions;
 
     @Inject
-    private Request _request;
+    private Request request;
 
     static class HandleSubmission implements ComponentAction<FormFragment>
     {
-        private final String _controlName;
+        private final String controlName;
 
-        private final List<WrappedComponentAction> _actions;
+        private final List<WrappedComponentAction> actions;
 
         public HandleSubmission(String controlName, List<WrappedComponentAction> actions)
         {
-            _controlName = controlName;
-            _actions = actions;
+            this.controlName = controlName;
+            this.actions = actions;
         }
 
         public void execute(FormFragment component)
         {
-            component.handleSubmission(_controlName, _actions);
+            component.handleSubmission(controlName, actions);
         }
     }
 
 
     private void handleSubmission(String elementName, List<WrappedComponentAction> actions)
     {
-        String value = _request.getParameter(elementName);
+        String value = request.getParameter(elementName);
 
         boolean visible = Boolean.parseBoolean(value);
 
@@ -123,7 +123,7 @@
 
         for (WrappedComponentAction action : actions)
         {
-            action.execute(_componentSource);
+            action.execute(componentSource);
         }
     }
 
@@ -133,18 +133,18 @@
      */
     void beginRender(MarkupWriter writer)
     {
-        FormSupport formSupport = _environment.peekRequired(FormSupport.class);
+        FormSupport formSupport = environment.peekRequired(FormSupport.class);
 
-        String id = _resources.getId();
+        String id = resources.getId();
 
-        _controlName = formSupport.allocateControlName(id);
-        _clientId = _pageRenderSupport.allocateClientId(id);
+        controlName = formSupport.allocateControlName(id);
+        clientId = pageRenderSupport.allocateClientId(id);
 
-        Element element = writer.element("div", "id", _clientId);
+        Element element = writer.element("div", "id", clientId);
 
-        _resources.renderInformalParameters(writer);
+        resources.renderInformalParameters(writer);
 
-        if (!_visible)
+        if (!visible)
             element.addClassName(TapestryConstants.INVISIBLE_CLASS);
 
 
@@ -152,17 +152,17 @@
 
                        "type", "hidden",
 
-                       "name", _controlName,
+                       "name", controlName,
 
-                       "id", _clientId + ":hidden",
+                       "id", clientId + ":hidden",
 
-                       "value", String.valueOf(_visible));
+                       "value", String.valueOf(visible));
         writer.end();
 
 
-        _clientBehaviorSupport.addFormFragment(_clientId, _show, _hide);
+        clientBehaviorSupport.addFormFragment(clientId, show, hide);
 
-        _componentActions = CollectionFactory.newList();
+        componentActions = CollectionFactory.newList();
 
         // Here's the magic of environmentals ... we can create a wrapper around
         // the normal FormSupport environmental that intercepts some of the behavior.
@@ -176,7 +176,7 @@
             {
                 Component asComponent = Defense.cast(component, Component.class, "component");
 
-                _componentActions.add(new WrappedComponentAction(asComponent, action));
+                componentActions.add(new WrappedComponentAction(asComponent, action));
             }
 
             @Override
@@ -191,7 +191,7 @@
         // Tada!  Now all the enclosed components will use our override of FormSupport,
         // until we pop it off.
 
-        _environment.push(FormSupport.class, override);
+        environment.push(FormSupport.class, override);
 
     }
 
@@ -205,13 +205,13 @@
     {
         writer.end(); // div
 
-        _environment.pop(FormSupport.class);
+        environment.pop(FormSupport.class);
 
-        _environment.peek(FormSupport.class).store(this, new HandleSubmission(_controlName, _componentActions));
+        environment.peek(FormSupport.class).store(this, new HandleSubmission(controlName, componentActions));
     }
 
     public String getClientId()
     {
-        return _clientId;
+        return clientId;
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/FormInjector.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/FormInjector.java?rev=653960&r1=653959&r2=653960&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/FormInjector.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/FormInjector.java Tue May  6 18:00:03 2008
@@ -51,77 +51,77 @@
      * methods.
      */
     @Parameter
-    private List<?> _context;
+    private List<?> context;
 
     @Parameter(defaultPrefix = TapestryConstants.LITERAL_BINDING_PREFIX, value = "above")
-    private InsertPosition _position;
+    private InsertPosition position;
 
     /**
      * Name of a function on the client-side Tapestry.ElementEffect object that is invoked to make added content
      * visible. Leaving as null uses the default function, "highlight".
      */
     @Parameter(defaultPrefix = TapestryConstants.LITERAL_BINDING_PREFIX)
-    private String _show;
+    private String show;
 
     /**
      * The element name to render, which is normally the element name used to represent the FormInjector component in
      * the template, or "div".
      */
     @Parameter(defaultPrefix = TapestryConstants.LITERAL_BINDING_PREFIX)
-    private String _element;
+    private String element;
 
 
     @Environmental
-    private PageRenderSupport _pageRenderSupport;
+    private PageRenderSupport pageRenderSupport;
 
     @Environmental
-    private FormSupport _formSupport;
+    private FormSupport formSupport;
 
     @Environmental
-    private ClientBehaviorSupport _clientBehaviorSupport;
+    private ClientBehaviorSupport clientBehaviorSupport;
 
     @Inject
     @Ajax
-    private ComponentEventResultProcessor _componentEventResultProcessor;
+    private ComponentEventResultProcessor componentEventResultProcessor;
 
 
     @Inject
-    private PageRenderQueue _pageRenderQueue;
+    private PageRenderQueue pageRenderQueue;
 
-    private String _clientId;
+    private String clientId;
 
     @Inject
-    private ComponentResources _resources;
+    private ComponentResources resources;
 
     @Inject
-    private Request _request;
+    private Request request;
 
     @Inject
-    private Environment _environment;
+    private Environment environment;
 
     String defaultElement()
     {
-        return _resources.getElementName("div");
+        return resources.getElementName("div");
     }
 
     void beginRender(MarkupWriter writer)
     {
-        _clientId = _pageRenderSupport.allocateClientId(_resources);
+        clientId = pageRenderSupport.allocateClientId(resources);
 
-        writer.element(_element,
+        writer.element(element,
 
-                       "id", _clientId);
+                       "id", clientId);
 
-        _resources.renderInformalParameters(writer);
+        resources.renderInformalParameters(writer);
 
         // Now work on the JavaScript side of things.
 
-        Link link = _resources.createActionLink(INJECT_EVENT, false,
-                                                _context == null ? new Object[0] : _context.toArray());
+        Link link = resources.createActionLink(INJECT_EVENT, false,
+                                               context == null ? new Object[0] : context.toArray());
 
-        link.addParameter(FORMID_PARAMETER, _formSupport.getClientId());
+        link.addParameter(FORMID_PARAMETER, formSupport.getClientId());
 
-        _clientBehaviorSupport.addFormInjector(_clientId, link, _position, _show);
+        clientBehaviorSupport.addFormInjector(clientId, link, position, show);
     }
 
     void afterRender(MarkupWriter writer)
@@ -135,7 +135,7 @@
      */
     public String getClientId()
     {
-        return _clientId;
+        return clientId;
     }
 
     /**
@@ -146,17 +146,17 @@
     Object onInject(EventContext context) throws IOException
     {
         ComponentResultProcessorWrapper callback = new ComponentResultProcessorWrapper(
-                _componentEventResultProcessor);
+                componentEventResultProcessor);
 
-        _resources.triggerContextEvent(TapestryConstants.ACTION_EVENT, context, callback);
+        resources.triggerContextEvent(TapestryConstants.ACTION_EVENT, context, callback);
 
         if (!callback.isAborted()) return null;
 
         // Here's where it gets very, very tricky.
 
-        final RenderCommand rootRenderCommand = _pageRenderQueue.getRootRenderCommand();
+        final RenderCommand rootRenderCommand = pageRenderQueue.getRootRenderCommand();
 
-        final String formId = _request.getParameter(FORMID_PARAMETER);
+        final String formId = request.getParameter(FORMID_PARAMETER);
 
         final Base64ObjectOutputStream actions = new Base64ObjectOutputStream();
 
@@ -173,9 +173,9 @@
                     throw new RuntimeException(ex);
                 }
 
-                _environment.pop(ValidationTracker.class);
+                environment.pop(ValidationTracker.class);
 
-                FormSupportImpl formSupport = (FormSupportImpl) _environment.pop(FormSupport.class);
+                FormSupportImpl formSupport = (FormSupportImpl) environment.pop(FormSupport.class);
 
                 formSupport.executeDeferred();
 
@@ -202,12 +202,12 @@
 
                 IdAllocator idAllocator = new IdAllocator(":" + uid);
 
-                FormSupportImpl formSupport = new FormSupportImpl(formId, actions, _clientBehaviorSupport, true,
+                FormSupportImpl formSupport = new FormSupportImpl(formId, actions, clientBehaviorSupport, true,
                                                                   idAllocator);
-                _environment.push(FormSupport.class, formSupport);
+                environment.push(FormSupport.class, formSupport);
 
 
-                _environment.push(ValidationTracker.class, new ValidationTrackerImpl());
+                environment.push(ValidationTracker.class, new ValidationTrackerImpl());
 
                 // Queue up the root render command to execute first, and the cleanup
                 // to execute after it is done.

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Grid.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Grid.java?rev=653960&r1=653959&r2=653960&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Grid.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Grid.java Tue May  6 18:00:03 2008
@@ -58,13 +58,13 @@
      * around the underlying List.
      */
     @Parameter(required = true)
-    private GridDataSource _source;
+    private GridDataSource source;
 
     /**
      * A wrapper around the provided GridDataSource that caches access to the availableRows property. This is the source
      * provided to sub-components.
      */
-    private GridDataSource _cachingSource;
+    private GridDataSource cachingSource;
 
     /**
      * The number of rows of data displayed on each page. If there are more rows than will fit, the Grid will divide up
@@ -72,14 +72,14 @@
      * set.
      */
     @Parameter("25")
-    private int _rowsPerPage;
+    private int rowsPerPage;
 
     /**
      * Defines where the pager (used to navigate within the "pages" of results) should be displayed: "top", "bottom",
      * "both" or "none".
      */
     @Parameter(value = "top", defaultPrefix = TapestryConstants.LITERAL_BINDING_PREFIX)
-    private GridPagerPosition _pagerPosition;
+    private GridPagerPosition pagerPosition;
 
     /**
      * Used to store the current object being rendered (for the current row). This is used when parameter blocks are
@@ -87,7 +87,7 @@
      * use the property bound to the row parameter to know what they should render.
      */
     @Parameter
-    private Object _row;
+    private Object row;
 
     /**
      * The model used to identify the properties to be presented and the order of presentation. The model may be
@@ -96,7 +96,7 @@
      * behavior, say to reorder or rename columns or add additional columns.
      */
     @Parameter
-    private BeanModel _model;
+    private BeanModel model;
 
     /**
      * The model used to handle sorting of the Grid. This is generally not specified, and the built-in model supports
@@ -104,14 +104,14 @@
      * stored as persistent fields of the Grid component.
      */
     @Parameter
-    private GridSortModel _sortModel;
+    private GridSortModel sortModel;
 
     /**
      * A comma-seperated list of property names to be added to the {@link org.apache.tapestry.beaneditor.BeanModel}.
      * Cells for added columns will be blank unless a cell override is provided.
      */
     @Parameter(defaultPrefix = TapestryConstants.LITERAL_BINDING_PREFIX)
-    private String _add;
+    private String add;
 
     /**
      * A comma-separated list of property names to be retained from the {@link org.apache.tapestry.beaneditor.BeanModel}.
@@ -120,15 +120,14 @@
      */
     @SuppressWarnings("unused")
     @Parameter(defaultPrefix = TapestryConstants.LITERAL_BINDING_PREFIX)
-    private String _include;
-
+    private String include;
 
     /**
      * A comma-separated list of property names to be removed from the {@link org.apache.tapestry.beaneditor.BeanModel}.
      * The names are case-insensitive.
      */
     @Parameter(defaultPrefix = TapestryConstants.LITERAL_BINDING_PREFIX)
-    private String _exclude;
+    private String exclude;
 
     /**
      * A comma-separated list of property names indicating the order in which the properties should be presented. The
@@ -136,7 +135,7 @@
      * order.
      */
     @Parameter(defaultPrefix = TapestryConstants.LITERAL_BINDING_PREFIX)
-    private String _reorder;
+    private String reorder;
 
     /**
      * A Block to render instead of the table (and pager, etc.) when the source is empty. The default is simply the text
@@ -144,7 +143,7 @@
      * allow the user to create new objects.
      */
     @Parameter(value = "block:empty")
-    private Block _empty;
+    private Block empty;
 
 
     /**
@@ -153,7 +152,7 @@
      * leveraging the CSS to customize the look and feel of particular columns.
      */
     @Parameter
-    private boolean _lean;
+    private boolean lean;
 
     /**
      * If true and the Loop is enclosed by a Form, then the normal state persisting logic is turned off. Defaults to
@@ -161,8 +160,8 @@
      * contain any form control components (such as {@link TextField}), then binding volatile to false will reduce the
      * amount of client-side state that must be persisted.
      */
-    @Parameter
-    private boolean _volatile;
+    @Parameter(name = "volatile")
+    private boolean volatileState;
 
     /**
      * The CSS class for the tr element for each data row. This can be used to highlight particular rows, or cycle
@@ -170,7 +169,7 @@
      */
     @Parameter(cache = false)
     @Property(write = false)
-    private String _rowClass;
+    private String rowClass;
 
     /**
      * CSS class for the &lt;table&gt; element.  In addition, informal parameters to the Grid are rendered in the table
@@ -178,45 +177,45 @@
      */
     @Parameter(name = "class", defaultPrefix = TapestryConstants.LITERAL_BINDING_PREFIX, value = "t-data-grid")
     @Property(write = false)
-    private String _tableClass;
+    private String tableClass;
 
     /**
      * If true, then the Grid will be wrapped in an element that acts like a {@link
      * org.apache.tapestry.corelib.components.Zone}; all the paging and sorting links will
      */
     @Parameter
-    private boolean _inPlace;
+    private boolean inPlace;
 
     /**
      * The name of the psuedo-zone that encloses the Grid.
      */
     @Property(write = false)
-    private String _zone;
+    private String zone;
 
-    private boolean _didRenderZoneDiv;
+    private boolean didRenderZoneDiv;
 
     @Persist
-    private int _currentPage = 1;
+    private int currentPage = 1;
 
     @Persist
-    private String _sortColumnId;
+    private String sortColumnId;
 
     @Persist
-    private boolean _sortAscending = true;
+    private boolean sortAscending = true;
 
     @Inject
-    private ComponentResources _resources;
+    private ComponentResources resources;
 
     @Inject
-    private BeanModelSource _modelSource;
+    private BeanModelSource modelSource;
 
     @Environmental
-    private ClientBehaviorSupport _clientBehaviorSupport;
+    private ClientBehaviorSupport clientBehaviorSupport;
 
     @SuppressWarnings("unused")
     @Component(
             parameters = { "lean=inherit:lean", "overrides=componentResources", "zone=zone" })
-    private GridColumns _columns;
+    private GridColumns columns;
 
     @SuppressWarnings("unused")
     @Component(
@@ -224,68 +223,68 @@
     private GridRows _rows;
 
     @Component(parameters = { "source=dataSource", "rowsPerPage=rowsPerPage", "currentPage=currentPage", "zone=zone" })
-    private GridPager _pager;
+    private GridPager pager;
 
     @SuppressWarnings("unused")
     @Component(parameters = "to=pagerTop")
-    private Delegate _pagerTop;
+    private Delegate pagerTop;
 
     @SuppressWarnings("unused")
     @Component(parameters = "to=pagerBottom")
-    private Delegate _pagerBottom;
+    private Delegate pagerBottom;
 
     @SuppressWarnings("unused")
     @Component(parameters = "class=tableClass", inheritInformalParameters = true)
-    private Any _table;
+    private Any table;
 
     @Environmental(false)
-    private FormSupport _formSupport;
+    private FormSupport formSupport;
 
     @Inject
-    private Request _request;
+    private Request request;
 
     @Environmental
-    private PageRenderSupport _pageRenderSupport;
+    private PageRenderSupport pageRenderSupport;
 
     /**
      * Set up via the traditional or Ajax component event request handler
      */
     @Environmental
-    private ComponentEventResultProcessor _componentEventResultProcessor;
+    private ComponentEventResultProcessor componentEventResultProcessor;
 
     /**
      * A version of GridDataSource that caches the availableRows property. This addresses TAPESTRY-2245.
      */
     class CachingDataSource implements GridDataSource
     {
-        private boolean _availableRowsCached;
+        private boolean availableRowsCached;
 
-        private int _availableRows;
+        private int availableRows;
 
         public int getAvailableRows()
         {
-            if (!_availableRowsCached)
+            if (!availableRowsCached)
             {
-                _availableRows = _source.getAvailableRows();
-                _availableRowsCached = true;
+                availableRows = source.getAvailableRows();
+                availableRowsCached = true;
             }
 
-            return _availableRows;
+            return availableRows;
         }
 
         public void prepare(int startIndex, int endIndex, List<SortConstraint> sortConstraints)
         {
-            _source.prepare(startIndex, endIndex, sortConstraints);
+            source.prepare(startIndex, endIndex, sortConstraints);
         }
 
         public Object getRowValue(int index)
         {
-            return _source.getRowValue(index);
+            return source.getRowValue(index);
         }
 
         public Class getRowType()
         {
-            return _source.getRowType();
+            return source.getRowType();
         }
     }
 
@@ -297,7 +296,7 @@
     {
         public ColumnSort getColumnSort(String columnId)
         {
-            if (!TapestryInternalUtils.isEqual(columnId, _sortColumnId))
+            if (!TapestryInternalUtils.isEqual(columnId, sortColumnId))
                 return ColumnSort.UNSORTED;
 
             return getColumnSort();
@@ -305,7 +304,7 @@
 
         private ColumnSort getColumnSort()
         {
-            return _sortAscending ? ColumnSort.ASCENDING : ColumnSort.DESCENDING;
+            return sortAscending ? ColumnSort.ASCENDING : ColumnSort.DESCENDING;
         }
 
 
@@ -313,22 +312,22 @@
         {
             Defense.notBlank(columnId, "columnId");
 
-            if (columnId.equals(_sortColumnId))
+            if (columnId.equals(sortColumnId))
             {
-                _sortAscending = !_sortAscending;
+                sortAscending = !sortAscending;
                 return;
             }
 
-            _sortColumnId = columnId;
-            _sortAscending = true;
+            sortColumnId = columnId;
+            sortAscending = true;
         }
 
         public List<SortConstraint> getSortContraints()
         {
-            if (_sortColumnId == null)
+            if (sortColumnId == null)
                 return Collections.emptyList();
 
-            PropertyModel sortModel = _model.getById(_sortColumnId);
+            PropertyModel sortModel = model.getById(sortColumnId);
 
             SortConstraint constraint = new SortConstraint(sortModel, getColumnSort());
 
@@ -337,7 +336,7 @@
 
         public void clear()
         {
-            _sortColumnId = null;
+            sortColumnId = null;
         }
     }
 
@@ -348,7 +347,7 @@
 
     Binding defaultModel()
     {
-        final ComponentResources containerResources = _resources.getContainerResources();
+        final ComponentResources containerResources = resources.getContainerResources();
 
         return new AbstractBinding()
         {
@@ -357,14 +356,14 @@
             {
                 // Get the default row type from the data source
 
-                Class rowType = _source.getRowType();
+                Class rowType = source.getRowType();
 
                 if (rowType == null) throw new RuntimeException(
                         "Unable to determine the bean type for rows from the GridDataSource. You should bind the model parameter explicitly.");
 
                 // Properties do not have to be read/write
 
-                return _modelSource.create(rowType, false, containerResources);
+                return modelSource.create(rowType, false, containerResources);
             }
 
             /**
@@ -393,37 +392,37 @@
 
     Object setupRender()
     {
-        if (!_volatile && _formSupport != null) _formSupport.store(this, SETUP_DATA_SOURCE);
+        if (!volatileState && formSupport != null) formSupport.store(this, SETUP_DATA_SOURCE);
 
         setupDataSource();
 
-        return _cachingSource.getAvailableRows() == 0 ? _empty : null;
+        return cachingSource.getAvailableRows() == 0 ? empty : null;
     }
 
     void setupDataSource()
     {
         // If there's no rows, display the empty block placeholder.
 
-        _cachingSource = new CachingDataSource();
+        cachingSource = new CachingDataSource();
 
-        int availableRows = _cachingSource.getAvailableRows();
+        int availableRows = cachingSource.getAvailableRows();
 
         if (availableRows == 0) return;
 
-        BeanModelUtils.modify(_model, _add, _include, _exclude, _reorder);
+        BeanModelUtils.modify(model, add, include, exclude, reorder);
 
-        int maxPage = ((availableRows - 1) / _rowsPerPage) + 1;
+        int maxPage = ((availableRows - 1) / rowsPerPage) + 1;
 
         // This captures when the number of rows has decreased, typically due to deletions.
 
-        if (_currentPage > maxPage)
-            _currentPage = maxPage;
+        if (currentPage > maxPage)
+            currentPage = maxPage;
 
-        int startIndex = (_currentPage - 1) * _rowsPerPage;
+        int startIndex = (currentPage - 1) * rowsPerPage;
 
-        int endIndex = Math.min(startIndex + _rowsPerPage - 1, availableRows - 1);
+        int endIndex = Math.min(startIndex + rowsPerPage - 1, availableRows - 1);
 
-        _cachingSource.prepare(startIndex, endIndex, _sortModel.getSortContraints());
+        cachingSource.prepare(startIndex, endIndex, sortModel.getSortContraints());
 
     }
 
@@ -432,17 +431,17 @@
         // Skip rendering of component (template, body, etc.) when there's nothing to display.
         // The empty placeholder will already have rendered.
 
-        if (_cachingSource.getAvailableRows() == 0) return false;
+        if (cachingSource.getAvailableRows() == 0) return false;
 
-        if (_inPlace && _zone == null)
+        if (inPlace && zone == null)
         {
-            _zone = _pageRenderSupport.allocateClientId(_resources);
+            zone = pageRenderSupport.allocateClientId(resources);
 
-            writer.element("div", "id", _zone);
+            writer.element("div", "id", zone);
 
-            _clientBehaviorSupport.addZone(_zone, null, "show");
+            clientBehaviorSupport.addZone(zone, null, "show");
 
-            _didRenderZoneDiv = true;
+            didRenderZoneDiv = true;
         }
 
         return null;
@@ -450,61 +449,61 @@
 
     void afterRender(MarkupWriter writer)
     {
-        if (_didRenderZoneDiv)
+        if (didRenderZoneDiv)
         {
             writer.end(); // div
-            _didRenderZoneDiv = false;
+            didRenderZoneDiv = false;
         }
     }
 
     public BeanModel getDataModel()
     {
-        return _model;
+        return model;
     }
 
     public GridDataSource getDataSource()
     {
-        return _cachingSource;
+        return cachingSource;
     }
 
     public GridSortModel getSortModel()
     {
-        return _sortModel;
+        return sortModel;
     }
 
     public Object getPagerTop()
     {
-        return _pagerPosition.isMatchTop() ? _pager : null;
+        return pagerPosition.isMatchTop() ? pager : null;
     }
 
     public Object getPagerBottom()
     {
-        return _pagerPosition.isMatchBottom() ? _pager : null;
+        return pagerPosition.isMatchBottom() ? pager : null;
     }
 
     public int getCurrentPage()
     {
-        return _currentPage;
+        return currentPage;
     }
 
     public void setCurrentPage(int currentPage)
     {
-        _currentPage = currentPage;
+        this.currentPage = currentPage;
     }
 
     public int getRowsPerPage()
     {
-        return _rowsPerPage;
+        return rowsPerPage;
     }
 
     public Object getRow()
     {
-        return _row;
+        return row;
     }
 
     public void setRow(Object row)
     {
-        _row = row;
+        this.row = row;
     }
 
     /**
@@ -513,8 +512,8 @@
      */
     public void reset()
     {
-        _currentPage = 1;
-        _sortModel.clear();
+        currentPage = 1;
+        sortModel.clear();
     }
 
     /**
@@ -525,8 +524,8 @@
      */
     void onInPlaceUpdate(String zone) throws IOException
     {
-        _zone = zone;
+        this.zone = zone;
 
-        _componentEventResultProcessor.processResultValue(this);
+        componentEventResultProcessor.processResultValue(this);
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/GridColumns.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/GridColumns.java?rev=653960&r1=653959&r2=653960&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/GridColumns.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/GridColumns.java Tue May  6 18:00:03 2008
@@ -41,7 +41,7 @@
      * The object that provides access to bean and data models, which is typically the enclosing Grid component.
      */
     @Parameter(value = "componentResources.container")
-    private GridModel _gridModel;
+    private GridModel gridModel;
 
     /**
      * If true, then the CSS class on each &lt;TH&gt; element will be omitted, which can reduce the amount of output
@@ -49,64 +49,64 @@
      * the CSS to customize the look and feel of particular columns.
      */
     @Parameter
-    private boolean _lean;
+    private boolean lean;
 
     /**
      * Where to look for informal parameter Blocks used to override column headers.  The default is to look for such
      * overrides in the GridColumns component itself, but this is usually overridden.
      */
     @Parameter("componentResources")
-    private ComponentResources _overrides;
+    private ComponentResources overrides;
 
 
     /**
      * If not null, then each link is output as a link to update the specified zone.
      */
     @Parameter
-    private String _zone;
+    private String zone;
 
     @SuppressWarnings("unused")
     @Component(
             parameters = { "event=sort", "disabled=sortDisabled", "context=columnContext", "class=sortLinkClass", "zone=inherit:zone" })
-    private EventLink _sort, _sort2;
+    private EventLink sort, sort2;
 
     @Inject
     @Path("sort-asc.png")
-    private Asset _ascendingAsset;
+    private Asset ascendingAsset;
 
     @Inject
     @Path("sort-desc.png")
-    private Asset _descendingAsset;
+    private Asset descendingAsset;
 
     @Inject
     @Path("sortable.png")
-    private Asset _sortableAsset;
+    private Asset sortableAsset;
 
     @Inject
-    private Messages _messages;
+    private Messages messages;
 
     @Inject
-    private Block _standardHeader;
+    private Block standardHeader;
 
     @Property
-    private int _columnIndex;
+    private int columnIndex;
 
-    private int _lastColumnIndex;
+    private int lastColumnIndex;
 
     @Property(write = false)
-    private PropertyModel _columnModel;
+    private PropertyModel columnModel;
 
     @Inject
-    private ComponentResources _resources;
+    private ComponentResources resources;
 
     void setupRender()
     {
-        _lastColumnIndex = _gridModel.getDataModel().getPropertyNames().size() - 1;
+        lastColumnIndex = gridModel.getDataModel().getPropertyNames().size() - 1;
     }
 
     public boolean isSortDisabled()
     {
-        return !_columnModel.isSortable();
+        return !columnModel.isSortable();
     }
 
     public String getSortLinkClass()
@@ -126,9 +126,9 @@
 
     private ColumnSort getSortForColumn()
     {
-        GridSortModel sortModel = _gridModel.getSortModel();
+        GridSortModel sortModel = gridModel.getSortModel();
 
-        String columnId = _columnModel.getId();
+        String columnId = columnModel.getId();
 
         return sortModel.getColumnSort(columnId);
     }
@@ -137,15 +137,15 @@
     {
         List<String> classes = CollectionFactory.newList();
 
-        if (!_lean) classes.add(_columnModel.getId());
+        if (!lean) classes.add(columnModel.getId());
 
         String sort = getSortLinkClass();
 
         if (sort != null) classes.add(sort);
 
-        if (_columnIndex == 0) classes.add(GridConstants.FIRST_CLASS);
+        if (columnIndex == 0) classes.add(GridConstants.FIRST_CLASS);
 
-        if (_columnIndex == _lastColumnIndex) classes.add(GridConstants.LAST_CLASS);
+        if (columnIndex == lastColumnIndex) classes.add(GridConstants.LAST_CLASS);
 
         return TapestryInternalUtils.toClassAttributeValue(classes);
     }
@@ -161,7 +161,7 @@
 
     void onSort(String columnId)
     {
-        _gridModel.getSortModel().updateSort(columnId);
+        gridModel.getSortModel().updateSort(columnId);
     }
 
     /**
@@ -171,7 +171,7 @@
     {
         onSort(columnId);
 
-        _resources.triggerEvent(InternalConstants.GRID_INPLACE_UPDATE, new Object[] { zone }, null);
+        resources.triggerEvent(InternalConstants.GRID_INPLACE_UPDATE, new Object[] { zone }, null);
 
         // Event is handled, don't trigger further event handler methods.
 
@@ -183,21 +183,21 @@
         switch (getSortForColumn())
         {
             case ASCENDING:
-                return _ascendingAsset;
+                return ascendingAsset;
 
             case DESCENDING:
-                return _descendingAsset;
+                return descendingAsset;
 
             default:
-                return _sortableAsset;
+                return sortableAsset;
         }
     }
 
     public Object getColumnContext()
     {
-        if (_zone == null) return _columnModel.getId();
+        if (zone == null) return columnModel.getId();
 
-        return new Object[] { _columnModel.getId(), _zone };
+        return new Object[] { columnModel.getId(), zone };
     }
 
     public String getIconLabel()
@@ -205,32 +205,32 @@
         switch (getSortForColumn())
         {
             case ASCENDING:
-                return _messages.get("ascending");
+                return messages.get("ascending");
             case DESCENDING:
-                return _messages.get("descending");
+                return messages.get("descending");
             default:
-                return _messages.get("sortable");
+                return messages.get("sortable");
         }
     }
 
     public List<String> getColumnNames()
     {
-        return _gridModel.getDataModel().getPropertyNames();
+        return gridModel.getDataModel().getPropertyNames();
     }
 
 
     public void setColumnName(String columnName)
     {
-        _columnModel = _gridModel.getDataModel().get(columnName);
+        columnModel = gridModel.getDataModel().get(columnName);
     }
 
 
     public Block getBlockForColumn()
     {
-        Block override = _overrides.getBlockParameter(_columnModel.getId() + "Header");
+        Block override = overrides.getBlockParameter(columnModel.getId() + "Header");
 
         if (override != null) return override;
 
-        return _standardHeader;
+        return standardHeader;
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/GridPager.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/GridPager.java?rev=653960&r1=653959&r2=653960&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/GridPager.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/GridPager.java Tue May  6 18:00:03 2008
@@ -34,85 +34,85 @@
      * how many rows are available}, which in turn determines the page count).
      */
     @Parameter(required = true)
-    private GridDataSource _source;
+    private GridDataSource source;
 
     /**
      * The number of rows displayed per page.
      */
     @Parameter(required = true)
-    private int _rowsPerPage;
+    private int rowsPerPage;
 
     /**
      * The current page number (indexed from 1).
      */
     @Parameter(required = true)
-    private int _currentPage;
+    private int currentPage;
 
     /**
      * Number of pages before and after the current page in the range. The pager always displays links for 2 * range + 1
      * pages, unless that's more than the total number of available pages.
      */
     @Parameter("5")
-    private int _range;
+    private int range;
 
     /**
      * If not null, then each link is output as a link to update the specified zone.
      */
     @Parameter
-    private String _zone;
+    private String zone;
 
-    private int _lastIndex;
+    private int lastIndex;
 
-    private int _maxPages;
+    private int maxPages;
 
     @Inject
-    private ComponentResources _resources;
+    private ComponentResources resources;
 
     @Inject
-    private Messages _messages;
+    private Messages messages;
 
     @Environmental
-    private ClientBehaviorSupport _clientBehaviorSupport;
+    private ClientBehaviorSupport clientBehaviorSupport;
 
     @Environmental
-    private PageRenderSupport _pageRenderSupport;
+    private PageRenderSupport pageRenderSupport;
 
     void beginRender(MarkupWriter writer)
     {
-        int availableRows = _source.getAvailableRows();
+        int availableRows = source.getAvailableRows();
 
-        _maxPages = ((availableRows - 1) / _rowsPerPage) + 1;
+        maxPages = ((availableRows - 1) / rowsPerPage) + 1;
 
-        if (_maxPages < 2) return;
+        if (maxPages < 2) return;
 
         writer.element("div", "class", "t-data-grid-pager");
 
-        _lastIndex = 0;
+        lastIndex = 0;
 
         for (int i = 1; i <= 2; i++)
             writePageLink(writer, i);
 
-        int low = _currentPage - _range;
-        int high = _currentPage + _range;
+        int low = currentPage - range;
+        int high = currentPage + range;
 
         if (low < 1)
         {
             low = 1;
-            high = 2 * _range + 1;
+            high = 2 * range + 1;
         }
         else
         {
-            if (high > _maxPages)
+            if (high > maxPages)
             {
-                high = _maxPages;
-                low = high - 2 * _range;
+                high = maxPages;
+                low = high - 2 * range;
             }
         }
 
         for (int i = low; i <= high; i++)
             writePageLink(writer, i);
 
-        for (int i = _maxPages - 1; i <= _maxPages; i++)
+        for (int i = maxPages - 1; i <= maxPages; i++)
             writePageLink(writer, i);
 
         writer.end();
@@ -120,15 +120,15 @@
 
     private void writePageLink(MarkupWriter writer, int pageIndex)
     {
-        if (pageIndex < 1 || pageIndex > _maxPages) return;
+        if (pageIndex < 1 || pageIndex > maxPages) return;
 
-        if (pageIndex <= _lastIndex) return;
+        if (pageIndex <= lastIndex) return;
 
-        if (pageIndex != _lastIndex + 1) writer.write(" ... ");
+        if (pageIndex != lastIndex + 1) writer.write(" ... ");
 
-        _lastIndex = pageIndex;
+        lastIndex = pageIndex;
 
-        if (pageIndex == _currentPage)
+        if (pageIndex == currentPage)
         {
             writer.element("span", "class", "current");
             writer.write(Integer.toString(pageIndex));
@@ -136,24 +136,24 @@
             return;
         }
 
-        Object[] context = _zone == null
+        Object[] context = zone == null
                            ? new Object[] { pageIndex }
-                           : new Object[] { pageIndex, _zone };
+                           : new Object[] { pageIndex, zone };
 
-        Link link = _resources.createActionLink(TapestryConstants.ACTION_EVENT, false, context);
+        Link link = resources.createActionLink(TapestryConstants.ACTION_EVENT, false, context);
 
-        Element element = writer.element("a", "href", link, "title", _messages.format("goto-page", pageIndex));
+        Element element = writer.element("a", "href", link, "title", messages.format("goto-page", pageIndex));
 
         writer.write(Integer.toString(pageIndex));
         writer.end();
 
-        if (_zone != null)
+        if (zone != null)
         {
-            String id = _pageRenderSupport.allocateClientId(_resources);
+            String id = pageRenderSupport.allocateClientId(resources);
 
             element.attribute("id", id);
 
-            _clientBehaviorSupport.linkZone(id, _zone);
+            clientBehaviorSupport.linkZone(id, zone);
         }
     }
 
@@ -164,7 +164,7 @@
     {
         // TODO: Validate newPage in range
 
-        _currentPage = newPage;
+        currentPage = newPage;
     }
 
     /**
@@ -174,7 +174,7 @@
     {
         onAction(newPage);
 
-        _resources.triggerEvent(InternalConstants.GRID_INPLACE_UPDATE, new Object[] { zone }, null);
+        resources.triggerEvent(InternalConstants.GRID_INPLACE_UPDATE, new Object[] { zone }, null);
 
         return true; // abort event
     }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/GridRows.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/GridRows.java?rev=653960&r1=653959&r2=653960&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/GridRows.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/GridRows.java Tue May  6 18:00:03 2008
@@ -44,16 +44,16 @@
     {
         private static final long serialVersionUID = -3216282071752371975L;
 
-        private final int _rowIndex;
+        private final int rowIndex;
 
         public SetupForRow(int rowIndex)
         {
-            _rowIndex = rowIndex;
+            this.rowIndex = rowIndex;
         }
 
         public void execute(GridRows component)
         {
-            component.setupForRow(_rowIndex);
+            component.setupForRow(rowIndex);
         }
     }
 
@@ -62,33 +62,33 @@
      * cached, so it will be recomputed for each row.
      */
     @Parameter(cache = false)
-    private String _rowClass;
+    private String rowClass;
 
     /**
      * Object that provides access to the bean and data models used to render the Grid.
      */
     @Parameter(value = "componentResources.container")
-    private GridModel _gridModel;
+    private GridModel gridModel;
 
     /**
      * Number of rows displayed on each page. Long result sets are split across multiple pages.
      */
     @Parameter(required = true)
-    private int _rowsPerPage;
+    private int rowsPerPage;
 
     /**
      * The current page number within the available pages (indexed from 1).
      */
     @Parameter(required = true)
-    private int _currentPage;
+    private int currentPage;
 
     /**
      * The current row being rendered, this is primarily an output parameter used to allow the Grid, and the Grid's
      * container, to know what object is being rendered.
      */
     @Parameter(required = true)
-    @Property(write=false)
-    private Object _row;
+    @Property(write = false)
+    private Object row;
 
     /**
      * If true, then the CSS class on each &lt;TD&gt; cell will be omitted, which can reduce the amount of output from
@@ -96,29 +96,28 @@
      * to customize the look and feel of particular columns.
      */
     @Parameter
-    private boolean _lean;
+    private boolean lean;
 
     /**
      * If true and the Loop is enclosed by a Form, then the normal state saving logic is turned off. Defaults to false,
      * enabling state saving logic within Forms.
      */
-    @SuppressWarnings("unused")
-    @Parameter
-    private boolean _volatile;
+    @Parameter(name = "volatile")
+    private boolean volatileState;
 
     @Environmental(false)
-    private FormSupport _formSupport;
+    private FormSupport formSupport;
 
-    private boolean _recordingStateInsideForm;
+    private boolean recordingStateInsideForm;
 
-    private int _endRow;
+    private int endRow;
 
-    private int _rowIndex;
+    private int rowIndex;
 
-    private String _propertyName;
+    private String propertyName;
 
-    @Property(write=false)
-    private PropertyModel _columnModel;
+    @Property(write = false)
+    private PropertyModel columnModel;
 
     public String getRowClass()
     {
@@ -126,13 +125,13 @@
 
         // Not a cached parameter, so careful to only access it once.
 
-        String rc = _rowClass;
+        String rc = rowClass;
 
         if (rc != null) classes.add(rc);
 
-        if (_rowIndex == _startRow) classes.add(GridConstants.FIRST_CLASS);
+        if (rowIndex == _startRow) classes.add(GridConstants.FIRST_CLASS);
 
-        if (_rowIndex == _endRow) classes.add(GridConstants.LAST_CLASS);
+        if (rowIndex == endRow) classes.add(GridConstants.LAST_CLASS);
 
         return TapestryInternalUtils.toClassAttributeValue(classes);
     }
@@ -141,13 +140,13 @@
     {
         List<String> classes = CollectionFactory.newList();
 
-        String id = _gridModel.getDataModel().get(_propertyName).getId();
+        String id = gridModel.getDataModel().get(propertyName).getId();
 
-        if (!_lean)
+        if (!lean)
         {
             classes.add(id);
 
-            switch (_gridModel.getSortModel().getColumnSort(id))
+            switch (gridModel.getSortModel().getColumnSort(id))
             {
                 case ASCENDING:
                     classes.add(GridConstants.SORT_ASCENDING_CLASS);
@@ -167,22 +166,22 @@
 
     void setupRender()
     {
-        GridDataSource dataSource = _gridModel.getDataSource();
+        GridDataSource dataSource = gridModel.getDataSource();
 
         int availableRows = dataSource.getAvailableRows();
 
-        int maxPages = ((availableRows - 1) / _rowsPerPage) + 1;
+        int maxPages = ((availableRows - 1) / rowsPerPage) + 1;
 
         // This can sometimes happen when the number of items shifts between requests.
 
-        if (_currentPage > maxPages) _currentPage = maxPages;
+        if (currentPage > maxPages) currentPage = maxPages;
 
-        _startRow = (_currentPage - 1) * _rowsPerPage;
-        _endRow = Math.min(availableRows - 1, _startRow + _rowsPerPage - 1);
+        _startRow = (currentPage - 1) * rowsPerPage;
+        endRow = Math.min(availableRows - 1, _startRow + rowsPerPage - 1);
 
-        _rowIndex = _startRow;
+        rowIndex = _startRow;
 
-        _recordingStateInsideForm = !_volatile && _formSupport != null;
+        recordingStateInsideForm = !volatileState && formSupport != null;
     }
 
     /**
@@ -190,7 +189,7 @@
      */
     void setupForRow(int rowIndex)
     {
-        _row = _gridModel.getDataSource().getRowValue(rowIndex);
+        row = gridModel.getDataSource().getRowValue(rowIndex);
 
     }
 
@@ -198,34 +197,34 @@
     {
         // When needed, store a callback used when the form is submitted.
 
-        if (_recordingStateInsideForm) _formSupport.store(this, new SetupForRow(_rowIndex));
+        if (recordingStateInsideForm) formSupport.store(this, new SetupForRow(rowIndex));
 
         // And do it now for the render.
 
-        setupForRow(_rowIndex);
+        setupForRow(rowIndex);
     }
 
     boolean afterRender()
     {
-        _rowIndex++;
+        rowIndex++;
 
-        return _rowIndex > _endRow;
+        return rowIndex > endRow;
     }
 
     public List<String> getPropertyNames()
     {
-        return _gridModel.getDataModel().getPropertyNames();
+        return gridModel.getDataModel().getPropertyNames();
     }
 
     public String getPropertyName()
     {
-        return _propertyName;
+        return propertyName;
     }
 
     public void setPropertyName(String propertyName)
     {
-        _propertyName = propertyName;
+        this.propertyName = propertyName;
 
-        _columnModel = _gridModel.getDataModel().get(propertyName);
+        columnModel = gridModel.getDataModel().get(propertyName);
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/If.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/If.java?rev=653960&r1=653959&r2=653960&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/If.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/If.java Tue May  6 18:00:03 2008
@@ -26,7 +26,7 @@
      * If true, then the body of the If component is rendered. If false, the body is omitted.
      */
     @Parameter(required = true)
-    private boolean _test;
+    private boolean test;
 
     /**
      * Optional parameter to invert the test. If true, then the body is rendered when the test parameter is false (not
@@ -35,14 +35,14 @@
      * @see Unless
      */
     @Parameter
-    private boolean _negate;
+    private boolean negate;
 
     /**
-     * An alternate {@link Block} to render if the test parameter is false. The default, null, means render nothing in
-     * that situation.
+     * An alternate {@link org.apache.tapestry.Block} to render if the test parameter is false. The default, null, means
+     * render nothing in that situation.
      */
-    @Parameter
-    private Block _else;
+    @Parameter(name = "else")
+    private Block elseBlock;
 
     /**
      * Returns null if the test parameter is true, which allows normal rendering (of the body). If the test parameter is
@@ -50,7 +50,7 @@
      */
     Object beginRender()
     {
-        return _test != _negate ? null : _else;
+        return test != negate ? null : elseBlock;
     }
 
     /**
@@ -59,13 +59,13 @@
      */
     boolean beforeRenderBody()
     {
-        return _test != _negate;
+        return test != negate;
     }
 
     void setup(boolean test, boolean negate, Block elseBlock)
     {
-        _test = test;
-        _negate = negate;
-        _else = elseBlock;
+        this.test = test;
+        this.negate = negate;
+        this.elseBlock = elseBlock;
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Label.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Label.java?rev=653960&r1=653959&r2=653960&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Label.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Label.java Tue May  6 18:00:03 2008
@@ -40,29 +40,29 @@
      * results in the for attribute of the label element).
      */
     @Parameter(name = "for", required = true, defaultPrefix = "component")
-    private Field _field;
+    private Field field;
 
     @Environmental
-    private Heartbeat _heartbeat;
+    private Heartbeat heartbeat;
 
     @Environmental
-    private ValidationDecorator _decorator;
+    private ValidationDecorator decorator;
 
     @Inject
-    private ComponentResources _resources;
+    private ComponentResources resources;
 
-    private Element _labelElement;
+    private Element labelElement;
 
     @BeginRender
     void begin(MarkupWriter writer)
     {
-        final Field field = _field;
+        final Field field = this.field;
 
-        _decorator.beforeLabel(field);
+        decorator.beforeLabel(field);
 
-        _labelElement = writer.element("label");
+        labelElement = writer.element("label");
 
-        _resources.renderInformalParameters(writer);
+        resources.renderInformalParameters(writer);
 
         // Since we don't know if the field has rendered yet, we need to defer writing the for and id
         // attributes until we know the field has rendered (and set its clientId property). That's
@@ -74,13 +74,13 @@
             {
                 String fieldId = field.getClientId();
 
-                _labelElement.forceAttributes("for", fieldId, "id", fieldId + ":label");
+                labelElement.forceAttributes("for", fieldId, "id", fieldId + ":label");
 
-                _decorator.insideLabel(field, _labelElement);
+                decorator.insideLabel(field, labelElement);
             }
         };
 
-        _heartbeat.defer(command);
+        heartbeat.defer(command);
     }
 
     @AfterRender
@@ -89,12 +89,12 @@
         // If the Label element has a body that renders some non-blank output, that takes precendence
         // over the label string provided by the field.
 
-        boolean bodyIsBlank = InternalUtils.isBlank(_labelElement.getChildMarkup());
+        boolean bodyIsBlank = InternalUtils.isBlank(labelElement.getChildMarkup());
 
-        if (bodyIsBlank) writer.write(_field.getLabel());
+        if (bodyIsBlank) writer.write(field.getLabel());
 
         writer.end(); // label
 
-        _decorator.afterLabel(_field);
+        decorator.afterLabel(field);
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Loop.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Loop.java?rev=653960&r1=653959&r2=653960&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Loop.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Loop.java Tue May  6 18:00:03 2008
@@ -101,16 +101,16 @@
     {
         private static final long serialVersionUID = -3926831611368720764L;
 
-        private final Object _storedValue;
+        private final Object storedValue;
 
         public RestoreState(final Object storedValue)
         {
-            _storedValue = storedValue;
+            this.storedValue = storedValue;
         }
 
         public void execute(Loop component)
         {
-            component.restoreState(_storedValue);
+            component.restoreState(storedValue);
         }
     }
 
@@ -121,16 +121,16 @@
     {
         private static final long serialVersionUID = -2422790241589517336L;
 
-        private final Serializable _primaryKey;
+        private final Serializable primaryKey;
 
         public RestoreStateViaEncodedPrimaryKey(final Serializable primaryKey)
         {
-            _primaryKey = primaryKey;
+            this.primaryKey = primaryKey;
         }
 
         public void execute(Loop component)
         {
-            component.restoreStateViaEncodedPrimaryKey(_primaryKey);
+            component.restoreStateViaEncodedPrimaryKey(primaryKey);
         }
     }
 
@@ -144,16 +144,16 @@
         /**
          * The variable is final, the contents are mutable while the Loop renders.
          */
-        private final List<Serializable> _keys;
+        private final List<Serializable> keys;
 
         public PrepareForKeys(final List<Serializable> keys)
         {
-            _keys = keys;
+            this.keys = keys;
         }
 
         public void execute(Loop component)
         {
-            component.prepareForKeys(_keys);
+            component.prepareForKeys(keys);
         }
     }
 
@@ -162,90 +162,90 @@
      * container whose name
      */
     @Parameter(required = true, principal = true)
-    private Iterable<?> _source;
+    private Iterable<?> source;
 
     /**
      * Optional primary key converter; if provided and inside a form and not volatile, then each iterated value is
      * converted and stored into the form.
      */
     @Parameter
-    private PrimaryKeyEncoder<Serializable, Object> _encoder;
+    private PrimaryKeyEncoder<Serializable, Object> encoder;
 
     /**
      * If true and the Loop is enclosed by a Form, then the normal state saving logic is turned off. Defaults to false,
      * enabling state saving logic within Forms.
      */
-    @Parameter
-    private boolean _volatile;
+    @Parameter(name = "volatile")
+    private boolean volatileState;
 
     @Environmental(false)
-    private FormSupport _formSupport;
+    private FormSupport formSupport;
 
     /**
      * The element to render. If not null, then the loop will render the indicated element around its body (on each pass
      * through the loop). The default is derived from the component template.
      */
     @Parameter(value = "prop:componentResources.elementName", defaultPrefix = TapestryConstants.LITERAL_BINDING_PREFIX)
-    private String _element;
+    private String element;
 
     /**
      * The current value, set before the component renders its body.
      */
     @Parameter
-    private Object _value;
+    private Object value;
 
     /**
      * The index into the source items.
      */
     @Parameter
-    private int _index;
+    private int index;
 
-    private Iterator<?> _iterator;
+    private Iterator<?> iterator;
 
     @Environmental
-    private Heartbeat _heartbeat;
+    private Heartbeat heartbeat;
 
-    private boolean _storeRenderStateInForm;
+    private boolean storeRenderStateInForm;
 
     @Inject
-    private ComponentResources _resources;
+    private ComponentResources resources;
 
     @Inject
-    private ComponentDefaultProvider _componentDefaultProvider;
+    private ComponentDefaultProvider componentDefaultProvider;
 
     Binding defaultSource()
     {
-        return _componentDefaultProvider.defaultBinding("source", _resources);
+        return componentDefaultProvider.defaultBinding("source", resources);
     }
 
     @SetupRender
     boolean setup()
     {
-        _index = 0;
+        index = 0;
 
-        if (_source == null) return false;
+        if (source == null) return false;
 
-        _iterator = _source.iterator();
+        iterator = source.iterator();
 
-        _storeRenderStateInForm = _formSupport != null && !_volatile;
+        storeRenderStateInForm = formSupport != null && !volatileState;
 
         // Only render the body if there is something to iterate over
 
-        boolean result = _iterator.hasNext();
+        boolean result = iterator.hasNext();
 
-        if (_formSupport != null && result)
+        if (formSupport != null && result)
         {
 
-            _formSupport.store(this, _volatile ? SETUP_FOR_VOLATILE : RESET_INDEX);
+            formSupport.store(this, volatileState ? SETUP_FOR_VOLATILE : RESET_INDEX);
 
-            if (_encoder != null)
+            if (encoder != null)
             {
                 List<Serializable> keyList = newList();
 
                 // We'll keep updating the _keyList while the Loop renders, the values will "lock
                 // down" when the Form serializes all the data.
 
-                _formSupport.store(this, new PrepareForKeys(keyList));
+                formSupport.store(this, new PrepareForKeys(keyList));
             }
         }
 
@@ -257,18 +257,18 @@
         // Again, the encoder existed when we rendered, we better have another available
         // when the enclosing Form is submitted.
 
-        _encoder.prepareForKeys(keys);
+        encoder.prepareForKeys(keys);
     }
 
     private void setupForVolatile()
     {
-        _index = 0;
-        _iterator = _source.iterator();
+        index = 0;
+        iterator = source.iterator();
     }
 
     private void advanceVolatile()
     {
-        _value = _iterator.next();
+        value = iterator.next();
 
         startHeartbeat();
     }
@@ -279,43 +279,43 @@
     @BeginRender
     void begin()
     {
-        _value = _iterator.next();
+        value = iterator.next();
 
-        if (_storeRenderStateInForm)
+        if (storeRenderStateInForm)
         {
-            if (_encoder == null)
+            if (encoder == null)
             {
-                _formSupport.store(this, new RestoreState(_value));
+                formSupport.store(this, new RestoreState(value));
             }
             else
             {
-                Serializable primaryKey = _encoder.toKey(_value);
-                _formSupport.store(this, new RestoreStateViaEncodedPrimaryKey(primaryKey));
+                Serializable primaryKey = encoder.toKey(value);
+                formSupport.store(this, new RestoreStateViaEncodedPrimaryKey(primaryKey));
             }
         }
 
-        if (_formSupport != null && _volatile) _formSupport.store(this, ADVANCE_VOLATILE);
+        if (formSupport != null && volatileState) formSupport.store(this, ADVANCE_VOLATILE);
 
         startHeartbeat();
     }
 
     private void startHeartbeat()
     {
-        _heartbeat.begin();
+        heartbeat.begin();
     }
 
     void beforeRenderBody(MarkupWriter writer)
     {
-        if (_element != null)
+        if (element != null)
         {
-            writer.element(_element);
-            _resources.renderInformalParameters(writer);
+            writer.element(element);
+            resources.renderInformalParameters(writer);
         }
     }
 
     void afterRenderBody(MarkupWriter writer)
     {
-        if (_element != null) writer.end();
+        if (element != null) writer.end();
     }
 
     /**
@@ -326,21 +326,21 @@
     {
         endHeartbeat();
 
-        if (_formSupport != null) _formSupport.store(this, END_HEARTBEAT);
+        if (formSupport != null) formSupport.store(this, END_HEARTBEAT);
 
-        return !_iterator.hasNext();
+        return !iterator.hasNext();
     }
 
     private void endHeartbeat()
     {
-        _heartbeat.end();
+        heartbeat.end();
 
-        _index++;
+        index++;
     }
 
     private void resetIndex()
     {
-        _index = 0;
+        index = 0;
     }
 
     /**
@@ -348,7 +348,7 @@
      */
     private void restoreState(Object storedValue)
     {
-        _value = storedValue;
+        value = storedValue;
 
         startHeartbeat();
     }
@@ -361,7 +361,7 @@
         // We assume that if a encoder is available when we rendered, that one will be available
         // when the form is submitted. TODO: Check for this.
 
-        Object restoredValue = _encoder.toValue(primaryKey);
+        Object restoredValue = encoder.toValue(primaryKey);
 
         restoreState(restoredValue);
     }
@@ -370,21 +370,21 @@
 
     int getIndex()
     {
-        return _index;
+        return index;
     }
 
     Object getValue()
     {
-        return _value;
+        return value;
     }
 
     void setSource(Iterable<?> source)
     {
-        _source = source;
+        this.source = source;
     }
 
     void setHeartbeat(Heartbeat heartbeat)
     {
-        _heartbeat = heartbeat;
+        this.heartbeat = heartbeat;
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Output.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Output.java?rev=653960&r1=653959&r2=653960&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Output.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/Output.java Tue May  6 18:00:03 2008
@@ -36,58 +36,58 @@
      * The value to be output (before formatting). If the formatted value is blank, no output is produced.
      */
     @Parameter(required = true)
-    private Object _value;
+    private Object value;
 
     /**
      * The format to be applied to the object.
      */
     @Parameter(required = true)
-    private Format _format;
+    private Format format;
 
     /**
      * If true, the default, then output is filtered, escaping any reserved characters. If false, the output is written
      * raw.
      */
     @Parameter
-    private boolean _filter = true;
+    private boolean filter = true;
 
     /**
      * The element name, derived from the component template. This can even be overridden manually if desired (for
      * example, to sometimes render a surrounding element and other times not).
      */
     @Parameter("componentResources.elementName")
-    private String _elementName;
+    private String elementName;
 
     @Inject
-    private ComponentDefaultProvider _defaultProvider;
+    private ComponentDefaultProvider defaultProvider;
 
     @Inject
-    private ComponentResources _resources;
+    private ComponentResources resources;
 
     Binding defaultValue()
     {
-        return _defaultProvider.defaultBinding("value", _resources);
+        return defaultProvider.defaultBinding("value", resources);
     }
 
     boolean beginRender(MarkupWriter writer)
     {
-        if (_value == null) return false;
+        if (value == null) return false;
 
-        String formatted = _format.format(_value);
+        String formatted = format.format(value);
 
         if (InternalUtils.isNonBlank(formatted))
         {
-            if (_elementName != null)
+            if (elementName != null)
             {
-                writer.element(_elementName);
+                writer.element(elementName);
 
-                _resources.renderInformalParameters(writer);
+                resources.renderInformalParameters(writer);
             }
 
-            if (_filter) writer.write(formatted);
+            if (filter) writer.write(formatted);
             else writer.writeRaw(formatted);
 
-            if (_elementName != null) writer.end();
+            if (elementName != null) writer.end();
         }
 
         return false;
@@ -97,10 +97,10 @@
 
     void setup(Object value, Format format, boolean filter, String elementName, ComponentResources resources)
     {
-        _value = value;
-        _format = format;
-        _filter = filter;
-        _elementName = elementName;
-        _resources = resources;
+        this.value = value;
+        this.format = format;
+        this.filter = filter;
+        this.elementName = elementName;
+        this.resources = resources;
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/OutputRaw.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/OutputRaw.java?rev=653960&r1=653959&r2=653960&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/OutputRaw.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/OutputRaw.java Tue May  6 18:00:03 2008
@@ -35,22 +35,22 @@
      * property will be the source of the value.
      */
     @Parameter(required = true)
-    private String _value;
+    private String value;
 
     @Inject
-    private ComponentDefaultProvider _defaultProvider;
+    private ComponentDefaultProvider defaultProvider;
 
     @Inject
-    private ComponentResources _resources;
+    private ComponentResources resources;
 
     Binding defaultValue()
     {
-        return _defaultProvider.defaultBinding("value", _resources);
+        return defaultProvider.defaultBinding("value", resources);
     }
 
     boolean beginRender(MarkupWriter writer)
     {
-        if (_value != null && _value.length() > 0) writer.writeRaw(_value);
+        if (value != null && value.length() > 0) writer.writeRaw(value);
 
         // Abort the rest of the render.
 
@@ -61,7 +61,7 @@
 
     void setValue(String value)
     {
-        _value = value;
+        this.value = value;
     }
 
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/PageLink.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/PageLink.java?rev=653960&r1=653959&r2=653960&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/PageLink.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/PageLink.java Tue May  6 18:00:03 2008
@@ -37,17 +37,17 @@
      * The logical name of the page to link to.
      */
     @Parameter(required = true, defaultPrefix = "literal")
-    private String _page;
+    private String page;
 
     @Inject
-    private ComponentResources _resources;
+    private ComponentResources resources;
 
     /**
      * If provided, this is the activation context for the target page (the information will be encoded into the URL).
      * If not provided, then the target page will provide its own activation context.
      */
     @Parameter
-    private List _context;
+    private List context;
 
     private final Object[] _emptyContext = new Object[0];
 
@@ -55,9 +55,9 @@
     {
         if (isDisabled()) return;
 
-        Object[] activationContext = _context != null ? _context.toArray() : _emptyContext;
+        Object[] activationContext = context != null ? context.toArray() : _emptyContext;
 
-        Link link = _resources.createPageLink(_page, _resources.isBound("context"), activationContext);
+        Link link = resources.createPageLink(page, resources.isBound("context"), activationContext);
 
         writeLink(writer, link);
     }