You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Ganesh <ga...@dojofaces.org> on 2009/12/17 21:04:34 UTC

Re: [JSF 2.0] Moving ViewDeclairationLanguage Impl's to shared

Cool, you're working on this. Just a week ago I was stuck with
the current portal - JSF2.0 problem. Are you doing portal 1.0 -
JSF 2.0 or portal 2.0 - JSF 2.0?

I not yet clear about why the bridge needs to care about the
VDL. I thought it would suffice to brige the portal lifecyle
phases and forward the requests to the faces servlet?

Best regards,
Ganesh

Scott O'Bryan schrieb:
> Hey Guys,
> 
> I'm working on a preliminary version of the portlet-bridge for JSF2.0..  
> Looking at the current R.I. implementations, it appears as if I'm going 
> to have to come up with my own implementations for the 
> ViewDeclairationLanguage's for the bridge.  Although the R.I. is laid 
> out so that their implementations of the ViewDeclairationLanguage's is 
> easily extended, everything is impl.  Since the Portlet Bridge is an 
> Apache project and should be container agnostic, I'm basically stuck 
> with two choices:
> 
>    1. Write the bridge's own implementation of the
>       ViewDeclairationLanguage for both JSF and facelets, or
>    2. Just use/extend the ViewDeclairationLanguage for MyFaces from the
>       shared project
> 
> I would rather do the latter so that the implementations of the 
> ViewDeclairationLanguage becomes consistent and, ideally, would allow us 
> to work with both the R.I. and MyFaces (albeit with the MyFaces code 
> handling the ViewDeclairationLanguage in the portal.
> 
> Any preferences or comments of the feasibility of implementing this?  I 
> haven't looked at this in depth but wanted to gauge people's reactions 
> before I went too far down the rabbit hole.
> 
> Scott

Re: [JSF 2.0] Moving ViewDeclairationLanguage Impl's to shared

Posted by Scott O'Bryan <so...@apache.org>.
Ganesh, Simon, Matthias..  I think I've got this patch mostly done (at 
least enough to commit and not hose anyone), but I've not been involved 
in much of the core development for JSF 2.0.  Can you guys review the 
patches I uploaded for 
https://issues.apache.org/jira/browse/MYFACES-2467 and give me any 
feedback.  It all seems to compile okay.

I may be able to reduce further the packages/utilities I had to move 
over if need be, but stuff is awfully tangled up in there.  I'm going to 
work, in the mean time, on incorporating shared into my Portlet Bridge 
branch.  Just let me know if things look good.

Scott

Ganesh wrote:
> +1 if it's about sharing the VDL base classes
>
>> sharing is good. So you are basically suggesting to reuse the
>> ViewDeclarationLanguage from
>> MyFaces (including ViewDeclarationLanguageBase and
>> ViewDeclarationLanguageStrategy) and make them part of the shared
>> project ?
>>
>> -Matthias


Re: [JSF 2.0] Moving ViewDeclairationLanguage Impl's to shared

Posted by Ganesh <ga...@dojofaces.org>.
+1 if it's about sharing the VDL base classes

> sharing is good. So you are basically suggesting to reuse the
> ViewDeclarationLanguage from
> MyFaces (including ViewDeclarationLanguageBase and
> ViewDeclarationLanguageStrategy) and make them part of the shared
> project ?
> 
> -Matthias

Re: [JSF 2.0] Moving ViewDeclairationLanguage Impl's to shared

Posted by Matthias Wessendorf <mw...@gmail.com>.

Sent from my iPod.

On 19.12.2009, at 03:30, "Scott O'Bryan" <da...@gmail.com> wrote:

>
>
> >
> > As for the VDL, simply put the current JSP VDL casts to some  
> servlet objects
> > (at least in the R.I.) to do some things.  ;)   
> <yoda>ClassCastExceptions do
> > not an effective bridge make..</yoda>
>
> Not to surprised if myfaces does that too. Filing bugs is welcome.
> Note that Apache MyFaces 2.0 is already alpha and we are not too
> far away from a real release...
> LOL.  Yeah I know.  I may have something very soon.  If not then the  
> bridge should be able to replace this code and use a later  
> version..  ;)
>
>
> >
> > The current bridge overrides the ViewHandler.renderView to  
> overcome this
> > problem, but I thought it might be nice to synchronize some code  
> up.  As it
> > is right now, I'm merging the code from the ViewHandler.renderView  
> in the
> > Portlet 2.0 bridge with the current R.I.   There are some strange  
> issues
> > which I'm overcoming, but evenutally it might be nice to allow  
> MyFaces
> > development to continue to drive these view handlers.
>
> sharing is good. So you are basically suggesting to reuse the
> ViewDeclarationLanguage from
> MyFaces (including ViewDeclarationLanguageBase and
> ViewDeclarationLanguageStrategy) and make them part of the shared
> project ?
> Yeah...  Essentially I would take those objects in myfaces and allow  
> them to have plugable Request/Response implementations.  Then for  
> the portal bridge, I would use the ViewDeclarationLanguageStrategies  
> with the Portlet implementation pieces plugged in and MyFaces would  
> have the servlet pieces plugged in.

