You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by Ture Hoefner <th...@bea.com> on 2005/11/17 18:01:21 UTC
netui:select tag - defaultValue and nullable attributes clash?
Hello,
I can successfully use the netui:select JSP tag while databinding to a
Map in my pageflow. I am successfully using the defaultValue attribute,
which is set equal to the key of some desired item in the databound Map.
Here is the problem: when I add the nullable and nullableOptionText
attributes, the defaultValue stops working and the null option is always
the selected one:
<netui:select dataSource="actionForm.type"
tagId="updateNameAndTypeDialog_contentTypes"
optionsDataSource="${pageFlow.availableTypes}"
defaultValue="/Tools_Repository/1"
nullable="true"
nullableOptionText="none"
size="8" />
generates:
<select name="contentNodeSummaryPortletwlw-select_key:{actionForm.type}"
id="n0.updateNameAndTypeDialog_contentTypes" size="8">
<option value="/Tools_Repository/1">ad</option>
<option value="/Tools_Repository/2">ad_shockwave</option>
<option value="/Tools_Repository/3">article</option>
<option value="netui_null" selected><none></option></select>
I don't see this when I search JIRA, maybe I am doing something goofy?
By the way, is there some reason that we don't have a nullableTop
attribute to make the null option appear at the top of the list instead
of the bottom?
I will try working around this by modifying my Map to contain an empty
option.
Thanks,
Ture
Re: netui:select tag - defaultValue and nullable attributes clash?
Posted by Daryl Olander <do...@gmail.com>.
Ture, when you say stops working do you mean that it stops being the
selected option? It's still in the list correct?
On 11/17/05, Ture Hoefner <th...@bea.com> wrote:
>
> Hello,
>
> I can successfully use the netui:select JSP tag while databinding to a
> Map in my pageflow. I am successfully using the defaultValue attribute,
> which is set equal to the key of some desired item in the databound Map.
>
> Here is the problem: when I add the nullable and nullableOptionText
> attributes, the defaultValue stops working and the null option is always
> the selected one:
>
>
>
> <netui:select dataSource="actionForm.type"
>
> tagId="updateNameAndTypeDialog_contentTypes"
>
> optionsDataSource="${pageFlow.availableTypes}"
>
> defaultValue="/Tools_Repository/1"
>
> nullable="true"
>
> nullableOptionText="none"
>
> size="8" />
>
>
>
> generates:
>
>
>
> <select name="contentNodeSummaryPortletwlw-select_key:{actionForm.type}"
> id="n0.updateNameAndTypeDialog_contentTypes" size="8">
>
> <option value="/Tools_Repository/1">ad</option>
>
> <option value="/Tools_Repository/2">ad_shockwave</option>
>
> <option value="/Tools_Repository/3">article</option>
>
> <option value="netui_null" selected><none></option></select>
>
>
>
> I don't see this when I search JIRA, maybe I am doing something goofy?
> By the way, is there some reason that we don't have a nullableTop
> attribute to make the null option appear at the top of the list instead
> of the bottom?
>
>
>
> I will try working around this by modifying my Map to contain an empty
> option.
>
>
>
> Thanks,
>
> Ture
>
>
>