Select Item with HTML Entity in value? (APEX 2.2.0)
600949Nov 15 2007 — edited Nov 16 2007Hi all,
I have a a select item that an HTML entity as the value for one of its options. The page it is on submits to itself. When the page submits, the value gets submitted just fine. (That is, the character represented by the entity goes into the session.) However, the value for the select list is not set. When I set the Display Extra Values flag, the character (rendered as a literal) is what shows up. That is, if I submit with a selection of The Ampersand, the page reloads and my options look like this:
<option value=" "> </option>
<option value=""CHR(2)</option>
<option value="&">The Ampersand</option>
<option value=""">The Quote"</option>
<option selected="selected" value="&">&amp;</option>
The first option is my NULL option. The selected value is the added missing value, and should not have been added, as the value was already there. How can I get the correct option selected? I've found using the Source Expression doesn't work if the item is specified in the URL, even if I have the "Always, replacing any existing value" setting turned on. If the item specified in the URL is actually %26amp%3B, it works just fine, but that's not the value I want to load the page with, as the value is used to populate a report table.
Thanks for any help you can provide.
Don
edit: The only solution I've thought of is to use some sort of JavaScript onload function with some hidden APEX items that contain the values. That will work, but it feels like quite a hack.
Message was edited by:
Don_84
edit: I realized that the entities I wrote were begin rendered, so I re-wrote them.
Message was edited by:
Don_84
Wow, writing HTML entities into this box is a pain in the neck.