[ 
https://issues.apache.org/jira/browse/TAPESTRY-1545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jesse Kuhnert updated TAPESTRY-1545:
------------------------------------

    Fix Version/s:     (was: 4.1.3)
                   4.1.4

> Tapestry overrides page methods that implement a superclass's abstract method
> -----------------------------------------------------------------------------
>
>                 Key: TAPESTRY-1545
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1545
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 4.1.1
>            Reporter: Robert J. Walker
>             Fix For: 4.1.4
>
>
> If you have an abstract accessor method in a page class, then implement the 
> getter in the subclass, then call that method in an OGNL expression on the 
> page, the implemented method never gets called. Instead, Tapestry overrides 
> it when it enhances the page class with its own version. Tapestry should not 
> override existing methods on page classes. An example follows. Bug is fixed 
> when MySubclassPage displays "Fixed" instead of "Borken".
> _____
> MySuperclassPage.java
> public abstract class MySuperclassPage extends 
> org.apache.tapestry.html.BasePage {
>       public abstract boolean isMyBooleanProperty();
> }
> _____
> MySubclassPage.java
> public abstract class MySubclassPage extends MySuperclassPage {
>       public boolean isMyBooleanProperty() {
>               return true; // This never gets called
>       }
> }
> _____
> MySubclassPage.html
> <span jwcid="@Insert" value="ognl:myBooleanProperty ? 'Fixed' : 'Borken'" />
> _____
> MySubclassPage.page
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE page-specification PUBLIC 
>   "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
>   "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>
> <page-specification class="mypackage.MySubclassPage">
> </page-specification>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to