I think the problem is the missing of simply using the "Decorator" in these cases
like it's used with the pure Table:
http://www.avoka.com/click-examples/table/table-decorator.htm
Here there's also "render()" in the decorator (like in the Tree example) but it behaves like the user expects - not after onProcess.


The table-decorator example is subtly different from the Tree example Adrian attached. In the table-decorator the ActionLink is added as a public variable, thus Click automatically adds the ActionLink as a control before the onProcess method.

In the Tree example the ActionLink is added inside the render method, which occurs after the onProcess method.
But only inside there I know the attributes and parameters for the ActionLink call, and also how many of them are :(.

If you also add the ActionLink as a public variable in the Tree example, it should work.
I did, but the result is the same :(.
In Adrian's example, if I add a public ActionLink (only one since I don't know how many would be):
------
public ActionLink alink = new ActionLink("alink");
-----

than instead of:
-----------
ActionLink link = new ActionLink(nodeId,nodeValue,this,"onAddClick");
-----------
I re-use that public "alink" with those attributes:
-----------
alink.setLabel(nodeValue);alink.setListener(this,"onAddClick");
// and the right params:
alink.setParameter("myParam",StringUtils.substringAfter(nodeId,"add_"));
-----------

than the result is the same :(. It's rendered how I want, but the desired action method is still not called :( (just like the case when I'm not using a public link).


thanks,
Joseph.

Reply via email to