You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Ben Sommerville (JIRA)" <de...@tapestry.apache.org> on 2008/01/14 03:05:34 UTC
[jira] Resolved: (TAPESTRY-1395) Add mixin to render element name &
id
[ https://issues.apache.org/jira/browse/TAPESTRY-1395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ben Sommerville resolved TAPESTRY-1395.
---------------------------------------
Resolution: Won't Fix
That makes sense to me.
I can't remember exactly what prompted this issue originally but reviewing my code & the tapestry core I no longer see any real benefit to a mixin.
> Add mixin to render element name & id
> -------------------------------------
>
> Key: TAPESTRY-1395
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1395
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.0.4
> Reporter: Ben Sommerville
> Priority: Trivial
>
> Currently all field components have to render their name and id explicitly.
> Since all field components need to do this it seems reasonable to add a mixin to do it for them, similar to the RenderDisabled mixin.
> This moves the responsiblity for rendering element names and ids to one place & reduce the code for component implementations. It also means that derived components don't have to worry about names/id in unit tests (which is tricky since both those fields are read only)
> e.g.
> /**
> * Renders a "name" and "id' attribute for the containing field.
> */
> @MixinAfter
> public class RenderIdentifiers {
> @InjectComponent
> private Field _field;
> void beginRender(MarkupWriter writer)
> {
> writer.attributes("name",field.getElementName()
> "id", field.getClientId);
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org