+1 on that

>
> Scott
>
>

Re: [JSF 2.0] Moving ViewDeclairationLanguage Impl's to shared

Posted by Scott O'Bryan <da...@gmail.com>.
>
> >
> > As for the VDL, simply put the current JSP VDL casts to some servlet
> objects
> > (at least in the R.I.) to do some things.  ;)  <yoda>ClassCastExceptions
> do
> > not an effective bridge make..</yoda>
>
> Not to surprised if myfaces does that too. Filing bugs is welcome.
> Note that Apache MyFaces 2.0 is already alpha and we are not too
> far away from a real release...
>
LOL.  Yeah I know.  I may have something very soon.  If not then the bridge
should be able to replace this code and use a later version..  ;)


>
> >
> > The current bridge overrides the ViewHandler.renderView to overcome this
> > problem, but I thought it might be nice to synchronize some code up.  As
> it
> > is right now, I'm merging the code from the ViewHandler.renderView in the
> > Portlet 2.0 bridge with the current R.I.   There are some strange issues
> > which I'm overcoming, but evenutally it might be nice to allow MyFaces
> > development to continue to drive these view handlers.
>
> sharing is good. So you are basically suggesting to reuse the
> ViewDeclarationLanguage from
> MyFaces (including ViewDeclarationLanguageBase and
> ViewDeclarationLanguageStrategy) and make them part of the shared
> project ?
>
Yeah...  Essentially I would take those objects in myfaces and allow them to
have plugable Request/Response implementations.  Then for the portal bridge,
I would use the ViewDeclarationLanguageStrategies with the Portlet
implementation pieces plugged in and MyFaces would have the servlet pieces
plugged in.

Scott

Re: [JSF 2.0] Moving ViewDeclairationLanguage Impl's to shared

Posted by Scott O'Bryan <da...@gmail.com>.
Yeah.  When using facelets, our factory would just deligate to the default
factory.  Essentially the logic is:

if portal AND jsp, use the bridge VDL.  What would have been nice is if the
VDL used the ExternalContext or allowed us to provide a custom
VHRequest/Response handler, but it doesn't.  We had to do something similar
with JSF 1.2 by implementing our own ViewHandler.

Scott

On Fri, Dec 18, 2009 at 8:17 AM, Simon Lessard <si...@gmail.com>wrote:

