Hello, I have a simple component that combines several existing components (DirectLinks, a select box and submit button) into one component. I've created an html template and a jwc for it so far, but I think I have to subclass BaseComponent. The problem I'm having is that whenever I use this component in a page, I have write listener methods for the directLinks (all the directlinks use the same listener) and for the submit button. I don't want to write these listeners in every page that uses this component.
Can I define these listeners in a subclass of BaseComponent? If so, does someone have a simple example of how to do this? Right now, I have to bind the listeners for the component in the page file, but these methods will always do the same thing and I don't want to define them in every .page file. Thanks, Jer ---no need to read further if you're not interested, but it may give you some more insight ---- This component is a breadcrumb navigation component. Our data is very hierarchical, (each row in the db has a 'ParentID' field), so there's a select box at the end of the breadcrumbs so that you can select the next child to go to. It starts off showing one link ( a 'Home' link) , a select box and submit button labelled "Go". The select box shows all data in the db at the top of the hierarchy. When you select an option and then hit the "Go" button, another link will be placed next to the Home link and before the select box. Home |________| V | |GO| // pick an option, click "Go" and then it changes to: Home > chosenOption |________| V | |GO| As long as there are children to the last option chosen, they will be populated in the select box. Each of our pages has an associated ID to go along with it (the value of the last chosen option, or 0 if none have been chosen yet). If you click a breadcrumb, the pages' ID will update and all the breadcrumbs after the clicked breadcrumb will go away. As you can see, the listener methods for the links and 'go' button are very well defined and won't be changing. I hate having to copy and paste the listener methods into each page that wants to use this componnent and I know there must be a better way to do it than this way. It seems like the component should know how to do this by itself. If you have any ideas or suggestions, please let me know. I'm new to making components and I don't know the best way forward. Thanks, Jer --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
