[prev in list] [next in list] [prev in thread] [next in thread]
List: myfaces-user
Subject: Re: [Trinidad] selectOneChoice referencing a value with a type that uses inheritance
From: "Adam Winer" <awiner () gmail ! com>
Date: 2007-07-30 17:47:39
Message-ID: 6dac79b90707301047t75256211w7dac0f97926950ec () mail ! gmail ! com
[Download RAW message or body]
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 <martin.ahrer@gmx.at> 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.
> <tr:selectOneChoice value="#{bean.currentObject.parent}" ...>. (bean
> is the managed bean handling the form, currentObject is a bean of type
> ReportGroup).
>
> An embedded <f:selectItems value="#{bean.selectItems}"/> 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: \
> http://www.nabble.com/-Trinidad--selectOneChoice-referencing-a-value-with-a-type-that-uses-inheritance-tf4169672.html#a11862406
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic