I have a grid component with some complex features I want to reuse in various
places of my app.
However, I'm having a problem preserving the AJAXy behavior.
Before I extracted the grid into its own component the tml looked like this:
<t:zone t:id="itemFormZone" id="itemFormZone" t:update="highlight">
<t:form t:id="itemForm" zone="^">
<table t:type="grid"... >
...
<p:actionsCell>
<a t:type="actionlink" t:id="removeItem" context="item.id">
Remove Item </a>
</p:actionsCell>
</table>
<input type="submit" value="Save"/>
</t:form>
</t:zone>
The action link was AJAXy with the handler Object onActionFromRemoveItem(Long
id){}
Then, I extracted the table grid into a component and replaced it in my TML
with:
<t:package.mycustomitemgrid ... />
But now the AJAX behavior of the remove button is lost.
Things to note:
1. The Zone is in the Page's TML, there is no Zone in the component TML
2. I've tried using an eventlink instead of an actionlink, but clicking it
still causes a full page refresh
3. In my event or actionlink handler (in the Page class!), _request.isXHR() ==
false
How do I make the actionlink/eventlink inside my custom component respect the
ajax Zone they are placed in inside the parent?
Cheers,
Casey
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]