if ( paramMethod != null )
{
Page page = RequestCycle.get().getInjector().getInstance( getPageClass() );
for ( Method method : page.getClass().getDeclaredMethods() )
{
AjaxRequest ajaxRequestAnnotation = method.getAnnotation( AjaxRequest.class );
if ( ajaxRequestAnnotation != null && ajaxRequestAnnotation.name().equals( paramMethod ) )
{
try
{
Response response = ( Response ) method.invoke( page );
response.setMessages( RequestCycle.get().getMessages() );