Re: JSF trouble 'not readable on type'
От: sovmaster  
Дата: 16.06.08 08:13
Оценка:
Здравствуйте, Ionich, Вы писали:

I>Есть проблема:

I>не работает контрол
I>вот кусок бина

I>
I>class MyClass {

I>//...

I>    private ArrayList identityTypes = new ArrayList();

I>    public MyClass() {
I>        super(IdentityImpl.class, prefix, value);
        
I>        for (IdentityType type : IdentityType.values()) { // IdentityType is Enum
I>            identityTypes.add(new SelectItem(type.name(),
I>                    Localization.loadLabel(type.name())));
I>        }
I>    }

I>    public ArrayList getIdentityTypes () {
I>        return identityTypes;
I>    }

I>//...
I>}
I>



I>вот кусок xhtml

I>
I>            <h:selectOneMenu disabled="#{readonly}"
I>                             id="#{viewId}identItyidentityType"
I>                             value="#{identityController.value.identityType}">
I>                <f:selectItems value="#{identityController.identityTypes}" />
I>            </h:selectOneMenu>

I>



I>Бин заполняет коллекцию нормально. Но на вызове вот этой строчки

I> <f:selectItems value="#{identityController.identityTypes}" />
I>все валится с вот таким эсепшином
I>Caused by: javax.el.PropertyNotFoundException: /templates/controls/edit/identity.xhtml @27,78 value="#{identityController.identityTypes}": Property 'identityTypes' not readable on type java.util.ArrayList

I>В чем может быть дело?

I>заранее спасибо

А метод public ArrayList getIdentityTypes () определен например в локальном интерфейсе бина?
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.