Problem using 'selected' attribute of dropDown component

Valid Assumptions:

1. Developer is not a novice

2. Problem has been verified by third party

3. Using Netbean 5.5 plus Visual Web Pack 5.5

Problem:

The 'selected' attribute of the webuijsf:dropDown throws 'Component Error'

<webuijsf:dropDown... selected="#{address$CreateUI.addressFormBean.accessLevel}" />

where:

a. 'selected' is the object that represents the selection made from the available options

b. 'accessLevel' is java.lang.String with get/setter methods

ERROR:

javax.el.ELException: javax.faces.el.PropertyNotFoundException: javax.el.PropertyNotFoundException: Target Unreachable,'addressFormBean' returnednull

at javax.faces.component.ValueExpressionValueBindingAdapter.getType(ValueExpressionValueBindingAdapter.java:129)

at com.sun.webui.jsf.util.ValueTypeEvaluator.evaluateValueBinding(ValueTypeEvaluator.java:138)

at com.sun.webui.jsf.util.ValueTypeEvaluator.evaluateValueType(ValueTypeEvaluator.java:111)

at com.sun.webui.jsf.util.ValueTypeEvaluator.getValueType(ValueTypeEvaluator.java:90)

at com.sun.webui.jsf.util.ValueTypeEvaluator.getValueType(ValueTypeEvaluator.java:67)

at com.sun.webui.jsf.component.ListSelector.processSelections(ListSelector.java:278)

at com.sun.webui.jsf.component.ListSelector.getListItems(ListSelector.java:122)

at com.sun.webui.jsf.renderkit.html.ListRendererBase.renderList(ListRendererBase.java:376)

at com.sun.webui.jsf.renderkit.html.ListRendererBase.renderListComponent(ListRendererBase.java:168)

at com.sun.webui.jsf.renderkit.html.DropDownRenderer.encodeEnd(DropDownRenderer.java:78)

at com.sun.webui.jsf.renderkit.html.AbstractDesignTimeRenderer.encodeEnd(AbstractDesignTimeRenderer.java:40)

at com.sun.webui.jsf.renderkit.html.SelectorDesignTimeRenderer.encodeEnd(SelectorDesignTimeRenderer.java:131)

at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:848)

:

:

Thanks in advance.

[2129 byte] By [cokneylonesoftneera] at [2007-11-26 15:09:10]
# 1
What object type for dropdown's items? selected property's type has to match dropdown's value.
sherryza at 2007-7-8 8:59:39 > top of Java-index,Development Tools,Java Tools...