Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
5.3
Description
So in my template,
context="[ foo, bar ]"
And in my code:
public static Foo FOO = Foo.FOO; // Foo is an enum type
This fails:
java.lang.IncompatibleClassChangeError
Expected non-static field com.example.pages.MyPage.FOO
- org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:59)
- org.apache.tapestry5.internal.transform.ParameterWorker$3$1.readFromBinding(ParameterWorker.java:254)
- org.apache.tapestry5.internal.transform.ParameterWorker$3$1.get(ParameterWorker.java:372)
- com.fivoosh.components.SilkPageLink.getfieldvalue_context(SilkPageLink.java)
- com.fivoosh.components.SilkPageLink.getContext(SilkPageLink.java)
- org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:59)
- org.apache.tapestry5.internal.transform.ParameterWorker$3$1.readFromBinding(ParameterWorker.java:254)
- org.apache.tapestry5.internal.transform.ParameterWorker$3$1.get(ParameterWorker.java:372)
- org.apache.tapestry5.corelib.components.PageLink.getfieldvalue_context(PageLink.java)
- org.apache.tapestry5.corelib.components.PageLink.beginRender(PageLink.java:57)
- org.apache.tapestry5.corelib.components.PageLink.beginRender(PageLink.java)
- org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.invokeComponent(ComponentPageElementImpl.java:202)
- org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:133)
- org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.render(ComponentPageElementImpl.java:209)
Replacing the field with:
public Foo getFoo()
{ return Foo.FOO ; }works. There's the workaround, anyway.