0 Replies Latest reply on May 22, 2007 6:02 AM by mustaghattack

    Versatile poll question component

    mustaghattack

      Hi there,

      I would like to make a questionnaire maker and for rendering the questionnaire I would need a versatile component which could render radio / checkbox / menu or freetext.

      I found this article http://technology.amis.nl/blog/?p=1187 which is perfect but uses component binding. I'm using Seam and component binding is deprecated.
      I'm using Facelets so I though to make a Facelets composition but I would need conditionnal tags which are not well integrated (I'm maybe wrong).

      I didn't find any free component to achieve this so I wonder if someone has a better idea ?

      The perfect component would have the following attributes :
      type : one of SINGLE, MULTIPLE, OPEN
      style : one of MENU, TICK_HORIZONTAL, TICK_VERTICAL
      options : a Map< Object, String >
      answers : a list of Object which will take the selected options keys
      freeText : if the type is OPEN

      Instead of an UIInput component there is two "values" : answers and freeText depending on the component type. I think this is necessary to fit the model constraint : in order to persist the model bean, we need both a list of answers which are related to an Option table and a freeText column in the Answer table.

      Thanks for any suggestion,
      Bruno