Hi,

I have created a basic Layout component and template that contains a
navigation menu containing a Logout ActionLink, the event handler is
onActionFromLogout is defined in the Layout component. 

If a user has a active session and is authenticated I use a layout with a
side bar that displays some user relevant information. Therefore I have a
LayoutActiveSession component and template. LayoutActiveSession extends from
Layout and I have an extension point in the layout.tml which I use for
layoutActiveSession.tml. 

Everything works quite fine and no code duplication is required beside the
event handling method. If I don't explicitely override the method and make a
call to the method of the super class I end up with an exception that says:

Unable to locate Method public java.lang.Object onActionFromLogout():  ...
LayoutActiveSession.onActionFromLogout()

With the fix below it works:

public class LayoutActiveSession extends Layout{
        @SessionState(create=true)
        @Property
        private User user;
                
        public Object onActionFromLogout(){
                return super.onActionFromLogout();
        }       
}

Wouldn't it be nice to have the event handlers of the base component
automatically working for the sub component, or have I done a misconeption
for my problem?

Best regards,
Markus


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Component-inheritance-Unable-to-locate-method-onAction-tp4444644p4444644.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to