> Hi,
>
> Although I wouldn't mind if this is needed, I do find it weird for the
> portle bridge to work with the VDL at all. VDL is supposed to have pretty
> much a single purpose: convert a physical document to a JSF component tree.
> That being said the JSP VDL most likely uses Servlet API too since, well,
> it's about the only way to interact with JSP. This is sad, make you wish JSP
> was never supported for JSF...
>
>
> ~ Simon
>
>
> On Fri, Dec 18, 2009 at 1:38 AM, Matthias Wessendorf <ma...@apache.org>wrote:
>
>> On Thu, Dec 17, 2009 at 11:42 PM, Scott O'Bryan <da...@gmail.com>
>> wrote:
>> > It's going to be JSF 2.0/Portal 2.0.  I'm not sure if the JCP is going
>> to
>> > look at a Portal 1.0 Spec for JSF 2.0.  The leanings on the current EG's
>> > were that they were not.  Portal 1.0 has some pretty major issues in
>> dealing
>> > with AJAX and whatnot so such a specification would be problematic.
>>
>> even due to the fact that I am mostly a portlet ignorant, this makes sense
>> to only specify Portlet 2.0 w/ JSF 2
>>
>> >
>> > As for the VDL, simply put the current JSP VDL casts to some servlet
>> objects
>> > (at least in the R.I.) to do some things.  ;)  <yoda>ClassCastExceptions
>> do
>> > not an effective bridge make..</yoda>
>>
>> Not to surprised if myfaces does that too. Filing bugs is welcome.
>> Note that Apache MyFaces 2.0 is already alpha and we are not too
>> far away from a real release...
>>
>> >
>> > The current bridge overrides the ViewHandler.renderView to overcome this
>> > problem, but I thought it might be nice to synchronize some code up.  As
>> it
>> > is right now, I'm merging the code from the ViewHandler.renderView in
>> the
>> > Portlet 2.0 bridge with the current R.I.   There are some strange issues
>> > which I'm overcoming, but evenutally it might be nice to allow MyFaces
>> > development to continue to drive these view handlers.
>>
>> sharing is good. So you are basically suggesting to reuse the
>> ViewDeclarationLanguage from
>> MyFaces (including ViewDeclarationLanguageBase and
>> ViewDeclarationLanguageStrategy) and make them part of the shared
>> project ?
>>
>> -Matthias
>>
>> >
>> > <shrug>
>> >
>> > Just a thought..
>> >
>> > Scott
>> >
>> > Ganesh wrote:
>> >>
>> >> Cool, you're working on this. Just a week ago I was stuck with
>> >> the current portal - JSF2.0 problem. Are you doing portal 1.0 -
>> >> JSF 2.0 or portal 2.0 - JSF 2.0?
>> >>
>> >> I not yet clear about why the bridge needs to care about the
>> >> VDL. I thought it would suffice to brige the portal lifecyle
>> >> phases and forward the requests to the faces servlet?
>> >>
>> >> Best regards,
>> >> Ganesh
>> >>
>> >> Scott O'Bryan schrieb:
>> >>>
>> >>> Hey Guys,
>> >>>
>> >>> I'm working on a preliminary version of the portlet-bridge for
>> JSF2.0..
>> >>>  Looking at the current R.I. implementations, it appears as if I'm
>> going to
>> >>> have to come up with my own implementations for the
>> >>> ViewDeclairationLanguage's for the bridge.  Although the R.I. is laid
>> out so
>> >>> that their implementations of the ViewDeclairationLanguage's is easily
>> >>> extended, everything is impl.  Since the Portlet Bridge is an Apache
>> project
>> >>> and should be container agnostic, I'm basically stuck with two
>> choices:
>> >>>
>> >>>   1. Write the bridge's own implementation of the
>> >>>      ViewDeclairationLanguage for both JSF and facelets, or
>> >>>   2. Just use/extend the ViewDeclairationLanguage for MyFaces from the
>> >>>      shared project
>> >>>
>> >>> I would rather do the latter so that the implementations of the
>> >>> ViewDeclairationLanguage becomes consistent and, ideally, would allow
>> us to
>> >>> work with both the R.I. and MyFaces (albeit with the MyFaces code
>> handling
>> >>> the ViewDeclairationLanguage in the portal.
>> >>>
>> >>> Any preferences or comments of the feasibility of implementing this?
>>  I
>> >>> haven't looked at this in depth but wanted to gauge people's reactions
>> >>> before I went too far down the rabbit hole.
>> >>>
>> >>> Scott
>> >
>> >
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>>
>
>

Re: [JSF 2.0] Moving ViewDeclairationLanguage Impl's to shared

Posted by Simon Lessard <si...@gmail.com>.
Hi,

Although I wouldn't mind if this is needed, I do find it weird for the
portle bridge to work with the VDL at all. VDL is supposed to have pretty
much a single purpose: convert a physical document to a JSF component tree.
That being said the JSP VDL most likely uses Servlet API too since, well,
it's about the only way to interact with JSP. This is sad, make you wish JSP
was never supported for JSF...


~ Simon

On Fri, Dec 18, 2009 at 1:38 AM, Matthias Wessendorf <ma...@apache.org>wrote:

> On Thu, Dec 17, 2009 at 11:42 PM, Scott O'Bryan <da...@gmail.com>
> wrote:
> > It's going to be JSF 2.0/Portal 2.0.  I'm not sure if the JCP is going to
> > look at a Portal 1.0 Spec for JSF 2.0.  The leanings on the current EG's
> > were that they were not.  Portal 1.0 has some pretty major issues in
> dealing
> > with AJAX and whatnot so such a specification would be problematic.
>
> even due to the fact that I am mostly a portlet ignorant, this makes sense
> to only specify Portlet 2.0 w/ JSF 2
>
> >
> > As for the VDL, simply put the current JSP VDL casts to some servlet
> objects
> > (at least in the R.I.) to do some things.  ;)  <yoda>ClassCastExceptions
> do
> > not an effective bridge make..</yoda>
>
> Not to surprised if myfaces does that too. Filing bugs is welcome.
> Note that Apache MyFaces 2.0 is already alpha and we are not too
> far away from a real release...
>
> >
> > The current bridge overrides the ViewHandler.renderView to overcome this
> > problem, but I thought it might be nice to synchronize some code up.  As
> it
> > is right now, I'm merging the code from the ViewHandler.renderView in the
> > Portlet 2.0 bridge with the current R.I.   There are some strange issues
> > which I'm overcoming, but evenutally it might be nice to allow MyFaces
> > development to continue to drive these view handlers.
>
> sharing is good. So you are basically suggesting to reuse the
> ViewDeclarationLanguage from
> MyFaces (including ViewDeclarationLanguageBase and
> ViewDeclarationLanguageStrategy) and make them part of the shared
> project ?
>
> -Matthias
>
> >
> > <shrug>
> >
> > Just a thought..
> >
> > Scott
> >
> > Ganesh wrote:
> >>
> >> Cool, you're working on this. Just a week ago I was stuck with
> >> the current portal - JSF2.0 problem. Are you doing portal 1.0 -
> >> JSF 2.0 or portal 2.0 - JSF 2.0?
> >>
> >> I not yet clear about why the bridge needs to care about the
> >> VDL. I thought it would suffice to brige the portal lifecyle
> >> phases and forward the requests to the faces servlet?
> >>
> >> Best regards,
> >> Ganesh
> >>
> >> Scott O'Bryan schrieb:
> >>>
> >>> Hey Guys,
> >>>
> >>> I'm working on a preliminary version of the portlet-bridge for JSF2.0..
> >>>  Looking at the current R.I. implementations, it appears as if I'm
> going to
> >>> have to come up with my own implementations for the
> >>> ViewDeclairationLanguage's for the bridge.  Although the R.I. is laid
> out so
> >>> that their implementations of the ViewDeclairationLanguage's is easily
> >>> extended, everything is impl.  Since the Portlet Bridge is an Apache
> project
> >>> and should be container agnostic, I'm basically stuck with two choices:
> >>>
> >>>   1. Write the bridge's own implementation of the
> >>>      ViewDeclairationLanguage for both JSF and facelets, or
> >>>   2. Just use/extend the ViewDeclairationLanguage for MyFaces from the
> >>>      shared project
> >>>
> >>> I would rather do the latter so that the implementations of the
> >>> ViewDeclairationLanguage becomes consistent and, ideally, would allow
> us to
> >>> work with both the R.I. and MyFaces (albeit with the MyFaces code
> handling
> >>> the ViewDeclairationLanguage in the portal.
> >>>
> >>> Any preferences or comments of the feasibility of implementing this?  I
> >>> haven't looked at this in depth but wanted to gauge people's reactions
> >>> before I went too far down the rabbit hole.
> >>>
> >>> Scott
> >
> >
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>

Re: [JSF 2.0] Moving ViewDeclairationLanguage Impl's to shared

Posted by Matthias Wessendorf <ma...@apache.org>.
On Thu, Dec 17, 2009 at 11:42 PM, Scott O'Bryan <da...@gmail.com> wrote:
> It's going to be JSF 2.0/Portal 2.0.  I'm not sure if the JCP is going to
> look at a Portal 1.0 Spec for JSF 2.0.  The leanings on the current EG's
> were that they were not.  Portal 1.0 has some pretty major issues in dealing
> with AJAX and whatnot so such a specification would be problematic.

even due to the fact that I am mostly a portlet ignorant, this makes sense
to only specify Portlet 2.0 w/ JSF 2

>
> As for the VDL, simply put the current JSP VDL casts to some servlet objects
> (at least in the R.I.) to do some things.  ;)  <yoda>ClassCastExceptions do
> not an effective bridge make..</yoda>

