myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <>
Subject Re: [Trinidad] selectOneChoice referencing a value with a type that uses inheritance
Date Mon, 30 Jul 2007 17:47:39 GMT
Are any of the classes in that hierarchy package-private?

This isn't a Trinidad thing - what's likely happening is that
the getter/setter methods aren't visible according
to JavaBean rules, so the JavaBean API isn't identifying
the existence of the property.

-- Adam

On 7/30/07, Martin Ahrer <> wrote:
> I'm facing some Trinidad behaviour that I'm not able to explain. I have an
> inheritance hierarchy consisting of 3 classes like:
> ReportGroup->FolderItem->AbstractTreeItem.
> AbstractTreeItem has a self reference (to make up a tree!) represented by a
> property parent of type AbstractTreeItem (with corresponding accessor and
> mutator method).
> In some form for a ReportGroup instance I try to  show a selectOneChoice so
> that a user can select a parent for this instance.
> &lt;tr:selectOneChoice value="#{bean.currentObject.parent}" ...&gt;. (bean
> is the managed bean handling the form, currentObject is a bean of type
> ReportGroup).
> An embedded &lt;f:selectItems value="#{bean.selectItems}"/&gt; element
> delivers beans of type ReportGroup to choose from.
> When running the JSP containing the form no select box is shown (and of
> course the selectItems are never populated). However as soon as I add
> (overrride) the setParent() and the getParent() method in ReportGroup the
> select box is shown and everything works properly!
>         @Override
>         public AbstractTreeItem getParent() {
>                 return (AbstractTreeItem) super.getParent();
>         }
>         @Override
>         public void setParent(AbstractTreeItem reportFolder) {
>                 super.setParent(reportFolder);
>         }
> So it looks that the trinidad selectOneChoice control does not recognize
> that there is are inherited setParent() and getParent() methods????
> Anybody there who has an idea what's going on? I really want to avoid to
> duplicate my accessor and mutator methods that are already present in an
> base class down the inheritance tree!!
> Thanks
>   Martin
> --
> View this message in context:
> Sent from the MyFaces - Users mailing list archive at

View raw message