Dear Listeners!

In our application we want to track the pages a user has visited and provide
a "last visited object" widget in the application for faster access.

Our idea was to provide an Annotation @LastVisitedPage on the page to mark
the pages that should be included in the history (like it is done in the
breadcrumb project of https://github.com/argoyle/tapestry-breadcrumbs/).

The text shown in the last visited object should be rendered by the page due
to performance and translation purposes. The track should be written after
the page is rendererd.

@LastVisitedPage(summary="prop:summary", context="prop:context")
public class PageA
{
    private Bean bean;

@Inject
private Messages messages;
 @Inject
private Repository repository;

void onActivate(Long id)
{
this.bean = repository.loadBean(id);
        }
 public String getSummary()
{
return messages.get("translationfor.this.page") + " " + bean.getSummary();
}

public Long getContext()
{
return bean.getId();
}
}

Is the following solution possible and could you provide an example for
processing the properties?
I don't know how to access the props from the Annotation in the Dispatcher.

Best regards,
Gerold

Reply via email to