Getting rid of "value" attribute in f:selectItems?
Hello,
There is a simple problem I am facing at work that is actually hurting us significantly... we have a JSF 1.1 (yes, it's very old!) situation where we need to present a page that has a very long dropdown list, more than 5000 options in it. The problem is that the options are very long, and the entire page ends up being over 600Kb in the browser, and worse than that the application server gobbles up massive amounts of RAM just to generate the page.
One optimization we want to do is to take advantage of the following fact: all of the options have values that match the labels. In other words, our options look like this:
<option value="longString1">longString1</option>
<option value="longString2">longString2</option>
<option value="longString3">longString3</option>
We'd like to reduce the page by 50% with a simple optimization: suppress the value attributes like the following:
<option>longString1</option>
<option>longString2</option>
<option>longString3</option>
We are generating these options in an ArrayList of SelectItems, and using an f:selectItems to generate the HTML... but we have NOT figured out how to suppress the value attributes. Try as we might, we are unable to remove them... Is there any way to get:
<f:selectItems ...>
to just display the labels???
Or is there another approach we should use??
Thanks in advance.