wild guess: do you have another component with the id manager on the same page?
regards,
Martin
P.S.: this is the method in my backing bean:
public List<SelectItem> getAttributeTypes()
{
List<SelectItem> li = new ArrayList<SelectItem>();
Session session = getSession();
Criteria crit = session.createCriteria(AttributeType.class);
//noinspection unchecked
List<AttributeType> attributeTypesList = crit.list();
for (AttributeType attrType : attributeTypesList)
{
SelectItem item = new SelectItem(attrType.getId(),
attrType.getName());
li.add(item);
}
return li;
}
On 9/5/05, Arash Bijanzadeh <[EMAIL PROTECTED]> wrote:
> yes. Here it is :
> <h:selectOneMenu id="manager" value="#{project.manager}">
> <f:selectItems value="#{manager.managers}"/>
> </h:selectOneMenu>
> <h:commandButton value="#{messages.submit}"
> action="#{project.save}"/>
>
>
> On 9/5/05, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> > what does your jsp look like? something like this?
> >
> > <h:selectOneMenu
> > value="#{
> attrDefHolder.attributeDefinition.attributeTypeId}"
> > style="width:150px;">
> > <f:selectItems
> value="#{createProduct.attributeTypes}"/>
> > </h:selectOneMenu>
> >
> > regards,
> >
> > Martin
> >
> > On 9/5/05, Arash Bijanzadeh <[EMAIL PROTECTED]> wrote:
> > > I did :
> > >
> > > public ArrayList<SelectItem> getManagers(){
> > > log.info("in the get managers!!");
> > > if (managers!=null) {
> > > return managers;
> > > } else {
> > > refreshManagers();
> > > return managers;
> > > }
> > > }
> > >
> > > but even the log message not apears. It seems JSF did not call the
> getter.
> > > Is it using reflection or something?
> > >
> > >
> > > On 9/5/05, Martin Marinschek <[EMAIL PROTECTED]> wrote:
> > > > Your getManagers method needs to have the following signature:
> > > >
> > > > List getManagers();
> > > >
> > > > where "List" is a list of javax.faces.model.SelectItem objects...
> > > >
> > > > regards,
> > > >
> > > > Martin
> > > >
> > > > On 9/5/05, Arash Bijanzadeh < [EMAIL PROTECTED]> wrote:
> > > > > I want to bind a selectItems to all the managers i have in databse
> so
> > > the
> > > > > user can choose one. I want to bind the value of selectItems to a
> > > > > getManagers method in the Manager bean. but it seems JSF did not
> call
> > > the
> > > > > getManagers method. Could you give me a clue/pattern how to do this?
> > > > >
> > > > > Thanks
> > > > >
> > > > > --
> > > > > from debian manifesto:
> > > > > Debian Linux is a brand-new kind of Linux distribution.
> > > > > Rather than being developed by one isolated individual or group, as
> > > other
> > > > > distributions of Linux have been developed in the
> > > > > past, Debian is being developed openly in the spirit of Linux and
> GNU.
> > > >
> > > >
> > > > --
> > > >
> > > > http://www.irian.at
> > > > Your JSF powerhouse -
> > > > JSF Trainings in English and German
> > > >
> > >
> > >
> > >
> > > --
> > > from debian manifesto:
> > > Debian Linux is a brand-new kind of Linux distribution.
> > > Rather than being developed by one isolated individua
> > > l or group, as other distributions of Linux have been developed in the
> > > past, Debian is being developed openly in the spirit of Linux and GNU.
> >
> >
> > --
> >
> > http://www.irian.at
> > Your JSF powerhouse -
> > JSF Trainings in English and German
> >
>
>
>
> --
> from debian manifesto:
> Debian Linux is a brand-new kind of Linux distribution.
> Rather than being developed by one isolated individua
> l or group, as other distributions of Linux have been developed in the
> past, Debian is being developed openly in the spirit of Linux and GNU.
--
http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German