You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Davor Hrg (JIRA)" <de...@tapestry.apache.org> on 2008/03/12 14:32:47 UTC
[jira] Created: (TAPESTRY-2252) Support for EmbededComponent as
Block without template tag
Support for EmbededComponent as Block without template tag
----------------------------------------------------------
Key: TAPESTRY-2252
URL: https://issues.apache.org/jira/browse/TAPESTRY-2252
Project: Tapestry
Issue Type: Improvement
Affects Versions: 5.0.12
Reporter: Davor Hrg
Priority: Minor
Fix For: unspecified
I have a complex form with multiple steps,
I've embeded the parts so I can notify them to reset state when new entity is loaded...
but beside that it looks like this:
@Component private Eri _eri;
@Component private Route _route;
@Component private Barges _barges;
@Component private Consigments _consigments;
@Component private Containers _containers;
@Component private Finish _finish;
and in the template I need:
<t:block t:id="eri_block" ><p t:id="eri"/></t:block>
<t:block t:id="route_block" ><p t:id="route"/></t:block>
<t:block t:id="barges_block" ><p t:id="barges"/></t:block>
<t:block t:id="consigments_block" ><p t:id="consigments"/></t:block>
<t:block t:id="containers_block" ><p t:id="containers"/></t:block>
<t:block t:id="finish_block" ><p t:id="finish"/></t:block>
It is not that much, but I'd prefer to not have to write the above code into template,
there could be a parameter to mark the embeded component as a block
so the framework is strict about this and to avoid problems with misspelled ids.
something like this:
@Component(block=true) private Finish _finish;
or
@Component @Block private Finish _finish;
all these component need not render them selves, but will be included as
block inside a t:delegate, so their position in template is irrellevant.
--
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
[jira] Commented: (TAPESTRY-2252) Support for EmbededComponent as
Block without template tag
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12577872#action_12577872 ]
Howard M. Lewis Ship commented on TAPESTRY-2252:
------------------------------------------------
I think you made this too complicated.
How about:
<t:block>
<p t:id="eri"/>
<p t:id="route"/>
<p t:id="barges"/>
...
</t:block>
Put them all inside an anonymous block. That'll keep them from rendering normally with the rest of the template.
You can provide a component instance to a Delegate component just as you can a Block. Just the component will render, not its siblings, and I think that gets you what you want.
Further, you can @Inject a Block instance. Your @Component @Block doesn't make sense because the field type, Finish, is your component type, not type Block ... that seems to indicate a conflict that can't be resolved.
> Support for EmbededComponent as Block without template tag
> ----------------------------------------------------------
>
> Key: TAPESTRY-2252
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2252
> Project: Tapestry
> Issue Type: Improvement
> Affects Versions: 5.0.12
> Reporter: Davor Hrg
> Priority: Minor
> Fix For: unspecified
>
>
> I have a complex form with multiple steps,
> I've embeded the parts so I can notify them to reset state when new entity is loaded...
> but beside that it looks like this:
> @Component private Eri _eri;
> @Component private Route _route;
> @Component private Barges _barges;
> @Component private Consigments _consigments;
> @Component private Containers _containers;
> @Component private Finish _finish;
> and in the template I need:
> <t:block t:id="eri_block" ><p t:id="eri"/></t:block>
> <t:block t:id="route_block" ><p t:id="route"/></t:block>
> <t:block t:id="barges_block" ><p t:id="barges"/></t:block>
> <t:block t:id="consigments_block" ><p t:id="consigments"/></t:block>
> <t:block t:id="containers_block" ><p t:id="containers"/></t:block>
> <t:block t:id="finish_block" ><p t:id="finish"/></t:block>
> It is not that much, but I'd prefer to not have to write the above code into template,
> there could be a parameter to mark the embeded component as a block
> so the framework is strict about this and to avoid problems with misspelled ids.
> something like this:
> @Component(block=true) private Finish _finish;
> or
> @Component @Block private Finish _finish;
> all these component need not render them selves, but will be included as
> block inside a t:delegate, so their position in template is irrellevant.
--
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
[jira] Commented: (TAPESTRY-2252) Support for EmbededComponent as
Block without template tag
Posted by "Davor Hrg (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12577983#action_12577983 ]
Davor Hrg commented on TAPESTRY-2252:
-------------------------------------
ok, that is definitely simpler,
now it is a minimal overhead,
InjectComponent definitely must have a template counterpart,
but components in a case like mine can just as well be omitted from template.
If it is not too much against the framework, it would be a nice little simplification.
> Support for EmbededComponent as Block without template tag
> ----------------------------------------------------------
>
> Key: TAPESTRY-2252
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2252
> Project: Tapestry
> Issue Type: Improvement
> Affects Versions: 5.0.12
> Reporter: Davor Hrg
> Priority: Minor
> Fix For: unspecified
>
>
> I have a complex form with multiple steps,
> I've embeded the parts so I can notify them to reset state when new entity is loaded...
> but beside that it looks like this:
> @Component private Eri _eri;
> @Component private Route _route;
> @Component private Barges _barges;
> @Component private Consigments _consigments;
> @Component private Containers _containers;
> @Component private Finish _finish;
> and in the template I need:
> <t:block t:id="eri_block" ><p t:id="eri"/></t:block>
> <t:block t:id="route_block" ><p t:id="route"/></t:block>
> <t:block t:id="barges_block" ><p t:id="barges"/></t:block>
> <t:block t:id="consigments_block" ><p t:id="consigments"/></t:block>
> <t:block t:id="containers_block" ><p t:id="containers"/></t:block>
> <t:block t:id="finish_block" ><p t:id="finish"/></t:block>
> It is not that much, but I'd prefer to not have to write the above code into template,
> there could be a parameter to mark the embeded component as a block
> so the framework is strict about this and to avoid problems with misspelled ids.
> something like this:
> @Component(block=true) private Finish _finish;
> or
> @Component @Block private Finish _finish;
> all these component need not render them selves, but will be included as
> block inside a t:delegate, so their position in template is irrellevant.
--
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
[jira] Closed: (TAPESTRY-2252) Support for EmbededComponent as
Block without template tag
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAPESTRY-2252.
------------------------------------------
Resolution: Won't Fix
Fix Version/s: (was: unspecified)
Assignee: Howard M. Lewis Ship
Allowing @Component or @InjectComponent without something in the template would defeat some honest warnings that we already have, when a component is defined but not referenced in the template. Those other warnings are important (they perhaps should be errors, not warnings). Since its both or neither, I chose neither. Put your components inside a <t:block>.
> Support for EmbededComponent as Block without template tag
> ----------------------------------------------------------
>
> Key: TAPESTRY-2252
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2252
> Project: Tapestry
> Issue Type: Improvement
> Affects Versions: 5.0.12
> Reporter: Davor Hrg
> Assignee: Howard M. Lewis Ship
> Priority: Minor
>
> I have a complex form with multiple steps,
> I've embeded the parts so I can notify them to reset state when new entity is loaded...
> but beside that it looks like this:
> @Component private Eri _eri;
> @Component private Route _route;
> @Component private Barges _barges;
> @Component private Consigments _consigments;
> @Component private Containers _containers;
> @Component private Finish _finish;
> and in the template I need:
> <t:block t:id="eri_block" ><p t:id="eri"/></t:block>
> <t:block t:id="route_block" ><p t:id="route"/></t:block>
> <t:block t:id="barges_block" ><p t:id="barges"/></t:block>
> <t:block t:id="consigments_block" ><p t:id="consigments"/></t:block>
> <t:block t:id="containers_block" ><p t:id="containers"/></t:block>
> <t:block t:id="finish_block" ><p t:id="finish"/></t:block>
> It is not that much, but I'd prefer to not have to write the above code into template,
> there could be a parameter to mark the embeded component as a block
> so the framework is strict about this and to avoid problems with misspelled ids.
> something like this:
> @Component(block=true) private Finish _finish;
> or
> @Component @Block private Finish _finish;
> all these component need not render them selves, but will be included as
> block inside a t:delegate, so their position in template is irrellevant.
--
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