2 Replies Latest reply on Jul 22, 2009 4:03 AM by Nick Belaevski

    custom component

    Shailesh Paranjpe Newbie

      I am a newbie to richfaces/JSF development world. Carrying over experience from .NET and Swing world, I have a question regarding custom component development.
      I would like to have a reusable component which supports auto-suggest. The backing bean that will supply the list will decide what to supply based on certain property that will be set in the component. For example, if I set the property to Town, I will get the auto-suggest box with Town names. If set to State, get the state names.
      The key is reusability-I want to use the components on different web applications within our system. In the windows/swing world, i would have extended some base control and added an extra property to indicate the fetchType (Town or State). The model class would have supplied the appropriate list.
      What is the easiest approach I can take in the JSF/richfaces world? I see that RichFaces hs a suggestionBox component. How do I add a custom property so that my backing bean will return the appropraite list. I would like to package this control/bean as a reusable JAR that a developer can just create on the JSF page.
      I did briefly look at the CDK. What are the approaches/best practices that need to be followed? are there alternatives to using the CDK?