2 Replies Latest reply on May 16, 2012 3:54 AM by giant2

    Parametered inputText,...

    giant2 Newbie

      A problem.

      I have many h:inputText, comboBox, calendar on my page.

      Each of one is identified by an unique index.

      I have a bean saving and retrieving the value of these video-input.

      So I have for example:

      <h:inputText id="first" value"videoInput.first" />


      so my videoInput bean has many variable (one of each inputText, ... on the screen).


      In this manner the code is really big (imagine I have about 100 inputText on the screen) and I need to make it small.

      I think to create a Map with:

                     key=the unique id of the inputText

                     value=the value inserted by the user (and visualized)

      So, the setter/getter methods could be only one (one getter and one setter) like following:

           public void setValue(String key, String val){

                theMap.set(key, val); //or something similar



           public String getValue(String key){

                return theMap.get(key);



      How can I write this in the xhtml pages?

      I suppose something like:

      <h:inputText id="first" value"videoInput.value???" />


      Please help!