Cool. I would just handle all of it within a listener method. You could use a direct link for your tabs and handle forms based upon which tab you're currently using. If the content within the tab is defined within your page anyway, you could just tack the listener method on the page and access it that way.
Let me know if this doesn't help, I'm going to hit the hay right now, but can look at it first thing in the morning too. -Ben On 5/22/07, Paul Stanton <[EMAIL PROTECTED]> wrote:
Basically I have a tab structure with 5 tabs, each is an individual page. The tabs are contained within my border component, the content with the tab is defined in the page template. Now 2 of the pages have no form, and 3 of the pages have a form. The behaviour of the tabs should be that clicking any tab while on a non-form page simply redirects to the tab's page (ala PageLink) while clicking the any tab while on a form page should submit/process the form, then redirect to the tab's page. That's the long and short of it. Ben Acker wrote: > Could you tell me more about the what the pages are and what the links > would > do on each of the pages? That may help with finding a solution to your > problem! > > -Ben > > > On 5/22/07, Paul Stanton <[EMAIL PROTECTED]> wrote: >> >> Actually, I think something is missing .. how do I tell the links that I >> want to submit a form if a form is present? ie, I can implement the >> listener for each page, but in a couple of cases, this would mean the >> listener would be called without the required form data on the request. >> >> I'll see what I can do but I'm sceptical about the form portion. >> >> Ben Acker wrote: >> > I am using a similar approach to Phillip, but using the same method >> > name for >> > each page. We have the method implemented in a base page that is >> > extended by >> > the pages implementing the component. Anytime we need the method to do >> > something different, we just overwrite it in that page. >> > >> > >> > >> > On 5/14/07, Phillip Rhodes <[EMAIL PROTECTED]> wrote: >> >> >> >> You can you use IListener as a parameter. On each page, you can bind >> >> your >> >> component to the specific page listener that you want invoked. >> >> >> >> This works good, as I am using this approach myself. >> >> >> >> >> >> ----- Original Message ----- >> >> From: "Paul Stanton" <[EMAIL PROTECTED]> >> >> To: "Tapestry users" <users@tapestry.apache.org> >> >> Sent: Monday, May 14, 2007 8:56:54 PM (GMT-0500) America/New_York >> >> Subject: expert needed >> >> >> >> Tapestry 4.1 >> >> >> >> I've got a set of anchors (<a>) which are common for a group of pages >> >> and are contained within a component, however on each page they >> need to >> >> do different things. Essentially they will either submit a form on >> the >> >> page with or without client side validation or perform a simple page >> >> link. >> >> >> >> Can I achieve this with a common component with event handling >> >> implemented on a page by page basis, or will I have to re-write the >> >> links for each page? >> >> >> >> Thanks for any hints. >> >> >> >> >> >> --------------------------------------------------------------------- >> >> 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] >> >> >> >> >> > >> >> >> --------------------------------------------------------------------- >> 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]