Not to surprised if myfaces does that too. Filing bugs is welcome.
Note that Apache MyFaces 2.0 is already alpha and we are not too
far away from a real release...

>
> The current bridge overrides the ViewHandler.renderView to overcome this
> problem, but I thought it might be nice to synchronize some code up.  As it
> is right now, I'm merging the code from the ViewHandler.renderView in the
> Portlet 2.0 bridge with the current R.I.   There are some strange issues
> which I'm overcoming, but evenutally it might be nice to allow MyFaces
> development to continue to drive these view handlers.

sharing is good. So you are basically suggesting to reuse the
ViewDeclarationLanguage from
MyFaces (including ViewDeclarationLanguageBase and
ViewDeclarationLanguageStrategy) and make them part of the shared
project ?

-Matthias

>
> <shrug>
>
> Just a thought..
>
> Scott
>
> Ganesh wrote:
>>
>> Cool, you're working on this. Just a week ago I was stuck with
>> the current portal - JSF2.0 problem. Are you doing portal 1.0 -
>> JSF 2.0 or portal 2.0 - JSF 2.0?
>>
>> I not yet clear about why the bridge needs to care about the
>> VDL. I thought it would suffice to brige the portal lifecyle
>> phases and forward the requests to the faces servlet?
>>
>> Best regards,
>> Ganesh
>>
>> Scott O'Bryan schrieb:
>>>
>>> Hey Guys,
>>>
>>> I'm working on a preliminary version of the portlet-bridge for JSF2.0..
>>>  Looking at the current R.I. implementations, it appears as if I'm going to
>>> have to come up with my own implementations for the
>>> ViewDeclairationLanguage's for the bridge.  Although the R.I. is laid out so
>>> that their implementations of the ViewDeclairationLanguage's is easily
>>> extended, everything is impl.  Since the Portlet Bridge is an Apache project
>>> and should be container agnostic, I'm basically stuck with two choices:
>>>
>>>   1. Write the bridge's own implementation of the
>>>      ViewDeclairationLanguage for both JSF and facelets, or
>>>   2. Just use/extend the ViewDeclairationLanguage for MyFaces from the
>>>      shared project
>>>
>>> I would rather do the latter so that the implementations of the
>>> ViewDeclairationLanguage becomes consistent and, ideally, would allow us to
>>> work with both the R.I. and MyFaces (albeit with the MyFaces code handling
>>> the ViewDeclairationLanguage in the portal.
>>>
>>> Any preferences or comments of the feasibility of implementing this?  I
>>> haven't looked at this in depth but wanted to gauge people's reactions
>>> before I went too far down the rabbit hole.
>>>
>>> Scott
>
>



-- 
Matthias Wessendorf

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

Re: [JSF 2.0] Moving ViewDeclairationLanguage Impl's to shared

Posted by Scott O'Bryan <da...@gmail.com>.
It's going to be JSF 2.0/Portal 2.0.  I'm not sure if the JCP is going 
to look at a Portal 1.0 Spec for JSF 2.0.  The leanings on the current 
EG's were that they were not.  Portal 1.0 has some pretty major issues 
in dealing with AJAX and whatnot so such a specification would be 
problematic.

As for the VDL, simply put the current JSP VDL casts to some servlet 
objects (at least in the R.I.) to do some things.  ;)  
<yoda>ClassCastExceptions do not an effective bridge make..</yoda>

