On 21.12.2007, at 19:29, Kaspar Fischer wrote:
Hi,
My custom component needs to emit in its renderComponent() method
several
DirectLink with updateComponents information. That is, I need to
output the
same HTML as
<a jwcid="@DirectLink" listener="listener:doClick"
updateComponents="result"></a>
generates non-programmatically, but from within renderComponent().
How can
I do this?
Thanks,
Kaspar
To give a concrete example: I tried to do it as follows:
<div jwcid="@Block">
<a jwcid="[EMAIL PROTECTED]" listener="listener:showResult"
updateComponents="result"></a>
</div>
<div jwcid="@ResultElement" tree="ognl:mydate"/>
<div jwcid="[EMAIL PROTECTED]">
<div jwcid="@Insert" value="ognl:result"></div>
div>
... and from the code (ResultElement's renderComponent()) I try to
render the link as follows:
DirectLink link = (DirectLink)this.getContainer().getComponent
("link");
String url = link.getLink(cycle).getURL();
writer.begin("a");
writer.appendAttribute("href", url);
writer.print(title);
writer.end();
Unfortunately, this only outputs an ordinary link, not an AJAX link!
Any ideas how to output a AJAX link programmatically?
Thanks,
Kaspar
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]