Hi All,
I am experiencing a error of using "ComponentResources.createActionLink"
after upgrade from 5.0.6 to 5.0.10. The code used to work now broke.
The Stack Trace is :
==================
Caused by: java.lang.NullPointerException
at
org.apache.tapestry.internal.services.LinkFactoryImpl.collectActivationContextForPage(LinkFactoryImpl.java:217)
at
org.apache.tapestry.internal.services.LinkFactoryImpl.createActionLink(LinkFactoryImpl.java:129)
at
$LinkFactory_11832fc661e.createActionLink($LinkFactory_11832fc661e.java)
at
org.apache.tapestry.internal.structure.PageImpl.createActionLink(PageImpl.java:156)
at
org.apache.tapestry.internal.structure.InternalComponentResourcesImpl.createActionLink(InternalComponentResourcesImpl.java:123)
at
net.memberdirect.mdsb.pages.trial.DemoActionLink.onActionFromLink1(DemoActionLink.java:18)
....
==================
The code snippet is:
===============
public class DemoActionLink
{
@Inject
private ComponentResources componentResources;
@SuppressWarnings("unused")
private Object onActionFromLink1()
{
// Some Business logic
// Navigation logic
return this.componentResources.createActionLink( "Link2", false
);
}
@SuppressWarnings("unused")
private Object onLink2()
{
// Some Business logic
// Navigation logic
}
}
======================
What I noticed in 5.0.10 source code is that
"ComponentResources.createActionLink" is either called from "beginRender" or
"afterRender" method only. Does that imply that we cannot use it in event
handlers?
Cheers,
Jeffrey Ai
--
View this message in context:
http://www.nabble.com/T5-5.0.10%3A---ComponentResources.createActionLink-broke-after-upgrade-from-5.0.6-to-5.0.10-tp15562416p15562416.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]