You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by arti <ar...@tambas.at> on 2006/04/18 20:17:18 UTC

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