You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Igor Drobiazko (JIRA)" <de...@tapestry.apache.org> on 2008/02/07 13:32:11 UTC
[jira] Created: (TAPESTRY-2132) Rendering of blocks and/or zones
Rendering of blocks and/or zones
--------------------------------
Key: TAPESTRY-2132
URL: https://issues.apache.org/jira/browse/TAPESTRY-2132
Project: Tapestry
Issue Type: Improvement
Affects Versions: 5.0.10
Reporter: Igor Drobiazko
Initially a block is not rendered. This is quite reasonable for the usecase in which you define an empty block for the Grid.
Now consider following scenario:
We have a Grid containing an ActionLink for every single row.
<t:grid t:id="grid" source="users" model="model" row="user">
<t:parameter name="deleteCell">
<t:actionlink t:id="delete" zone="deleteZone" context="user.id">Delete</t:actionlink>
</t:parameter>
</t:grid>
Clicking on the link I want to delete the user and update the table without to refresh the whole page.
To make a partial response we have several possibilities. Two of them are to return a component or a block.
It would be nice to wrap the table by a block which is rendered initially. This block could be returned by the action method.
Alternatively one could put the Grid into the zone but this doesn't work well. Every second click ends in a full refresh of the page.
The reason is that after the partial response the ActionLinks of the updated Grid are not converted into Ajax links.
--
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-2132) Allow Blocks to render themselves
initially
Posted by "Massimo Lusetti (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588206#action_12588206 ]
Massimo Lusetti commented on TAPESTRY-2132:
-------------------------------------------
By my point of view i was more interested in the solution as a new feature for block "components".
I've to say that i've always found a workaround for my use case even before Andy suggestion, which is BTW a very nice one.
> Allow Blocks to render themselves initially
> -------------------------------------------
>
> Key: TAPESTRY-2132
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2132
> Project: Tapestry
> Issue Type: Improvement
> Affects Versions: 5.0.10
> Reporter: Igor Drobiazko
> Fix For: 5.1
>
>
> Initially a block is not rendered. This is quite reasonable for the usecase in which you define an empty block for the Grid.
> Now consider following scenario:
> We have a Grid containing an ActionLink for every single row.
> <t:grid t:id="grid" source="users" model="model" row="user">
> <t:parameter name="deleteCell">
> <t:actionlink t:id="delete" zone="deleteZone" context="user.id">Delete</t:actionlink>
> </t:parameter>
> </t:grid>
> Clicking on the link I want to delete the user and update the table without to refresh the whole page.
> To make a partial response we have several possibilities. Two of them are to return a component or a block.
> It would be nice to wrap the table by a block which is rendered initially. This block could be returned by the action method.
> Alternatively one could put the Grid into the zone but this doesn't work well. Every second click ends in a full refresh of the page.
> The reason is that after the partial response the ActionLinks of the updated Grid are not converted into Ajax links.
--
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-2132) Allow Blocks to render themselves
initially
Posted by "Igor Drobiazko (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576974#action_12576974 ]
Igor Drobiazko commented on TAPESTRY-2132:
------------------------------------------
Exactly
> Allow Blocks to render themselves initially
> -------------------------------------------
>
> Key: TAPESTRY-2132
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2132
> Project: Tapestry
> Issue Type: Improvement
> Affects Versions: 5.0.10
> Reporter: Igor Drobiazko
> Fix For: 5.1
>
>
> Initially a block is not rendered. This is quite reasonable for the usecase in which you define an empty block for the Grid.
> Now consider following scenario:
> We have a Grid containing an ActionLink for every single row.
> <t:grid t:id="grid" source="users" model="model" row="user">
> <t:parameter name="deleteCell">
> <t:actionlink t:id="delete" zone="deleteZone" context="user.id">Delete</t:actionlink>
> </t:parameter>
> </t:grid>
> Clicking on the link I want to delete the user and update the table without to refresh the whole page.
> To make a partial response we have several possibilities. Two of them are to return a component or a block.
> It would be nice to wrap the table by a block which is rendered initially. This block could be returned by the action method.
> Alternatively one could put the Grid into the zone but this doesn't work well. Every second click ends in a full refresh of the page.
> The reason is that after the partial response the ActionLinks of the updated Grid are not converted into Ajax links.
--
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] Updated: (TAP5-82) Allow Blocks to render themselves
initially
Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-82?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship updated TAP5-82:
-------------------------------------
Priority: Minor (was: Major)
A recent change is that a Zone now provides access to its body. Thus you can render a Zone initially, and on an Ajax component event, return the Zone's body to refresh the Zone's content. This (I believe) covers most of the use cases I think you are targetting, and does it with a bit less clutter in the template file.
> Allow Blocks to render themselves initially
> -------------------------------------------
>
> Key: TAP5-82
> URL: https://issues.apache.org/jira/browse/TAP5-82
> Project: Tapestry 5
> Issue Type: New Feature
> Affects Versions: 5.0.15
> Reporter: Igor Drobiazko
> Priority: Minor
>
> Initially a block is not rendered. This is quite reasonable for the usecase in which you define an empty block for the Grid.
> Now consider following scenario:
> We have a Grid containing an ActionLink for every single row.
> <t:grid t:id="grid" source="users" model="model" row="user">
> <t:parameter name="deleteCell">
> <t:actionlink t:id="delete" zone="deleteZone" context="user.id">Delete</t:actionlink>
> </t:parameter>
> </t:grid>
> Clicking on the link I want to delete the user and update the table without to refresh the whole page.
> To make a partial response we have several possibilities. Two of them are to return a component or a block.
> It would be nice to wrap the table by a block which is rendered initially. This block could be returned by the action method.
> Alternatively one could put the Grid into the zone but this doesn't work well. Every second click ends in a full refresh of the page.
> The reason is that after the partial response the ActionLinks of the updated Grid are not converted into Ajax links.
--
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] Updated: (TAP5-82) Allow Blocks to render themselves
initially
Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-82?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship updated TAP5-82:
-------------------------------------
Issue Type: New Feature (was: Bug)
> Allow Blocks to render themselves initially
> -------------------------------------------
>
> Key: TAP5-82
> URL: https://issues.apache.org/jira/browse/TAP5-82
> Project: Tapestry 5
> Issue Type: New Feature
> Affects Versions: 5.0.15
> Reporter: Igor Drobiazko
>
> Initially a block is not rendered. This is quite reasonable for the usecase in which you define an empty block for the Grid.
> Now consider following scenario:
> We have a Grid containing an ActionLink for every single row.
> <t:grid t:id="grid" source="users" model="model" row="user">
> <t:parameter name="deleteCell">
> <t:actionlink t:id="delete" zone="deleteZone" context="user.id">Delete</t:actionlink>
> </t:parameter>
> </t:grid>
> Clicking on the link I want to delete the user and update the table without to refresh the whole page.
> To make a partial response we have several possibilities. Two of them are to return a component or a block.
> It would be nice to wrap the table by a block which is rendered initially. This block could be returned by the action method.
> Alternatively one could put the Grid into the zone but this doesn't work well. Every second click ends in a full refresh of the page.
> The reason is that after the partial response the ActionLinks of the updated Grid are not converted into Ajax links.
--
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-2132) Allow Blocks to render themselves
initially
Posted by "Andy Blower (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587588#action_12587588 ]
Andy Blower commented on TAPESTRY-2132:
---------------------------------------
If I understand the issue correctly, this can be done using the delegate component. I know because I needed to do the same thing.
So, you have a zone which initially has a delegate comp in it that renders the block when the page is first rendered. Then when you refresh the zone, returning the injected block comp from your action method, the zone's contents becomes another partial rendering of the block. Note that the block can be anywhere in the template - it doesn't have to be inside the zone.
<div t:type="zone" t:id="som">
<t:delegate to="somBlock"/>
<t:block t:id="somBlock">block-content</t:block>
</div>
Unless there's some limitation to this technique that I cannot see, or this is considered a bad thing for some reason, then could this bug be closed needing no further resolution?
> Allow Blocks to render themselves initially
> -------------------------------------------
>
> Key: TAPESTRY-2132
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2132
> Project: Tapestry
> Issue Type: Improvement
> Affects Versions: 5.0.10
> Reporter: Igor Drobiazko
> Fix For: 5.1
>
>
> Initially a block is not rendered. This is quite reasonable for the usecase in which you define an empty block for the Grid.
> Now consider following scenario:
> We have a Grid containing an ActionLink for every single row.
> <t:grid t:id="grid" source="users" model="model" row="user">
> <t:parameter name="deleteCell">
> <t:actionlink t:id="delete" zone="deleteZone" context="user.id">Delete</t:actionlink>
> </t:parameter>
> </t:grid>
> Clicking on the link I want to delete the user and update the table without to refresh the whole page.
> To make a partial response we have several possibilities. Two of them are to return a component or a block.
> It would be nice to wrap the table by a block which is rendered initially. This block could be returned by the action method.
> Alternatively one could put the Grid into the zone but this doesn't work well. Every second click ends in a full refresh of the page.
> The reason is that after the partial response the ActionLinks of the updated Grid are not converted into Ajax links.
--
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] Updated: (TAPESTRY-2132) Allow Blocks to render themselves
initially
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship updated TAPESTRY-2132:
-------------------------------------------
Fix Version/s: 5.1
Summary: Allow Blocks to render themselves initially (was: Rendering of blocks and/or zones)
As I understand it, what you want is for the Block to render itself initally, but still be useable as a content provider for an Ajax partial update response.
> Allow Blocks to render themselves initially
> -------------------------------------------
>
> Key: TAPESTRY-2132
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2132
> Project: Tapestry
> Issue Type: Improvement
> Affects Versions: 5.0.10
> Reporter: Igor Drobiazko
> Fix For: 5.1
>
>
> Initially a block is not rendered. This is quite reasonable for the usecase in which you define an empty block for the Grid.
> Now consider following scenario:
> We have a Grid containing an ActionLink for every single row.
> <t:grid t:id="grid" source="users" model="model" row="user">
> <t:parameter name="deleteCell">
> <t:actionlink t:id="delete" zone="deleteZone" context="user.id">Delete</t:actionlink>
> </t:parameter>
> </t:grid>
> Clicking on the link I want to delete the user and update the table without to refresh the whole page.
> To make a partial response we have several possibilities. Two of them are to return a component or a block.
> It would be nice to wrap the table by a block which is rendered initially. This block could be returned by the action method.
> Alternatively one could put the Grid into the zone but this doesn't work well. Every second click ends in a full refresh of the page.
> The reason is that after the partial response the ActionLinks of the updated Grid are not converted into Ajax links.
--
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-2132) Allow Blocks to render themselves
initially
Posted by "Igor Drobiazko (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588011#action_12588011 ]
Igor Drobiazko commented on TAPESTRY-2132:
------------------------------------------
Yes, delegate component can solve my issue:
<t:zone t:id="gridZone">
<t:delegate to="gridBlock"/>
<t:block id="gridBlock">
<t:grid t:id="grid" source="users" model="model" row="user">
<t:parameter name="deleteCell">
<t:actionlink t:id="delete" zone="gridZone" context="user.id">Delete</t:actionlink>
</t:parameter>
</t:grid>
</t:block>
</t:zone>
Before closing the issue we should ask the watchers of the issue if they still want Blocks to render themselves initially. Maybe there further use cases.
> Allow Blocks to render themselves initially
> -------------------------------------------
>
> Key: TAPESTRY-2132
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2132
> Project: Tapestry
> Issue Type: Improvement
> Affects Versions: 5.0.10
> Reporter: Igor Drobiazko
> Fix For: 5.1
>
>
> Initially a block is not rendered. This is quite reasonable for the usecase in which you define an empty block for the Grid.
> Now consider following scenario:
> We have a Grid containing an ActionLink for every single row.
> <t:grid t:id="grid" source="users" model="model" row="user">
> <t:parameter name="deleteCell">
> <t:actionlink t:id="delete" zone="deleteZone" context="user.id">Delete</t:actionlink>
> </t:parameter>
> </t:grid>
> Clicking on the link I want to delete the user and update the table without to refresh the whole page.
> To make a partial response we have several possibilities. Two of them are to return a component or a block.
> It would be nice to wrap the table by a block which is rendered initially. This block could be returned by the action method.
> Alternatively one could put the Grid into the zone but this doesn't work well. Every second click ends in a full refresh of the page.
> The reason is that after the partial response the ActionLinks of the updated Grid are not converted into Ajax links.
--
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