> -----Original Message-----
> My question is, where should the component implement it's 
> core behaviour
> (which is not dependent on application logic)?
> -----Original Message-----

Last time I had to do this, I created a POJO, configured it as
a managed bean in my components faces-config.xml and offered
the client to overwrite the behaviour by defining a 
different bean-name to use.

The component would then either use its default bean-name to 
look up the POJO or the name the user configured.

The POJO just contained pure logic... and implemented an 
interface the user could use to implement his own logic.

regards
Alexander


> -----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
> > 
> > 
> 
> 
> 
> 

Reply via email to