Re: [t5] NPE in createActionLink

2008-02-21 Thread Joachim Van der Auwera
Tried that, it doesn't work, gives Event 'action' from ObjectEdit:edit.organizations.add received an event handler method return value of [EMAIL PROTECTED] This type of event does not support return values from event handler methods. Robert Zeigler wrote: In that case, why not just trigger

Re: [t5] NPE in createActionLink

2008-02-21 Thread Ted Steen
Try to create the action link in setupRender(). I remember having trouble creating the actionlink too early (onActivate) after upgrading from 5.0.6. I'm looking it to it this weekend. 2008/2/20, Joachim Van der Auwera [EMAIL PROTECTED]: Does anybody have an idea what I am doing wrong? Using

Re: [t5] NPE in createActionLink

2008-02-21 Thread Davor Hrg
if the event can return a value add a handler as the last parameter instead of null resources.triggerEvent(action,contextArray,null); Davor Hrg On Thu, Feb 21, 2008 at 10:25 AM, Joachim Van der Auwera [EMAIL PROTECTED] wrote: Tried that, it doesn't work, gives Event 'action' from

Re: [t5] NPE in createActionLink

2008-02-21 Thread Joachim Van der Auwera
Thanks for the help. That is exactly what I am doing now. Joachim Ted Steen wrote: Try to create the action link in setupRender(). I remember having trouble creating the actionlink too early (onActivate) after upgrading from 5.0.6. I'm looking it to it this weekend. 2008/2/20, Joachim Van der

Re: [t5] NPE in createActionLink

2008-02-20 Thread Robert Zeigler
getting a NPE trying to access the page's root element (page is null). Page is obtained from the active page from the page render queue. So, it looks like you're trying to create an action link while no page is rendering. Cheers. Robert On Feb 20, 2008, at 2/202:03 PM , Joachim Van der

[t5] NPE in createActionLink

2008-02-20 Thread Joachim Van der Auwera
Does anybody have an idea what I am doing wrong? Using the latest snapshot of tapestry5. In the following code : @Inject private ComponentResources resources; /** * Act upon the link */ void onSelected() { Link link = resources.createActionLink( action, false,

Re: [t5] NPE in createActionLink

2008-02-20 Thread Joachim Van der Auwera
Indeed. Problem is that I don't need it until the button is clicked. Then in the onSelected() I build the Link to redirect to. It seems a bit backward (and waste of data in the session) if I have to build this link during render and persist it until the button is clicked (if it is). Any ideas

Re: [t5] NPE in createActionLink

2008-02-20 Thread Robert Zeigler
What is it you're trying to accomplish? Robert On Feb 20, 2008, at 2/202:31 PM , Joachim Van der Auwera wrote: Indeed. Problem is that I don't need it until the button is clicked. Then in the onSelected() I build the Link to redirect to. It seems a bit backward (and waste of data in the

Re: [t5] NPE in createActionLink

2008-02-20 Thread Robert Zeigler
In that case, why not just trigger the action yourself? void onSelected() { resources.triggerEvent(action,contextArray,null); } Robert On Feb 20, 2008, at 2/203:24 PM , Joachim Van der Auwera wrote: I am creating a component which behaves like an ActionLink but is form aware in the sense

Re: [t5] NPE in createActionLink

2008-02-20 Thread Joachim Van der Auwera
I am creating a component which behaves like an ActionLink but is form aware in the sense that the form is submitted and then the actionlink is called. It all works fine when I persist the link (building it in the render phase). But was hoping to not need the persit. Then again, it should not