Hi, My intention is not to leave the behavior to users. Sorting was just an example. Primarily because my component should be ready-to-use.
My component must define and implement some core behaviour. For custom/additional behaviour it can provide some hooks (like callback-methods)as you suggested. My question is, where should the component implement it's core behaviour (which is not dependent on application logic)? Thanks, Arti -----Original Message----- From: Jesse Alexander (KSFD 121) [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 19, 2006 1:39 PM To: MyFaces Discussion Subject: RE: Behaviour of custom components You could ask the customer for a callback-method implementing the sort-mechanism... He can pass it using a EL-parameter to your component. regards Alexander > -----Original Message----- > From: arti [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 19, 2006 8:48 AM > To: MyFaces Discussion > Subject: Behaviour of custom components > > Hi, > > How do we solve this design decision problem? > > When developing a custom component, if it has some behaviour > associated with it, where exactly should this behaviour be > implemented? > > e.g. To develop a table sortable on multiple columns, once the user > identifies the columns to be sorted and clicks the sort button (which > is also part of table component) there must be an action listener > which implements this sort method. > > I mean when such a component is delivered to myfaces, it does not have > a backing bean packaged with it. But still it is a self-contained > ready-to-use component. The users of myfaces simply have to include > the tag for the component in their JSF page, and assign a datamodel to > it. > And the sortable table is ready for use in their page. > > Here myfaces users do not implement the core sorting behaviour of the > component, since it is packaged somehow in the comopent - I need to > understand where? > > Thanks > Arti > >