The current bridge overrides the ViewHandler.renderView to overcome this 
problem, but I thought it might be nice to synchronize some code up.  As 
it is right now, I'm merging the code from the ViewHandler.renderView in 
the Portlet 2.0 bridge with the current R.I.   There are some strange 
issues which I'm overcoming, but evenutally it might be nice to allow 
MyFaces development to continue to drive these view handlers.

<shrug>

Just a thought..

Scott

Ganesh wrote:
> Cool, you're working on this. Just a week ago I was stuck with
> the current portal - JSF2.0 problem. Are you doing portal 1.0 -
> JSF 2.0 or portal 2.0 - JSF 2.0?
>
> I not yet clear about why the bridge needs to care about the
> VDL. I thought it would suffice to brige the portal lifecyle
> phases and forward the requests to the faces servlet?
>
> Best regards,
> Ganesh
>
> Scott O'Bryan schrieb:
>> Hey Guys,
>>
>> I'm working on a preliminary version of the portlet-bridge for 
>> JSF2.0..  Looking at the current R.I. implementations, it appears as 
>> if I'm going to have to come up with my own implementations for the 
>> ViewDeclairationLanguage's for the bridge.  Although the R.I. is laid 
>> out so that their implementations of the ViewDeclairationLanguage's 
>> is easily extended, everything is impl.  Since the Portlet Bridge is 
>> an Apache project and should be container agnostic, I'm basically 
>> stuck with two choices:
>>
>>    1. Write the bridge's own implementation of the
>>       ViewDeclairationLanguage for both JSF and facelets, or
>>    2. Just use/extend the ViewDeclairationLanguage for MyFaces from the
>>       shared project
>>
>> I would rather do the latter so that the implementations of the 
>> ViewDeclairationLanguage becomes consistent and, ideally, would allow 
>> us to work with both the R.I. and MyFaces (albeit with the MyFaces 
>> code handling the ViewDeclairationLanguage in the portal.
>>
>> Any preferences or comments of the feasibility of implementing this?  
>> I haven't looked at this in depth but wanted to gauge people's 
>> reactions before I went too far down the rabbit hole.
>>
>> Scott