JSF: Displaying data on a website based on selection in a dropdown box
I have the following problem:

In my data model I have a class called *Type*. *Type* consists of a title and a description.

Now I have a dropdown box in which the user may select an instance of *Type*:

    <h:selectOneMenu id="typeDropdown" onchange="displayDescription();">
     	  <f:selectItems value="#{operationCreator.types.title}" />
	</h:selectOneMenu>

Below the dropdown box is a div area in which I want the description of the selected *Type* displayed.

My question is the following:

How can I store the description of the *Type* instances in javascript? A simple JSF tag which iterates over the list would do the job, but unfortunately I know of none. They all print additional HTML tags (like datatable), or work only with surrounding JSF tags (like selectItems).

I do know I could fix my problem using AJAX push, but I don't want to. I want to access my data on page load in javascript.

I hope you can help me!
Thanks, Michael
JSF: Displaying data on a website based on selection in a dropdown box
===

I have the following problem:

In my data model I have a class called *Type*. *Type* consists of a title and a description.

Now I have a dropdown box in which the user may select an instance of *Type*:

    <h:selectOneMenu id="typeDropdown" onchange="displayDescription();">
     	  <f:selectItems value="#{operationCreator.types.title}" />
	</h:selectOneMenu>

Below the dropdown box is a div area in which I want the description of the selected *Type* displayed.

My question is the following:

How can I store the description of the *Type* instances in javascript? A simple JSF tag which iterates over the list would do the job, but unfortunately I know of none. They all print additional HTML tags (like datatable), or work only with surrounding JSF tags (like selectItems).

I do know I could fix my problem using AJAX push, but I don't want to. I want to access my data on page load in javascript.

I hope you can help me!
Thanks, Michael