2 Replies Latest reply on Jan 12, 2010 1:30 PM by Rocky S

    how to define page variables?

    v c Newbie

      hihi all,

       

      i want to define a variable on my page that holds static lookup data and then be able to reference this variable from other components that require the data.  semantically, something like the following pseudo code:

       

      <ui:param name="countryListItems">
      <f:selectItem itemLabel="Italy" itemValue="it" />
      <f:selectItem itemLabel="Spain" itemValue="sp" />
      <f:selectItem itemLabel="France" itemValue="fr" />
      </ui:param>
      
      <h:selectOneMenu value="myBean.firstCountry">
      <f:selectItems value="#{countryListItems}" />
      </h:selectOneMenu>
      
      <h:selectOneMenu value="myBean.secondCountry">
      <f:selectItems value="#{countryListItems} />
      </h:selectOneMenu>
      
      

       

      i have been experimenting with a few things but still unsuccessful... is it possible?

       

      thanks!

      -v