You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Mark Struberg <st...@yahoo.de> on 2010/02/25 18:25:08 UTC

UIData.setDataModel must not be used anymore?

I found the following source in UIData of the latest from trunk (2.0.0):

    protected void setDataModel(DataModel dataModel)
    {
        throw new UnsupportedOperationException("this method is here only to maintain binary compatibility w/ the RI");
    }

which make a few libraries crash.

Is there any reason for that change?
Or better: is this defined in the JSF-2 spec?

What is the reason for that change?

I worked around by using DataModel#setWrappedData(Object) instead, but not sure about the side effects...

txs and LieGrue,
strub

__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. 
http://mail.yahoo.com 

Re: UIData.setDataModel must not be used anymore?

Posted by Mark Struberg <st...@yahoo.de>.
from looking at the code it sounds somehow like it has something to do with cascading tables? But just a blind guess ...

LieGrue,
strub

--- Jakob Korherr <ja...@gmail.com> schrieb am Fr, 26.2.2010:

> Von: Jakob Korherr <ja...@gmail.com>
> Betreff: Re: UIData.setDataModel must not be used anymore?
> An: "MyFaces Development" <de...@myfaces.apache.org>
> Datum: Freitag, 26. Februar, 2010 00:04 Uhr
> Hi Mark and Matthias,
> 
> I am also currently investigating the problem here, but
> this was far before my time (somewhere in MyFaces 1.2).
> However I think we should do what the JavaDoc says (set the
> current DataModel) and apply this change not only on the
> trunk, but also on the JSF 1.2 branch, because the JSF 1.2
> JavaDoc says exactly the same (I just checked that).
> 
> 
> It is really interesting why it does not do what the method
> name would tell you to expect. I don't believe it had to
> do with the TCK. Maybe it was just forgotten to implement on
> MyFaces 1.2 and not tested by the "old" TCK.
> 
> 
> However it would be great to get some further information
> about that. Thanks in advance for that, Matthias!
> 
> Regards,
> Jakob
> 
> 2010/2/25 Matthias Wessendorf
> <ma...@apache.org>
> 
> HEy Mark,
> 
> 
> 
> interesting found!
> 
> 
> 
> On Thu, Feb 25, 2010 at 6:25 PM, Mark Struberg <st...@yahoo.de>
> wrote:
> 
> > I found the following source in UIData of the latest
> from trunk (2.0.0):
> 
> >
> 
> >    protected void setDataModel(DataModel dataModel)
> 
> >    {
> 
> >        throw new
> UnsupportedOperationException("this method is here only
> to maintain binary compatibility w/ the RI");
> 
> >    }
> 
> >
> 
> > which make a few libraries crash.
> 
> >
> 
> > Is there any reason for that change?
> 
> > Or better: is this defined in the JSF-2 spec?
> 
> 
> 
> Nope, I'd say. This has been done almost 4 years
> ago:
> 
> http://bit.ly/bXtzWq
> 
> 
> 
> I took a look at the "official" JavaDoc and they
> actually say
> 
> something meaningful...
> 
> http://java.sun.com/javaee/javaserverfaces/2.0/docs/api/javax/faces/component/UIData.html#setDataModel(javax.faces.model.DataModel)
> 
> 
> 
> 
> >
> 
> > What is the reason for that change?
> 
> 
> 
> <log-message>
> 
> added 23 methods for binary compatibility w/ the RI
> 
> 12 methods throw UnsupportedOperationException in this
> commit
> 
> added 1.5 features to FactoryFinder
> 
> added new class called HtmlColumn
> 
> </log-message>
> 
> 
> 
> I can track down 2morrow if there was some *old* tck issue
> or similar
> 
> 
> 
> -Matthias
> 
> 
> 
> >
> 
> > I worked around by using
> DataModel#setWrappedData(Object) instead, but not sure about
> the side effects...
> 
> >
> 
> > txs and LieGrue,
> 
> > strub
> 
> >
> 
> > __________________________________________________
> 
> > Do You Yahoo!?
> 
> > Sie sind Spam leid? Yahoo! Mail verfügt über einen
> herausragenden Schutz gegen Massenmails.
> 
> > http://mail.yahoo.com
> 
> >
> 
> 
> 
> 
> 
> 
> 
> --
> 
> Matthias Wessendorf
> 
> 
> 
> blog: http://matthiaswessendorf.wordpress.com/
> 
> sessions: http://www.slideshare.net/mwessendorf
> 
> twitter: http://twitter.com/mwessendorf
> 
> 
> 
> 

__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. 
http://mail.yahoo.com 

Re: UIData.setDataModel must not be used anymore?

Posted by Jakob Korherr <ja...@gmail.com>.
Hi Mark and Matthias,

I am also currently investigating the problem here, but this was far before
my time (somewhere in MyFaces 1.2). However I think we should do what the
JavaDoc says (set the current DataModel) and apply this change not only on
the trunk, but also on the JSF 1.2 branch, because the JSF 1.2 JavaDoc says
exactly the same (I just checked that).

It is really interesting why it does not do what the method name would tell
you to expect. I don't believe it had to do with the TCK. Maybe it was just
forgotten to implement on MyFaces 1.2 and not tested by the "old" TCK.

However it would be great to get some further information about that. Thanks
in advance for that, Matthias!

Regards,
Jakob

2010/2/25 Matthias Wessendorf <ma...@apache.org>

> HEy Mark,
>
> interesting found!
>
> On Thu, Feb 25, 2010 at 6:25 PM, Mark Struberg <st...@yahoo.de> wrote:
> > I found the following source in UIData of the latest from trunk (2.0.0):
> >
> >    protected void setDataModel(DataModel dataModel)
> >    {
> >        throw new UnsupportedOperationException("this method is here only
> to maintain binary compatibility w/ the RI");
> >    }
> >
> > which make a few libraries crash.
> >
> > Is there any reason for that change?
> > Or better: is this defined in the JSF-2 spec?
>
> Nope, I'd say. This has been done almost 4 years ago:
> http://bit.ly/bXtzWq
>
> I took a look at the "official" JavaDoc and they actually say
> something meaningful...
>
> http://java.sun.com/javaee/javaserverfaces/2.0/docs/api/javax/faces/component/UIData.html#setDataModel(javax.faces.model.DataModel)<http://java.sun.com/javaee/javaserverfaces/2.0/docs/api/javax/faces/component/UIData.html#setDataModel%28javax.faces.model.DataModel%29>
>
> >
> > What is the reason for that change?
>
> <log-message>
> added 23 methods for binary compatibility w/ the RI
> 12 methods throw UnsupportedOperationException in this commit
> added 1.5 features to FactoryFinder
> added new class called HtmlColumn
> </log-message>
>
> I can track down 2morrow if there was some *old* tck issue or similar
>
> -Matthias
>
> >
> > I worked around by using DataModel#setWrappedData(Object) instead, but
> not sure about the side effects...
> >
> > txs and LieGrue,
> > strub
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz
> gegen Massenmails.
> > http://mail.yahoo.com
> >
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>

Re: UIData.setDataModel must not be used anymore?

Posted by Matthias Wessendorf <ma...@apache.org>.
HEy Mark,

interesting found!

On Thu, Feb 25, 2010 at 6:25 PM, Mark Struberg <st...@yahoo.de> wrote:
> I found the following source in UIData of the latest from trunk (2.0.0):
>
>    protected void setDataModel(DataModel dataModel)
>    {
>        throw new UnsupportedOperationException("this method is here only to maintain binary compatibility w/ the RI");
>    }
>
> which make a few libraries crash.
>
> Is there any reason for that change?
> Or better: is this defined in the JSF-2 spec?

Nope, I'd say. This has been done almost 4 years ago:
http://bit.ly/bXtzWq

I took a look at the "official" JavaDoc and they actually say
something meaningful...
http://java.sun.com/javaee/javaserverfaces/2.0/docs/api/javax/faces/component/UIData.html#setDataModel(javax.faces.model.DataModel)

>
> What is the reason for that change?

<log-message>
added 23 methods for binary compatibility w/ the RI
12 methods throw UnsupportedOperationException in this commit
added 1.5 features to FactoryFinder
added new class called HtmlColumn
</log-message>

I can track down 2morrow if there was some *old* tck issue or similar

-Matthias

>
> I worked around by using DataModel#setWrappedData(Object) instead, but not sure about the side effects...
>
> txs and LieGrue,
> strub
>
> __________________________________________________
> Do You Yahoo!?
> Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
> http://mail.yahoo.com
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf