3 Replies Latest reply on Dec 29, 2009 6:32 AM by Daniel Lechner

    Integrate RichFaces component in custom JSF component or extend RichFaces component?

    Daniel Lechner Novice

      Hi there!


      I'm working with RichFaces Version 3.3.0.GA, using many components of the rich library.
      Due to special requirements, I need to modify/extend a component respectively to use a RichFaces widged in a custom JSF component (I don't know which way is better to go).


      I need a calendar component with separated input fields for date and time. Furthermore, these two fields have to use custom converers since many different inputs are allowed to specify a day or time.
      I've successfully created a new JSF component (incl. converters) fulfilling all these requirements - including Ajax support to react on events.
      But now, instead of providing only two input fields, I want also add the possibility to select a day with the RichFaces calendar widget. So a basic question is:

      • is it possible to use the RichFaces calendar widget inside my custom JSF component in order to fill one of the input fields if the user selects a day in the calendar
      • is it better to take the RichFaces calendar component and somehow modify it to meet my requirements


      Since we already have some other custom JSF-components, I would prefer the first option - the sourcecode would fit perfectly into our source tree.


      Many thanks!