> I'm not sure if I understand... > Do you mean to say that manipulating the breadcrumb path (adding or > removing crumbs) should/could all go into one event handler?
Sure, couldn't they? I'm not sure why they are split up into the two different event handlers. Except in the case of action links and form submission both the onAction and beginRender events are going to fire in a request. You haven't mentioned a need to do anything different with the information between when the two events fire, so why not handle it in one place? Or am I missing something? On Wed, Apr 23, 2008 at 2:27 PM, Jan Vissers <[EMAIL PROTECTED]> wrote: > Hi, > > I'm not sure if I understand... > Do you mean to say that manipulating the breadcrumb path (adding or > removing crumbs) should/could all go into one event handler? > > -J. > > > > Ah, by workflow I meant to ask when you expected the events to get > > fired, which you answered for the onactivate handler. > > > > So, why not do this all in one event handler, perhaps setupRender? > > > > > > > > On Wed, Apr 23, 2008 at 11:44 AM, Jan Vissers <[EMAIL PROTECTED]> > > wrote: > >> > I used T4 for a short period a long time ago, so I'm not understanding > >> > the parallels that you are making. Can you describe the workflow that > >> > you are shooting for? I'm not clear why you'd remove the breadcrumb in > >> > the activate event and the add it again the beginrender event. > >> > >> beginRender will > >> : create a bookmarkable link > >> : store (if necessary) in the model of breadcrumbs. > >> > >> onActivate gets called whenever a breadcrumb - rendered as link is > >> clicked > >> and will > >> : remove a crumbs that are listed after the clicked link, cleaning up > >> the trail > >> > >> I think the workflow is okay - as it is proven in T4. I'm just looking > >> for > >> the correct points to hook it into T5. > >> > >> Thx, > >> -J. > >> > >> > >> > > >> > > >> > Josh > >> > > >> > On Wed, Apr 23, 2008 at 8:19 AM, Jan Vissers <[EMAIL PROTECTED]> > >> > wrote: > >> >> Hi, > >> >> > >> >> Need some advice. In T4 I had a breadcrumb component that got its > >> >> information from a breadcrumb model structure. Each page that needed > >> to > >> >> go > >> >> onto the crumb path would implement some base page class. This page > >> >> class > >> >> implemented PageRenderListener and IExternalPage. The former to add > >> info > >> >> to the model and the latter to remove info from the model (btw the > >> >> breadcrumb model was an ASO). > >> >> > >> >> Basically the model consisted of some key, name/title and > >> (constructed) > >> >> link tuple. The link basically pointed to an IExternalPage > >> implemented > >> >> page class - so to be precise the whole breadcrumb path consisted of > >> >> bookmarkable pages. > >> >> > >> >> I'm trying to mimic this behavior with T5, using the BeginRender > >> >> annotation on a basepage class method called initPage() and also on > >> the > >> >> basepage class a onActivate() method. I have some questions about it. > >> >> Below the specific base page code: > >> >> > >> >> protected String getBreadCrumbTitle() { > >> >> return resources.getMessages().get("title-" + > >> >> resources.getPageName().toLowerCase()); > >> >> } > >> >> > >> >> protected Object[] getLinkParameters() { > >> >> return null; > >> >> } > >> >> > >> >> @BeginRender > >> >> public void initPage() { > >> >> String pageName = resources.getPageName(); > >> >> Link link = resources.createPageLink(resources.getPageName(), > >> >> true, getLinkParameters()); > >> >> breadCrumbHolder.checkBreadCrumbForAdd(pageName, > >> >> getBreadCrumbTitle(), link.toRedirectURI()); > >> >> } > >> >> > >> >> public void onActivate() { > >> >> String pageName = resources.getPageName(); > >> >> breadCrumbHolder.checkBreadCrumbForRemove(pageName); > >> >> } > >> >> > >> >> Q1: the initPage() method is there to create a 'bookmarkable' link - > >> >> amongst others - and store that information in the breadcrumb model. > >> The > >> >> getLinkParameters() is there for a subclass to provide its specific > >> >> activation parameters to be used. Should I use another way to create > >> >> bookmarable links? > >> >> > >> >> Q2: the onActivate() method is there to remove one (or more) crumbs > >> from > >> >> the crumbpath. Since other pages will also need activation - > >> potentially > >> >> with additional arguments - is this onActivate() the best way/place > >> to > >> >> manipulate the model? I'm getting the idea that onActivate() is not > >> the > >> >> designated alternative for T4's activateExternalPage(Object[] > >> >> parameters, > >> >> IRequestCycle cycle) in IExternalPage interface. > >> >> > >> >> Currently all of this works - although haven't tested activation with > >> >> activation context parameters yet. > >> >> > >> >> Thx. > >> >> -J. > >> >> > >> >> > >> >> --------------------------------------------------------------------- > >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> >> For additional commands, e-mail: [EMAIL PROTECTED] > >> >> > >> >> > >> > > >> > > >> > > >> > -- > >> > -- > >> > TheDailyTube.com. Sign up and get the best new videos on the internet > >> > delivered fresh to your inbox. > >> > > >> > --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: [EMAIL PROTECTED] > >> > For additional commands, e-mail: [EMAIL PROTECTED] > >> > > >> > > >> > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > > > -- > > -- > > TheDailyTube.com. Sign up and get the best new videos on the internet > > delivered fresh to your inbox. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]