You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by José Luis Cetina <ma...@gmail.com> on 2012/03/08 16:56:29 UTC

MyFaces and CODI

Hi im so excited to start and use MyFaces and CODI but i cant get any
"good" documentation in fact i only can get like 2 or 3 mini tutorial but
they are really incomplete, can somebody recommend me to some tutorial or
book to start with *CODI *y see this is an excellent extension, im moving
from mojarra and CDI to MyFaces and MyFaces extensions, please where i can
find value information

The only URL where i found a little info is this:
https://cwiki.apache.org/confluence/display/EXTCDI/Index

-- 
-------------------------------------------------------------------
*SCJA. José Luis Cetina*
-------------------------------------------------------------------

Re: MyFaces and CODI

Posted by Stephen More <st...@gmail.com>.
That seems to work fine when pasting into a new empty window, but it
still allows you to copy-paste the url from one codi window to an
existing codi window.


On Fri, Mar 9, 2012 at 8:18 AM, Gerhard Petracek
<ge...@gmail.com> wrote:
> hi stephen,
>
> i think it's easier to use [1] (for now).
> i'll provide all the details in the wiki as soon as we made the final test.
>
> regards,
> gerhard
>
> [1] http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/9 Gerhard Petracek <ge...@gmail.com>
>
>> hi stephen,
>>
>> just handle it like any custom js with jsf2 (you can see the usage in the
>> example - see layout.xhtml).
>>
>> btw. i saw that the previous version in the playground example has an
>> issue.
>> werner is currently refactoring the script -> [1] is his current result.
>>
>> regards,
>> gerhard
>>
>> [1] http://s.apache.org/rr
>>
>> http://www.irian.at
>>
>> Your JSF/JavaEE powerhouse -
>> JavaEE Consulting, Development and
>> Courses in English and German
>>
>> Professional Support for Apache MyFaces
>>
>>
>> 2012/3/9 Stephen More <st...@gmail.com>
>>
>>> Included in the JSF jar is META-INF/resources/javax.faces/jsf.js which
>>> enables its use by <h:outputScript name="jsf.js" library="javax.faces"
>>> target="head"/>
>>>
>>> Should windowhandler.js be moved from the examples into a core library
>>> so that it can be utilized the same way ?
>>>
>>>
>>>
>>> On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
>>> <ge...@gmail.com> wrote:
>>> > hi stephen,
>>> >
>>> > yes - you can add a small js (see e.g. [1]) to support this use-case.
>>> >
>>> > regards,
>>> > gerhard
>>> >
>>> > [1] http://s.apache.org/YTq
>>> >
>>> > http://www.irian.at
>>> >
>>> > Your JSF/JavaEE powerhouse -
>>> > JavaEE Consulting, Development and
>>> > Courses in English and German
>>> >
>>> > Professional Support for Apache MyFaces
>>> >
>>> >
>>> >
>>> > 2012/3/9 Stephen More <st...@gmail.com>
>>> >
>>> >> Great. I am mainly interested in WindowScoped i.e. every browser tab
>>> >> has its own mini-session.
>>> >>
>>> >> I see that CODI is adding a ?windowId=595 to keep these conversations
>>> >> separate. If a user simply copies the url and pastes in a new tab now
>>> >> two browser tabs are sharing the same conversation. How can I prevent
>>> >> this ? I want to enforce that EVERY browser tab has its own
>>> >> conversation. Perhaps a simple error to the user saying "Sorry" or
>>> >> start a new conversation.
>>> >>
>>> >> -Thanks
>>> >>
>>> >> On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
>>> >> <ge...@gmail.com> wrote:
>>> >> > hi stephen,
>>> >> >
>>> >> > (that's an issue with the setup of weld and not related to myfaces
>>> codi.)
>>> >> > however, myfaces codi doesn't need this support -> if you also don't
>>> need
>>> >> > cdi support for servlets, filters or listeners, you can run the
>>> >> application
>>> >> > without those features.
>>> >> >
>>> >> > regards,
>>> >> > gerhard
>>> >> >
>>> >> > http://www.irian.at
>>> >> >
>>> >> > Your JSF/JavaEE powerhouse -
>>> >> > JavaEE Consulting, Development and
>>> >> > Courses in English and German
>>> >> >
>>> >> > Professional Support for Apache MyFaces
>>> >> >
>>> >> >
>>> >> > 2012/3/9 Stephen More <st...@gmail.com>
>>> >> >
>>> >> >> I too am trying to get a simple example working. I have put together
>>> >> >> this project:
>>> http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
>>> >> >>
>>> >> >> mvn jetty:run-war   results in
>>> >> >>
>>> >> >> SEVERE: Unable to create JettyWeldInjector. CDI injection will not
>>> be
>>> >> >> available in Servlets, Filters or Listeners
>>> >> >>
>>> >> >> What else do I need to get this simple example working ?
>>> >> >>
>>> >> >> -Thanks
>>> >> >>
>>> >> >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
>>> >> >> <ge...@gmail.com> wrote:
>>> >> >> > hi jose,
>>> >> >> >
>>> >> >> > first of all: welcome @ myfaces!
>>> >> >> >
>>> >> >> > concrete questions are very welcome and we will improve the wiki
>>> >> based on
>>> >> >> > them.
>>> >> >> >
>>> >> >> > regards,
>>> >> >> > gerhard
>>> >> >> >
>>> >> >> > http://www.irian.at
>>> >> >> >
>>> >> >> > Your JSF/JavaEE powerhouse -
>>> >> >> > JavaEE Consulting, Development and
>>> >> >> > Courses in English and German
>>> >> >> >
>>> >> >> > Professional Support for Apache MyFaces
>>> >> >> >
>>> >> >> >
>>> >> >> >
>>> >> >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
>>> >> >> >
>>> >> >> >> Hi im so excited to start and use MyFaces and CODI but i cant
>>> get any
>>> >> >> >> "good" documentation in fact i only can get like 2 or 3 mini
>>> tutorial
>>> >> >> but
>>> >> >> >> they are really incomplete, can somebody recommend me to some
>>> >> tutorial
>>> >> >> or
>>> >> >> >> book to start with *CODI *y see this is an excellent extension,
>>> im
>>> >> >> moving
>>> >> >> >> from mojarra and CDI to MyFaces and MyFaces extensions, please
>>> where
>>> >> i
>>> >> >> can
>>> >> >> >> find value information
>>> >> >> >>
>>> >> >> >> The only URL where i found a little info is this:
>>> >> >> >> https://cwiki.apache.org/confluence/display/EXTCDI/Index
>>> >> >> >>
>>> >> >> >> --
>>> >> >> >>
>>> -------------------------------------------------------------------
>>> >> >> >> *SCJA. José Luis Cetina*
>>> >> >> >>
>>> -------------------------------------------------------------------
>>> >> >> >>
>>> >> >>
>>> >>
>>>
>>
>>

Re: MyFaces and CODI

Posted by Gerhard Petracek <ge...@gmail.com>.
hi stephen,

i think it's easier to use [1] (for now).
i'll provide all the details in the wiki as soon as we made the final test.

regards,
gerhard

[1] http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/9 Gerhard Petracek <ge...@gmail.com>

> hi stephen,
>
> just handle it like any custom js with jsf2 (you can see the usage in the
> example - see layout.xhtml).
>
> btw. i saw that the previous version in the playground example has an
> issue.
> werner is currently refactoring the script -> [1] is his current result.
>
> regards,
> gerhard
>
> [1] http://s.apache.org/rr
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> 2012/3/9 Stephen More <st...@gmail.com>
>
>> Included in the JSF jar is META-INF/resources/javax.faces/jsf.js which
>> enables its use by <h:outputScript name="jsf.js" library="javax.faces"
>> target="head"/>
>>
>> Should windowhandler.js be moved from the examples into a core library
>> so that it can be utilized the same way ?
>>
>>
>>
>> On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
>> <ge...@gmail.com> wrote:
>> > hi stephen,
>> >
>> > yes - you can add a small js (see e.g. [1]) to support this use-case.
>> >
>> > regards,
>> > gerhard
>> >
>> > [1] http://s.apache.org/YTq
>> >
>> > http://www.irian.at
>> >
>> > Your JSF/JavaEE powerhouse -
>> > JavaEE Consulting, Development and
>> > Courses in English and German
>> >
>> > Professional Support for Apache MyFaces
>> >
>> >
>> >
>> > 2012/3/9 Stephen More <st...@gmail.com>
>> >
>> >> Great. I am mainly interested in WindowScoped i.e. every browser tab
>> >> has its own mini-session.
>> >>
>> >> I see that CODI is adding a ?windowId=595 to keep these conversations
>> >> separate. If a user simply copies the url and pastes in a new tab now
>> >> two browser tabs are sharing the same conversation. How can I prevent
>> >> this ? I want to enforce that EVERY browser tab has its own
>> >> conversation. Perhaps a simple error to the user saying "Sorry" or
>> >> start a new conversation.
>> >>
>> >> -Thanks
>> >>
>> >> On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
>> >> <ge...@gmail.com> wrote:
>> >> > hi stephen,
>> >> >
>> >> > (that's an issue with the setup of weld and not related to myfaces
>> codi.)
>> >> > however, myfaces codi doesn't need this support -> if you also don't
>> need
>> >> > cdi support for servlets, filters or listeners, you can run the
>> >> application
>> >> > without those features.
>> >> >
>> >> > regards,
>> >> > gerhard
>> >> >
>> >> > http://www.irian.at
>> >> >
>> >> > Your JSF/JavaEE powerhouse -
>> >> > JavaEE Consulting, Development and
>> >> > Courses in English and German
>> >> >
>> >> > Professional Support for Apache MyFaces
>> >> >
>> >> >
>> >> > 2012/3/9 Stephen More <st...@gmail.com>
>> >> >
>> >> >> I too am trying to get a simple example working. I have put together
>> >> >> this project:
>> http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
>> >> >>
>> >> >> mvn jetty:run-war   results in
>> >> >>
>> >> >> SEVERE: Unable to create JettyWeldInjector. CDI injection will not
>> be
>> >> >> available in Servlets, Filters or Listeners
>> >> >>
>> >> >> What else do I need to get this simple example working ?
>> >> >>
>> >> >> -Thanks
>> >> >>
>> >> >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
>> >> >> <ge...@gmail.com> wrote:
>> >> >> > hi jose,
>> >> >> >
>> >> >> > first of all: welcome @ myfaces!
>> >> >> >
>> >> >> > concrete questions are very welcome and we will improve the wiki
>> >> based on
>> >> >> > them.
>> >> >> >
>> >> >> > regards,
>> >> >> > gerhard
>> >> >> >
>> >> >> > http://www.irian.at
>> >> >> >
>> >> >> > Your JSF/JavaEE powerhouse -
>> >> >> > JavaEE Consulting, Development and
>> >> >> > Courses in English and German
>> >> >> >
>> >> >> > Professional Support for Apache MyFaces
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
>> >> >> >
>> >> >> >> Hi im so excited to start and use MyFaces and CODI but i cant
>> get any
>> >> >> >> "good" documentation in fact i only can get like 2 or 3 mini
>> tutorial
>> >> >> but
>> >> >> >> they are really incomplete, can somebody recommend me to some
>> >> tutorial
>> >> >> or
>> >> >> >> book to start with *CODI *y see this is an excellent extension,
>> im
>> >> >> moving
>> >> >> >> from mojarra and CDI to MyFaces and MyFaces extensions, please
>> where
>> >> i
>> >> >> can
>> >> >> >> find value information
>> >> >> >>
>> >> >> >> The only URL where i found a little info is this:
>> >> >> >> https://cwiki.apache.org/confluence/display/EXTCDI/Index
>> >> >> >>
>> >> >> >> --
>> >> >> >>
>> -------------------------------------------------------------------
>> >> >> >> *SCJA. José Luis Cetina*
>> >> >> >>
>> -------------------------------------------------------------------
>> >> >> >>
>> >> >>
>> >>
>>
>
>

Re: MyFaces and CODI

Posted by Gerhard Petracek <ge...@gmail.com>.
hi stephen,

just handle it like any custom js with jsf2 (you can see the usage in the
example - see layout.xhtml).

btw. i saw that the previous version in the playground example has an issue.
werner is currently refactoring the script -> [1] is his current result.

regards,
gerhard

[1] http://s.apache.org/rr

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


2012/3/9 Stephen More <st...@gmail.com>

> Included in the JSF jar is META-INF/resources/javax.faces/jsf.js which
> enables its use by <h:outputScript name="jsf.js" library="javax.faces"
> target="head"/>
>
> Should windowhandler.js be moved from the examples into a core library
> so that it can be utilized the same way ?
>
>
>
> On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> <ge...@gmail.com> wrote:
> > hi stephen,
> >
> > yes - you can add a small js (see e.g. [1]) to support this use-case.
> >
> > regards,
> > gerhard
> >
> > [1] http://s.apache.org/YTq
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/3/9 Stephen More <st...@gmail.com>
> >
> >> Great. I am mainly interested in WindowScoped i.e. every browser tab
> >> has its own mini-session.
> >>
> >> I see that CODI is adding a ?windowId=595 to keep these conversations
> >> separate. If a user simply copies the url and pastes in a new tab now
> >> two browser tabs are sharing the same conversation. How can I prevent
> >> this ? I want to enforce that EVERY browser tab has its own
> >> conversation. Perhaps a simple error to the user saying "Sorry" or
> >> start a new conversation.
> >>
> >> -Thanks
> >>
> >> On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> >> <ge...@gmail.com> wrote:
> >> > hi stephen,
> >> >
> >> > (that's an issue with the setup of weld and not related to myfaces
> codi.)
> >> > however, myfaces codi doesn't need this support -> if you also don't
> need
> >> > cdi support for servlets, filters or listeners, you can run the
> >> application
> >> > without those features.
> >> >
> >> > regards,
> >> > gerhard
> >> >
> >> > http://www.irian.at
> >> >
> >> > Your JSF/JavaEE powerhouse -
> >> > JavaEE Consulting, Development and
> >> > Courses in English and German
> >> >
> >> > Professional Support for Apache MyFaces
> >> >
> >> >
> >> > 2012/3/9 Stephen More <st...@gmail.com>
> >> >
> >> >> I too am trying to get a simple example working. I have put together
> >> >> this project:
> http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> >> >>
> >> >> mvn jetty:run-war   results in
> >> >>
> >> >> SEVERE: Unable to create JettyWeldInjector. CDI injection will not be
> >> >> available in Servlets, Filters or Listeners
> >> >>
> >> >> What else do I need to get this simple example working ?
> >> >>
> >> >> -Thanks
> >> >>
> >> >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> >> >> <ge...@gmail.com> wrote:
> >> >> > hi jose,
> >> >> >
> >> >> > first of all: welcome @ myfaces!
> >> >> >
> >> >> > concrete questions are very welcome and we will improve the wiki
> >> based on
> >> >> > them.
> >> >> >
> >> >> > regards,
> >> >> > gerhard
> >> >> >
> >> >> > http://www.irian.at
> >> >> >
> >> >> > Your JSF/JavaEE powerhouse -
> >> >> > JavaEE Consulting, Development and
> >> >> > Courses in English and German
> >> >> >
> >> >> > Professional Support for Apache MyFaces
> >> >> >
> >> >> >
> >> >> >
> >> >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> >> >> >
> >> >> >> Hi im so excited to start and use MyFaces and CODI but i cant get
> any
> >> >> >> "good" documentation in fact i only can get like 2 or 3 mini
> tutorial
> >> >> but
> >> >> >> they are really incomplete, can somebody recommend me to some
> >> tutorial
> >> >> or
> >> >> >> book to start with *CODI *y see this is an excellent extension, im
> >> >> moving
> >> >> >> from mojarra and CDI to MyFaces and MyFaces extensions, please
> where
> >> i
> >> >> can
> >> >> >> find value information
> >> >> >>
> >> >> >> The only URL where i found a little info is this:
> >> >> >> https://cwiki.apache.org/confluence/display/EXTCDI/Index
> >> >> >>
> >> >> >> --
> >> >> >>
> -------------------------------------------------------------------
> >> >> >> *SCJA. José Luis Cetina*
> >> >> >>
> -------------------------------------------------------------------
> >> >> >>
> >> >>
> >>
>

Re: MyFaces and CODI

Posted by Gerhard Petracek <ge...@gmail.com>.
hi stephen,

werner made the latest changes in the playground project -> he can provide
all the details.
i created [1] -> the documentation about the alternative implementations
should be better soon.

regards,
gerhard

[1] https://issues.apache.org/jira/browse/EXTCDI-274

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


2012/3/9 Stephen More <st...@gmail.com>

> I simply added [3] and now I get the behavior I was looking for.
>
> Is there a reason why I should add [2] ?
>
>
> On Fri, Mar 9, 2012 at 10:38 AM, Gerhard Petracek
> <ge...@gmail.com> wrote:
> > hi stephen,
> >
> > that's right [1] doesn't support it.
> > werner committed his improvement and you can try [2] and [3] as you see
> > them right now.
> >
> > regards,
> > gerhard
> >
> > [1]
> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > [2] http://s.apache.org/rr
> > [3] http://s.apache.org/23p
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/3/9 Stephen More <st...@gmail.com>
> >
> >> I was referring to [1]
> >> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> >>
> >> I guess I just need to wait until the correct way is tested and
> >> documented in the wiki using:
> >>   [1] http://s.apache.org/rr
> >>  [2] http://s.apache.org/23p
> >>
> >>
> >>
> >> On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
> >> <ge...@gmail.com> wrote:
> >> > @ mark:
> >> > i just tested it and it works with [1] in combination
> >> > with ClientSideWindowHandler [2].
> >> >
> >> > regards,
> >> > gerhard
> >> >
> >> > [1] http://s.apache.org/rr
> >> > [2] http://s.apache.org/23p
> >> >
> >> > http://www.irian.at
> >> >
> >> > Your JSF/JavaEE powerhouse -
> >> > JavaEE Consulting, Development and
> >> > Courses in English and German
> >> >
> >> > Professional Support for Apache MyFaces
> >> >
> >> >
> >> >
> >> > 2012/3/9 Mark Struberg <st...@yahoo.de>
> >> >
> >> >> Hi Stephen!
> >> >>
> >> >> Well, the current approach in CODI is currently under discussion in
> the
> >> >> JSF EG. The whole windowId stuff of CODI might end up in the JSF-2.2
> or
> >> 2.3
> >> >> spec.
> >> >>
> >> >> >T hat seems to work fine when pasting into a new empty window, but
> it
> >> >> > still allows you to copy-paste the url from one codi window to an
> >> >> > existing codi window.
> >> >>
> >> >> Nope, because the windowhandler.js script will first check the
> >> window.name.
> >> >> And if this is empty/doesn't fit the windowId in the URL, then it
> will
> >> >> reload the page with a freshly requested windowId.
> >> >>
> >> >> LieGrue,
> >> >> strub
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> ----- Original Message -----
> >> >> > From: Stephen More <st...@gmail.com>
> >> >> > To: MyFaces Discussion <us...@myfaces.apache.org>
> >> >> > Cc:
> >> >> > Sent: Friday, March 9, 2012 1:27 PM
> >> >> > Subject: Re: MyFaces and CODI
> >> >> >
> >> >> > Included in the JSF jar is META-INF/resources/javax.faces/jsf.js
> which
> >> >> > enables its use by <h:outputScript name="jsf.js"
> >> >> > library="javax.faces"
> >> >> > target="head"/>
> >> >> >
> >> >> > Should windowhandler.js be moved from the examples into a core
> library
> >> >> > so that it can be utilized the same way ?
> >> >> >
> >> >> >
> >> >> >
> >> >> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> >> >> > <ge...@gmail.com> wrote:
> >> >> >>  hi stephen,
> >> >> >>
> >> >> >>  yes - you can add a small js (see e.g. [1]) to support this
> >> use-case.
> >> >> >>
> >> >> >>  regards,
> >> >> >>  gerhard
> >> >> >>
> >> >> >>  [1] http://s.apache.org/YTq
> >> >> >>
> >> >> >>  http://www.irian.at
> >> >> >>
> >> >> >>  Your JSF/JavaEE powerhouse -
> >> >> >>  JavaEE Consulting, Development and
> >> >> >>  Courses in English and German
> >> >> >>
> >> >> >>  Professional Support for Apache MyFaces
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>  2012/3/9 Stephen More <st...@gmail.com>
> >> >> >>
> >> >> >>>  Great. I am mainly interested in WindowScoped i.e. every browser
> >> tab
> >> >> >>>  has its own mini-session.
> >> >> >>>
> >> >> >>>  I see that CODI is adding a ?windowId=595 to keep these
> >> conversations
> >> >> >>>  separate. If a user simply copies the url and pastes in a new
> tab
> >> now
> >> >> >>>  two browser tabs are sharing the same conversation. How can I
> >> prevent
> >> >> >>>  this ? I want to enforce that EVERY browser tab has its own
> >> >> >>>  conversation. Perhaps a simple error to the user saying
> >> >> > "Sorry" or
> >> >> >>>  start a new conversation.
> >> >> >>>
> >> >> >>>  -Thanks
> >> >> >>>
> >> >> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> >> >> >>>  <ge...@gmail.com> wrote:
> >> >> >>>  > hi stephen,
> >> >> >>>  >
> >> >> >>>  > (that's an issue with the setup of weld and not related to
> >> >> > myfaces codi.)
> >> >> >>>  > however, myfaces codi doesn't need this support -> if you
> >> >> > also don't need
> >> >> >>>  > cdi support for servlets, filters or listeners, you can run
> the
> >> >> >>>  application
> >> >> >>>  > without those features.
> >> >> >>>  >
> >> >> >>>  > regards,
> >> >> >>>  > gerhard
> >> >> >>>  >
> >> >> >>>  > http://www.irian.at
> >> >> >>>  >
> >> >> >>>  > Your JSF/JavaEE powerhouse -
> >> >> >>>  > JavaEE Consulting, Development and
> >> >> >>>  > Courses in English and German
> >> >> >>>  >
> >> >> >>>  > Professional Support for Apache MyFaces
> >> >> >>>  >
> >> >> >>>  >
> >> >> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
> >> >> >>>  >
> >> >> >>>  >> I too am trying to get a simple example working. I have put
> >> >> > together
> >> >> >>>  >> this project:
> >> >> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> >> >> >>>  >>
> >> >> >>>  >> mvn jetty:run-war   results in
> >> >> >>>  >>
> >> >> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI injection
> will
> >> >> > not be
> >> >> >>>  >> available in Servlets, Filters or Listeners
> >> >> >>>  >>
> >> >> >>>  >> What else do I need to get this simple example working ?
> >> >> >>>  >>
> >> >> >>>  >> -Thanks
> >> >> >>>  >>
> >> >> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> >> >> >>>  >> <ge...@gmail.com> wrote:
> >> >> >>>  >> > hi jose,
> >> >> >>>  >> >
> >> >> >>>  >> > first of all: welcome @ myfaces!
> >> >> >>>  >> >
> >> >> >>>  >> > concrete questions are very welcome and we will improve
> >> >> > the wiki
> >> >> >>>  based on
> >> >> >>>  >> > them.
> >> >> >>>  >> >
> >> >> >>>  >> > regards,
> >> >> >>>  >> > gerhard
> >> >> >>>  >> >
> >> >> >>>  >> > http://www.irian.at
> >> >> >>>  >> >
> >> >> >>>  >> > Your JSF/JavaEE powerhouse -
> >> >> >>>  >> > JavaEE Consulting, Development and
> >> >> >>>  >> > Courses in English and German
> >> >> >>>  >> >
> >> >> >>>  >> > Professional Support for Apache MyFaces
> >> >> >>>  >> >
> >> >> >>>  >> >
> >> >> >>>  >> >
> >> >> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> >> >> >>>  >> >
> >> >> >>>  >> >> Hi im so excited to start and use MyFaces and CODI
> >> >> > but i cant get any
> >> >> >>>  >> >> "good" documentation in fact i only can get
> >> >> > like 2 or 3 mini tutorial
> >> >> >>>  >> but
> >> >> >>>  >> >> they are really incomplete, can somebody recommend me
> >> >> > to some
> >> >> >>>  tutorial
> >> >> >>>  >> or
> >> >> >>>  >> >> book to start with *CODI *y see this is an excellent
> >> >> > extension, im
> >> >> >>>  >> moving
> >> >> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
> >> >> > extensions, please where
> >> >> >>>  i
> >> >> >>>  >> can
> >> >> >>>  >> >> find value information
> >> >> >>>  >> >>
> >> >> >>>  >> >> The only URL where i found a little info is this:
> >> >> >>>  >> >>
> >> >> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
> >> >> >>>  >> >>
> >> >> >>>  >> >> --
> >> >> >>>  >> >>
> >> >> > -------------------------------------------------------------------
> >> >> >>>  >> >> *SCJA. José Luis Cetina*
> >> >> >>>  >> >>
> >> >> > -------------------------------------------------------------------
> >> >> >>>  >> >>
> >> >> >>>  >>
> >> >> >>>
> >> >> >
> >> >>
> >>
>

Re: MyFaces and CODI

Posted by Stephen More <st...@gmail.com>.
I simply added [3] and now I get the behavior I was looking for.

Is there a reason why I should add [2] ?


On Fri, Mar 9, 2012 at 10:38 AM, Gerhard Petracek
<ge...@gmail.com> wrote:
> hi stephen,
>
> that's right [1] doesn't support it.
> werner committed his improvement and you can try [2] and [3] as you see
> them right now.
>
> regards,
> gerhard
>
> [1] http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> [2] http://s.apache.org/rr
> [3] http://s.apache.org/23p
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/9 Stephen More <st...@gmail.com>
>
>> I was referring to [1]
>> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
>>
>> I guess I just need to wait until the correct way is tested and
>> documented in the wiki using:
>>   [1] http://s.apache.org/rr
>>  [2] http://s.apache.org/23p
>>
>>
>>
>> On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
>> <ge...@gmail.com> wrote:
>> > @ mark:
>> > i just tested it and it works with [1] in combination
>> > with ClientSideWindowHandler [2].
>> >
>> > regards,
>> > gerhard
>> >
>> > [1] http://s.apache.org/rr
>> > [2] http://s.apache.org/23p
>> >
>> > http://www.irian.at
>> >
>> > Your JSF/JavaEE powerhouse -
>> > JavaEE Consulting, Development and
>> > Courses in English and German
>> >
>> > Professional Support for Apache MyFaces
>> >
>> >
>> >
>> > 2012/3/9 Mark Struberg <st...@yahoo.de>
>> >
>> >> Hi Stephen!
>> >>
>> >> Well, the current approach in CODI is currently under discussion in the
>> >> JSF EG. The whole windowId stuff of CODI might end up in the JSF-2.2 or
>> 2.3
>> >> spec.
>> >>
>> >> >T hat seems to work fine when pasting into a new empty window, but it
>> >> > still allows you to copy-paste the url from one codi window to an
>> >> > existing codi window.
>> >>
>> >> Nope, because the windowhandler.js script will first check the
>> window.name.
>> >> And if this is empty/doesn't fit the windowId in the URL, then it will
>> >> reload the page with a freshly requested windowId.
>> >>
>> >> LieGrue,
>> >> strub
>> >>
>> >>
>> >>
>> >>
>> >> ----- Original Message -----
>> >> > From: Stephen More <st...@gmail.com>
>> >> > To: MyFaces Discussion <us...@myfaces.apache.org>
>> >> > Cc:
>> >> > Sent: Friday, March 9, 2012 1:27 PM
>> >> > Subject: Re: MyFaces and CODI
>> >> >
>> >> > Included in the JSF jar is META-INF/resources/javax.faces/jsf.js which
>> >> > enables its use by <h:outputScript name="jsf.js"
>> >> > library="javax.faces"
>> >> > target="head"/>
>> >> >
>> >> > Should windowhandler.js be moved from the examples into a core library
>> >> > so that it can be utilized the same way ?
>> >> >
>> >> >
>> >> >
>> >> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
>> >> > <ge...@gmail.com> wrote:
>> >> >>  hi stephen,
>> >> >>
>> >> >>  yes - you can add a small js (see e.g. [1]) to support this
>> use-case.
>> >> >>
>> >> >>  regards,
>> >> >>  gerhard
>> >> >>
>> >> >>  [1] http://s.apache.org/YTq
>> >> >>
>> >> >>  http://www.irian.at
>> >> >>
>> >> >>  Your JSF/JavaEE powerhouse -
>> >> >>  JavaEE Consulting, Development and
>> >> >>  Courses in English and German
>> >> >>
>> >> >>  Professional Support for Apache MyFaces
>> >> >>
>> >> >>
>> >> >>
>> >> >>  2012/3/9 Stephen More <st...@gmail.com>
>> >> >>
>> >> >>>  Great. I am mainly interested in WindowScoped i.e. every browser
>> tab
>> >> >>>  has its own mini-session.
>> >> >>>
>> >> >>>  I see that CODI is adding a ?windowId=595 to keep these
>> conversations
>> >> >>>  separate. If a user simply copies the url and pastes in a new tab
>> now
>> >> >>>  two browser tabs are sharing the same conversation. How can I
>> prevent
>> >> >>>  this ? I want to enforce that EVERY browser tab has its own
>> >> >>>  conversation. Perhaps a simple error to the user saying
>> >> > "Sorry" or
>> >> >>>  start a new conversation.
>> >> >>>
>> >> >>>  -Thanks
>> >> >>>
>> >> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
>> >> >>>  <ge...@gmail.com> wrote:
>> >> >>>  > hi stephen,
>> >> >>>  >
>> >> >>>  > (that's an issue with the setup of weld and not related to
>> >> > myfaces codi.)
>> >> >>>  > however, myfaces codi doesn't need this support -> if you
>> >> > also don't need
>> >> >>>  > cdi support for servlets, filters or listeners, you can run the
>> >> >>>  application
>> >> >>>  > without those features.
>> >> >>>  >
>> >> >>>  > regards,
>> >> >>>  > gerhard
>> >> >>>  >
>> >> >>>  > http://www.irian.at
>> >> >>>  >
>> >> >>>  > Your JSF/JavaEE powerhouse -
>> >> >>>  > JavaEE Consulting, Development and
>> >> >>>  > Courses in English and German
>> >> >>>  >
>> >> >>>  > Professional Support for Apache MyFaces
>> >> >>>  >
>> >> >>>  >
>> >> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
>> >> >>>  >
>> >> >>>  >> I too am trying to get a simple example working. I have put
>> >> > together
>> >> >>>  >> this project:
>> >> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
>> >> >>>  >>
>> >> >>>  >> mvn jetty:run-war   results in
>> >> >>>  >>
>> >> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI injection will
>> >> > not be
>> >> >>>  >> available in Servlets, Filters or Listeners
>> >> >>>  >>
>> >> >>>  >> What else do I need to get this simple example working ?
>> >> >>>  >>
>> >> >>>  >> -Thanks
>> >> >>>  >>
>> >> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
>> >> >>>  >> <ge...@gmail.com> wrote:
>> >> >>>  >> > hi jose,
>> >> >>>  >> >
>> >> >>>  >> > first of all: welcome @ myfaces!
>> >> >>>  >> >
>> >> >>>  >> > concrete questions are very welcome and we will improve
>> >> > the wiki
>> >> >>>  based on
>> >> >>>  >> > them.
>> >> >>>  >> >
>> >> >>>  >> > regards,
>> >> >>>  >> > gerhard
>> >> >>>  >> >
>> >> >>>  >> > http://www.irian.at
>> >> >>>  >> >
>> >> >>>  >> > Your JSF/JavaEE powerhouse -
>> >> >>>  >> > JavaEE Consulting, Development and
>> >> >>>  >> > Courses in English and German
>> >> >>>  >> >
>> >> >>>  >> > Professional Support for Apache MyFaces
>> >> >>>  >> >
>> >> >>>  >> >
>> >> >>>  >> >
>> >> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
>> >> >>>  >> >
>> >> >>>  >> >> Hi im so excited to start and use MyFaces and CODI
>> >> > but i cant get any
>> >> >>>  >> >> "good" documentation in fact i only can get
>> >> > like 2 or 3 mini tutorial
>> >> >>>  >> but
>> >> >>>  >> >> they are really incomplete, can somebody recommend me
>> >> > to some
>> >> >>>  tutorial
>> >> >>>  >> or
>> >> >>>  >> >> book to start with *CODI *y see this is an excellent
>> >> > extension, im
>> >> >>>  >> moving
>> >> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
>> >> > extensions, please where
>> >> >>>  i
>> >> >>>  >> can
>> >> >>>  >> >> find value information
>> >> >>>  >> >>
>> >> >>>  >> >> The only URL where i found a little info is this:
>> >> >>>  >> >>
>> >> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
>> >> >>>  >> >>
>> >> >>>  >> >> --
>> >> >>>  >> >>
>> >> > -------------------------------------------------------------------
>> >> >>>  >> >> *SCJA. José Luis Cetina*
>> >> >>>  >> >>
>> >> > -------------------------------------------------------------------
>> >> >>>  >> >>
>> >> >>>  >>
>> >> >>>
>> >> >
>> >>
>>

Re: MyFaces and CODI

Posted by Mark Struberg <st...@yahoo.de>.
Hi Rafael!

Please try to set a breakpoint in 


GroupedConversationContextExtension#afterBeanDiscovery()

The new contexts get added via the AfterBeanDiscovery events addContext() method.

If this doesn't get invoked, then the Extension detection probably doesn't work.


LieGrue,
strub



----- Original Message -----
> From: Rafael Pestano <rm...@yahoo.com.br>
> To: MyFaces Discussion <us...@myfaces.apache.org>
> Cc: 
> Sent: Sunday, March 18, 2012 9:20 PM
> Subject: Re: MyFaces and CODI
> 
> Hi guys,
>  
> 
> I think that what Mark stated can be happening in the environment at my 
> company(weblogic 11g, mojarra 1.2, owb and CODI) cause a simple forward is also 
> causing the bean to be instantiated(tested with ViewAccess and WindowScoped),  
> 
> How can i ensure that the whole Context is being initialized?   
> 
> 
> 
> About the server side solution Gerhard proposed i can confirm it is working here 
> at home, the main problem is something with the"constalation" that the 
> application at my company is using, maybe the frame based layout, jspx extension 
> or something else.
> 
> i also tried to deploy Gerhard example here in weblogic here at home without 
> success, the CDI container cannot start.
> 
> i just changed from myfaces to mojarra, instaled the example via maven and 
> deployed the war in weblogic 11g(10.3.2), to try simulate the enviroment at my 
> company, here is the error:
> 
> 
> INFO: Initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS) 
> for context '/playground-jsf12-1.0.4'
> 18/03/2012 17:10:46 
> org.apache.myfaces.extensions.cdi.core.api.provider.ServiceProvider 
> <clinit>
> INFO: 
> org.apache.myfaces.extensions.cdi.core.impl.provider.DefaultServiceProvider 
> installed successfully.
> 18/03/2012 17:10:46 
> org.apache.myfaces.extensions.cdi.core.api.provider.ServiceProvider 
> <clinit>
> INFO: 
> org.apache.myfaces.extensions.cdi.core.impl.provider.DefaultServiceProviderContext 
> installed successfully.
> java.lang.IllegalStateException: no 
> org.apache.myfaces.extensions.cdi.core.api.provider.BeanManagerProvider in 
> place! Please ensur
> e that you configured the CDI implementation of your choice properly. If your 
> setup is correct, please clear all caches and compil
> ed artifacts. If there is still a problem, try one of the controlled 
> bootstrapping add-ons for the CDI implementation you are usin
> g.
>         at 
> org.apache.myfaces.extensions.cdi.core.api.provider.BeanManagerProvider.getInstance(BeanManagerProvider.java:81)
>         at 
> org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils.getContextualReferenceByClass(CodiUtils.java:124)
>         at 
> org.apache.myfaces.extensions.cdi.jsf.impl.listener.phase.PhaseListenerExtension.consumePhaseListeners(PhaseListenerExt
> ension.java:110)
>         at 
> org.apache.myfaces.extensions.cdi.jsf.impl.listener.phase.CodiLifecycleFactoryWrapper.getLifecycle(CodiLifecycleFactory
> Wrapper.java:65)
>         at 
> com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:1115)
>         at 
> com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:766)
>         at 
> com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:529)
>         at 
> com.sun.faces.config.GlassFishConfigureListener.contextInitialized(GlassFishConfigureListener.java:47)
>         at 
> weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
>         at 
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
>         at 
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
>         at 
> weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
>         at 
> weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1801)
>         at 
> weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3045)
>         at 
> weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1397)
>         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
>         at 
> weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
>         at 
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
>         at 
> weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
>         at 
> weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
>         at 
> weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
>         at 
> weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
>         at 
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
>         at 
> weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
>         at 
> weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
>         at 
> weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
>         at 
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
>         at 
> weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
>         at 
> weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:39)
>         at 
> weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
>         at 
> weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
>         at 
> weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
>         at 
> weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
>         at 
> weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
>         at 
> weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
>         at 
> weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
>         at 
> weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
>         at 
> weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
>         at 
> weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
>         at 
> weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCa
> llbackDeliverer.java:181)
>         at 
> weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallback
> Deliverer.java:12)
>         at 
> weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliv
> erer.java:67)
>         at 
> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
>         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
>         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
> 18/03/2012 17:10:47 com.sun.faces.config.ConfigureListener contextInitialized
>  
> thanks for your time.
> 
>  
> Att, 
> Rafael M. Pestano
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
> 
> 
> 
> ----- Mensagem original -----
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Cc: 
> Enviadas: Domingo, 18 de Março de 2012 16:47
> Assunto: Re: MyFaces and CODI
> 
> hi mark,
> 
> since rafael mentioned that it works without a4j and there is no issue with
> a4j in the demo, i don't think that it is such a basic issue.
> 
> regards,
> gerhard
> 
> http://www.irian.at
> 
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
> 
> Professional Support for Apache MyFaces
> 
> 
> 
> 2012/3/18 Mark Struberg <st...@yahoo.de>
> 
>> 
>> 
>>  Gerhard pinged me that you are using @ViewAccessScoped. In that case 
> I'd
>>  recomment to debug if the whole Context Extension gets properly 
> registrated.
>> 
>>  If the CDI container doesn't know the @ViewAccessScoped annotation then
>>  all your beans will end up as @Dependent...
>> 
>>  LieGrue,
>>  strub
>> 
>> 
>>  ----- Original Message -----
>>  > From: Mark Struberg <st...@yahoo.de>
>>  > To: MyFaces Discussion <us...@myfaces.apache.org>
>>  > Cc:
>>  > Sent: Sunday, March 18, 2012 7:42 PM
>>  > Subject: Re: MyFaces and CODI
>>  >
>>  >>  when i find out what's causing my bean to be instantiated on 
> every ajax
>>  > call
>>  >>  i'll come back here to report.
>>  >
>>  > That sounds familiar - good luck ;)
>>  >
>>  > Which scope does your bean have? You are sure that you are really 
> using
>>  CDI
>>  > javax.enterprise.context.* scopes and not javax.faces.bean.* scopes 
> due
>>  to a
>>  > wrong auto-import  of your IDE?
>>  >
>>  > LieGrue,
>>  > strub
>>  >
>>  >
>>  >
>>  > ----- Original Message -----
>>  >>  From: Rafael Pestano <rm...@yahoo.com.br>
>>  >>  To: MyFaces Discussion <us...@myfaces.apache.org>
>>  >>  Cc:
>>  >>  Sent: Saturday, March 17, 2012 4:34 PM
>>  >>  Subject: Re: MyFaces and CODI
>>  >>
>>  >>  yeap, i also deployed the server side demo in tomcat and it works 
> as
>>  > expected,
>>  >>  when i find out what's causing my bean to be instantiated on 
> every ajax
>>  > call
>>  >>  i'll come back here to report.
>>  >>
>>  >>  many thanks for the assistance.
>>  >>
>>  >>  Att,
>>  >>
>>  >>  Rafael M. Pestano
>>  >>
>>  >>  Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande 
> do Sul
>>  >>  Graduando em Ciência da Computação UFRGS
>>  >>  @realpestano
>>  >>  http://code.google.com/p/jsf-conventions-framework/
>>  >>
>>  >>
>>  >>
>>  >>  ________________________________
>>  >>  De: Gerhard Petracek <ge...@gmail.com>
>>  >>  Para: MyFaces Discussion <us...@myfaces.apache.org>
>>  >>  Enviadas: Sexta-feira, 16 de Março de 2012 22:46
>>  >>  Assunto: Re: MyFaces and CODI
>>  >>
>>  >>  hi rafael,
>>  >>
>>  >>  i can't reproduce it. i added richfaces to the previous demo 
> as well as
>>  > a4j
>>  >>  support to the input component and everything works as expected.
>>  >>
>>  >>  regards,
>>  >>  gerhard
>>  >>
>>  >>  http://www.irian.at
>>  >>
>>  >>  Your JSF/JavaEE powerhouse -
>>  >>  JavaEE Consulting, Development and
>>  >>  Courses in English and German
>>  >>
>>  >>  Professional Support for Apache MyFaces
>>  >>
>>  >>
>>  >>
>>  >>  2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>>  >>
>>  >>>   Hi Gehard,
>>  >>>
>>  >>>   i didnt got the ideia, do you have any example or a link 
> showing this
>>  >>>   approach?
>>  >>>
>>  >>>   what i have got til now is:
>>  >>>   1 - WindowContextIdHolderComponent is a jsf component which 
> is added
>>  >>>   dynamically to the view
>>  >>>   2 - this component holds the windowId
>>  >>>   3 - i have,somehow , to keep the windowId the same between 
> requests
>>  so
>>  > my
>>  >>>   ViewAccessScoped bean  is "keeped alive" <- 
> here is where
>>  > im
>>  >>  stuck
>>  >>>
>>  >>>
>>  >>>
>>  >>>
>>  >>>   Att,
>>  >>>   Rafael M. Pestano
>>  >>>   Desenvolvedor Java Cia. de Processamento de Dados do Rio 
> Grande do
>>  Sul
>>  >>>   Graduando em Ciência da Computação UFRGS
>>  >>>   @realpestano
>>  >>>  http://code.google.com/p/jsf-conventions-framework/
>>  >>>
>>  >>>
>>  >>>
>>  >>>   ----- Mensagem original -----
>>  >>>   De: Gerhard Petracek <ge...@gmail.com>
>>  >>>   Para: MyFaces Discussion <us...@myfaces.apache.org>
>>  >>>   Cc:
>>  >>>   Enviadas: Quinta-feira, 15 de Março de 2012 11:28
>>  >>>   Assunto: Re: MyFaces and CODI
>>  >>>
>>  >>>   hi rafael,
>>  >>>
>>  >>>   @ WindowContextIdHolderComponent:
>>  >>>
>>  >>>   that's the name of the class. you have to resolve the 
> component
>>  > (by
>>  >>  type)
>>  >>>   before the view gets rendered and add it to the ajax enabled 
> a4j
>>  > components
>>  >>>   via the corresponding java-api.
>>  >>>
>>  >>>   @ custom approach:
>>  >>>   independent of the concrete approach you would like to use, 
> you just
>>  > have
>>  >>>   to ensure that the information is available on the 
> server-side (for
>>  > every
>>  >>>   jsf request which starts the jsf request-lifecycle).
>>  >>>
>>  >>>   regards,
>>  >>>   gerhard
>>  >>>
>>  >>>   Your JSF/JavaEE powerhouse -
>>  >>>   JavaEE Consulting, Development and
>>  >>>   Courses in English and German
>>  >>>
>>  >>>   Professional Support for Apache MyFaces
>>  >>>
>>  >>>
>>  >>>   2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>>  >>>
>>  >>>   > Hi again,
>>  >>>   >
>>  >>>   > "it will work with a4j as soon as you
>>  >>>   > ensure that it gets restored for requests triggered by 
> a4j "
>>  > you
>>  >>  mean i
>>  >>>   > should send WindowContextIdHolderComponent  within the 
> ajax
>>  > request?
>>  >>>   >
>>  >>>   > somethink like <a4j:support
>>  >>  process="WindowContextIdHolderComponent"/> ?
>>  >>>   >
>>  >>>   > if so whats the id of the generated component?
>>  >>>   >
>>  >>>   > i also have another question, in the javadoc
>>  >>>   > of WindowContextConfig isUrlParameterSuported() says
>>  >>>   >
>>  >>>   > "Specifies if it is allowed to use URL params for 
> forwarding
>>  > the
>>  >>  current
>>  >>>   > window-id. (deactivate it e.g. for higher security - in 
> this case
>>  >
>>  >>  it's
>>  >>>   > required to use a window id provided by a component lib 
> or a
>>  >>  server-side
>>  >>>   > window-handler"
>>  >>>   >
>>  >>>   > how can i create a component to handle the window id? 
> can i do
>>  > that
>>  >>  with
>>  >>>   > an h:inputHidden for example?
>>  >>>   >
>>  >>>   > thanks for the help.
>>  >>>   >
>>  >>>   >
>>  >>>   >
>>  >>>   > Att,
>>  >>>   >
>>  >>>   > Rafael M. Pestano
>>  >>>   >
>>  >>>   > Desenvolvedor Java Cia. de Processamento de Dados do 
> Rio Grande
>>  > do Sul
>>  >>>   > Graduando em Ciência da Computação UFRGS
>>  >>>   > @realpestano
>>  >>>   > http://code.google.com/p/jsf-conventions-framework/
>>  >>>   >
>>  >>>   >
>>  >>>   >
>>  >>>   > ________________________________
>>  >>>   > De: Gerhard Petracek <ge...@gmail.com>
>>  >>>   > Para: MyFaces Discussion 
> <us...@myfaces.apache.org>
>>  >>>   > Enviadas: Quinta-feira, 15 de Março de 2012 10:37
>>  >>>   > Assunto: Re: MyFaces and CODI
>>  >>>   >
>>  >>>   > hi rafael,
>>  >>>   >
>>  >>>   > the fallback adds a component 
> (WindowContextIdHolderComponent)
>>  >>>   dynamically
>>  >>>   > (as a direct child of UiViewRoot) -> it will work 
> with a4j as
>>  > soon
>>  >>  as you
>>  >>>   > ensure that it gets restored for requests triggered by 
> a4j.
>>  >>>   >
>>  >>>   > regards,
>>  >>>   > gerhard
>>  >>>   >
>>  >>>   > http://www.irian.at
>>  >>>   >
>>  >>>   > Your JSF/JavaEE powerhouse -
>>  >>>   > JavaEE Consulting, Development and
>>  >>>   > Courses in English and German
>>  >>>   >
>>  >>>   > Professional Support for Apache MyFaces
>>  >>>   >
>>  >>>   >
>>  >>>   > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>>  >>>   >
>>  >>>   > > well its not 100% yet ;(...on every ajaxCall my
>>  > ViewAccessScoped
>>  >>  bean
>>  >>>   is
>>  >>>   > > being instantiated,
>>  >>>   > >
>>  >>>   > > im using a4j, there is any known issue with it?
>>  >>>   > >
>>  >>>   > > for example <h:selectOneMenu .....>
>>  >>>   > >                         <a4j:support
>>  >>  event="onchange" ....action="when
>>  >>>   > the
>>  >>>   > > action is called the bean constructor gets 
> called"/>
>>  >>>   > >                     </h:selectOneMenu>
>>  >>>   > >
>>  >>>   > > if i change from View to RequestScoped the 
> bahavior is the
>>  > same,
>>  >>  any
>>  >>>   > ideas?
>>  >>>   > >
>>  >>>   > >
>>  >>>   > > thanks in advance.
>>  >>>   > >
>>  >>>   > >
>>  >>>   > > Att,
>>  >>>   > >
>>  >>>   > > Rafael M. Pestano
>>  >>>   > >
>>  >>>   > > Desenvolvedor Java Cia. de Processamento de Dados 
> do Rio
>>  > Grande
>>  >>  do Sul
>>  >>>   > > Graduando em Ciência da Computação UFRGS
>>  >>>   > > @realpestano
>>  >>>   > > 
> http://code.google.com/p/jsf-conventions-framework/
>>  >>>   > >
>>  >>>   > >
>>  >>>   > >
>>  >>>   > > ________________________________
>>  >>>   > >  De: Rafael Pestano <rm...@yahoo.com.br>
>>  >>>   > > Para: MyFaces Discussion 
> <us...@myfaces.apache.org>
>>  >>>   > > Enviadas: Quinta-feira, 15 de Março de 2012 8:45
>>  >>>   > > Assunto: Re: MyFaces and CODI
>>  >>>   > >
>>  >>>   > > "if you don't need redirects, you could 
> have a look
>>  > at
>>  >>  e.g. [1] which
>>  >>>   > uses
>>  >>>   > > an internal fallback." yea, its our case and 
> it just
>>  > works!
>>  >>>   > >
>>  >>>   > > many thanks for your help, keep the great work!
>>  >>>   > >
>>  >>>   > > Att,
>>  >>>   > >
>>  >>>   > > Rafael M. Pestano
>>  >>>   > >
>>  >>>   > > Desenvolvedor Java Cia. de Processamento de Dados 
> do Rio
>>  > Grande
>>  >>  do Sul
>>  >>>   > > Graduando em Ciência da Computação UFRGS
>>  >>>   > > @realpestano
>>  >>>   > > 
> http://code.google.com/p/jsf-conventions-framework/
>>  >>>   > >
>>  >>>   > >
>>  >>>   > >
>>  >>>   > > ________________________________
>>  >>>   > > De: Gerhard Petracek 
> <ge...@gmail.com>
>>  >>>   > > Para: MyFaces Discussion 
> <us...@myfaces.apache.org>
>>  >>>   > > Enviadas: Quarta-feira, 14 de Março de 2012 23:19
>>  >>>   > > Assunto: Re: MyFaces and CODI
>>  >>>   > >
>>  >>>   > > hi rafael,
>>  >>>   > >
>>  >>>   > > as you have seen it's easy to provide a custom
>>  > WindowHandler
>>  >>  (just
>>  >>>   > > implement the interface and provide your 
> implementation as
>>  >>  alternative
>>  >>>   > cdi
>>  >>>   > > bean)
>>  >>>   > > -> you can integrate every custom approach 
> which is
>>  > enough to
>>  >>  solve you
>>  >>>   > > requirements.
>>  >>>   > >
>>  >>>   > > if you don't need redirects, you could have a 
> look at
>>  > e.g.
>>  >>  [1] which
>>  >>>   uses
>>  >>>   > > an internal fallback.
>>  >>>   > >
>>  >>>   > > regards,
>>  >>>   > > gerhard
>>  >>>   > >
>>  >>>   > > [1] http://s.apache.org/SAs
>>  >>>   > >
>>  >>>   > > http://www.irian.at
>>  >>>   > >
>>  >>>   > > Your JSF/JavaEE powerhouse -
>>  >>>   > > JavaEE Consulting, Development and
>>  >>>   > > Courses in English and German
>>  >>>   > >
>>  >>>   > > Professional Support for Apache MyFaces
>>  >>>   > >
>>  >>>   > >
>>  >>>   > >
>>  >>>   > > 2012/3/15 Rafael Pestano 
> <rm...@yahoo.com.br>
>>  >>>   > >
>>  >>>   > > > Hi Gehard,
>>  >>>   > > >
>>  >>>   > > > its a stopper to us cause we are still 
> dependent on JSF
>>  > 1.2
>>  >>>   > > > Can i implement an alternative
>>  >>>   > > > to
>>  >>>   > >
>>  >>>   >
>>  >>>
>>  >>
>>  >
>> 
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
>>  >>>   > > > based on JSF 1.2?
>>  >>>   > > >
>>  >>>   > > > i see you use flash scope to span the 
> windowId through
>>  >>  requests in
>>  >>>   the
>>  >>>   > > > server side solution:
>>  >>>   > > >
>>  >>>   > > > if (windowId != null)
>>  >>>   > > > 79         {
>>  >>>   > > >
>>  >>>   > > > 80
>>  >>>   > >
>>  >>  
> externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY,
>>  >>>   > > windowId);
>>  >>>   > > >
>>  >>>   > > > 81
>>  >>>   > >
>>  > externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
>>  >>>   > > > 82         }
>>  >>>   > > >
>>  >>>   > > > if i put the windownId in the sessionMap it 
> would still
>>  >
>>  >>  work? i think
>>  >>>   > ill
>>  >>>   > > > find hard time trying to remove the windowId 
> from the
>>  > map
>>  >>  when user
>>  >>>   > leave
>>  >>>   > > > the page.
>>  >>>   > > >
>>  >>>   > > >
>>  >>>   > > >
>>  >>>   > > > thanks for your help i really appreciated it.
>>  >>>   > > >
>>  >>>   > > > Att,
>>  >>>   > > > Rafael M. Pestano
>>  >>>   > > > Desenvolvedor Java Cia. de Processamento de 
> Dados do
>>  > Rio
>>  >>  Grande do
>>  >>>   Sul
>>  >>>   > > > Graduando em Ciência da Computação UFRGS
>>  >>>   > > > @realpestano
>>  >>>   > > > 
> http://code.google.com/p/jsf-conventions-framework/
>>  >>>   > > >
>>  >>>   > > >
>>  >>>   > > >
>>  >>>   > > > ----- Mensagem original -----
>>  >>>   > > > De: Gerhard Petracek 
> <ge...@gmail.com>
>>  >>>   > > > Para: MyFaces Discussion
>>  > <us...@myfaces.apache.org>
>>  >>>   > > > Cc:
>>  >>>   > > > Enviadas: Quarta-feira, 14 de Março de 2012 
> 20:55
>>  >>>   > > > Assunto: Re: MyFaces and CODI
>>  >>>   > > >
>>  >>>   > > > hi rafael,
>>  >>>   > > >
>>  >>>   > > > internally the ServerSideWindowHandler is 
> based on the
>>  > flash
>>  >>  scope
>>  >>>   > > (that's
>>  >>>   > > > one of the mentioned disadvantages)
>>  >>>   > > > -> it's bound to jsf 2+ -> it is:
>>  >>>   > > >
>>  >>>   > > >
>>  >>>   > >
>>  >>>   >
>>  >>>
>>  >>
>>  >
>> 
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
>>  >>>   > > > (and you can't use the additional js.)
>>  >>>   > > >
>>  >>>   > > > with some constellations you just hit the 
> restrictions
>>  > of
>>  >>  browsers ->
>>  >>>   > you
>>  >>>   > > > have to choose what you really need.
>>  >>>   > > >
>>  >>>   > > > regards,
>>  >>>   > > > gerhard
>>  >>>   > > >
>>  >>>   > > > http://www.irian.at
>>  >>>   > > >
>>  >>>   > > > Your JSF/JavaEE powerhouse -
>>  >>>   > > > JavaEE Consulting, Development and
>>  >>>   > > > Courses in English and German
>>  >>>   > > >
>>  >>>   > > > Professional Support for Apache MyFaces
>>  >>>   > > >
>>  >>>   > > >
>>  >>>   > > >
>>  >>>   > > > 2012/3/15 Rafael Pestano 
> <rm...@yahoo.com.br>
>>  >>>   > > >
>>  >>>   > > > > i see, i have used the client side one
>>  >>>   > > > >
>>  >>>   > > > > <alternatives>
>>  >>>   > > > >
>>  >>>   > > >
>>  >>>   > >
>>  >>>   >
>>  >>>
>>  >>
>>  >
>> 
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
>>  >>>   > > > > </alternatives>
>>  >>>   > > > >
>>  >>>   > > > > i imagine the server side should be
>>  >>>   > > > >
>>  >>>   > > > > <alternatives>
>>  >>>   > > > >
>>  >>>   > > >
>>  >>>   > >
>>  >>>   >
>>  >>>
>>  >>
>>  >
>> 
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
>>  >>>   > > > > </alternatives>alright?
>>  >>>   > > > >
>>  >>>   > > > > i will test it tomorrow and give the 
> feedback,
>>  > thanks.
>>  >>>   > > > >
>>  >>>   > > > > Att,
>>  >>>   > > > > Rafael M. Pestano
>>  >>>   > > > > Desenvolvedor Java Cia. de Processamento 
> de Dados
>>  > do
>>  >>  Rio Grande do
>>  >>>   > Sul
>>  >>>   > > > > Graduando em Ciência da Computação UFRGS
>>  >>>   > > > > @realpestano
>>  >>>   > > > >
>>  > http://code.google.com/p/jsf-conventions-framework/
>>  >>>   > > > >
>>  >>>   > > > >
>>  >>>   > > > >
>>  >>>   > > > > ----- Mensagem original -----
>>  >>>   > > > > De: Gerhard Petracek
>>  > <ge...@gmail.com>
>>  >>>   > > > > Para: MyFaces Discussion
>>  >>  <us...@myfaces.apache.org>
>>  >>>   > > > > Cc:
>>  >>>   > > > > Enviadas: Quarta-feira, 14 de Março de 
> 2012 20:11
>>  >>>   > > > > Assunto: Re: MyFaces and CODI
>>  >>>   > > > >
>>  >>>   > > > > hi rafael,
>>  >>>   > > > >
>>  >>>   > > > > the easiest approach to test an 
> alternative for
>>  > this
>>  >>  constellation
>>  >>>   is
>>  >>>   > > the
>>  >>>   > > > > activation of the 
> ServerSideWindowHandler
>>  > (it's a
>>  >>  std. cdi
>>  >>>   > @Alternative
>>  >>>   > > > > implementation -> you can activate it 
> in the
>>  >>  beans.xml file of your
>>  >>>   > > > > application).
>>  >>>   > > > > (however, please be aware that this 
> alternative
>>  >>  implementation has
>>  >>>   > some
>>  >>>   > > > > disadvantages.)
>>  >>>   > > > >
>>  >>>   > > > > regards,
>>  >>>   > > > > gerhard
>>  >>>   > > > >
>>  >>>   > > > > http://www.irian.at
>>  >>>   > > > >
>>  >>>   > > > > Your JSF/JavaEE powerhouse -
>>  >>>   > > > > JavaEE Consulting, Development and
>>  >>>   > > > > Courses in English and German
>>  >>>   > > > >
>>  >>>   > > > > Professional Support for Apache MyFaces
>>  >>>   > > > >
>>  >>>   > > > >
>>  >>>   > > > >
>>  >>>   > > > > 2012/3/14 Rafael Pestano
>>  > <rm...@yahoo.com.br>
>>  >>>   > > > >
>>  >>>   > > > > > Hi Gerhard, i successfuly added 
> codi and
>>  >>  openwebbeans to an
>>  >>>   > > application
>>  >>>   > > > > > running on weblogic 11g
>>  >>>   > > > > >
>>  >>>   > > > > > however its a  legacy application 
> which uses
>>  >>  frames, basicaly we
>>  >>>   > > have a
>>  >>>   > > > > > menu on the left frame that targets 
> the
>>  > center
>>  >>  frame, something
>>  >>>   > like:
>>  >>>   > > > > >
>>  >>>   > > > > > <h:commandLink 
> value="menuLink"
>>  >>  action="#{myBean.init}"
>>  >>>   > > > target="frmDados"
>>  >>>   > > > > > />
>>  >>>   > > > > >
>>  >>>   > > > > >
>>  >>>   > > > > > the problem is, when a add CODI to 
> the
>>  > application
>>  >>  and mark
>>  >>>   myBean
>>  >>>   > as
>>  >>>   > > > > > ViewAccessScoped (and thus the 
> windowId
>>  > starts to
>>  >>  be append to
>>  >>>   the
>>  >>>   > > url)
>>  >>>   > > > > > the above menuLink always open the 
> center
>>  > frame in
>>  >>  a new browser
>>  >>>   > tab.
>>  >>>   > > > > >
>>  >>>   > > > > > If i remove CODI and set myBean as
>>  >>  RequestScoped(or any other CDI
>>  >>>   > > > Scope)
>>  >>>   > > > > > the application behaves  as 
> expected.
>>  >>>   > > > > >
>>  >>>   > > > > > So i think the windowId generated 
> by CODI  is
>>  >
>>  >>  causing this
>>  >>>   issue, i
>>  >>>   > > > tried
>>  >>>   > > > > > your solution without success, the 
> windowId
>>  > isnt
>>  >>  removed from the
>>  >>>   > url
>>  >>>   > > > > and a
>>  >>>   > > > > > new tab opens when i click in the 
> menuLink.
>>  >>>   > > > > >
>>  >>>   > > > > > Any thoughs?
>>  >>>   > > > > >
>>  >>>   > > > > >
>>  >>>   > > > > > thanks for all your help.
>>  >>>   > > > > >
>>  >>>   > > > > >
>>  >>>   > > > > >
>>  >>>   > > > > > Att,
>>  >>>   > > > > >
>>  >>>   > > > > > Rafael M. Pestano
>>  >>>   > > > > >
>>  >>>   > > > > > Desenvolvedor Java Cia. de 
> Processamento de
>>  > Dados
>>  >>  do Rio Grande
>>  >>>   do
>>  >>>   > > Sul
>>  >>>   > > > > > Graduando em Ciência da Computação 
> UFRGS
>>  >>>   > > > > > @realpestano
>>  >>>   > > > > >
>>  >>  http://code.google.com/p/jsf-conventions-framework/
>>  >>>   > > > > >
>>  >>>   > > > > >
>>  >>>   > > > > >
>>  >>>   > > > > > ________________________________
>>  >>>   > > > > > De: Gerhard Petracek
>>  >>  <ge...@gmail.com>
>>  >>>   > > > > > Para: MyFaces Discussion
>>  >>  <us...@myfaces.apache.org>
>>  >>>   > > > > > Enviadas: Sexta-feira, 9 de Março 
> de 2012
>>  > 12:38
>>  >>>   > > > > > Assunto: Re: MyFaces and CODI
>>  >>>   > > > > >
>>  >>>   > > > > > hi stephen,
>>  >>>   > > > > >
>>  >>>   > > > > > that's right [1] doesn't 
> support it.
>>  >>>   > > > > > werner committed his improvement 
> and you can
>>  > try
>>  >>  [2] and [3] as
>>  >>>   you
>>  >>>   > > see
>>  >>>   > > > > > them right now.
>>  >>>   > > > > >
>>  >>>   > > > > > regards,
>>  >>>   > > > > > gerhard
>>  >>>   > > > > >
>>  >>>   > > > > > [1]
>>  >>>   > > > >
>>  >>>   >
>>  > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
>>  >>>   > > > > > [2] http://s.apache.org/rr
>>  >>>   > > > > > [3] http://s.apache.org/23p
>>  >>>   > > > > >
>>  >>>   > > > > > http://www.irian.at
>>  >>>   > > > > >
>>  >>>   > > > > > Your JSF/JavaEE powerhouse -
>>  >>>   > > > > > JavaEE Consulting, Development and
>>  >>>   > > > > > Courses in English and German
>>  >>>   > > > > >
>>  >>>   > > > > > Professional Support for Apache 
> MyFaces
>>  >>>   > > > > >
>>  >>>   > > > > >
>>  >>>   > > > > >
>>  >>>   > > > > > 2012/3/9 Stephen More
>>  >>  <st...@gmail.com>
>>  >>>   > > > > >
>>  >>>   > > > > > > I was referring to [1]
>>  >>>   > > > > > >
>>  >>>   > > >
>>  >>>
>>  http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
>>  >>>   > > > > > >
>>  >>>   > > > > > > I guess I just need to wait 
> until the
>>  > correct
>>  >>  way is tested and
>>  >>>   > > > > > > documented in the wiki using:
>>  >>>   > > > > > >   [1] http://s.apache.org/rr
>>  >>>   > > > > > >  [2] http://s.apache.org/23p
>>  >>>   > > > > > >
>>  >>>   > > > > > >
>>  >>>   > > > > > >
>>  >>>   > > > > > > On Fri, Mar 9, 2012 at 9:20 
> AM, Gerhard
>>  >>  Petracek
>>  >>>   > > > > > > 
> <ge...@gmail.com>
>>  > wrote:
>>  >>>   > > > > > > > @ mark:
>>  >>>   > > > > > > > i just tested it and it 
> works with
>>  > [1]
>>  >>  in combination
>>  >>>   > > > > > > > with 
> ClientSideWindowHandler [2].
>>  >>>   > > > > > > >
>>  >>>   > > > > > > > regards,
>>  >>>   > > > > > > > gerhard
>>  >>>   > > > > > > >
>>  >>>   > > > > > > > [1] 
> http://s.apache.org/rr
>>  >>>   > > > > > > > [2] 
> http://s.apache.org/23p
>>  >>>   > > > > > > >
>>  >>>   > > > > > > > http://www.irian.at
>>  >>>   > > > > > > >
>>  >>>   > > > > > > > Your JSF/JavaEE 
> powerhouse -
>>  >>>   > > > > > > > JavaEE Consulting, 
> Development and
>>  >>>   > > > > > > > Courses in English and 
> German
>>  >>>   > > > > > > >
>>  >>>   > > > > > > > Professional Support for 
> Apache
>>  > MyFaces
>>  >>>   > > > > > > >
>>  >>>   > > > > > > >
>>  >>>   > > > > > > >
>>  >>>   > > > > > > > 2012/3/9 Mark Struberg
>>  >>  <st...@yahoo.de>
>>  >>>   > > > > > > >
>>  >>>   > > > > > > >> Hi Stephen!
>>  >>>   > > > > > > >>
>>  >>>   > > > > > > >> Well, the current 
> approach in
>>  > CODI
>>  >>  is currently under
>>  >>>   > discussion
>>  >>>   > > > in
>>  >>>   > > > > > the
>>  >>>   > > > > > > >> JSF EG. The whole 
> windowId
>>  > stuff of
>>  >>  CODI might end up in the
>>  >>>   > > > JSF-2.2
>>  >>>   > > > > > or
>>  >>>   > > > > > > 2.3
>>  >>>   > > > > > > >> spec.
>>  >>>   > > > > > > >>
>>  >>>   > > > > > > >> >T hat seems to 
> work fine
>>  > when
>>  >>  pasting into a new empty
>>  >>>   > window,
>>  >>>   > > > but
>>  >>>   > > > > it
>>  >>>   > > > > > > >> > still allows you 
> to
>>  > copy-paste
>>  >>  the url from one codi
>>  >>>   window
>>  >>>   > to
>>  >>>   > > > an
>>  >>>   > > > > > > >> > existing codi 
> window.
>>  >>>   > > > > > > >>
>>  >>>   > > > > > > >> Nope, because the
>>  > windowhandler.js
>>  >>  script will first check
>>  >>>   the
>>  >>>   > > > > > > window.name.
>>  >>>   > > > > > > >> And if this is
>>  > empty/doesn't fit
>>  >>  the windowId in the URL,
>>  >>>   then
>>  >>>   > > it
>>  >>>   > > > > will
>>  >>>   > > > > > > >> reload the page with 
> a freshly
>>  >>  requested windowId.
>>  >>>   > > > > > > >>
>>  >>>   > > > > > > >> LieGrue,
>>  >>>   > > > > > > >> strub
>>  >>>   > > > > > > >>
>>  >>>   > > > > > > >>
>>  >>>   > > > > > > >>
>>  >>>   > > > > > > >>
>>  >>>   > > > > > > >> ----- Original 
> Message -----
>>  >>>   > > > > > > >> > From: Stephen 
> More
>>  >>  <st...@gmail.com>
>>  >>>   > > > > > > >> > To: MyFaces 
> Discussion
>>  >>  <us...@myfaces.apache.org>
>>  >>>   > > > > > > >> > Cc:
>>  >>>   > > > > > > >> > Sent: Friday, 
> March 9,
>>  > 2012
>>  >>  1:27 PM
>>  >>>   > > > > > > >> > Subject: Re: 
> MyFaces and
>>  > CODI
>>  >>>   > > > > > > >> >
>>  >>>   > > > > > > >> > Included in the 
> JSF jar is
>>  >>>   > > META-INF/resources/javax.faces/jsf.js
>>  >>>   > > > > > which
>>  >>>   > > > > > > >> > enables its use 
> by
>>  >>  <h:outputScript name="jsf.js"
>>  >>>   > > > > > > >> >
>>  > library="javax.faces"
>>  >>>   > > > > > > >> >
>>  > target="head"/>
>>  >>>   > > > > > > >> >
>>  >>>   > > > > > > >> > Should 
> windowhandler.js be
>>  >
>>  >>  moved from the examples into a
>>  >>>   > core
>>  >>>   > > > > > library
>>  >>>   > > > > > > >> > so that it can 
> be utilized
>>  > the
>>  >>  same way ?
>>  >>>   > > > > > > >> >
>>  >>>   > > > > > > >> >
>>  >>>   > > > > > > >> >
>>  >>>   > > > > > > >> > On Fri, Mar 9, 
> 2012 at
>>  > 7:10 AM,
>>  >>  Gerhard Petracek
>>  >>>   > > > > > > >> >
>>  >>  <ge...@gmail.com> wrote:
>>  >>>   > > > > > > >> >>  hi stephen,
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>  yes - you 
> can add a
>>  > small
>>  >>  js (see e.g. [1]) to support
>>  >>>   > this
>>  >>>   > > > > > > use-case.
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>  regards,
>>  >>>   > > > > > > >> >>  gerhard
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>  [1]
>>  >>  http://s.apache.org/YTq
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>  
> http://www.irian.at
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>  Your 
> JSF/JavaEE
>>  > powerhouse
>>  >>  -
>>  >>>   > > > > > > >> >>  JavaEE 
> Consulting,
>>  >>  Development and
>>  >>>   > > > > > > >> >>  Courses in 
> English
>>  > and
>>  >>  German
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>  
> Professional Support
>>  > for
>>  >>  Apache MyFaces
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>  2012/3/9 
> Stephen More
>>  >
>>  >>  <st...@gmail.com>
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>>  Great. 
> I am
>>  > mainly
>>  >>  interested in WindowScoped i.e.
>>  >>>   every
>>  >>>   > > > > browser
>>  >>>   > > > > > > tab
>>  >>>   > > > > > > >> >>>  has its 
> own
>>  >>  mini-session.
>>  >>>   > > > > > > >> >>>
>>  >>>   > > > > > > >> >>>  I see 
> that CODI
>>  > is
>>  >>  adding a ?windowId=595 to keep these
>>  >>>   > > > > > > conversations
>>  >>>   > > > > > > >> >>>  
> separate. If a
>>  > user
>>  >>  simply copies the url and pastes
>>  >>>   in a
>>  >>>   > > new
>>  >>>   > > > > tab
>>  >>>   > > > > > > now
>>  >>>   > > > > > > >> >>>  two 
> browser tabs
>>  > are
>>  >>  sharing the same conversation. How
>>  >>>   > > can I
>>  >>>   > > > > > > prevent
>>  >>>   > > > > > > >> >>>  this ? 
> I want to
>>  >>  enforce that EVERY browser tab has its
>>  >>>   > own
>>  >>>   > > > > > > >> >>>  
> conversation.
>>  > Perhaps
>>  >>  a simple error to the user saying
>>  >>>   > > > > > > >> > 
> "Sorry" or
>>  >>>   > > > > > > >> >>>  start a 
> new
>>  >>  conversation.
>>  >>>   > > > > > > >> >>>
>>  >>>   > > > > > > >> >>>  -Thanks
>>  >>>   > > > > > > >> >>>
>>  >>>   > > > > > > >> >>>  On Fri, 
> Mar 9,
>>  > 2012 at
>>  >>  3:18 AM, Gerhard Petracek
>>  >>>   > > > > > > >> >>>
>>  >>  <ge...@gmail.com> wrote:
>>  >>>   > > > > > > >> >>>  > hi 
> stephen,
>>  >>>   > > > > > > >> >>>  >
>>  >>>   > > > > > > >> >>>  > 
> (that's
>>  > an
>>  >>  issue with the setup of weld and not
>>  >>>   related
>>  >>>   > > to
>>  >>>   > > > > > > >> > myfaces codi.)
>>  >>>   > > > > > > >> >>>  > 
> however,
>>  > myfaces
>>  >>  codi doesn't need this support -> if
>>  >>>   > you
>>  >>>   > > > > > > >> > also don't 
> need
>>  >>>   > > > > > > >> >>>  > 
> cdi support
>>  > for
>>  >>  servlets, filters or listeners, you
>>  >>>   can
>>  >>>   > > run
>>  >>>   > > > > the
>>  >>>   > > > > > > >> >>>  
> application
>>  >>>   > > > > > > >> >>>  > 
> without
>>  > those
>>  >>  features.
>>  >>>   > > > > > > >> >>>  >
>>  >>>   > > > > > > >> >>>  > 
> regards,
>>  >>>   > > > > > > >> >>>  > 
> gerhard
>>  >>>   > > > > > > >> >>>  >
>>  >>>   > > > > > > >> >>>  >
>>  >>  http://www.irian.at
>>  >>>   > > > > > > >> >>>  >
>>  >>>   > > > > > > >> >>>  > 
> Your
>>  > JSF/JavaEE
>>  >>  powerhouse -
>>  >>>   > > > > > > >> >>>  > 
> JavaEE
>>  >>  Consulting, Development and
>>  >>>   > > > > > > >> >>>  > 
> Courses in
>>  >>  English and German
>>  >>>   > > > > > > >> >>>  >
>>  >>>   > > > > > > >> >>>  > 
> Professional
>>  >
>>  >>  Support for Apache MyFaces
>>  >>>   > > > > > > >> >>>  >
>>  >>>   > > > > > > >> >>>  >
>>  >>>   > > > > > > >> >>>  > 
> 2012/3/9
>>  > Stephen
>>  >>  More <st...@gmail.com>
>>  >>>   > > > > > > >> >>>  >
>>  >>>   > > > > > > >> >>>  
>>>  I too am
>>  >
>>  >>  trying to get a simple example working. I
>>  >>>   > have
>>  >>>   > > > put
>>  >>>   > > > > > > >> > together
>>  >>>   > > > > > > >> >>>  
>>>  this
>>  > project:
>>  >>>   > > > > > > >> >
>>  >>  http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
>>  >>>   > > > > > > >> >>>  
>>> 
>>  >>>   > > > > > > >> >>>  
>>>  mvn
>>  >>  jetty:run-war   results in
>>  >>>   > > > > > > >> >>>  
>>> 
>>  >>>   > > > > > > >> >>>  
>>>  SEVERE:
>>  >>  Unable to create JettyWeldInjector. CDI
>>  >>>   > > injection
>>  >>>   > > > > will
>>  >>>   > > > > > > >> > not be
>>  >>>   > > > > > > >> >>>  
>>> 
>>  > available in
>>  >>  Servlets, Filters or Listeners
>>  >>>   > > > > > > >> >>>  
>>> 
>>  >>>   > > > > > > >> >>>  
>>>  What
>>  > else do
>>  >>  I need to get this simple example
>>  >>>   > working ?
>>  >>>   > > > > > > >> >>>  
>>> 
>>  >>>   > > > > > > >> >>>  
>>>  -Thanks
>>  >>>   > > > > > > >> >>>  
>>> 
>>  >>>   > > > > > > >> >>>  
>>>  On Thu,
>>  > Mar
>>  >>  8, 2012 at 11:07 AM, Gerhard Petracek
>>  >>>   > > > > > > >> >>>  
>>> 
>>  >>  <ge...@gmail.com> wrote:
>>  >>>   > > > > > > >> >>>  
>>>  > hi
>>  > jose,
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > first of
>>  >>  all: welcome @ myfaces!
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > concrete
>>  >>  questions are very welcome and we will
>>  >>>   > > improve
>>  >>>   > > > > > > >> > the wiki
>>  >>>   > > > > > > >> >>>  based 
> on
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > them.
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > regards,
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > gerhard
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>  http://www.irian.at
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > Your
>>  >>  JSF/JavaEE powerhouse -
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > JavaEE
>>  >>  Consulting, Development and
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > Courses
>>  >>  in English and German
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>  Professional Support for Apache MyFaces
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > 2012/3/8
>>  >>  José Luis Cetina <ma...@gmail.com>
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  > Hi
>>  >>  im so excited to start and use MyFaces and
>>  >>>   CODI
>>  >>>   > > > > > > >> > but i cant get 
> any
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  >
>>  >>  "good" documentation in fact i only can get
>>  >>>   > > > > > > >> > like 2 or 3 mini 
> tutorial
>>  >>>   > > > > > > >> >>>  
>>>  but
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  > they
>>  >>  are really incomplete, can somebody
>>  >>>   recommend
>>  >>>   > me
>>  >>>   > > > > > > >> > to some
>>  >>>   > > > > > > >> >>>  
> tutorial
>>  >>>   > > > > > > >> >>>  
>>>  or
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  > book
>>  >>  to start with *CODI *y see this is an
>>  >>>   > excellent
>>  >>>   > > > > > > >> > extension, im
>>  >>>   > > > > > > >> >>>  
>>>  moving
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  > from
>>  >>  mojarra and CDI to MyFaces and MyFaces
>>  >>>   > > > > > > >> > extensions, 
> please where
>>  >>>   > > > > > > >> >>>  i
>>  >>>   > > > > > > >> >>>  
>>>  can
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  > find
>>  >>  value information
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  > The
>>  >>  only URL where i found a little info is this:
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  >>>   > > > > > > >> >
>>  >>  https://cwiki.apache.org/confluence/display/EXTCDI/Index
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  > --
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  >>>   > > > > > > >> >
>>  >>>   > > > >
>>  >>  
> -------------------------------------------------------------------
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  >
>>  >>  *SCJA. José Luis Cetina*
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  >>>   > > > > > > >> >
>>  >>>   > > > >
>>  >>  
> -------------------------------------------------------------------
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  >>>   > > > > > > >> >>>  
>>> 
>>  >>>   > > > > > > >> >>>
>>  >>>   > > > > > > >> >
>>  >>>   > > > > > > >>
>>  >>>   > > > > > >
>>  >>>   > > > > >
>>  >>>   > > > >
>>  >>>   > > > >
>>  >>>   > > >
>>  >>>   > >
>>  >>>   >
>>  >>>
>>  >>>
>>  >>
>>  >
>> 
> 

Re: MyFaces and CODI

Posted by Rafael Pestano <rm...@yahoo.com.br>.
 Hi gerhard ,


got CODI working on wls 11g \o/.

We fixed the problem with our page layout(the frames) and are using the client side windowId solution(the default one), so no especial configuration was required, we only changed the webbeans listener 

<listener>
 <listener-class>org.apache.myfaces.extensions.cdi.openwebbeans.startup.WebBeansAwareConfigurationListener</listener-class>
    </listener>

other info is that we are using exploded ear, with war we could not deploy the app (i posted the error and the war is this thread).

many thanks for all your help and time, i really apreciated it!

Att, 

Rafael M. Pestano

Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
Graduando em Ciência da Computação UFRGS
@realpestano
http://code.google.com/p/jsf-conventions-framework/



________________________________
De: Gerhard Petracek <ge...@gmail.com>
Para: MyFaces Discussion <us...@myfaces.apache.org> 
Enviadas: Domingo, 18 de Março de 2012 18:33
Assunto: Re: MyFaces and CODI

hi rafael,

i just can say that i've used it already with wls 11g.

regards,
gerhard

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/18 Rafael Pestano <rm...@yahoo.com.br>

> hi gerhard,
>
> tried that but got the same error,
>
> the generated war can be found here: http://bit.ly/xvbtu7
>
> Mark, thanks for the reply, ill try that.
>
>
>
> Att,
> Rafael M. Pestano
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ----- Mensagem original -----
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Cc:
> Enviadas: Domingo, 18 de Março de 2012 17:32
> Assunto: Re: MyFaces and CODI
>
> hi rafael,
>
> for a wls 11g deployment you have to follow [1].
>
> regards,
> gerhard
>
> [1] https://cwiki.apache.org/confluence/display/EXTCDI/JavaEE5+Support
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/18 Rafael Pestano <rm...@yahoo.com.br>
>
> > Hi guys,
> >
> >
> > I think that what Mark stated can be happening in the environment at my
> > company(weblogic 11g, mojarra 1.2, owb and CODI) cause a simple forward
> is
> > also causing the bean to be instantiated(tested with ViewAccess and
> > WindowScoped),
> >
> > How can i ensure that the whole Context is being initialized?
> >
> >
> >
> > About the server side solution Gerhard proposed i can confirm it is
> > working here at home, the main problem is something with
> the"constalation"
> > that the application at my company is using, maybe the frame based
> layout,
> > jspx extension or something else.
> >
> > i also tried to deploy Gerhard example here in weblogic here at home
> > without success, the CDI container cannot start.
> >
> > i just changed from myfaces to mojarra, instaled the example via maven
> and
> > deployed the war in weblogic 11g(10.3.2), to try simulate the enviroment
> at
> > my company, here is the error:
> >
> >
> > INFO: Initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS)
> > for context '/playground-jsf12-1.0.4'
> > 18/03/2012 17:10:46
> > org.apache.myfaces.extensions.cdi.core.api.provider.ServiceProvider
> <clinit>
> > INFO:
> >
> org.apache.myfaces.extensions.cdi.core.impl.provider.DefaultServiceProvider
> > installed successfully.
> > 18/03/2012 17:10:46
> > org.apache.myfaces.extensions.cdi.core.api.provider.ServiceProvider
> <clinit>
> > INFO:
> >
> org.apache.myfaces.extensions.cdi.core.impl.provider.DefaultServiceProviderContext
> > installed successfully.
> > java.lang.IllegalStateException: no
> > org.apache.myfaces.extensions.cdi.core.api.provider.BeanManagerProvider
> in
> > place! Please ensur
> > e that you configured the CDI implementation of your choice properly. If
> > your setup is correct, please clear all caches and compil
> > ed artifacts. If there is still a problem, try one of the controlled
> > bootstrapping add-ons for the CDI implementation you are usin
> > g.
> >         at
> >
> org.apache.myfaces.extensions.cdi.core.api.provider.BeanManagerProvider.getInstance(BeanManagerProvider.java:81)
> >         at
> >
> org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils.getContextualReferenceByClass(CodiUtils.java:124)
> >         at
> >
> org.apache.myfaces.extensions.cdi.jsf.impl.listener.phase.PhaseListenerExtension.consumePhaseListeners(PhaseListenerExt
> > ension.java:110)
> >         at
> >
> org.apache.myfaces.extensions.cdi.jsf.impl.listener.phase.CodiLifecycleFactoryWrapper.getLifecycle(CodiLifecycleFactory
> > Wrapper.java:65)
> >         at
> >
> com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:1115)
> >         at
> >
> com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:766)
> >         at
> >
> com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:529)
> >         at
> >
> com.sun.faces.config.GlassFishConfigureListener.contextInitialized(GlassFishConfigureListener.java:47)
> >         at
> >
> weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
> >         at
> >
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
> >         at
> > weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
> >         at
> >
> weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
> >         at
> >
> weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1801)
> >         at
> >
> weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3045)
> >         at
> >
> weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1397)
> >         at
> > weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
> >         at
> >
> weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
> >         at
> >
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
> >         at
> >
> weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
> >         at
> >
> weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
> >         at
> >
> weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
> >         at
> >
> weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
> >         at
> >
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
> >         at
> >
> weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
> >         at
> >
> weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
> >         at
> >
> weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
> >         at
> >
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
> >         at
> >
> weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
> >         at
> >
> weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:39)
> >         at
> >
> weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
> >         at
> >
> weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
> >         at
> >
> weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
> >         at
> >
> weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
> >         at
> >
> weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
> >         at
> >
> weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
> >         at
> >
> weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
> >         at
> >
> weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
> >         at
> >
> weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
> >         at
> >
> weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
> >         at
> >
> weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCa
> > llbackDeliverer.java:181)
> >         at
> >
> weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallback
> > Deliverer.java:12)
> >         at
> >
> weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliv
> > erer.java:67)
> >         at
> >
> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
> >         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
> >         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
> > 18/03/2012 17:10:47 com.sun.faces.config.ConfigureListener
> > contextInitialized
> >
> > thanks for your time.
> >
> >
> > Att,
> > Rafael M. Pestano
> > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > Graduando em Ciência da Computação UFRGS
> > @realpestano
> > http://code.google.com/p/jsf-conventions-framework/
> >
> >
> >
> > ----- Mensagem original -----
> > De: Gerhard Petracek <ge...@gmail.com>
> > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > Cc:
> > Enviadas: Domingo, 18 de Março de 2012 16:47
> > Assunto: Re: MyFaces and CODI
> >
> > hi mark,
> >
> > since rafael mentioned that it works without a4j and there is no issue
> with
> > a4j in the demo, i don't think that it is such a basic issue.
> >
> > regards,
> > gerhard
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/3/18 Mark Struberg <st...@yahoo.de>
> >
> > >
> > >
> > > Gerhard pinged me that you are using @ViewAccessScoped. In that case
> I'd
> > > recomment to debug if the whole Context Extension gets properly
> > registrated.
> > >
> > > If the CDI container doesn't know the @ViewAccessScoped annotation then
> > > all your beans will end up as @Dependent...
> > >
> > > LieGrue,
> > > strub
> > >
> > >
> > > ----- Original Message -----
> > > > From: Mark Struberg <st...@yahoo.de>
> > > > To: MyFaces Discussion <us...@myfaces.apache.org>
> > > > Cc:
> > > > Sent: Sunday, March 18, 2012 7:42 PM
> > > > Subject: Re: MyFaces and CODI
> > > >
> > > >>  when i find out what's causing my bean to be instantiated on every
> > ajax
> > > > call
> > > >>  i'll come back here to report.
> > > >
> > > > That sounds familiar - good luck ;)
> > > >
> > > > Which scope does your bean have? You are sure that you are really
> using
> > > CDI
> > > > javax.enterprise.context.* scopes and not javax.faces.bean.* scopes
> due
> > > to a
> > > > wrong auto-import  of your IDE?
> > > >
> > > > LieGrue,
> > > > strub
> > > >
> > > >
> > > >
> > > > ----- Original Message -----
> > > >>  From: Rafael Pestano <rm...@yahoo.com.br>
> > > >>  To: MyFaces Discussion <us...@myfaces.apache.org>
> > > >>  Cc:
> > > >>  Sent: Saturday, March 17, 2012 4:34 PM
> > > >>  Subject: Re: MyFaces and CODI
> > > >>
> > > >>  yeap, i also deployed the server side demo in tomcat and it works
> as
> > > > expected,
> > > >>  when i find out what's causing my bean to be instantiated on every
> > ajax
> > > > call
> > > >>  i'll come back here to report.
> > > >>
> > > >>  many thanks for the assistance.
> > > >>
> > > >>  Att,
> > > >>
> > > >>  Rafael M. Pestano
> > > >>
> > > >>  Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> > Sul
> > > >>  Graduando em Ciência da Computação UFRGS
> > > >>  @realpestano
> > > >>  http://code.google.com/p/jsf-conventions-framework/
> > > >>
> > > >>
> > > >>
> > > >>  ________________________________
> > > >>  De: Gerhard Petracek <ge...@gmail.com>
> > > >>  Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > >>  Enviadas: Sexta-feira, 16 de Março de 2012 22:46
> > > >>  Assunto: Re: MyFaces and CODI
> > > >>
> > > >>  hi rafael,
> > > >>
> > > >>  i can't reproduce it. i added richfaces to the previous demo as
> well
> > as
> > > > a4j
> > > >>  support to the input component and everything works as expected.
> > > >>
> > > >>  regards,
> > > >>  gerhard
> > > >>
> > > >>  http://www.irian.at
> > > >>
> > > >>  Your JSF/JavaEE powerhouse -
> > > >>  JavaEE Consulting, Development and
> > > >>  Courses in English and German
> > > >>
> > > >>  Professional Support for Apache MyFaces
> > > >>
> > > >>
> > > >>
> > > >>  2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > > >>
> > > >>>   Hi Gehard,
> > > >>>
> > > >>>   i didnt got the ideia, do you have any example or a link showing
> > this
> > > >>>   approach?
> > > >>>
> > > >>>   what i have got til now is:
> > > >>>   1 - WindowContextIdHolderComponent is a jsf component which is
> > added
> > > >>>   dynamically to the view
> > > >>>   2 - this component holds the windowId
> > > >>>   3 - i have,somehow , to keep the windowId the same between
> requests
> > > so
> > > > my
> > > >>>   ViewAccessScoped bean  is "keeped alive" <- here is where
> > > > im
> > > >>  stuck
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>>   Att,
> > > >>>   Rafael M. Pestano
> > > >>>   Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande
> do
> > > Sul
> > > >>>   Graduando em Ciência da Computação UFRGS
> > > >>>   @realpestano
> > > >>>  http://code.google.com/p/jsf-conventions-framework/
> > > >>>
> > > >>>
> > > >>>
> > > >>>   ----- Mensagem original -----
> > > >>>   De: Gerhard Petracek <ge...@gmail.com>
> > > >>>   Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > >>>   Cc:
> > > >>>   Enviadas: Quinta-feira, 15 de Março de 2012 11:28
> > > >>>   Assunto: Re: MyFaces and CODI
> > > >>>
> > > >>>   hi rafael,
> > > >>>
> > > >>>   @ WindowContextIdHolderComponent:
> > > >>>
> > > >>>   that's the name of the class. you have to resolve the component
> > > > (by
> > > >>  type)
> > > >>>   before the view gets rendered and add it to the ajax enabled a4j
> > > > components
> > > >>>   via the corresponding java-api.
> > > >>>
> > > >>>   @ custom approach:
> > > >>>   independent of the concrete approach you would like to use, you
> > just
> > > > have
> > > >>>   to ensure that the information is available on the server-side
> (for
> > > > every
> > > >>>   jsf request which starts the jsf request-lifecycle).
> > > >>>
> > > >>>   regards,
> > > >>>   gerhard
> > > >>>
> > > >>>   Your JSF/JavaEE powerhouse -
> > > >>>   JavaEE Consulting, Development and
> > > >>>   Courses in English and German
> > > >>>
> > > >>>   Professional Support for Apache MyFaces
> > > >>>
> > > >>>
> > > >>>   2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > > >>>
> > > >>>   > Hi again,
> > > >>>   >
> > > >>>   > "it will work with a4j as soon as you
> > > >>>   > ensure that it gets restored for requests triggered by a4j "
> > > > you
> > > >>  mean i
> > > >>>   > should send WindowContextIdHolderComponent  within the ajax
> > > > request?
> > > >>>   >
> > > >>>   > somethink like <a4j:support
> > > >>  process="WindowContextIdHolderComponent"/> ?
> > > >>>   >
> > > >>>   > if so whats the id of the generated component?
> > > >>>   >
> > > >>>   > i also have another question, in the javadoc
> > > >>>   > of WindowContextConfig isUrlParameterSuported() says
> > > >>>   >
> > > >>>   > "Specifies if it is allowed to use URL params for forwarding
> > > > the
> > > >>  current
> > > >>>   > window-id. (deactivate it e.g. for higher security - in this
> case
> > > >
> > > >>  it's
> > > >>>   > required to use a window id provided by a component lib or a
> > > >>  server-side
> > > >>>   > window-handler"
> > > >>>   >
> > > >>>   > how can i create a component to handle the window id? can i do
> > > > that
> > > >>  with
> > > >>>   > an h:inputHidden for example?
> > > >>>   >
> > > >>>   > thanks for the help.
> > > >>>   >
> > > >>>   >
> > > >>>   >
> > > >>>   > Att,
> > > >>>   >
> > > >>>   > Rafael M. Pestano
> > > >>>   >
> > > >>>   > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande
> > > > do Sul
> > > >>>   > Graduando em Ciência da Computação UFRGS
> > > >>>   > @realpestano
> > > >>>   > http://code.google.com/p/jsf-conventions-framework/
> > > >>>   >
> > > >>>   >
> > > >>>   >
> > > >>>   > ________________________________
> > > >>>   > De: Gerhard Petracek <ge...@gmail.com>
> > > >>>   > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > >>>   > Enviadas: Quinta-feira, 15 de Março de 2012 10:37
> > > >>>   > Assunto: Re: MyFaces and CODI
> > > >>>   >
> > > >>>   > hi rafael,
> > > >>>   >
> > > >>>   > the fallback adds a component (WindowContextIdHolderComponent)
> > > >>>   dynamically
> > > >>>   > (as a direct child of UiViewRoot) -> it will work with a4j as
> > > > soon
> > > >>  as you
> > > >>>   > ensure that it gets restored for requests triggered by a4j.
> > > >>>   >
> > > >>>   > regards,
> > > >>>   > gerhard
> > > >>>   >
> > > >>>   > http://www.irian.at
> > > >>>   >
> > > >>>   > Your JSF/JavaEE powerhouse -
> > > >>>   > JavaEE Consulting, Development and
> > > >>>   > Courses in English and German
> > > >>>   >
> > > >>>   > Professional Support for Apache MyFaces
> > > >>>   >
> > > >>>   >
> > > >>>   > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > > >>>   >
> > > >>>   > > well its not 100% yet ;(...on every ajaxCall my
> > > > ViewAccessScoped
> > > >>  bean
> > > >>>   is
> > > >>>   > > being instantiated,
> > > >>>   > >
> > > >>>   > > im using a4j, there is any known issue with it?
> > > >>>   > >
> > > >>>   > > for example <h:selectOneMenu .....>
> > > >>>   > >                         <a4j:support
> > > >>  event="onchange" ....action="when
> > > >>>   > the
> > > >>>   > > action is called the bean constructor gets called"/>
> > > >>>   > >                     </h:selectOneMenu>
> > > >>>   > >
> > > >>>   > > if i change from View to RequestScoped the bahavior is the
> > > > same,
> > > >>  any
> > > >>>   > ideas?
> > > >>>   > >
> > > >>>   > >
> > > >>>   > > thanks in advance.
> > > >>>   > >
> > > >>>   > >
> > > >>>   > > Att,
> > > >>>   > >
> > > >>>   > > Rafael M. Pestano
> > > >>>   > >
> > > >>>   > > Desenvolvedor Java Cia. de Processamento de Dados do Rio
> > > > Grande
> > > >>  do Sul
> > > >>>   > > Graduando em Ciência da Computação UFRGS
> > > >>>   > > @realpestano
> > > >>>   > > http://code.google.com/p/jsf-conventions-framework/
> > > >>>   > >
> > > >>>   > >
> > > >>>   > >
> > > >>>   > > ________________________________
> > > >>>   > >  De: Rafael Pestano <rm...@yahoo.com.br>
> > > >>>   > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > >>>   > > Enviadas: Quinta-feira, 15 de Março de 2012 8:45
> > > >>>   > > Assunto: Re: MyFaces and CODI
> > > >>>   > >
> > > >>>   > > "if you don't need redirects, you could have a look
> > > > at
> > > >>  e.g. [1] which
> > > >>>   > uses
> > > >>>   > > an internal fallback." yea, its our case and it just
> > > > works!
> > > >>>   > >
> > > >>>   > > many thanks for your help, keep the great work!
> > > >>>   > >
> > > >>>   > > Att,
> > > >>>   > >
> > > >>>   > > Rafael M. Pestano
> > > >>>   > >
> > > >>>   > > Desenvolvedor Java Cia. de Processamento de Dados do Rio
> > > > Grande
> > > >>  do Sul
> > > >>>   > > Graduando em Ciência da Computação UFRGS
> > > >>>   > > @realpestano
> > > >>>   > > http://code.google.com/p/jsf-conventions-framework/
> > > >>>   > >
> > > >>>   > >
> > > >>>   > >
> > > >>>   > > ________________________________
> > > >>>   > > De: Gerhard Petracek <ge...@gmail.com>
> > > >>>   > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > >>>   > > Enviadas: Quarta-feira, 14 de Março de 2012 23:19
> > > >>>   > > Assunto: Re: MyFaces and CODI
> > > >>>   > >
> > > >>>   > > hi rafael,
> > > >>>   > >
> > > >>>   > > as you have seen it's easy to provide a custom
> > > > WindowHandler
> > > >>  (just
> > > >>>   > > implement the interface and provide your implementation as
> > > >>  alternative
> > > >>>   > cdi
> > > >>>   > > bean)
> > > >>>   > > -> you can integrate every custom approach which is
> > > > enough to
> > > >>  solve you
> > > >>>   > > requirements.
> > > >>>   > >
> > > >>>   > > if you don't need redirects, you could have a look at
> > > > e.g.
> > > >>  [1] which
> > > >>>   uses
> > > >>>   > > an internal fallback.
> > > >>>   > >
> > > >>>   > > regards,
> > > >>>   > > gerhard
> > > >>>   > >
> > > >>>   > > [1] http://s.apache.org/SAs
> > > >>>   > >
> > > >>>   > > http://www.irian.at
> > > >>>   > >
> > > >>>   > > Your JSF/JavaEE powerhouse -
> > > >>>   > > JavaEE Consulting, Development and
> > > >>>   > > Courses in English and German
> > > >>>   > >
> > > >>>   > > Professional Support for Apache MyFaces
> > > >>>   > >
> > > >>>   > >
> > > >>>   > >
> > > >>>   > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > > >>>   > >
> > > >>>   > > > Hi Gehard,
> > > >>>   > > >
> > > >>>   > > > its a stopper to us cause we are still dependent on JSF
> > > > 1.2
> > > >>>   > > > Can i implement an alternative
> > > >>>   > > > to
> > > >>>   > >
> > > >>>   >
> > > >>>
> > > >>
> > > >
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > > >>>   > > > based on JSF 1.2?
> > > >>>   > > >
> > > >>>   > > > i see you use flash scope to span the windowId through
> > > >>  requests in
> > > >>>   the
> > > >>>   > > > server side solution:
> > > >>>   > > >
> > > >>>   > > > if (windowId != null)
> > > >>>   > > > 79         {
> > > >>>   > > >
> > > >>>   > > > 80
> > > >>>   > >
> > > >>
> externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY,
> > > >>>   > > windowId);
> > > >>>   > > >
> > > >>>   > > > 81
> > > >>>   > >
> > > > externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
> > > >>>   > > > 82         }
> > > >>>   > > >
> > > >>>   > > > if i put the windownId in the sessionMap it would still
> > > >
> > > >>  work? i think
> > > >>>   > ill
> > > >>>   > > > find hard time trying to remove the windowId from the
> > > > map
> > > >>  when user
> > > >>>   > leave
> > > >>>   > > > the page.
> > > >>>   > > >
> > > >>>   > > >
> > > >>>   > > >
> > > >>>   > > > thanks for your help i really appreciated it.
> > > >>>   > > >
> > > >>>   > > > Att,
> > > >>>   > > > Rafael M. Pestano
> > > >>>   > > > Desenvolvedor Java Cia. de Processamento de Dados do
> > > > Rio
> > > >>  Grande do
> > > >>>   Sul
> > > >>>   > > > Graduando em Ciência da Computação UFRGS
> > > >>>   > > > @realpestano
> > > >>>   > > > http://code.google.com/p/jsf-conventions-framework/
> > > >>>   > > >
> > > >>>   > > >
> > > >>>   > > >
> > > >>>   > > > ----- Mensagem original -----
> > > >>>   > > > De: Gerhard Petracek <ge...@gmail.com>
> > > >>>   > > > Para: MyFaces Discussion
> > > > <us...@myfaces.apache.org>
> > > >>>   > > > Cc:
> > > >>>   > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:55
> > > >>>   > > > Assunto: Re: MyFaces and CODI
> > > >>>   > > >
> > > >>>   > > > hi rafael,
> > > >>>   > > >
> > > >>>   > > > internally the ServerSideWindowHandler is based on the
> > > > flash
> > > >>  scope
> > > >>>   > > (that's
> > > >>>   > > > one of the mentioned disadvantages)
> > > >>>   > > > -> it's bound to jsf 2+ -> it is:
> > > >>>   > > >
> > > >>>   > > >
> > > >>>   > >
> > > >>>   >
> > > >>>
> > > >>
> > > >
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > > >>>   > > > (and you can't use the additional js.)
> > > >>>   > > >
> > > >>>   > > > with some constellations you just hit the restrictions
> > > > of
> > > >>  browsers ->
> > > >>>   > you
> > > >>>   > > > have to choose what you really need.
> > > >>>   > > >
> > > >>>   > > > regards,
> > > >>>   > > > gerhard
> > > >>>   > > >
> > > >>>   > > > http://www.irian.at
> > > >>>   > > >
> > > >>>   > > > Your JSF/JavaEE powerhouse -
> > > >>>   > > > JavaEE Consulting, Development and
> > > >>>   > > > Courses in English and German
> > > >>>   > > >
> > > >>>   > > > Professional Support for Apache MyFaces
> > > >>>   > > >
> > > >>>   > > >
> > > >>>   > > >
> > > >>>   > > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > > >>>   > > >
> > > >>>   > > > > i see, i have used the client side one
> > > >>>   > > > >
> > > >>>   > > > > <alternatives>
> > > >>>   > > > >
> > > >>>   > > >
> > > >>>   > >
> > > >>>   >
> > > >>>
> > > >>
> > > >
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
> > > >>>   > > > > </alternatives>
> > > >>>   > > > >
> > > >>>   > > > > i imagine the server side should be
> > > >>>   > > > >
> > > >>>   > > > > <alternatives>
> > > >>>   > > > >
> > > >>>   > > >
> > > >>>   > >
> > > >>>   >
> > > >>>
> > > >>
> > > >
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
> > > >>>   > > > > </alternatives>alright?
> > > >>>   > > > >
> > > >>>   > > > > i will test it tomorrow and give the feedback,
> > > > thanks.
> > > >>>   > > > >
> > > >>>   > > > > Att,
> > > >>>   > > > > Rafael M. Pestano
> > > >>>   > > > > Desenvolvedor Java Cia. de Processamento de Dados
> > > > do
> > > >>  Rio Grande do
> > > >>>   > Sul
> > > >>>   > > > > Graduando em Ciência da Computação UFRGS
> > > >>>   > > > > @realpestano
> > > >>>   > > > >
> > > > http://code.google.com/p/jsf-conventions-framework/
> > > >>>   > > > >
> > > >>>   > > > >
> > > >>>   > > > >
> > > >>>   > > > > ----- Mensagem original -----
> > > >>>   > > > > De: Gerhard Petracek
> > > > <ge...@gmail.com>
> > > >>>   > > > > Para: MyFaces Discussion
> > > >>  <us...@myfaces.apache.org>
> > > >>>   > > > > Cc:
> > > >>>   > > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:11
> > > >>>   > > > > Assunto: Re: MyFaces and CODI
> > > >>>   > > > >
> > > >>>   > > > > hi rafael,
> > > >>>   > > > >
> > > >>>   > > > > the easiest approach to test an alternative for
> > > > this
> > > >>  constellation
> > > >>>   is
> > > >>>   > > the
> > > >>>   > > > > activation of the ServerSideWindowHandler
> > > > (it's a
> > > >>  std. cdi
> > > >>>   > @Alternative
> > > >>>   > > > > implementation -> you can activate it in the
> > > >>  beans.xml file of your
> > > >>>   > > > > application).
> > > >>>   > > > > (however, please be aware that this alternative
> > > >>  implementation has
> > > >>>   > some
> > > >>>   > > > > disadvantages.)
> > > >>>   > > > >
> > > >>>   > > > > regards,
> > > >>>   > > > > gerhard
> > > >>>   > > > >
> > > >>>   > > > > http://www.irian.at
> > > >>>   > > > >
> > > >>>   > > > > Your JSF/JavaEE powerhouse -
> > > >>>   > > > > JavaEE Consulting, Development and
> > > >>>   > > > > Courses in English and German
> > > >>>   > > > >
> > > >>>   > > > > Professional Support for Apache MyFaces
> > > >>>   > > > >
> > > >>>   > > > >
> > > >>>   > > > >
> > > >>>   > > > > 2012/3/14 Rafael Pestano
> > > > <rm...@yahoo.com.br>
> > > >>>   > > > >
> > > >>>   > > > > > Hi Gerhard, i successfuly added codi and
> > > >>  openwebbeans to an
> > > >>>   > > application
> > > >>>   > > > > > running on weblogic 11g
> > > >>>   > > > > >
> > > >>>   > > > > > however its a  legacy application which uses
> > > >>  frames, basicaly we
> > > >>>   > > have a
> > > >>>   > > > > > menu on the left frame that targets the
> > > > center
> > > >>  frame, something
> > > >>>   > like:
> > > >>>   > > > > >
> > > >>>   > > > > > <h:commandLink value="menuLink"
> > > >>  action="#{myBean.init}"
> > > >>>   > > > target="frmDados"
> > > >>>   > > > > > />
> > > >>>   > > > > >
> > > >>>   > > > > >
> > > >>>   > > > > > the problem is, when a add CODI to the
> > > > application
> > > >>  and mark
> > > >>>   myBean
> > > >>>   > as
> > > >>>   > > > > > ViewAccessScoped (and thus the windowId
> > > > starts to
> > > >>  be append to
> > > >>>   the
> > > >>>   > > url)
> > > >>>   > > > > > the above menuLink always open the center
> > > > frame in
> > > >>  a new browser
> > > >>>   > tab.
> > > >>>   > > > > >
> > > >>>   > > > > > If i remove CODI and set myBean as
> > > >>  RequestScoped(or any other CDI
> > > >>>   > > > Scope)
> > > >>>   > > > > > the application behaves  as expected.
> > > >>>   > > > > >
> > > >>>   > > > > > So i think the windowId generated by CODI  is
> > > >
> > > >>  causing this
> > > >>>   issue, i
> > > >>>   > > > tried
> > > >>>   > > > > > your solution without success, the windowId
> > > > isnt
> > > >>  removed from the
> > > >>>   > url
> > > >>>   > > > > and a
> > > >>>   > > > > > new tab opens when i click in the menuLink.
> > > >>>   > > > > >
> > > >>>   > > > > > Any thoughs?
> > > >>>   > > > > >
> > > >>>   > > > > >
> > > >>>   > > > > > thanks for all your help.
> > > >>>   > > > > >
> > > >>>   > > > > >
> > > >>>   > > > > >
> > > >>>   > > > > > Att,
> > > >>>   > > > > >
> > > >>>   > > > > > Rafael M. Pestano
> > > >>>   > > > > >
> > > >>>   > > > > > Desenvolvedor Java Cia. de Processamento de
> > > > Dados
> > > >>  do Rio Grande
> > > >>>   do
> > > >>>   > > Sul
> > > >>>   > > > > > Graduando em Ciência da Computação UFRGS
> > > >>>   > > > > > @realpestano
> > > >>>   > > > > >
> > > >>  http://code.google.com/p/jsf-conventions-framework/
> > > >>>   > > > > >
> > > >>>   > > > > >
> > > >>>   > > > > >
> > > >>>   > > > > > ________________________________
> > > >>>   > > > > > De: Gerhard Petracek
> > > >>  <ge...@gmail.com>
> > > >>>   > > > > > Para: MyFaces Discussion
> > > >>  <us...@myfaces.apache.org>
> > > >>>   > > > > > Enviadas: Sexta-feira, 9 de Março de 2012
> > > > 12:38
> > > >>>   > > > > > Assunto: Re: MyFaces and CODI
> > > >>>   > > > > >
> > > >>>   > > > > > hi stephen,
> > > >>>   > > > > >
> > > >>>   > > > > > that's right [1] doesn't support it.
> > > >>>   > > > > > werner committed his improvement and you can
> > > > try
> > > >>  [2] and [3] as
> > > >>>   you
> > > >>>   > > see
> > > >>>   > > > > > them right now.
> > > >>>   > > > > >
> > > >>>   > > > > > regards,
> > > >>>   > > > > > gerhard
> > > >>>   > > > > >
> > > >>>   > > > > > [1]
> > > >>>   > > > >
> > > >>>   >
> > > >
> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > >>>   > > > > > [2] http://s.apache.org/rr
> > > >>>   > > > > > [3] http://s.apache.org/23p
> > > >>>   > > > > >
> > > >>>   > > > > > http://www.irian.at
> > > >>>   > > > > >
> > > >>>   > > > > > Your JSF/JavaEE powerhouse -
> > > >>>   > > > > > JavaEE Consulting, Development and
> > > >>>   > > > > > Courses in English and German
> > > >>>   > > > > >
> > > >>>   > > > > > Professional Support for Apache MyFaces
> > > >>>   > > > > >
> > > >>>   > > > > >
> > > >>>   > > > > >
> > > >>>   > > > > > 2012/3/9 Stephen More
> > > >>  <st...@gmail.com>
> > > >>>   > > > > >
> > > >>>   > > > > > > I was referring to [1]
> > > >>>   > > > > > >
> > > >>>   > > >
> > > >>>
> > > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > >>>   > > > > > >
> > > >>>   > > > > > > I guess I just need to wait until the
> > > > correct
> > > >>  way is tested and
> > > >>>   > > > > > > documented in the wiki using:
> > > >>>   > > > > > >   [1] http://s.apache.org/rr
> > > >>>   > > > > > >  [2] http://s.apache.org/23p
> > > >>>   > > > > > >
> > > >>>   > > > > > >
> > > >>>   > > > > > >
> > > >>>   > > > > > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard
> > > >>  Petracek
> > > >>>   > > > > > > <ge...@gmail.com>
> > > > wrote:
> > > >>>   > > > > > > > @ mark:
> > > >>>   > > > > > > > i just tested it and it works with
> > > > [1]
> > > >>  in combination
> > > >>>   > > > > > > > with ClientSideWindowHandler [2].
> > > >>>   > > > > > > >
> > > >>>   > > > > > > > regards,
> > > >>>   > > > > > > > gerhard
> > > >>>   > > > > > > >
> > > >>>   > > > > > > > [1] http://s.apache.org/rr
> > > >>>   > > > > > > > [2] http://s.apache.org/23p
> > > >>>   > > > > > > >
> > > >>>   > > > > > > > http://www.irian.at
> > > >>>   > > > > > > >
> > > >>>   > > > > > > > Your JSF/JavaEE powerhouse -
> > > >>>   > > > > > > > JavaEE Consulting, Development and
> > > >>>   > > > > > > > Courses in English and German
> > > >>>   > > > > > > >
> > > >>>   > > > > > > > Professional Support for Apache
> > > > MyFaces
> > > >>>   > > > > > > >
> > > >>>   > > > > > > >
> > > >>>   > > > > > > >
> > > >>>   > > > > > > > 2012/3/9 Mark Struberg
> > > >>  <st...@yahoo.de>
> > > >>>   > > > > > > >
> > > >>>   > > > > > > >> Hi Stephen!
> > > >>>   > > > > > > >>
> > > >>>   > > > > > > >> Well, the current approach in
> > > > CODI
> > > >>  is currently under
> > > >>>   > discussion
> > > >>>   > > > in
> > > >>>   > > > > > the
> > > >>>   > > > > > > >> JSF EG. The whole windowId
> > > > stuff of
> > > >>  CODI might end up in the
> > > >>>   > > > JSF-2.2
> > > >>>   > > > > > or
> > > >>>   > > > > > > 2.3
> > > >>>   > > > > > > >> spec.
> > > >>>   > > > > > > >>
> > > >>>   > > > > > > >> >T hat seems to work fine
> > > > when
> > > >>  pasting into a new empty
> > > >>>   > window,
> > > >>>   > > > but
> > > >>>   > > > > it
> > > >>>   > > > > > > >> > still allows you to
> > > > copy-paste
> > > >>  the url from one codi
> > > >>>   window
> > > >>>   > to
> > > >>>   > > > an
> > > >>>   > > > > > > >> > existing codi window.
> > > >>>   > > > > > > >>
> > > >>>   > > > > > > >> Nope, because the
> > > > windowhandler.js
> > > >>  script will first check
> > > >>>   the
> > > >>>   > > > > > > window.name.
> > > >>>   > > > > > > >> And if this is
> > > > empty/doesn't fit
> > > >>  the windowId in the URL,
> > > >>>   then
> > > >>>   > > it
> > > >>>   > > > > will
> > > >>>   > > > > > > >> reload the page with a freshly
> > > >>  requested windowId.
> > > >>>   > > > > > > >>
> > > >>>   > > > > > > >> LieGrue,
> > > >>>   > > > > > > >> strub
> > > >>>   > > > > > > >>
> > > >>>   > > > > > > >>
> > > >>>   > > > > > > >>
> > > >>>   > > > > > > >>
> > > >>>   > > > > > > >> ----- Original Message -----
> > > >>>   > > > > > > >> > From: Stephen More
> > > >>  <st...@gmail.com>
> > > >>>   > > > > > > >> > To: MyFaces Discussion
> > > >>  <us...@myfaces.apache.org>
> > > >>>   > > > > > > >> > Cc:
> > > >>>   > > > > > > >> > Sent: Friday, March 9,
> > > > 2012
> > > >>  1:27 PM
> > > >>>   > > > > > > >> > Subject: Re: MyFaces and
> > > > CODI
> > > >>>   > > > > > > >> >
> > > >>>   > > > > > > >> > Included in the JSF jar is
> > > >>>   > > META-INF/resources/javax.faces/jsf.js
> > > >>>   > > > > > which
> > > >>>   > > > > > > >> > enables its use by
> > > >>  <h:outputScript name="jsf.js"
> > > >>>   > > > > > > >> >
> > > > library="javax.faces"
> > > >>>   > > > > > > >> >
> > > > target="head"/>
> > > >>>   > > > > > > >> >
> > > >>>   > > > > > > >> > Should windowhandler.js be
> > > >
> > > >>  moved from the examples into a
> > > >>>   > core
> > > >>>   > > > > > library
> > > >>>   > > > > > > >> > so that it can be utilized
> > > > the
> > > >>  same way ?
> > > >>>   > > > > > > >> >
> > > >>>   > > > > > > >> >
> > > >>>   > > > > > > >> >
> > > >>>   > > > > > > >> > On Fri, Mar 9, 2012 at
> > > > 7:10 AM,
> > > >>  Gerhard Petracek
> > > >>>   > > > > > > >> >
> > > >>  <ge...@gmail.com> wrote:
> > > >>>   > > > > > > >> >>  hi stephen,
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>  yes - you can add a
> > > > small
> > > >>  js (see e.g. [1]) to support
> > > >>>   > this
> > > >>>   > > > > > > use-case.
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>  regards,
> > > >>>   > > > > > > >> >>  gerhard
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>  [1]
> > > >>  http://s.apache.org/YTq
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>  http://www.irian.at
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>  Your JSF/JavaEE
> > > > powerhouse
> > > >>  -
> > > >>>   > > > > > > >> >>  JavaEE Consulting,
> > > >>  Development and
> > > >>>   > > > > > > >> >>  Courses in English
> > > > and
> > > >>  German
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>  Professional Support
> > > > for
> > > >>  Apache MyFaces
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>  2012/3/9 Stephen More
> > > >
> > > >>  <st...@gmail.com>
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>>  Great. I am
> > > > mainly
> > > >>  interested in WindowScoped i.e.
> > > >>>   every
> > > >>>   > > > > browser
> > > >>>   > > > > > > tab
> > > >>>   > > > > > > >> >>>  has its own
> > > >>  mini-session.
> > > >>>   > > > > > > >> >>>
> > > >>>   > > > > > > >> >>>  I see that CODI
> > > > is
> > > >>  adding a ?windowId=595 to keep these
> > > >>>   > > > > > > conversations
> > > >>>   > > > > > > >> >>>  separate. If a
> > > > user
> > > >>  simply copies the url and pastes
> > > >>>   in a
> > > >>>   > > new
> > > >>>   > > > > tab
> > > >>>   > > > > > > now
> > > >>>   > > > > > > >> >>>  two browser tabs
> > > > are
> > > >>  sharing the same conversation. How
> > > >>>   > > can I
> > > >>>   > > > > > > prevent
> > > >>>   > > > > > > >> >>>  this ? I want to
> > > >>  enforce that EVERY browser tab has its
> > > >>>   > own
> > > >>>   > > > > > > >> >>>  conversation.
> > > > Perhaps
> > > >>  a simple error to the user saying
> > > >>>   > > > > > > >> > "Sorry" or
> > > >>>   > > > > > > >> >>>  start a new
> > > >>  conversation.
> > > >>>   > > > > > > >> >>>
> > > >>>   > > > > > > >> >>>  -Thanks
> > > >>>   > > > > > > >> >>>
> > > >>>   > > > > > > >> >>>  On Fri, Mar 9,
> > > > 2012 at
> > > >>  3:18 AM, Gerhard Petracek
> > > >>>   > > > > > > >> >>>
> > > >>  <ge...@gmail.com> wrote:
> > > >>>   > > > > > > >> >>>  > hi stephen,
> > > >>>   > > > > > > >> >>>  >
> > > >>>   > > > > > > >> >>>  > (that's
> > > > an
> > > >>  issue with the setup of weld and not
> > > >>>   related
> > > >>>   > > to
> > > >>>   > > > > > > >> > myfaces codi.)
> > > >>>   > > > > > > >> >>>  > however,
> > > > myfaces
> > > >>  codi doesn't need this support -> if
> > > >>>   > you
> > > >>>   > > > > > > >> > also don't need
> > > >>>   > > > > > > >> >>>  > cdi support
> > > > for
> > > >>  servlets, filters or listeners, you
> > > >>>   can
> > > >>>   > > run
> > > >>>   > > > > the
> > > >>>   > > > > > > >> >>>  application
> > > >>>   > > > > > > >> >>>  > without
> > > > those
> > > >>  features.
> > > >>>   > > > > > > >> >>>  >
> > > >>>   > > > > > > >> >>>  > regards,
> > > >>>   > > > > > > >> >>>  > gerhard
> > > >>>   > > > > > > >> >>>  >
> > > >>>   > > > > > > >> >>>  >
> > > >>  http://www.irian.at
> > > >>>   > > > > > > >> >>>  >
> > > >>>   > > > > > > >> >>>  > Your
> > > > JSF/JavaEE
> > > >>  powerhouse -
> > > >>>   > > > > > > >> >>>  > JavaEE
> > > >>  Consulting, Development and
> > > >>>   > > > > > > >> >>>  > Courses in
> > > >>  English and German
> > > >>>   > > > > > > >> >>>  >
> > > >>>   > > > > > > >> >>>  > Professional
> > > >
> > > >>  Support for Apache MyFaces
> > > >>>   > > > > > > >> >>>  >
> > > >>>   > > > > > > >> >>>  >
> > > >>>   > > > > > > >> >>>  > 2012/3/9
> > > > Stephen
> > > >>  More <st...@gmail.com>
> > > >>>   > > > > > > >> >>>  >
> > > >>>   > > > > > > >> >>>  >> I too am
> > > >
> > > >>  trying to get a simple example working. I
> > > >>>   > have
> > > >>>   > > > put
> > > >>>   > > > > > > >> > together
> > > >>>   > > > > > > >> >>>  >> this
> > > > project:
> > > >>>   > > > > > > >> >
> > > >>  http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> > > >>>   > > > > > > >> >>>  >>
> > > >>>   > > > > > > >> >>>  >> mvn
> > > >>  jetty:run-war   results in
> > > >>>   > > > > > > >> >>>  >>
> > > >>>   > > > > > > >> >>>  >> SEVERE:
> > > >>  Unable to create JettyWeldInjector. CDI
> > > >>>   > > injection
> > > >>>   > > > > will
> > > >>>   > > > > > > >> > not be
> > > >>>   > > > > > > >> >>>  >>
> > > > available in
> > > >>  Servlets, Filters or Listeners
> > > >>>   > > > > > > >> >>>  >>
> > > >>>   > > > > > > >> >>>  >> What
> > > > else do
> > > >>  I need to get this simple example
> > > >>>   > working ?
> > > >>>   > > > > > > >> >>>  >>
> > > >>>   > > > > > > >> >>>  >> -Thanks
> > > >>>   > > > > > > >> >>>  >>
> > > >>>   > > > > > > >> >>>  >> On Thu,
> > > > Mar
> > > >>  8, 2012 at 11:07 AM, Gerhard Petracek
> > > >>>   > > > > > > >> >>>  >>
> > > >>  <ge...@gmail.com> wrote:
> > > >>>   > > > > > > >> >>>  >> > hi
> > > > jose,
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > > first of
> > > >>  all: welcome @ myfaces!
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > > concrete
> > > >>  questions are very welcome and we will
> > > >>>   > > improve
> > > >>>   > > > > > > >> > the wiki
> > > >>>   > > > > > > >> >>>  based on
> > > >>>   > > > > > > >> >>>  >> >
> > > > them.
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > > regards,
> > > >>>   > > > > > > >> >>>  >> >
> > > > gerhard
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > >>  http://www.irian.at
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > > Your
> > > >>  JSF/JavaEE powerhouse -
> > > >>>   > > > > > > >> >>>  >> >
> > > > JavaEE
> > > >>  Consulting, Development and
> > > >>>   > > > > > > >> >>>  >> >
> > > > Courses
> > > >>  in English and German
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > >>  Professional Support for Apache MyFaces
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > > 2012/3/8
> > > >>  José Luis Cetina <ma...@gmail.com>
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >>
> > > > Hi
> > > >>  im so excited to start and use MyFaces and
> > > >>>   CODI
> > > >>>   > > > > > > >> > but i cant get any
> > > >>>   > > > > > > >> >>>  >> >>
> > > >
> > > >>  "good" documentation in fact i only can get
> > > >>>   > > > > > > >> > like 2 or 3 mini tutorial
> > > >>>   > > > > > > >> >>>  >> but
> > > >>>   > > > > > > >> >>>  >> >>
> > > > they
> > > >>  are really incomplete, can somebody
> > > >>>   recommend
> > > >>>   > me
> > > >>>   > > > > > > >> > to some
> > > >>>   > > > > > > >> >>>  tutorial
> > > >>>   > > > > > > >> >>>  >> or
> > > >>>   > > > > > > >> >>>  >> >>
> > > > book
> > > >>  to start with *CODI *y see this is an
> > > >>>   > excellent
> > > >>>   > > > > > > >> > extension, im
> > > >>>   > > > > > > >> >>>  >> moving
> > > >>>   > > > > > > >> >>>  >> >>
> > > > from
> > > >>  mojarra and CDI to MyFaces and MyFaces
> > > >>>   > > > > > > >> > extensions, please where
> > > >>>   > > > > > > >> >>>  i
> > > >>>   > > > > > > >> >>>  >> can
> > > >>>   > > > > > > >> >>>  >> >>
> > > > find
> > > >>  value information
> > > >>>   > > > > > > >> >>>  >> >>
> > > >>>   > > > > > > >> >>>  >> >>
> > > > The
> > > >>  only URL where i found a little info is this:
> > > >>>   > > > > > > >> >>>  >> >>
> > > >>>   > > > > > > >> >
> > > >>  https://cwiki.apache.org/confluence/display/EXTCDI/Index
> > > >>>   > > > > > > >> >>>  >> >>
> > > >>>   > > > > > > >> >>>  >> >>
> > > > --
> > > >>>   > > > > > > >> >>>  >> >>
> > > >>>   > > > > > > >> >
> > > >>>   > > > >
> > > >>  -------------------------------------------------------------------
> > > >>>   > > > > > > >> >>>  >> >>
> > > >
> > > >>  *SCJA. José Luis Cetina*
> > > >>>   > > > > > > >> >>>  >> >>
> > > >>>   > > > > > > >> >
> > > >>>   > > > >
> > > >>  -------------------------------------------------------------------
> > > >>>   > > > > > > >> >>>  >> >>
> > > >>>   > > > > > > >> >>>  >>
> > > >>>   > > > > > > >> >>>
> > > >>>   > > > > > > >> >
> > > >>>   > > > > > > >>
> > > >>>   > > > > > >
> > > >>>   > > > > >
> > > >>>   > > > >
> > > >>>   > > > >
> > > >>>   > > >
> > > >>>   > >
> > > >>>   >
> > > >>>
> > > >>>
> > > >>
> > > >
> > >
> >
> >
>
>

Re: MyFaces and CODI

Posted by Gerhard Petracek <ge...@gmail.com>.
hi rafael,

i just can say that i've used it already with wls 11g.

regards,
gerhard

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/18 Rafael Pestano <rm...@yahoo.com.br>

> hi gerhard,
>
> tried that but got the same error,
>
> the generated war can be found here: http://bit.ly/xvbtu7
>
> Mark, thanks for the reply, ill try that.
>
>
>
> Att,
> Rafael M. Pestano
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ----- Mensagem original -----
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Cc:
> Enviadas: Domingo, 18 de Março de 2012 17:32
> Assunto: Re: MyFaces and CODI
>
> hi rafael,
>
> for a wls 11g deployment you have to follow [1].
>
> regards,
> gerhard
>
> [1] https://cwiki.apache.org/confluence/display/EXTCDI/JavaEE5+Support
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/18 Rafael Pestano <rm...@yahoo.com.br>
>
> > Hi guys,
> >
> >
> > I think that what Mark stated can be happening in the environment at my
> > company(weblogic 11g, mojarra 1.2, owb and CODI) cause a simple forward
> is
> > also causing the bean to be instantiated(tested with ViewAccess and
> > WindowScoped),
> >
> > How can i ensure that the whole Context is being initialized?
> >
> >
> >
> > About the server side solution Gerhard proposed i can confirm it is
> > working here at home, the main problem is something with
> the"constalation"
> > that the application at my company is using, maybe the frame based
> layout,
> > jspx extension or something else.
> >
> > i also tried to deploy Gerhard example here in weblogic here at home
> > without success, the CDI container cannot start.
> >
> > i just changed from myfaces to mojarra, instaled the example via maven
> and
> > deployed the war in weblogic 11g(10.3.2), to try simulate the enviroment
> at
> > my company, here is the error:
> >
> >
> > INFO: Initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS)
> > for context '/playground-jsf12-1.0.4'
> > 18/03/2012 17:10:46
> > org.apache.myfaces.extensions.cdi.core.api.provider.ServiceProvider
> <clinit>
> > INFO:
> >
> org.apache.myfaces.extensions.cdi.core.impl.provider.DefaultServiceProvider
> > installed successfully.
> > 18/03/2012 17:10:46
> > org.apache.myfaces.extensions.cdi.core.api.provider.ServiceProvider
> <clinit>
> > INFO:
> >
> org.apache.myfaces.extensions.cdi.core.impl.provider.DefaultServiceProviderContext
> > installed successfully.
> > java.lang.IllegalStateException: no
> > org.apache.myfaces.extensions.cdi.core.api.provider.BeanManagerProvider
> in
> > place! Please ensur
> > e that you configured the CDI implementation of your choice properly. If
> > your setup is correct, please clear all caches and compil
> > ed artifacts. If there is still a problem, try one of the controlled
> > bootstrapping add-ons for the CDI implementation you are usin
> > g.
> >         at
> >
> org.apache.myfaces.extensions.cdi.core.api.provider.BeanManagerProvider.getInstance(BeanManagerProvider.java:81)
> >         at
> >
> org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils.getContextualReferenceByClass(CodiUtils.java:124)
> >         at
> >
> org.apache.myfaces.extensions.cdi.jsf.impl.listener.phase.PhaseListenerExtension.consumePhaseListeners(PhaseListenerExt
> > ension.java:110)
> >         at
> >
> org.apache.myfaces.extensions.cdi.jsf.impl.listener.phase.CodiLifecycleFactoryWrapper.getLifecycle(CodiLifecycleFactory
> > Wrapper.java:65)
> >         at
> >
> com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:1115)
> >         at
> >
> com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:766)
> >         at
> >
> com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:529)
> >         at
> >
> com.sun.faces.config.GlassFishConfigureListener.contextInitialized(GlassFishConfigureListener.java:47)
> >         at
> >
> weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
> >         at
> >
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
> >         at
> > weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
> >         at
> >
> weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
> >         at
> >
> weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1801)
> >         at
> >
> weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3045)
> >         at
> >
> weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1397)
> >         at
> > weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
> >         at
> >
> weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
> >         at
> >
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
> >         at
> >
> weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
> >         at
> >
> weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
> >         at
> >
> weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
> >         at
> >
> weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
> >         at
> >
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
> >         at
> >
> weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
> >         at
> >
> weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
> >         at
> >
> weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
> >         at
> >
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
> >         at
> >
> weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
> >         at
> >
> weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:39)
> >         at
> >
> weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
> >         at
> >
> weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
> >         at
> >
> weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
> >         at
> >
> weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
> >         at
> >
> weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
> >         at
> >
> weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
> >         at
> >
> weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
> >         at
> >
> weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
> >         at
> >
> weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
> >         at
> >
> weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
> >         at
> >
> weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCa
> > llbackDeliverer.java:181)
> >         at
> >
> weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallback
> > Deliverer.java:12)
> >         at
> >
> weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliv
> > erer.java:67)
> >         at
> >
> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
> >         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
> >         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
> > 18/03/2012 17:10:47 com.sun.faces.config.ConfigureListener
> > contextInitialized
> >
> > thanks for your time.
> >
> >
> > Att,
> > Rafael M. Pestano
> > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > Graduando em Ciência da Computação UFRGS
> > @realpestano
> > http://code.google.com/p/jsf-conventions-framework/
> >
> >
> >
> > ----- Mensagem original -----
> > De: Gerhard Petracek <ge...@gmail.com>
> > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > Cc:
> > Enviadas: Domingo, 18 de Março de 2012 16:47
> > Assunto: Re: MyFaces and CODI
> >
> > hi mark,
> >
> > since rafael mentioned that it works without a4j and there is no issue
> with
> > a4j in the demo, i don't think that it is such a basic issue.
> >
> > regards,
> > gerhard
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/3/18 Mark Struberg <st...@yahoo.de>
> >
> > >
> > >
> > > Gerhard pinged me that you are using @ViewAccessScoped. In that case
> I'd
> > > recomment to debug if the whole Context Extension gets properly
> > registrated.
> > >
> > > If the CDI container doesn't know the @ViewAccessScoped annotation then
> > > all your beans will end up as @Dependent...
> > >
> > > LieGrue,
> > > strub
> > >
> > >
> > > ----- Original Message -----
> > > > From: Mark Struberg <st...@yahoo.de>
> > > > To: MyFaces Discussion <us...@myfaces.apache.org>
> > > > Cc:
> > > > Sent: Sunday, March 18, 2012 7:42 PM
> > > > Subject: Re: MyFaces and CODI
> > > >
> > > >>  when i find out what's causing my bean to be instantiated on every
> > ajax
> > > > call
> > > >>  i'll come back here to report.
> > > >
> > > > That sounds familiar - good luck ;)
> > > >
> > > > Which scope does your bean have? You are sure that you are really
> using
> > > CDI
> > > > javax.enterprise.context.* scopes and not javax.faces.bean.* scopes
> due
> > > to a
> > > > wrong auto-import  of your IDE?
> > > >
> > > > LieGrue,
> > > > strub
> > > >
> > > >
> > > >
> > > > ----- Original Message -----
> > > >>  From: Rafael Pestano <rm...@yahoo.com.br>
> > > >>  To: MyFaces Discussion <us...@myfaces.apache.org>
> > > >>  Cc:
> > > >>  Sent: Saturday, March 17, 2012 4:34 PM
> > > >>  Subject: Re: MyFaces and CODI
> > > >>
> > > >>  yeap, i also deployed the server side demo in tomcat and it works
> as
> > > > expected,
> > > >>  when i find out what's causing my bean to be instantiated on every
> > ajax
> > > > call
> > > >>  i'll come back here to report.
> > > >>
> > > >>  many thanks for the assistance.
> > > >>
> > > >>  Att,
> > > >>
> > > >>  Rafael M. Pestano
> > > >>
> > > >>  Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> > Sul
> > > >>  Graduando em Ciência da Computação UFRGS
> > > >>  @realpestano
> > > >>  http://code.google.com/p/jsf-conventions-framework/
> > > >>
> > > >>
> > > >>
> > > >>  ________________________________
> > > >>  De: Gerhard Petracek <ge...@gmail.com>
> > > >>  Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > >>  Enviadas: Sexta-feira, 16 de Março de 2012 22:46
> > > >>  Assunto: Re: MyFaces and CODI
> > > >>
> > > >>  hi rafael,
> > > >>
> > > >>  i can't reproduce it. i added richfaces to the previous demo as
> well
> > as
> > > > a4j
> > > >>  support to the input component and everything works as expected.
> > > >>
> > > >>  regards,
> > > >>  gerhard
> > > >>
> > > >>  http://www.irian.at
> > > >>
> > > >>  Your JSF/JavaEE powerhouse -
> > > >>  JavaEE Consulting, Development and
> > > >>  Courses in English and German
> > > >>
> > > >>  Professional Support for Apache MyFaces
> > > >>
> > > >>
> > > >>
> > > >>  2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > > >>
> > > >>>   Hi Gehard,
> > > >>>
> > > >>>   i didnt got the ideia, do you have any example or a link showing
> > this
> > > >>>   approach?
> > > >>>
> > > >>>   what i have got til now is:
> > > >>>   1 - WindowContextIdHolderComponent is a jsf component which is
> > added
> > > >>>   dynamically to the view
> > > >>>   2 - this component holds the windowId
> > > >>>   3 - i have,somehow , to keep the windowId the same between
> requests
> > > so
> > > > my
> > > >>>   ViewAccessScoped bean  is "keeped alive" <- here is where
> > > > im
> > > >>  stuck
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>>   Att,
> > > >>>   Rafael M. Pestano
> > > >>>   Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande
> do
> > > Sul
> > > >>>   Graduando em Ciência da Computação UFRGS
> > > >>>   @realpestano
> > > >>>  http://code.google.com/p/jsf-conventions-framework/
> > > >>>
> > > >>>
> > > >>>
> > > >>>   ----- Mensagem original -----
> > > >>>   De: Gerhard Petracek <ge...@gmail.com>
> > > >>>   Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > >>>   Cc:
> > > >>>   Enviadas: Quinta-feira, 15 de Março de 2012 11:28
> > > >>>   Assunto: Re: MyFaces and CODI
> > > >>>
> > > >>>   hi rafael,
> > > >>>
> > > >>>   @ WindowContextIdHolderComponent:
> > > >>>
> > > >>>   that's the name of the class. you have to resolve the component
> > > > (by
> > > >>  type)
> > > >>>   before the view gets rendered and add it to the ajax enabled a4j
> > > > components
> > > >>>   via the corresponding java-api.
> > > >>>
> > > >>>   @ custom approach:
> > > >>>   independent of the concrete approach you would like to use, you
> > just
> > > > have
> > > >>>   to ensure that the information is available on the server-side
> (for
> > > > every
> > > >>>   jsf request which starts the jsf request-lifecycle).
> > > >>>
> > > >>>   regards,
> > > >>>   gerhard
> > > >>>
> > > >>>   Your JSF/JavaEE powerhouse -
> > > >>>   JavaEE Consulting, Development and
> > > >>>   Courses in English and German
> > > >>>
> > > >>>   Professional Support for Apache MyFaces
> > > >>>
> > > >>>
> > > >>>   2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > > >>>
> > > >>>   > Hi again,
> > > >>>   >
> > > >>>   > "it will work with a4j as soon as you
> > > >>>   > ensure that it gets restored for requests triggered by a4j "
> > > > you
> > > >>  mean i
> > > >>>   > should send WindowContextIdHolderComponent  within the ajax
> > > > request?
> > > >>>   >
> > > >>>   > somethink like <a4j:support
> > > >>  process="WindowContextIdHolderComponent"/> ?
> > > >>>   >
> > > >>>   > if so whats the id of the generated component?
> > > >>>   >
> > > >>>   > i also have another question, in the javadoc
> > > >>>   > of WindowContextConfig isUrlParameterSuported() says
> > > >>>   >
> > > >>>   > "Specifies if it is allowed to use URL params for forwarding
> > > > the
> > > >>  current
> > > >>>   > window-id. (deactivate it e.g. for higher security - in this
> case
> > > >
> > > >>  it's
> > > >>>   > required to use a window id provided by a component lib or a
> > > >>  server-side
> > > >>>   > window-handler"
> > > >>>   >
> > > >>>   > how can i create a component to handle the window id? can i do
> > > > that
> > > >>  with
> > > >>>   > an h:inputHidden for example?
> > > >>>   >
> > > >>>   > thanks for the help.
> > > >>>   >
> > > >>>   >
> > > >>>   >
> > > >>>   > Att,
> > > >>>   >
> > > >>>   > Rafael M. Pestano
> > > >>>   >
> > > >>>   > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande
> > > > do Sul
> > > >>>   > Graduando em Ciência da Computação UFRGS
> > > >>>   > @realpestano
> > > >>>   > http://code.google.com/p/jsf-conventions-framework/
> > > >>>   >
> > > >>>   >
> > > >>>   >
> > > >>>   > ________________________________
> > > >>>   > De: Gerhard Petracek <ge...@gmail.com>
> > > >>>   > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > >>>   > Enviadas: Quinta-feira, 15 de Março de 2012 10:37
> > > >>>   > Assunto: Re: MyFaces and CODI
> > > >>>   >
> > > >>>   > hi rafael,
> > > >>>   >
> > > >>>   > the fallback adds a component (WindowContextIdHolderComponent)
> > > >>>   dynamically
> > > >>>   > (as a direct child of UiViewRoot) -> it will work with a4j as
> > > > soon
> > > >>  as you
> > > >>>   > ensure that it gets restored for requests triggered by a4j.
> > > >>>   >
> > > >>>   > regards,
> > > >>>   > gerhard
> > > >>>   >
> > > >>>   > http://www.irian.at
> > > >>>   >
> > > >>>   > Your JSF/JavaEE powerhouse -
> > > >>>   > JavaEE Consulting, Development and
> > > >>>   > Courses in English and German
> > > >>>   >
> > > >>>   > Professional Support for Apache MyFaces
> > > >>>   >
> > > >>>   >
> > > >>>   > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > > >>>   >
> > > >>>   > > well its not 100% yet ;(...on every ajaxCall my
> > > > ViewAccessScoped
> > > >>  bean
> > > >>>   is
> > > >>>   > > being instantiated,
> > > >>>   > >
> > > >>>   > > im using a4j, there is any known issue with it?
> > > >>>   > >
> > > >>>   > > for example <h:selectOneMenu .....>
> > > >>>   > >                         <a4j:support
> > > >>  event="onchange" ....action="when
> > > >>>   > the
> > > >>>   > > action is called the bean constructor gets called"/>
> > > >>>   > >                     </h:selectOneMenu>
> > > >>>   > >
> > > >>>   > > if i change from View to RequestScoped the bahavior is the
> > > > same,
> > > >>  any
> > > >>>   > ideas?
> > > >>>   > >
> > > >>>   > >
> > > >>>   > > thanks in advance.
> > > >>>   > >
> > > >>>   > >
> > > >>>   > > Att,
> > > >>>   > >
> > > >>>   > > Rafael M. Pestano
> > > >>>   > >
> > > >>>   > > Desenvolvedor Java Cia. de Processamento de Dados do Rio
> > > > Grande
> > > >>  do Sul
> > > >>>   > > Graduando em Ciência da Computação UFRGS
> > > >>>   > > @realpestano
> > > >>>   > > http://code.google.com/p/jsf-conventions-framework/
> > > >>>   > >
> > > >>>   > >
> > > >>>   > >
> > > >>>   > > ________________________________
> > > >>>   > >  De: Rafael Pestano <rm...@yahoo.com.br>
> > > >>>   > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > >>>   > > Enviadas: Quinta-feira, 15 de Março de 2012 8:45
> > > >>>   > > Assunto: Re: MyFaces and CODI
> > > >>>   > >
> > > >>>   > > "if you don't need redirects, you could have a look
> > > > at
> > > >>  e.g. [1] which
> > > >>>   > uses
> > > >>>   > > an internal fallback." yea, its our case and it just
> > > > works!
> > > >>>   > >
> > > >>>   > > many thanks for your help, keep the great work!
> > > >>>   > >
> > > >>>   > > Att,
> > > >>>   > >
> > > >>>   > > Rafael M. Pestano
> > > >>>   > >
> > > >>>   > > Desenvolvedor Java Cia. de Processamento de Dados do Rio
> > > > Grande
> > > >>  do Sul
> > > >>>   > > Graduando em Ciência da Computação UFRGS
> > > >>>   > > @realpestano
> > > >>>   > > http://code.google.com/p/jsf-conventions-framework/
> > > >>>   > >
> > > >>>   > >
> > > >>>   > >
> > > >>>   > > ________________________________
> > > >>>   > > De: Gerhard Petracek <ge...@gmail.com>
> > > >>>   > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > >>>   > > Enviadas: Quarta-feira, 14 de Março de 2012 23:19
> > > >>>   > > Assunto: Re: MyFaces and CODI
> > > >>>   > >
> > > >>>   > > hi rafael,
> > > >>>   > >
> > > >>>   > > as you have seen it's easy to provide a custom
> > > > WindowHandler
> > > >>  (just
> > > >>>   > > implement the interface and provide your implementation as
> > > >>  alternative
> > > >>>   > cdi
> > > >>>   > > bean)
> > > >>>   > > -> you can integrate every custom approach which is
> > > > enough to
> > > >>  solve you
> > > >>>   > > requirements.
> > > >>>   > >
> > > >>>   > > if you don't need redirects, you could have a look at
> > > > e.g.
> > > >>  [1] which
> > > >>>   uses
> > > >>>   > > an internal fallback.
> > > >>>   > >
> > > >>>   > > regards,
> > > >>>   > > gerhard
> > > >>>   > >
> > > >>>   > > [1] http://s.apache.org/SAs
> > > >>>   > >
> > > >>>   > > http://www.irian.at
> > > >>>   > >
> > > >>>   > > Your JSF/JavaEE powerhouse -
> > > >>>   > > JavaEE Consulting, Development and
> > > >>>   > > Courses in English and German
> > > >>>   > >
> > > >>>   > > Professional Support for Apache MyFaces
> > > >>>   > >
> > > >>>   > >
> > > >>>   > >
> > > >>>   > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > > >>>   > >
> > > >>>   > > > Hi Gehard,
> > > >>>   > > >
> > > >>>   > > > its a stopper to us cause we are still dependent on JSF
> > > > 1.2
> > > >>>   > > > Can i implement an alternative
> > > >>>   > > > to
> > > >>>   > >
> > > >>>   >
> > > >>>
> > > >>
> > > >
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > > >>>   > > > based on JSF 1.2?
> > > >>>   > > >
> > > >>>   > > > i see you use flash scope to span the windowId through
> > > >>  requests in
> > > >>>   the
> > > >>>   > > > server side solution:
> > > >>>   > > >
> > > >>>   > > > if (windowId != null)
> > > >>>   > > > 79         {
> > > >>>   > > >
> > > >>>   > > > 80
> > > >>>   > >
> > > >>
> externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY,
> > > >>>   > > windowId);
> > > >>>   > > >
> > > >>>   > > > 81
> > > >>>   > >
> > > > externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
> > > >>>   > > > 82         }
> > > >>>   > > >
> > > >>>   > > > if i put the windownId in the sessionMap it would still
> > > >
> > > >>  work? i think
> > > >>>   > ill
> > > >>>   > > > find hard time trying to remove the windowId from the
> > > > map
> > > >>  when user
> > > >>>   > leave
> > > >>>   > > > the page.
> > > >>>   > > >
> > > >>>   > > >
> > > >>>   > > >
> > > >>>   > > > thanks for your help i really appreciated it.
> > > >>>   > > >
> > > >>>   > > > Att,
> > > >>>   > > > Rafael M. Pestano
> > > >>>   > > > Desenvolvedor Java Cia. de Processamento de Dados do
> > > > Rio
> > > >>  Grande do
> > > >>>   Sul
> > > >>>   > > > Graduando em Ciência da Computação UFRGS
> > > >>>   > > > @realpestano
> > > >>>   > > > http://code.google.com/p/jsf-conventions-framework/
> > > >>>   > > >
> > > >>>   > > >
> > > >>>   > > >
> > > >>>   > > > ----- Mensagem original -----
> > > >>>   > > > De: Gerhard Petracek <ge...@gmail.com>
> > > >>>   > > > Para: MyFaces Discussion
> > > > <us...@myfaces.apache.org>
> > > >>>   > > > Cc:
> > > >>>   > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:55
> > > >>>   > > > Assunto: Re: MyFaces and CODI
> > > >>>   > > >
> > > >>>   > > > hi rafael,
> > > >>>   > > >
> > > >>>   > > > internally the ServerSideWindowHandler is based on the
> > > > flash
> > > >>  scope
> > > >>>   > > (that's
> > > >>>   > > > one of the mentioned disadvantages)
> > > >>>   > > > -> it's bound to jsf 2+ -> it is:
> > > >>>   > > >
> > > >>>   > > >
> > > >>>   > >
> > > >>>   >
> > > >>>
> > > >>
> > > >
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > > >>>   > > > (and you can't use the additional js.)
> > > >>>   > > >
> > > >>>   > > > with some constellations you just hit the restrictions
> > > > of
> > > >>  browsers ->
> > > >>>   > you
> > > >>>   > > > have to choose what you really need.
> > > >>>   > > >
> > > >>>   > > > regards,
> > > >>>   > > > gerhard
> > > >>>   > > >
> > > >>>   > > > http://www.irian.at
> > > >>>   > > >
> > > >>>   > > > Your JSF/JavaEE powerhouse -
> > > >>>   > > > JavaEE Consulting, Development and
> > > >>>   > > > Courses in English and German
> > > >>>   > > >
> > > >>>   > > > Professional Support for Apache MyFaces
> > > >>>   > > >
> > > >>>   > > >
> > > >>>   > > >
> > > >>>   > > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > > >>>   > > >
> > > >>>   > > > > i see, i have used the client side one
> > > >>>   > > > >
> > > >>>   > > > > <alternatives>
> > > >>>   > > > >
> > > >>>   > > >
> > > >>>   > >
> > > >>>   >
> > > >>>
> > > >>
> > > >
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
> > > >>>   > > > > </alternatives>
> > > >>>   > > > >
> > > >>>   > > > > i imagine the server side should be
> > > >>>   > > > >
> > > >>>   > > > > <alternatives>
> > > >>>   > > > >
> > > >>>   > > >
> > > >>>   > >
> > > >>>   >
> > > >>>
> > > >>
> > > >
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
> > > >>>   > > > > </alternatives>alright?
> > > >>>   > > > >
> > > >>>   > > > > i will test it tomorrow and give the feedback,
> > > > thanks.
> > > >>>   > > > >
> > > >>>   > > > > Att,
> > > >>>   > > > > Rafael M. Pestano
> > > >>>   > > > > Desenvolvedor Java Cia. de Processamento de Dados
> > > > do
> > > >>  Rio Grande do
> > > >>>   > Sul
> > > >>>   > > > > Graduando em Ciência da Computação UFRGS
> > > >>>   > > > > @realpestano
> > > >>>   > > > >
> > > > http://code.google.com/p/jsf-conventions-framework/
> > > >>>   > > > >
> > > >>>   > > > >
> > > >>>   > > > >
> > > >>>   > > > > ----- Mensagem original -----
> > > >>>   > > > > De: Gerhard Petracek
> > > > <ge...@gmail.com>
> > > >>>   > > > > Para: MyFaces Discussion
> > > >>  <us...@myfaces.apache.org>
> > > >>>   > > > > Cc:
> > > >>>   > > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:11
> > > >>>   > > > > Assunto: Re: MyFaces and CODI
> > > >>>   > > > >
> > > >>>   > > > > hi rafael,
> > > >>>   > > > >
> > > >>>   > > > > the easiest approach to test an alternative for
> > > > this
> > > >>  constellation
> > > >>>   is
> > > >>>   > > the
> > > >>>   > > > > activation of the ServerSideWindowHandler
> > > > (it's a
> > > >>  std. cdi
> > > >>>   > @Alternative
> > > >>>   > > > > implementation -> you can activate it in the
> > > >>  beans.xml file of your
> > > >>>   > > > > application).
> > > >>>   > > > > (however, please be aware that this alternative
> > > >>  implementation has
> > > >>>   > some
> > > >>>   > > > > disadvantages.)
> > > >>>   > > > >
> > > >>>   > > > > regards,
> > > >>>   > > > > gerhard
> > > >>>   > > > >
> > > >>>   > > > > http://www.irian.at
> > > >>>   > > > >
> > > >>>   > > > > Your JSF/JavaEE powerhouse -
> > > >>>   > > > > JavaEE Consulting, Development and
> > > >>>   > > > > Courses in English and German
> > > >>>   > > > >
> > > >>>   > > > > Professional Support for Apache MyFaces
> > > >>>   > > > >
> > > >>>   > > > >
> > > >>>   > > > >
> > > >>>   > > > > 2012/3/14 Rafael Pestano
> > > > <rm...@yahoo.com.br>
> > > >>>   > > > >
> > > >>>   > > > > > Hi Gerhard, i successfuly added codi and
> > > >>  openwebbeans to an
> > > >>>   > > application
> > > >>>   > > > > > running on weblogic 11g
> > > >>>   > > > > >
> > > >>>   > > > > > however its a  legacy application which uses
> > > >>  frames, basicaly we
> > > >>>   > > have a
> > > >>>   > > > > > menu on the left frame that targets the
> > > > center
> > > >>  frame, something
> > > >>>   > like:
> > > >>>   > > > > >
> > > >>>   > > > > > <h:commandLink value="menuLink"
> > > >>  action="#{myBean.init}"
> > > >>>   > > > target="frmDados"
> > > >>>   > > > > > />
> > > >>>   > > > > >
> > > >>>   > > > > >
> > > >>>   > > > > > the problem is, when a add CODI to the
> > > > application
> > > >>  and mark
> > > >>>   myBean
> > > >>>   > as
> > > >>>   > > > > > ViewAccessScoped (and thus the windowId
> > > > starts to
> > > >>  be append to
> > > >>>   the
> > > >>>   > > url)
> > > >>>   > > > > > the above menuLink always open the center
> > > > frame in
> > > >>  a new browser
> > > >>>   > tab.
> > > >>>   > > > > >
> > > >>>   > > > > > If i remove CODI and set myBean as
> > > >>  RequestScoped(or any other CDI
> > > >>>   > > > Scope)
> > > >>>   > > > > > the application behaves  as expected.
> > > >>>   > > > > >
> > > >>>   > > > > > So i think the windowId generated by CODI  is
> > > >
> > > >>  causing this
> > > >>>   issue, i
> > > >>>   > > > tried
> > > >>>   > > > > > your solution without success, the windowId
> > > > isnt
> > > >>  removed from the
> > > >>>   > url
> > > >>>   > > > > and a
> > > >>>   > > > > > new tab opens when i click in the menuLink.
> > > >>>   > > > > >
> > > >>>   > > > > > Any thoughs?
> > > >>>   > > > > >
> > > >>>   > > > > >
> > > >>>   > > > > > thanks for all your help.
> > > >>>   > > > > >
> > > >>>   > > > > >
> > > >>>   > > > > >
> > > >>>   > > > > > Att,
> > > >>>   > > > > >
> > > >>>   > > > > > Rafael M. Pestano
> > > >>>   > > > > >
> > > >>>   > > > > > Desenvolvedor Java Cia. de Processamento de
> > > > Dados
> > > >>  do Rio Grande
> > > >>>   do
> > > >>>   > > Sul
> > > >>>   > > > > > Graduando em Ciência da Computação UFRGS
> > > >>>   > > > > > @realpestano
> > > >>>   > > > > >
> > > >>  http://code.google.com/p/jsf-conventions-framework/
> > > >>>   > > > > >
> > > >>>   > > > > >
> > > >>>   > > > > >
> > > >>>   > > > > > ________________________________
> > > >>>   > > > > > De: Gerhard Petracek
> > > >>  <ge...@gmail.com>
> > > >>>   > > > > > Para: MyFaces Discussion
> > > >>  <us...@myfaces.apache.org>
> > > >>>   > > > > > Enviadas: Sexta-feira, 9 de Março de 2012
> > > > 12:38
> > > >>>   > > > > > Assunto: Re: MyFaces and CODI
> > > >>>   > > > > >
> > > >>>   > > > > > hi stephen,
> > > >>>   > > > > >
> > > >>>   > > > > > that's right [1] doesn't support it.
> > > >>>   > > > > > werner committed his improvement and you can
> > > > try
> > > >>  [2] and [3] as
> > > >>>   you
> > > >>>   > > see
> > > >>>   > > > > > them right now.
> > > >>>   > > > > >
> > > >>>   > > > > > regards,
> > > >>>   > > > > > gerhard
> > > >>>   > > > > >
> > > >>>   > > > > > [1]
> > > >>>   > > > >
> > > >>>   >
> > > >
> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > >>>   > > > > > [2] http://s.apache.org/rr
> > > >>>   > > > > > [3] http://s.apache.org/23p
> > > >>>   > > > > >
> > > >>>   > > > > > http://www.irian.at
> > > >>>   > > > > >
> > > >>>   > > > > > Your JSF/JavaEE powerhouse -
> > > >>>   > > > > > JavaEE Consulting, Development and
> > > >>>   > > > > > Courses in English and German
> > > >>>   > > > > >
> > > >>>   > > > > > Professional Support for Apache MyFaces
> > > >>>   > > > > >
> > > >>>   > > > > >
> > > >>>   > > > > >
> > > >>>   > > > > > 2012/3/9 Stephen More
> > > >>  <st...@gmail.com>
> > > >>>   > > > > >
> > > >>>   > > > > > > I was referring to [1]
> > > >>>   > > > > > >
> > > >>>   > > >
> > > >>>
> > > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > >>>   > > > > > >
> > > >>>   > > > > > > I guess I just need to wait until the
> > > > correct
> > > >>  way is tested and
> > > >>>   > > > > > > documented in the wiki using:
> > > >>>   > > > > > >   [1] http://s.apache.org/rr
> > > >>>   > > > > > >  [2] http://s.apache.org/23p
> > > >>>   > > > > > >
> > > >>>   > > > > > >
> > > >>>   > > > > > >
> > > >>>   > > > > > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard
> > > >>  Petracek
> > > >>>   > > > > > > <ge...@gmail.com>
> > > > wrote:
> > > >>>   > > > > > > > @ mark:
> > > >>>   > > > > > > > i just tested it and it works with
> > > > [1]
> > > >>  in combination
> > > >>>   > > > > > > > with ClientSideWindowHandler [2].
> > > >>>   > > > > > > >
> > > >>>   > > > > > > > regards,
> > > >>>   > > > > > > > gerhard
> > > >>>   > > > > > > >
> > > >>>   > > > > > > > [1] http://s.apache.org/rr
> > > >>>   > > > > > > > [2] http://s.apache.org/23p
> > > >>>   > > > > > > >
> > > >>>   > > > > > > > http://www.irian.at
> > > >>>   > > > > > > >
> > > >>>   > > > > > > > Your JSF/JavaEE powerhouse -
> > > >>>   > > > > > > > JavaEE Consulting, Development and
> > > >>>   > > > > > > > Courses in English and German
> > > >>>   > > > > > > >
> > > >>>   > > > > > > > Professional Support for Apache
> > > > MyFaces
> > > >>>   > > > > > > >
> > > >>>   > > > > > > >
> > > >>>   > > > > > > >
> > > >>>   > > > > > > > 2012/3/9 Mark Struberg
> > > >>  <st...@yahoo.de>
> > > >>>   > > > > > > >
> > > >>>   > > > > > > >> Hi Stephen!
> > > >>>   > > > > > > >>
> > > >>>   > > > > > > >> Well, the current approach in
> > > > CODI
> > > >>  is currently under
> > > >>>   > discussion
> > > >>>   > > > in
> > > >>>   > > > > > the
> > > >>>   > > > > > > >> JSF EG. The whole windowId
> > > > stuff of
> > > >>  CODI might end up in the
> > > >>>   > > > JSF-2.2
> > > >>>   > > > > > or
> > > >>>   > > > > > > 2.3
> > > >>>   > > > > > > >> spec.
> > > >>>   > > > > > > >>
> > > >>>   > > > > > > >> >T hat seems to work fine
> > > > when
> > > >>  pasting into a new empty
> > > >>>   > window,
> > > >>>   > > > but
> > > >>>   > > > > it
> > > >>>   > > > > > > >> > still allows you to
> > > > copy-paste
> > > >>  the url from one codi
> > > >>>   window
> > > >>>   > to
> > > >>>   > > > an
> > > >>>   > > > > > > >> > existing codi window.
> > > >>>   > > > > > > >>
> > > >>>   > > > > > > >> Nope, because the
> > > > windowhandler.js
> > > >>  script will first check
> > > >>>   the
> > > >>>   > > > > > > window.name.
> > > >>>   > > > > > > >> And if this is
> > > > empty/doesn't fit
> > > >>  the windowId in the URL,
> > > >>>   then
> > > >>>   > > it
> > > >>>   > > > > will
> > > >>>   > > > > > > >> reload the page with a freshly
> > > >>  requested windowId.
> > > >>>   > > > > > > >>
> > > >>>   > > > > > > >> LieGrue,
> > > >>>   > > > > > > >> strub
> > > >>>   > > > > > > >>
> > > >>>   > > > > > > >>
> > > >>>   > > > > > > >>
> > > >>>   > > > > > > >>
> > > >>>   > > > > > > >> ----- Original Message -----
> > > >>>   > > > > > > >> > From: Stephen More
> > > >>  <st...@gmail.com>
> > > >>>   > > > > > > >> > To: MyFaces Discussion
> > > >>  <us...@myfaces.apache.org>
> > > >>>   > > > > > > >> > Cc:
> > > >>>   > > > > > > >> > Sent: Friday, March 9,
> > > > 2012
> > > >>  1:27 PM
> > > >>>   > > > > > > >> > Subject: Re: MyFaces and
> > > > CODI
> > > >>>   > > > > > > >> >
> > > >>>   > > > > > > >> > Included in the JSF jar is
> > > >>>   > > META-INF/resources/javax.faces/jsf.js
> > > >>>   > > > > > which
> > > >>>   > > > > > > >> > enables its use by
> > > >>  <h:outputScript name="jsf.js"
> > > >>>   > > > > > > >> >
> > > > library="javax.faces"
> > > >>>   > > > > > > >> >
> > > > target="head"/>
> > > >>>   > > > > > > >> >
> > > >>>   > > > > > > >> > Should windowhandler.js be
> > > >
> > > >>  moved from the examples into a
> > > >>>   > core
> > > >>>   > > > > > library
> > > >>>   > > > > > > >> > so that it can be utilized
> > > > the
> > > >>  same way ?
> > > >>>   > > > > > > >> >
> > > >>>   > > > > > > >> >
> > > >>>   > > > > > > >> >
> > > >>>   > > > > > > >> > On Fri, Mar 9, 2012 at
> > > > 7:10 AM,
> > > >>  Gerhard Petracek
> > > >>>   > > > > > > >> >
> > > >>  <ge...@gmail.com> wrote:
> > > >>>   > > > > > > >> >>  hi stephen,
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>  yes - you can add a
> > > > small
> > > >>  js (see e.g. [1]) to support
> > > >>>   > this
> > > >>>   > > > > > > use-case.
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>  regards,
> > > >>>   > > > > > > >> >>  gerhard
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>  [1]
> > > >>  http://s.apache.org/YTq
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>  http://www.irian.at
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>  Your JSF/JavaEE
> > > > powerhouse
> > > >>  -
> > > >>>   > > > > > > >> >>  JavaEE Consulting,
> > > >>  Development and
> > > >>>   > > > > > > >> >>  Courses in English
> > > > and
> > > >>  German
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>  Professional Support
> > > > for
> > > >>  Apache MyFaces
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>  2012/3/9 Stephen More
> > > >
> > > >>  <st...@gmail.com>
> > > >>>   > > > > > > >> >>
> > > >>>   > > > > > > >> >>>  Great. I am
> > > > mainly
> > > >>  interested in WindowScoped i.e.
> > > >>>   every
> > > >>>   > > > > browser
> > > >>>   > > > > > > tab
> > > >>>   > > > > > > >> >>>  has its own
> > > >>  mini-session.
> > > >>>   > > > > > > >> >>>
> > > >>>   > > > > > > >> >>>  I see that CODI
> > > > is
> > > >>  adding a ?windowId=595 to keep these
> > > >>>   > > > > > > conversations
> > > >>>   > > > > > > >> >>>  separate. If a
> > > > user
> > > >>  simply copies the url and pastes
> > > >>>   in a
> > > >>>   > > new
> > > >>>   > > > > tab
> > > >>>   > > > > > > now
> > > >>>   > > > > > > >> >>>  two browser tabs
> > > > are
> > > >>  sharing the same conversation. How
> > > >>>   > > can I
> > > >>>   > > > > > > prevent
> > > >>>   > > > > > > >> >>>  this ? I want to
> > > >>  enforce that EVERY browser tab has its
> > > >>>   > own
> > > >>>   > > > > > > >> >>>  conversation.
> > > > Perhaps
> > > >>  a simple error to the user saying
> > > >>>   > > > > > > >> > "Sorry" or
> > > >>>   > > > > > > >> >>>  start a new
> > > >>  conversation.
> > > >>>   > > > > > > >> >>>
> > > >>>   > > > > > > >> >>>  -Thanks
> > > >>>   > > > > > > >> >>>
> > > >>>   > > > > > > >> >>>  On Fri, Mar 9,
> > > > 2012 at
> > > >>  3:18 AM, Gerhard Petracek
> > > >>>   > > > > > > >> >>>
> > > >>  <ge...@gmail.com> wrote:
> > > >>>   > > > > > > >> >>>  > hi stephen,
> > > >>>   > > > > > > >> >>>  >
> > > >>>   > > > > > > >> >>>  > (that's
> > > > an
> > > >>  issue with the setup of weld and not
> > > >>>   related
> > > >>>   > > to
> > > >>>   > > > > > > >> > myfaces codi.)
> > > >>>   > > > > > > >> >>>  > however,
> > > > myfaces
> > > >>  codi doesn't need this support -> if
> > > >>>   > you
> > > >>>   > > > > > > >> > also don't need
> > > >>>   > > > > > > >> >>>  > cdi support
> > > > for
> > > >>  servlets, filters or listeners, you
> > > >>>   can
> > > >>>   > > run
> > > >>>   > > > > the
> > > >>>   > > > > > > >> >>>  application
> > > >>>   > > > > > > >> >>>  > without
> > > > those
> > > >>  features.
> > > >>>   > > > > > > >> >>>  >
> > > >>>   > > > > > > >> >>>  > regards,
> > > >>>   > > > > > > >> >>>  > gerhard
> > > >>>   > > > > > > >> >>>  >
> > > >>>   > > > > > > >> >>>  >
> > > >>  http://www.irian.at
> > > >>>   > > > > > > >> >>>  >
> > > >>>   > > > > > > >> >>>  > Your
> > > > JSF/JavaEE
> > > >>  powerhouse -
> > > >>>   > > > > > > >> >>>  > JavaEE
> > > >>  Consulting, Development and
> > > >>>   > > > > > > >> >>>  > Courses in
> > > >>  English and German
> > > >>>   > > > > > > >> >>>  >
> > > >>>   > > > > > > >> >>>  > Professional
> > > >
> > > >>  Support for Apache MyFaces
> > > >>>   > > > > > > >> >>>  >
> > > >>>   > > > > > > >> >>>  >
> > > >>>   > > > > > > >> >>>  > 2012/3/9
> > > > Stephen
> > > >>  More <st...@gmail.com>
> > > >>>   > > > > > > >> >>>  >
> > > >>>   > > > > > > >> >>>  >> I too am
> > > >
> > > >>  trying to get a simple example working. I
> > > >>>   > have
> > > >>>   > > > put
> > > >>>   > > > > > > >> > together
> > > >>>   > > > > > > >> >>>  >> this
> > > > project:
> > > >>>   > > > > > > >> >
> > > >>  http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> > > >>>   > > > > > > >> >>>  >>
> > > >>>   > > > > > > >> >>>  >> mvn
> > > >>  jetty:run-war   results in
> > > >>>   > > > > > > >> >>>  >>
> > > >>>   > > > > > > >> >>>  >> SEVERE:
> > > >>  Unable to create JettyWeldInjector. CDI
> > > >>>   > > injection
> > > >>>   > > > > will
> > > >>>   > > > > > > >> > not be
> > > >>>   > > > > > > >> >>>  >>
> > > > available in
> > > >>  Servlets, Filters or Listeners
> > > >>>   > > > > > > >> >>>  >>
> > > >>>   > > > > > > >> >>>  >> What
> > > > else do
> > > >>  I need to get this simple example
> > > >>>   > working ?
> > > >>>   > > > > > > >> >>>  >>
> > > >>>   > > > > > > >> >>>  >> -Thanks
> > > >>>   > > > > > > >> >>>  >>
> > > >>>   > > > > > > >> >>>  >> On Thu,
> > > > Mar
> > > >>  8, 2012 at 11:07 AM, Gerhard Petracek
> > > >>>   > > > > > > >> >>>  >>
> > > >>  <ge...@gmail.com> wrote:
> > > >>>   > > > > > > >> >>>  >> > hi
> > > > jose,
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > > first of
> > > >>  all: welcome @ myfaces!
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > > concrete
> > > >>  questions are very welcome and we will
> > > >>>   > > improve
> > > >>>   > > > > > > >> > the wiki
> > > >>>   > > > > > > >> >>>  based on
> > > >>>   > > > > > > >> >>>  >> >
> > > > them.
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > > regards,
> > > >>>   > > > > > > >> >>>  >> >
> > > > gerhard
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > >>  http://www.irian.at
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > > Your
> > > >>  JSF/JavaEE powerhouse -
> > > >>>   > > > > > > >> >>>  >> >
> > > > JavaEE
> > > >>  Consulting, Development and
> > > >>>   > > > > > > >> >>>  >> >
> > > > Courses
> > > >>  in English and German
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > >>  Professional Support for Apache MyFaces
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >
> > > > 2012/3/8
> > > >>  José Luis Cetina <ma...@gmail.com>
> > > >>>   > > > > > > >> >>>  >> >
> > > >>>   > > > > > > >> >>>  >> >>
> > > > Hi
> > > >>  im so excited to start and use MyFaces and
> > > >>>   CODI
> > > >>>   > > > > > > >> > but i cant get any
> > > >>>   > > > > > > >> >>>  >> >>
> > > >
> > > >>  "good" documentation in fact i only can get
> > > >>>   > > > > > > >> > like 2 or 3 mini tutorial
> > > >>>   > > > > > > >> >>>  >> but
> > > >>>   > > > > > > >> >>>  >> >>
> > > > they
> > > >>  are really incomplete, can somebody
> > > >>>   recommend
> > > >>>   > me
> > > >>>   > > > > > > >> > to some
> > > >>>   > > > > > > >> >>>  tutorial
> > > >>>   > > > > > > >> >>>  >> or
> > > >>>   > > > > > > >> >>>  >> >>
> > > > book
> > > >>  to start with *CODI *y see this is an
> > > >>>   > excellent
> > > >>>   > > > > > > >> > extension, im
> > > >>>   > > > > > > >> >>>  >> moving
> > > >>>   > > > > > > >> >>>  >> >>
> > > > from
> > > >>  mojarra and CDI to MyFaces and MyFaces
> > > >>>   > > > > > > >> > extensions, please where
> > > >>>   > > > > > > >> >>>  i
> > > >>>   > > > > > > >> >>>  >> can
> > > >>>   > > > > > > >> >>>  >> >>
> > > > find
> > > >>  value information
> > > >>>   > > > > > > >> >>>  >> >>
> > > >>>   > > > > > > >> >>>  >> >>
> > > > The
> > > >>  only URL where i found a little info is this:
> > > >>>   > > > > > > >> >>>  >> >>
> > > >>>   > > > > > > >> >
> > > >>  https://cwiki.apache.org/confluence/display/EXTCDI/Index
> > > >>>   > > > > > > >> >>>  >> >>
> > > >>>   > > > > > > >> >>>  >> >>
> > > > --
> > > >>>   > > > > > > >> >>>  >> >>
> > > >>>   > > > > > > >> >
> > > >>>   > > > >
> > > >>  -------------------------------------------------------------------
> > > >>>   > > > > > > >> >>>  >> >>
> > > >
> > > >>  *SCJA. José Luis Cetina*
> > > >>>   > > > > > > >> >>>  >> >>
> > > >>>   > > > > > > >> >
> > > >>>   > > > >
> > > >>  -------------------------------------------------------------------
> > > >>>   > > > > > > >> >>>  >> >>
> > > >>>   > > > > > > >> >>>  >>
> > > >>>   > > > > > > >> >>>
> > > >>>   > > > > > > >> >
> > > >>>   > > > > > > >>
> > > >>>   > > > > > >
> > > >>>   > > > > >
> > > >>>   > > > >
> > > >>>   > > > >
> > > >>>   > > >
> > > >>>   > >
> > > >>>   >
> > > >>>
> > > >>>
> > > >>
> > > >
> > >
> >
> >
>
>

Re: MyFaces and CODI

Posted by Rafael Pestano <rm...@yahoo.com.br>.
hi gerhard,

tried that but got the same error,

the generated war can be found here: http://bit.ly/xvbtu7 

Mark, thanks for the reply, ill try that.


 
Att, 
Rafael M. Pestano
Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
Graduando em Ciência da Computação UFRGS
@realpestano
http://code.google.com/p/jsf-conventions-framework/



----- Mensagem original -----
De: Gerhard Petracek <ge...@gmail.com>
Para: MyFaces Discussion <us...@myfaces.apache.org>
Cc: 
Enviadas: Domingo, 18 de Março de 2012 17:32
Assunto: Re: MyFaces and CODI

hi rafael,

for a wls 11g deployment you have to follow [1].

regards,
gerhard

[1] https://cwiki.apache.org/confluence/display/EXTCDI/JavaEE5+Support

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/18 Rafael Pestano <rm...@yahoo.com.br>

> Hi guys,
>
>
> I think that what Mark stated can be happening in the environment at my
> company(weblogic 11g, mojarra 1.2, owb and CODI) cause a simple forward is
> also causing the bean to be instantiated(tested with ViewAccess and
> WindowScoped),
>
> How can i ensure that the whole Context is being initialized?
>
>
>
> About the server side solution Gerhard proposed i can confirm it is
> working here at home, the main problem is something with the"constalation"
> that the application at my company is using, maybe the frame based layout,
> jspx extension or something else.
>
> i also tried to deploy Gerhard example here in weblogic here at home
> without success, the CDI container cannot start.
>
> i just changed from myfaces to mojarra, instaled the example via maven and
> deployed the war in weblogic 11g(10.3.2), to try simulate the enviroment at
> my company, here is the error:
>
>
> INFO: Initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS)
> for context '/playground-jsf12-1.0.4'
> 18/03/2012 17:10:46
> org.apache.myfaces.extensions.cdi.core.api.provider.ServiceProvider <clinit>
> INFO:
> org.apache.myfaces.extensions.cdi.core.impl.provider.DefaultServiceProvider
> installed successfully.
> 18/03/2012 17:10:46
> org.apache.myfaces.extensions.cdi.core.api.provider.ServiceProvider <clinit>
> INFO:
> org.apache.myfaces.extensions.cdi.core.impl.provider.DefaultServiceProviderContext
> installed successfully.
> java.lang.IllegalStateException: no
> org.apache.myfaces.extensions.cdi.core.api.provider.BeanManagerProvider in
> place! Please ensur
> e that you configured the CDI implementation of your choice properly. If
> your setup is correct, please clear all caches and compil
> ed artifacts. If there is still a problem, try one of the controlled
> bootstrapping add-ons for the CDI implementation you are usin
> g.
>         at
> org.apache.myfaces.extensions.cdi.core.api.provider.BeanManagerProvider.getInstance(BeanManagerProvider.java:81)
>         at
> org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils.getContextualReferenceByClass(CodiUtils.java:124)
>         at
> org.apache.myfaces.extensions.cdi.jsf.impl.listener.phase.PhaseListenerExtension.consumePhaseListeners(PhaseListenerExt
> ension.java:110)
>         at
> org.apache.myfaces.extensions.cdi.jsf.impl.listener.phase.CodiLifecycleFactoryWrapper.getLifecycle(CodiLifecycleFactory
> Wrapper.java:65)
>         at
> com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:1115)
>         at
> com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:766)
>         at
> com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:529)
>         at
> com.sun.faces.config.GlassFishConfigureListener.contextInitialized(GlassFishConfigureListener.java:47)
>         at
> weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
>         at
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
>         at
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
>         at
> weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
>         at
> weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1801)
>         at
> weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3045)
>         at
> weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1397)
>         at
> weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
>         at
> weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
>         at
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
>         at
> weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
>         at
> weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
>         at
> weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
>         at
> weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
>         at
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
>         at
> weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
>         at
> weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
>         at
> weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
>         at
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
>         at
> weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
>         at
> weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:39)
>         at
> weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
>         at
> weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
>         at
> weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
>         at
> weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
>         at
> weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
>         at
> weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
>         at
> weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
>         at
> weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
>         at
> weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
>         at
> weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
>         at
> weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCa
> llbackDeliverer.java:181)
>         at
> weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallback
> Deliverer.java:12)
>         at
> weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliv
> erer.java:67)
>         at
> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
>         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
>         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
> 18/03/2012 17:10:47 com.sun.faces.config.ConfigureListener
> contextInitialized
>
> thanks for your time.
>
>
> Att,
> Rafael M. Pestano
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ----- Mensagem original -----
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Cc:
> Enviadas: Domingo, 18 de Março de 2012 16:47
> Assunto: Re: MyFaces and CODI
>
> hi mark,
>
> since rafael mentioned that it works without a4j and there is no issue with
> a4j in the demo, i don't think that it is such a basic issue.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/18 Mark Struberg <st...@yahoo.de>
>
> >
> >
> > Gerhard pinged me that you are using @ViewAccessScoped. In that case I'd
> > recomment to debug if the whole Context Extension gets properly
> registrated.
> >
> > If the CDI container doesn't know the @ViewAccessScoped annotation then
> > all your beans will end up as @Dependent...
> >
> > LieGrue,
> > strub
> >
> >
> > ----- Original Message -----
> > > From: Mark Struberg <st...@yahoo.de>
> > > To: MyFaces Discussion <us...@myfaces.apache.org>
> > > Cc:
> > > Sent: Sunday, March 18, 2012 7:42 PM
> > > Subject: Re: MyFaces and CODI
> > >
> > >>  when i find out what's causing my bean to be instantiated on every
> ajax
> > > call
> > >>  i'll come back here to report.
> > >
> > > That sounds familiar - good luck ;)
> > >
> > > Which scope does your bean have? You are sure that you are really using
> > CDI
> > > javax.enterprise.context.* scopes and not javax.faces.bean.* scopes due
> > to a
> > > wrong auto-import  of your IDE?
> > >
> > > LieGrue,
> > > strub
> > >
> > >
> > >
> > > ----- Original Message -----
> > >>  From: Rafael Pestano <rm...@yahoo.com.br>
> > >>  To: MyFaces Discussion <us...@myfaces.apache.org>
> > >>  Cc:
> > >>  Sent: Saturday, March 17, 2012 4:34 PM
> > >>  Subject: Re: MyFaces and CODI
> > >>
> > >>  yeap, i also deployed the server side demo in tomcat and it works as
> > > expected,
> > >>  when i find out what's causing my bean to be instantiated on every
> ajax
> > > call
> > >>  i'll come back here to report.
> > >>
> > >>  many thanks for the assistance.
> > >>
> > >>  Att,
> > >>
> > >>  Rafael M. Pestano
> > >>
> > >>  Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> Sul
> > >>  Graduando em Ciência da Computação UFRGS
> > >>  @realpestano
> > >>  http://code.google.com/p/jsf-conventions-framework/
> > >>
> > >>
> > >>
> > >>  ________________________________
> > >>  De: Gerhard Petracek <ge...@gmail.com>
> > >>  Para: MyFaces Discussion <us...@myfaces.apache.org>
> > >>  Enviadas: Sexta-feira, 16 de Março de 2012 22:46
> > >>  Assunto: Re: MyFaces and CODI
> > >>
> > >>  hi rafael,
> > >>
> > >>  i can't reproduce it. i added richfaces to the previous demo as well
> as
> > > a4j
> > >>  support to the input component and everything works as expected.
> > >>
> > >>  regards,
> > >>  gerhard
> > >>
> > >>  http://www.irian.at
> > >>
> > >>  Your JSF/JavaEE powerhouse -
> > >>  JavaEE Consulting, Development and
> > >>  Courses in English and German
> > >>
> > >>  Professional Support for Apache MyFaces
> > >>
> > >>
> > >>
> > >>  2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > >>
> > >>>   Hi Gehard,
> > >>>
> > >>>   i didnt got the ideia, do you have any example or a link showing
> this
> > >>>   approach?
> > >>>
> > >>>   what i have got til now is:
> > >>>   1 - WindowContextIdHolderComponent is a jsf component which is
> added
> > >>>   dynamically to the view
> > >>>   2 - this component holds the windowId
> > >>>   3 - i have,somehow , to keep the windowId the same between requests
> > so
> > > my
> > >>>   ViewAccessScoped bean  is "keeped alive" <- here is where
> > > im
> > >>  stuck
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>   Att,
> > >>>   Rafael M. Pestano
> > >>>   Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> > Sul
> > >>>   Graduando em Ciência da Computação UFRGS
> > >>>   @realpestano
> > >>>  http://code.google.com/p/jsf-conventions-framework/
> > >>>
> > >>>
> > >>>
> > >>>   ----- Mensagem original -----
> > >>>   De: Gerhard Petracek <ge...@gmail.com>
> > >>>   Para: MyFaces Discussion <us...@myfaces.apache.org>
> > >>>   Cc:
> > >>>   Enviadas: Quinta-feira, 15 de Março de 2012 11:28
> > >>>   Assunto: Re: MyFaces and CODI
> > >>>
> > >>>   hi rafael,
> > >>>
> > >>>   @ WindowContextIdHolderComponent:
> > >>>
> > >>>   that's the name of the class. you have to resolve the component
> > > (by
> > >>  type)
> > >>>   before the view gets rendered and add it to the ajax enabled a4j
> > > components
> > >>>   via the corresponding java-api.
> > >>>
> > >>>   @ custom approach:
> > >>>   independent of the concrete approach you would like to use, you
> just
> > > have
> > >>>   to ensure that the information is available on the server-side (for
> > > every
> > >>>   jsf request which starts the jsf request-lifecycle).
> > >>>
> > >>>   regards,
> > >>>   gerhard
> > >>>
> > >>>   Your JSF/JavaEE powerhouse -
> > >>>   JavaEE Consulting, Development and
> > >>>   Courses in English and German
> > >>>
> > >>>   Professional Support for Apache MyFaces
> > >>>
> > >>>
> > >>>   2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > >>>
> > >>>   > Hi again,
> > >>>   >
> > >>>   > "it will work with a4j as soon as you
> > >>>   > ensure that it gets restored for requests triggered by a4j "
> > > you
> > >>  mean i
> > >>>   > should send WindowContextIdHolderComponent  within the ajax
> > > request?
> > >>>   >
> > >>>   > somethink like <a4j:support
> > >>  process="WindowContextIdHolderComponent"/> ?
> > >>>   >
> > >>>   > if so whats the id of the generated component?
> > >>>   >
> > >>>   > i also have another question, in the javadoc
> > >>>   > of WindowContextConfig isUrlParameterSuported() says
> > >>>   >
> > >>>   > "Specifies if it is allowed to use URL params for forwarding
> > > the
> > >>  current
> > >>>   > window-id. (deactivate it e.g. for higher security - in this case
> > >
> > >>  it's
> > >>>   > required to use a window id provided by a component lib or a
> > >>  server-side
> > >>>   > window-handler"
> > >>>   >
> > >>>   > how can i create a component to handle the window id? can i do
> > > that
> > >>  with
> > >>>   > an h:inputHidden for example?
> > >>>   >
> > >>>   > thanks for the help.
> > >>>   >
> > >>>   >
> > >>>   >
> > >>>   > Att,
> > >>>   >
> > >>>   > Rafael M. Pestano
> > >>>   >
> > >>>   > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande
> > > do Sul
> > >>>   > Graduando em Ciência da Computação UFRGS
> > >>>   > @realpestano
> > >>>   > http://code.google.com/p/jsf-conventions-framework/
> > >>>   >
> > >>>   >
> > >>>   >
> > >>>   > ________________________________
> > >>>   > De: Gerhard Petracek <ge...@gmail.com>
> > >>>   > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > >>>   > Enviadas: Quinta-feira, 15 de Março de 2012 10:37
> > >>>   > Assunto: Re: MyFaces and CODI
> > >>>   >
> > >>>   > hi rafael,
> > >>>   >
> > >>>   > the fallback adds a component (WindowContextIdHolderComponent)
> > >>>   dynamically
> > >>>   > (as a direct child of UiViewRoot) -> it will work with a4j as
> > > soon
> > >>  as you
> > >>>   > ensure that it gets restored for requests triggered by a4j.
> > >>>   >
> > >>>   > regards,
> > >>>   > gerhard
> > >>>   >
> > >>>   > http://www.irian.at
> > >>>   >
> > >>>   > Your JSF/JavaEE powerhouse -
> > >>>   > JavaEE Consulting, Development and
> > >>>   > Courses in English and German
> > >>>   >
> > >>>   > Professional Support for Apache MyFaces
> > >>>   >
> > >>>   >
> > >>>   > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > >>>   >
> > >>>   > > well its not 100% yet ;(...on every ajaxCall my
> > > ViewAccessScoped
> > >>  bean
> > >>>   is
> > >>>   > > being instantiated,
> > >>>   > >
> > >>>   > > im using a4j, there is any known issue with it?
> > >>>   > >
> > >>>   > > for example <h:selectOneMenu .....>
> > >>>   > >                         <a4j:support
> > >>  event="onchange" ....action="when
> > >>>   > the
> > >>>   > > action is called the bean constructor gets called"/>
> > >>>   > >                     </h:selectOneMenu>
> > >>>   > >
> > >>>   > > if i change from View to RequestScoped the bahavior is the
> > > same,
> > >>  any
> > >>>   > ideas?
> > >>>   > >
> > >>>   > >
> > >>>   > > thanks in advance.
> > >>>   > >
> > >>>   > >
> > >>>   > > Att,
> > >>>   > >
> > >>>   > > Rafael M. Pestano
> > >>>   > >
> > >>>   > > Desenvolvedor Java Cia. de Processamento de Dados do Rio
> > > Grande
> > >>  do Sul
> > >>>   > > Graduando em Ciência da Computação UFRGS
> > >>>   > > @realpestano
> > >>>   > > http://code.google.com/p/jsf-conventions-framework/
> > >>>   > >
> > >>>   > >
> > >>>   > >
> > >>>   > > ________________________________
> > >>>   > >  De: Rafael Pestano <rm...@yahoo.com.br>
> > >>>   > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > >>>   > > Enviadas: Quinta-feira, 15 de Março de 2012 8:45
> > >>>   > > Assunto: Re: MyFaces and CODI
> > >>>   > >
> > >>>   > > "if you don't need redirects, you could have a look
> > > at
> > >>  e.g. [1] which
> > >>>   > uses
> > >>>   > > an internal fallback." yea, its our case and it just
> > > works!
> > >>>   > >
> > >>>   > > many thanks for your help, keep the great work!
> > >>>   > >
> > >>>   > > Att,
> > >>>   > >
> > >>>   > > Rafael M. Pestano
> > >>>   > >
> > >>>   > > Desenvolvedor Java Cia. de Processamento de Dados do Rio
> > > Grande
> > >>  do Sul
> > >>>   > > Graduando em Ciência da Computação UFRGS
> > >>>   > > @realpestano
> > >>>   > > http://code.google.com/p/jsf-conventions-framework/
> > >>>   > >
> > >>>   > >
> > >>>   > >
> > >>>   > > ________________________________
> > >>>   > > De: Gerhard Petracek <ge...@gmail.com>
> > >>>   > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > >>>   > > Enviadas: Quarta-feira, 14 de Março de 2012 23:19
> > >>>   > > Assunto: Re: MyFaces and CODI
> > >>>   > >
> > >>>   > > hi rafael,
> > >>>   > >
> > >>>   > > as you have seen it's easy to provide a custom
> > > WindowHandler
> > >>  (just
> > >>>   > > implement the interface and provide your implementation as
> > >>  alternative
> > >>>   > cdi
> > >>>   > > bean)
> > >>>   > > -> you can integrate every custom approach which is
> > > enough to
> > >>  solve you
> > >>>   > > requirements.
> > >>>   > >
> > >>>   > > if you don't need redirects, you could have a look at
> > > e.g.
> > >>  [1] which
> > >>>   uses
> > >>>   > > an internal fallback.
> > >>>   > >
> > >>>   > > regards,
> > >>>   > > gerhard
> > >>>   > >
> > >>>   > > [1] http://s.apache.org/SAs
> > >>>   > >
> > >>>   > > http://www.irian.at
> > >>>   > >
> > >>>   > > Your JSF/JavaEE powerhouse -
> > >>>   > > JavaEE Consulting, Development and
> > >>>   > > Courses in English and German
> > >>>   > >
> > >>>   > > Professional Support for Apache MyFaces
> > >>>   > >
> > >>>   > >
> > >>>   > >
> > >>>   > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > >>>   > >
> > >>>   > > > Hi Gehard,
> > >>>   > > >
> > >>>   > > > its a stopper to us cause we are still dependent on JSF
> > > 1.2
> > >>>   > > > Can i implement an alternative
> > >>>   > > > to
> > >>>   > >
> > >>>   >
> > >>>
> > >>
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > >>>   > > > based on JSF 1.2?
> > >>>   > > >
> > >>>   > > > i see you use flash scope to span the windowId through
> > >>  requests in
> > >>>   the
> > >>>   > > > server side solution:
> > >>>   > > >
> > >>>   > > > if (windowId != null)
> > >>>   > > > 79         {
> > >>>   > > >
> > >>>   > > > 80
> > >>>   > >
> > >>  externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY,
> > >>>   > > windowId);
> > >>>   > > >
> > >>>   > > > 81
> > >>>   > >
> > > externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
> > >>>   > > > 82         }
> > >>>   > > >
> > >>>   > > > if i put the windownId in the sessionMap it would still
> > >
> > >>  work? i think
> > >>>   > ill
> > >>>   > > > find hard time trying to remove the windowId from the
> > > map
> > >>  when user
> > >>>   > leave
> > >>>   > > > the page.
> > >>>   > > >
> > >>>   > > >
> > >>>   > > >
> > >>>   > > > thanks for your help i really appreciated it.
> > >>>   > > >
> > >>>   > > > Att,
> > >>>   > > > Rafael M. Pestano
> > >>>   > > > Desenvolvedor Java Cia. de Processamento de Dados do
> > > Rio
> > >>  Grande do
> > >>>   Sul
> > >>>   > > > Graduando em Ciência da Computação UFRGS
> > >>>   > > > @realpestano
> > >>>   > > > http://code.google.com/p/jsf-conventions-framework/
> > >>>   > > >
> > >>>   > > >
> > >>>   > > >
> > >>>   > > > ----- Mensagem original -----
> > >>>   > > > De: Gerhard Petracek <ge...@gmail.com>
> > >>>   > > > Para: MyFaces Discussion
> > > <us...@myfaces.apache.org>
> > >>>   > > > Cc:
> > >>>   > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:55
> > >>>   > > > Assunto: Re: MyFaces and CODI
> > >>>   > > >
> > >>>   > > > hi rafael,
> > >>>   > > >
> > >>>   > > > internally the ServerSideWindowHandler is based on the
> > > flash
> > >>  scope
> > >>>   > > (that's
> > >>>   > > > one of the mentioned disadvantages)
> > >>>   > > > -> it's bound to jsf 2+ -> it is:
> > >>>   > > >
> > >>>   > > >
> > >>>   > >
> > >>>   >
> > >>>
> > >>
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > >>>   > > > (and you can't use the additional js.)
> > >>>   > > >
> > >>>   > > > with some constellations you just hit the restrictions
> > > of
> > >>  browsers ->
> > >>>   > you
> > >>>   > > > have to choose what you really need.
> > >>>   > > >
> > >>>   > > > regards,
> > >>>   > > > gerhard
> > >>>   > > >
> > >>>   > > > http://www.irian.at
> > >>>   > > >
> > >>>   > > > Your JSF/JavaEE powerhouse -
> > >>>   > > > JavaEE Consulting, Development and
> > >>>   > > > Courses in English and German
> > >>>   > > >
> > >>>   > > > Professional Support for Apache MyFaces
> > >>>   > > >
> > >>>   > > >
> > >>>   > > >
> > >>>   > > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > >>>   > > >
> > >>>   > > > > i see, i have used the client side one
> > >>>   > > > >
> > >>>   > > > > <alternatives>
> > >>>   > > > >
> > >>>   > > >
> > >>>   > >
> > >>>   >
> > >>>
> > >>
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
> > >>>   > > > > </alternatives>
> > >>>   > > > >
> > >>>   > > > > i imagine the server side should be
> > >>>   > > > >
> > >>>   > > > > <alternatives>
> > >>>   > > > >
> > >>>   > > >
> > >>>   > >
> > >>>   >
> > >>>
> > >>
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
> > >>>   > > > > </alternatives>alright?
> > >>>   > > > >
> > >>>   > > > > i will test it tomorrow and give the feedback,
> > > thanks.
> > >>>   > > > >
> > >>>   > > > > Att,
> > >>>   > > > > Rafael M. Pestano
> > >>>   > > > > Desenvolvedor Java Cia. de Processamento de Dados
> > > do
> > >>  Rio Grande do
> > >>>   > Sul
> > >>>   > > > > Graduando em Ciência da Computação UFRGS
> > >>>   > > > > @realpestano
> > >>>   > > > >
> > > http://code.google.com/p/jsf-conventions-framework/
> > >>>   > > > >
> > >>>   > > > >
> > >>>   > > > >
> > >>>   > > > > ----- Mensagem original -----
> > >>>   > > > > De: Gerhard Petracek
> > > <ge...@gmail.com>
> > >>>   > > > > Para: MyFaces Discussion
> > >>  <us...@myfaces.apache.org>
> > >>>   > > > > Cc:
> > >>>   > > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:11
> > >>>   > > > > Assunto: Re: MyFaces and CODI
> > >>>   > > > >
> > >>>   > > > > hi rafael,
> > >>>   > > > >
> > >>>   > > > > the easiest approach to test an alternative for
> > > this
> > >>  constellation
> > >>>   is
> > >>>   > > the
> > >>>   > > > > activation of the ServerSideWindowHandler
> > > (it's a
> > >>  std. cdi
> > >>>   > @Alternative
> > >>>   > > > > implementation -> you can activate it in the
> > >>  beans.xml file of your
> > >>>   > > > > application).
> > >>>   > > > > (however, please be aware that this alternative
> > >>  implementation has
> > >>>   > some
> > >>>   > > > > disadvantages.)
> > >>>   > > > >
> > >>>   > > > > regards,
> > >>>   > > > > gerhard
> > >>>   > > > >
> > >>>   > > > > http://www.irian.at
> > >>>   > > > >
> > >>>   > > > > Your JSF/JavaEE powerhouse -
> > >>>   > > > > JavaEE Consulting, Development and
> > >>>   > > > > Courses in English and German
> > >>>   > > > >
> > >>>   > > > > Professional Support for Apache MyFaces
> > >>>   > > > >
> > >>>   > > > >
> > >>>   > > > >
> > >>>   > > > > 2012/3/14 Rafael Pestano
> > > <rm...@yahoo.com.br>
> > >>>   > > > >
> > >>>   > > > > > Hi Gerhard, i successfuly added codi and
> > >>  openwebbeans to an
> > >>>   > > application
> > >>>   > > > > > running on weblogic 11g
> > >>>   > > > > >
> > >>>   > > > > > however its a  legacy application which uses
> > >>  frames, basicaly we
> > >>>   > > have a
> > >>>   > > > > > menu on the left frame that targets the
> > > center
> > >>  frame, something
> > >>>   > like:
> > >>>   > > > > >
> > >>>   > > > > > <h:commandLink value="menuLink"
> > >>  action="#{myBean.init}"
> > >>>   > > > target="frmDados"
> > >>>   > > > > > />
> > >>>   > > > > >
> > >>>   > > > > >
> > >>>   > > > > > the problem is, when a add CODI to the
> > > application
> > >>  and mark
> > >>>   myBean
> > >>>   > as
> > >>>   > > > > > ViewAccessScoped (and thus the windowId
> > > starts to
> > >>  be append to
> > >>>   the
> > >>>   > > url)
> > >>>   > > > > > the above menuLink always open the center
> > > frame in
> > >>  a new browser
> > >>>   > tab.
> > >>>   > > > > >
> > >>>   > > > > > If i remove CODI and set myBean as
> > >>  RequestScoped(or any other CDI
> > >>>   > > > Scope)
> > >>>   > > > > > the application behaves  as expected.
> > >>>   > > > > >
> > >>>   > > > > > So i think the windowId generated by CODI  is
> > >
> > >>  causing this
> > >>>   issue, i
> > >>>   > > > tried
> > >>>   > > > > > your solution without success, the windowId
> > > isnt
> > >>  removed from the
> > >>>   > url
> > >>>   > > > > and a
> > >>>   > > > > > new tab opens when i click in the menuLink.
> > >>>   > > > > >
> > >>>   > > > > > Any thoughs?
> > >>>   > > > > >
> > >>>   > > > > >
> > >>>   > > > > > thanks for all your help.
> > >>>   > > > > >
> > >>>   > > > > >
> > >>>   > > > > >
> > >>>   > > > > > Att,
> > >>>   > > > > >
> > >>>   > > > > > Rafael M. Pestano
> > >>>   > > > > >
> > >>>   > > > > > Desenvolvedor Java Cia. de Processamento de
> > > Dados
> > >>  do Rio Grande
> > >>>   do
> > >>>   > > Sul
> > >>>   > > > > > Graduando em Ciência da Computação UFRGS
> > >>>   > > > > > @realpestano
> > >>>   > > > > >
> > >>  http://code.google.com/p/jsf-conventions-framework/
> > >>>   > > > > >
> > >>>   > > > > >
> > >>>   > > > > >
> > >>>   > > > > > ________________________________
> > >>>   > > > > > De: Gerhard Petracek
> > >>  <ge...@gmail.com>
> > >>>   > > > > > Para: MyFaces Discussion
> > >>  <us...@myfaces.apache.org>
> > >>>   > > > > > Enviadas: Sexta-feira, 9 de Março de 2012
> > > 12:38
> > >>>   > > > > > Assunto: Re: MyFaces and CODI
> > >>>   > > > > >
> > >>>   > > > > > hi stephen,
> > >>>   > > > > >
> > >>>   > > > > > that's right [1] doesn't support it.
> > >>>   > > > > > werner committed his improvement and you can
> > > try
> > >>  [2] and [3] as
> > >>>   you
> > >>>   > > see
> > >>>   > > > > > them right now.
> > >>>   > > > > >
> > >>>   > > > > > regards,
> > >>>   > > > > > gerhard
> > >>>   > > > > >
> > >>>   > > > > > [1]
> > >>>   > > > >
> > >>>   >
> > > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > >>>   > > > > > [2] http://s.apache.org/rr
> > >>>   > > > > > [3] http://s.apache.org/23p
> > >>>   > > > > >
> > >>>   > > > > > http://www.irian.at
> > >>>   > > > > >
> > >>>   > > > > > Your JSF/JavaEE powerhouse -
> > >>>   > > > > > JavaEE Consulting, Development and
> > >>>   > > > > > Courses in English and German
> > >>>   > > > > >
> > >>>   > > > > > Professional Support for Apache MyFaces
> > >>>   > > > > >
> > >>>   > > > > >
> > >>>   > > > > >
> > >>>   > > > > > 2012/3/9 Stephen More
> > >>  <st...@gmail.com>
> > >>>   > > > > >
> > >>>   > > > > > > I was referring to [1]
> > >>>   > > > > > >
> > >>>   > > >
> > >>>
> > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > >>>   > > > > > >
> > >>>   > > > > > > I guess I just need to wait until the
> > > correct
> > >>  way is tested and
> > >>>   > > > > > > documented in the wiki using:
> > >>>   > > > > > >   [1] http://s.apache.org/rr
> > >>>   > > > > > >  [2] http://s.apache.org/23p
> > >>>   > > > > > >
> > >>>   > > > > > >
> > >>>   > > > > > >
> > >>>   > > > > > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard
> > >>  Petracek
> > >>>   > > > > > > <ge...@gmail.com>
> > > wrote:
> > >>>   > > > > > > > @ mark:
> > >>>   > > > > > > > i just tested it and it works with
> > > [1]
> > >>  in combination
> > >>>   > > > > > > > with ClientSideWindowHandler [2].
> > >>>   > > > > > > >
> > >>>   > > > > > > > regards,
> > >>>   > > > > > > > gerhard
> > >>>   > > > > > > >
> > >>>   > > > > > > > [1] http://s.apache.org/rr
> > >>>   > > > > > > > [2] http://s.apache.org/23p
> > >>>   > > > > > > >
> > >>>   > > > > > > > http://www.irian.at
> > >>>   > > > > > > >
> > >>>   > > > > > > > Your JSF/JavaEE powerhouse -
> > >>>   > > > > > > > JavaEE Consulting, Development and
> > >>>   > > > > > > > Courses in English and German
> > >>>   > > > > > > >
> > >>>   > > > > > > > Professional Support for Apache
> > > MyFaces
> > >>>   > > > > > > >
> > >>>   > > > > > > >
> > >>>   > > > > > > >
> > >>>   > > > > > > > 2012/3/9 Mark Struberg
> > >>  <st...@yahoo.de>
> > >>>   > > > > > > >
> > >>>   > > > > > > >> Hi Stephen!
> > >>>   > > > > > > >>
> > >>>   > > > > > > >> Well, the current approach in
> > > CODI
> > >>  is currently under
> > >>>   > discussion
> > >>>   > > > in
> > >>>   > > > > > the
> > >>>   > > > > > > >> JSF EG. The whole windowId
> > > stuff of
> > >>  CODI might end up in the
> > >>>   > > > JSF-2.2
> > >>>   > > > > > or
> > >>>   > > > > > > 2.3
> > >>>   > > > > > > >> spec.
> > >>>   > > > > > > >>
> > >>>   > > > > > > >> >T hat seems to work fine
> > > when
> > >>  pasting into a new empty
> > >>>   > window,
> > >>>   > > > but
> > >>>   > > > > it
> > >>>   > > > > > > >> > still allows you to
> > > copy-paste
> > >>  the url from one codi
> > >>>   window
> > >>>   > to
> > >>>   > > > an
> > >>>   > > > > > > >> > existing codi window.
> > >>>   > > > > > > >>
> > >>>   > > > > > > >> Nope, because the
> > > windowhandler.js
> > >>  script will first check
> > >>>   the
> > >>>   > > > > > > window.name.
> > >>>   > > > > > > >> And if this is
> > > empty/doesn't fit
> > >>  the windowId in the URL,
> > >>>   then
> > >>>   > > it
> > >>>   > > > > will
> > >>>   > > > > > > >> reload the page with a freshly
> > >>  requested windowId.
> > >>>   > > > > > > >>
> > >>>   > > > > > > >> LieGrue,
> > >>>   > > > > > > >> strub
> > >>>   > > > > > > >>
> > >>>   > > > > > > >>
> > >>>   > > > > > > >>
> > >>>   > > > > > > >>
> > >>>   > > > > > > >> ----- Original Message -----
> > >>>   > > > > > > >> > From: Stephen More
> > >>  <st...@gmail.com>
> > >>>   > > > > > > >> > To: MyFaces Discussion
> > >>  <us...@myfaces.apache.org>
> > >>>   > > > > > > >> > Cc:
> > >>>   > > > > > > >> > Sent: Friday, March 9,
> > > 2012
> > >>  1:27 PM
> > >>>   > > > > > > >> > Subject: Re: MyFaces and
> > > CODI
> > >>>   > > > > > > >> >
> > >>>   > > > > > > >> > Included in the JSF jar is
> > >>>   > > META-INF/resources/javax.faces/jsf.js
> > >>>   > > > > > which
> > >>>   > > > > > > >> > enables its use by
> > >>  <h:outputScript name="jsf.js"
> > >>>   > > > > > > >> >
> > > library="javax.faces"
> > >>>   > > > > > > >> >
> > > target="head"/>
> > >>>   > > > > > > >> >
> > >>>   > > > > > > >> > Should windowhandler.js be
> > >
> > >>  moved from the examples into a
> > >>>   > core
> > >>>   > > > > > library
> > >>>   > > > > > > >> > so that it can be utilized
> > > the
> > >>  same way ?
> > >>>   > > > > > > >> >
> > >>>   > > > > > > >> >
> > >>>   > > > > > > >> >
> > >>>   > > > > > > >> > On Fri, Mar 9, 2012 at
> > > 7:10 AM,
> > >>  Gerhard Petracek
> > >>>   > > > > > > >> >
> > >>  <ge...@gmail.com> wrote:
> > >>>   > > > > > > >> >>  hi stephen,
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>  yes - you can add a
> > > small
> > >>  js (see e.g. [1]) to support
> > >>>   > this
> > >>>   > > > > > > use-case.
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>  regards,
> > >>>   > > > > > > >> >>  gerhard
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>  [1]
> > >>  http://s.apache.org/YTq
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>  http://www.irian.at
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>  Your JSF/JavaEE
> > > powerhouse
> > >>  -
> > >>>   > > > > > > >> >>  JavaEE Consulting,
> > >>  Development and
> > >>>   > > > > > > >> >>  Courses in English
> > > and
> > >>  German
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>  Professional Support
> > > for
> > >>  Apache MyFaces
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>  2012/3/9 Stephen More
> > >
> > >>  <st...@gmail.com>
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>>  Great. I am
> > > mainly
> > >>  interested in WindowScoped i.e.
> > >>>   every
> > >>>   > > > > browser
> > >>>   > > > > > > tab
> > >>>   > > > > > > >> >>>  has its own
> > >>  mini-session.
> > >>>   > > > > > > >> >>>
> > >>>   > > > > > > >> >>>  I see that CODI
> > > is
> > >>  adding a ?windowId=595 to keep these
> > >>>   > > > > > > conversations
> > >>>   > > > > > > >> >>>  separate. If a
> > > user
> > >>  simply copies the url and pastes
> > >>>   in a
> > >>>   > > new
> > >>>   > > > > tab
> > >>>   > > > > > > now
> > >>>   > > > > > > >> >>>  two browser tabs
> > > are
> > >>  sharing the same conversation. How
> > >>>   > > can I
> > >>>   > > > > > > prevent
> > >>>   > > > > > > >> >>>  this ? I want to
> > >>  enforce that EVERY browser tab has its
> > >>>   > own
> > >>>   > > > > > > >> >>>  conversation.
> > > Perhaps
> > >>  a simple error to the user saying
> > >>>   > > > > > > >> > "Sorry" or
> > >>>   > > > > > > >> >>>  start a new
> > >>  conversation.
> > >>>   > > > > > > >> >>>
> > >>>   > > > > > > >> >>>  -Thanks
> > >>>   > > > > > > >> >>>
> > >>>   > > > > > > >> >>>  On Fri, Mar 9,
> > > 2012 at
> > >>  3:18 AM, Gerhard Petracek
> > >>>   > > > > > > >> >>>
> > >>  <ge...@gmail.com> wrote:
> > >>>   > > > > > > >> >>>  > hi stephen,
> > >>>   > > > > > > >> >>>  >
> > >>>   > > > > > > >> >>>  > (that's
> > > an
> > >>  issue with the setup of weld and not
> > >>>   related
> > >>>   > > to
> > >>>   > > > > > > >> > myfaces codi.)
> > >>>   > > > > > > >> >>>  > however,
> > > myfaces
> > >>  codi doesn't need this support -> if
> > >>>   > you
> > >>>   > > > > > > >> > also don't need
> > >>>   > > > > > > >> >>>  > cdi support
> > > for
> > >>  servlets, filters or listeners, you
> > >>>   can
> > >>>   > > run
> > >>>   > > > > the
> > >>>   > > > > > > >> >>>  application
> > >>>   > > > > > > >> >>>  > without
> > > those
> > >>  features.
> > >>>   > > > > > > >> >>>  >
> > >>>   > > > > > > >> >>>  > regards,
> > >>>   > > > > > > >> >>>  > gerhard
> > >>>   > > > > > > >> >>>  >
> > >>>   > > > > > > >> >>>  >
> > >>  http://www.irian.at
> > >>>   > > > > > > >> >>>  >
> > >>>   > > > > > > >> >>>  > Your
> > > JSF/JavaEE
> > >>  powerhouse -
> > >>>   > > > > > > >> >>>  > JavaEE
> > >>  Consulting, Development and
> > >>>   > > > > > > >> >>>  > Courses in
> > >>  English and German
> > >>>   > > > > > > >> >>>  >
> > >>>   > > > > > > >> >>>  > Professional
> > >
> > >>  Support for Apache MyFaces
> > >>>   > > > > > > >> >>>  >
> > >>>   > > > > > > >> >>>  >
> > >>>   > > > > > > >> >>>  > 2012/3/9
> > > Stephen
> > >>  More <st...@gmail.com>
> > >>>   > > > > > > >> >>>  >
> > >>>   > > > > > > >> >>>  >> I too am
> > >
> > >>  trying to get a simple example working. I
> > >>>   > have
> > >>>   > > > put
> > >>>   > > > > > > >> > together
> > >>>   > > > > > > >> >>>  >> this
> > > project:
> > >>>   > > > > > > >> >
> > >>  http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> > >>>   > > > > > > >> >>>  >>
> > >>>   > > > > > > >> >>>  >> mvn
> > >>  jetty:run-war   results in
> > >>>   > > > > > > >> >>>  >>
> > >>>   > > > > > > >> >>>  >> SEVERE:
> > >>  Unable to create JettyWeldInjector. CDI
> > >>>   > > injection
> > >>>   > > > > will
> > >>>   > > > > > > >> > not be
> > >>>   > > > > > > >> >>>  >>
> > > available in
> > >>  Servlets, Filters or Listeners
> > >>>   > > > > > > >> >>>  >>
> > >>>   > > > > > > >> >>>  >> What
> > > else do
> > >>  I need to get this simple example
> > >>>   > working ?
> > >>>   > > > > > > >> >>>  >>
> > >>>   > > > > > > >> >>>  >> -Thanks
> > >>>   > > > > > > >> >>>  >>
> > >>>   > > > > > > >> >>>  >> On Thu,
> > > Mar
> > >>  8, 2012 at 11:07 AM, Gerhard Petracek
> > >>>   > > > > > > >> >>>  >>
> > >>  <ge...@gmail.com> wrote:
> > >>>   > > > > > > >> >>>  >> > hi
> > > jose,
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > > first of
> > >>  all: welcome @ myfaces!
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > > concrete
> > >>  questions are very welcome and we will
> > >>>   > > improve
> > >>>   > > > > > > >> > the wiki
> > >>>   > > > > > > >> >>>  based on
> > >>>   > > > > > > >> >>>  >> >
> > > them.
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > > regards,
> > >>>   > > > > > > >> >>>  >> >
> > > gerhard
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > >>  http://www.irian.at
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > > Your
> > >>  JSF/JavaEE powerhouse -
> > >>>   > > > > > > >> >>>  >> >
> > > JavaEE
> > >>  Consulting, Development and
> > >>>   > > > > > > >> >>>  >> >
> > > Courses
> > >>  in English and German
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > >>  Professional Support for Apache MyFaces
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > > 2012/3/8
> > >>  José Luis Cetina <ma...@gmail.com>
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >>
> > > Hi
> > >>  im so excited to start and use MyFaces and
> > >>>   CODI
> > >>>   > > > > > > >> > but i cant get any
> > >>>   > > > > > > >> >>>  >> >>
> > >
> > >>  "good" documentation in fact i only can get
> > >>>   > > > > > > >> > like 2 or 3 mini tutorial
> > >>>   > > > > > > >> >>>  >> but
> > >>>   > > > > > > >> >>>  >> >>
> > > they
> > >>  are really incomplete, can somebody
> > >>>   recommend
> > >>>   > me
> > >>>   > > > > > > >> > to some
> > >>>   > > > > > > >> >>>  tutorial
> > >>>   > > > > > > >> >>>  >> or
> > >>>   > > > > > > >> >>>  >> >>
> > > book
> > >>  to start with *CODI *y see this is an
> > >>>   > excellent
> > >>>   > > > > > > >> > extension, im
> > >>>   > > > > > > >> >>>  >> moving
> > >>>   > > > > > > >> >>>  >> >>
> > > from
> > >>  mojarra and CDI to MyFaces and MyFaces
> > >>>   > > > > > > >> > extensions, please where
> > >>>   > > > > > > >> >>>  i
> > >>>   > > > > > > >> >>>  >> can
> > >>>   > > > > > > >> >>>  >> >>
> > > find
> > >>  value information
> > >>>   > > > > > > >> >>>  >> >>
> > >>>   > > > > > > >> >>>  >> >>
> > > The
> > >>  only URL where i found a little info is this:
> > >>>   > > > > > > >> >>>  >> >>
> > >>>   > > > > > > >> >
> > >>  https://cwiki.apache.org/confluence/display/EXTCDI/Index
> > >>>   > > > > > > >> >>>  >> >>
> > >>>   > > > > > > >> >>>  >> >>
> > > --
> > >>>   > > > > > > >> >>>  >> >>
> > >>>   > > > > > > >> >
> > >>>   > > > >
> > >>  -------------------------------------------------------------------
> > >>>   > > > > > > >> >>>  >> >>
> > >
> > >>  *SCJA. José Luis Cetina*
> > >>>   > > > > > > >> >>>  >> >>
> > >>>   > > > > > > >> >
> > >>>   > > > >
> > >>  -------------------------------------------------------------------
> > >>>   > > > > > > >> >>>  >> >>
> > >>>   > > > > > > >> >>>  >>
> > >>>   > > > > > > >> >>>
> > >>>   > > > > > > >> >
> > >>>   > > > > > > >>
> > >>>   > > > > > >
> > >>>   > > > > >
> > >>>   > > > >
> > >>>   > > > >
> > >>>   > > >
> > >>>   > >
> > >>>   >
> > >>>
> > >>>
> > >>
> > >
> >
>
>


Re: MyFaces and CODI

Posted by Gerhard Petracek <ge...@gmail.com>.
hi rafael,

for a wls 11g deployment you have to follow [1].

regards,
gerhard

[1] https://cwiki.apache.org/confluence/display/EXTCDI/JavaEE5+Support

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/18 Rafael Pestano <rm...@yahoo.com.br>

> Hi guys,
>
>
> I think that what Mark stated can be happening in the environment at my
> company(weblogic 11g, mojarra 1.2, owb and CODI) cause a simple forward is
> also causing the bean to be instantiated(tested with ViewAccess and
> WindowScoped),
>
> How can i ensure that the whole Context is being initialized?
>
>
>
> About the server side solution Gerhard proposed i can confirm it is
> working here at home, the main problem is something with the"constalation"
> that the application at my company is using, maybe the frame based layout,
> jspx extension or something else.
>
> i also tried to deploy Gerhard example here in weblogic here at home
> without success, the CDI container cannot start.
>
> i just changed from myfaces to mojarra, instaled the example via maven and
> deployed the war in weblogic 11g(10.3.2), to try simulate the enviroment at
> my company, here is the error:
>
>
> INFO: Initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS)
> for context '/playground-jsf12-1.0.4'
> 18/03/2012 17:10:46
> org.apache.myfaces.extensions.cdi.core.api.provider.ServiceProvider <clinit>
> INFO:
> org.apache.myfaces.extensions.cdi.core.impl.provider.DefaultServiceProvider
> installed successfully.
> 18/03/2012 17:10:46
> org.apache.myfaces.extensions.cdi.core.api.provider.ServiceProvider <clinit>
> INFO:
> org.apache.myfaces.extensions.cdi.core.impl.provider.DefaultServiceProviderContext
> installed successfully.
> java.lang.IllegalStateException: no
> org.apache.myfaces.extensions.cdi.core.api.provider.BeanManagerProvider in
> place! Please ensur
> e that you configured the CDI implementation of your choice properly. If
> your setup is correct, please clear all caches and compil
> ed artifacts. If there is still a problem, try one of the controlled
> bootstrapping add-ons for the CDI implementation you are usin
> g.
>         at
> org.apache.myfaces.extensions.cdi.core.api.provider.BeanManagerProvider.getInstance(BeanManagerProvider.java:81)
>         at
> org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils.getContextualReferenceByClass(CodiUtils.java:124)
>         at
> org.apache.myfaces.extensions.cdi.jsf.impl.listener.phase.PhaseListenerExtension.consumePhaseListeners(PhaseListenerExt
> ension.java:110)
>         at
> org.apache.myfaces.extensions.cdi.jsf.impl.listener.phase.CodiLifecycleFactoryWrapper.getLifecycle(CodiLifecycleFactory
> Wrapper.java:65)
>         at
> com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:1115)
>         at
> com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:766)
>         at
> com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:529)
>         at
> com.sun.faces.config.GlassFishConfigureListener.contextInitialized(GlassFishConfigureListener.java:47)
>         at
> weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
>         at
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
>         at
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
>         at
> weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
>         at
> weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1801)
>         at
> weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3045)
>         at
> weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1397)
>         at
> weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
>         at
> weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
>         at
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
>         at
> weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
>         at
> weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
>         at
> weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
>         at
> weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
>         at
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
>         at
> weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
>         at
> weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
>         at
> weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
>         at
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
>         at
> weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
>         at
> weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:39)
>         at
> weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
>         at
> weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
>         at
> weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
>         at
> weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
>         at
> weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
>         at
> weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
>         at
> weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
>         at
> weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
>         at
> weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
>         at
> weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
>         at
> weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCa
> llbackDeliverer.java:181)
>         at
> weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallback
> Deliverer.java:12)
>         at
> weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliv
> erer.java:67)
>         at
> weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
>         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
>         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
> 18/03/2012 17:10:47 com.sun.faces.config.ConfigureListener
> contextInitialized
>
> thanks for your time.
>
>
> Att,
> Rafael M. Pestano
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ----- Mensagem original -----
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Cc:
> Enviadas: Domingo, 18 de Março de 2012 16:47
> Assunto: Re: MyFaces and CODI
>
> hi mark,
>
> since rafael mentioned that it works without a4j and there is no issue with
> a4j in the demo, i don't think that it is such a basic issue.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/18 Mark Struberg <st...@yahoo.de>
>
> >
> >
> > Gerhard pinged me that you are using @ViewAccessScoped. In that case I'd
> > recomment to debug if the whole Context Extension gets properly
> registrated.
> >
> > If the CDI container doesn't know the @ViewAccessScoped annotation then
> > all your beans will end up as @Dependent...
> >
> > LieGrue,
> > strub
> >
> >
> > ----- Original Message -----
> > > From: Mark Struberg <st...@yahoo.de>
> > > To: MyFaces Discussion <us...@myfaces.apache.org>
> > > Cc:
> > > Sent: Sunday, March 18, 2012 7:42 PM
> > > Subject: Re: MyFaces and CODI
> > >
> > >>  when i find out what's causing my bean to be instantiated on every
> ajax
> > > call
> > >>  i'll come back here to report.
> > >
> > > That sounds familiar - good luck ;)
> > >
> > > Which scope does your bean have? You are sure that you are really using
> > CDI
> > > javax.enterprise.context.* scopes and not javax.faces.bean.* scopes due
> > to a
> > > wrong auto-import  of your IDE?
> > >
> > > LieGrue,
> > > strub
> > >
> > >
> > >
> > > ----- Original Message -----
> > >>  From: Rafael Pestano <rm...@yahoo.com.br>
> > >>  To: MyFaces Discussion <us...@myfaces.apache.org>
> > >>  Cc:
> > >>  Sent: Saturday, March 17, 2012 4:34 PM
> > >>  Subject: Re: MyFaces and CODI
> > >>
> > >>  yeap, i also deployed the server side demo in tomcat and it works as
> > > expected,
> > >>  when i find out what's causing my bean to be instantiated on every
> ajax
> > > call
> > >>  i'll come back here to report.
> > >>
> > >>  many thanks for the assistance.
> > >>
> > >>  Att,
> > >>
> > >>  Rafael M. Pestano
> > >>
> > >>  Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> Sul
> > >>  Graduando em Ciência da Computação UFRGS
> > >>  @realpestano
> > >>  http://code.google.com/p/jsf-conventions-framework/
> > >>
> > >>
> > >>
> > >>  ________________________________
> > >>  De: Gerhard Petracek <ge...@gmail.com>
> > >>  Para: MyFaces Discussion <us...@myfaces.apache.org>
> > >>  Enviadas: Sexta-feira, 16 de Março de 2012 22:46
> > >>  Assunto: Re: MyFaces and CODI
> > >>
> > >>  hi rafael,
> > >>
> > >>  i can't reproduce it. i added richfaces to the previous demo as well
> as
> > > a4j
> > >>  support to the input component and everything works as expected.
> > >>
> > >>  regards,
> > >>  gerhard
> > >>
> > >>  http://www.irian.at
> > >>
> > >>  Your JSF/JavaEE powerhouse -
> > >>  JavaEE Consulting, Development and
> > >>  Courses in English and German
> > >>
> > >>  Professional Support for Apache MyFaces
> > >>
> > >>
> > >>
> > >>  2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > >>
> > >>>   Hi Gehard,
> > >>>
> > >>>   i didnt got the ideia, do you have any example or a link showing
> this
> > >>>   approach?
> > >>>
> > >>>   what i have got til now is:
> > >>>   1 - WindowContextIdHolderComponent is a jsf component which is
> added
> > >>>   dynamically to the view
> > >>>   2 - this component holds the windowId
> > >>>   3 - i have,somehow , to keep the windowId the same between requests
> > so
> > > my
> > >>>   ViewAccessScoped bean  is "keeped alive" <- here is where
> > > im
> > >>  stuck
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>   Att,
> > >>>   Rafael M. Pestano
> > >>>   Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> > Sul
> > >>>   Graduando em Ciência da Computação UFRGS
> > >>>   @realpestano
> > >>>  http://code.google.com/p/jsf-conventions-framework/
> > >>>
> > >>>
> > >>>
> > >>>   ----- Mensagem original -----
> > >>>   De: Gerhard Petracek <ge...@gmail.com>
> > >>>   Para: MyFaces Discussion <us...@myfaces.apache.org>
> > >>>   Cc:
> > >>>   Enviadas: Quinta-feira, 15 de Março de 2012 11:28
> > >>>   Assunto: Re: MyFaces and CODI
> > >>>
> > >>>   hi rafael,
> > >>>
> > >>>   @ WindowContextIdHolderComponent:
> > >>>
> > >>>   that's the name of the class. you have to resolve the component
> > > (by
> > >>  type)
> > >>>   before the view gets rendered and add it to the ajax enabled a4j
> > > components
> > >>>   via the corresponding java-api.
> > >>>
> > >>>   @ custom approach:
> > >>>   independent of the concrete approach you would like to use, you
> just
> > > have
> > >>>   to ensure that the information is available on the server-side (for
> > > every
> > >>>   jsf request which starts the jsf request-lifecycle).
> > >>>
> > >>>   regards,
> > >>>   gerhard
> > >>>
> > >>>   Your JSF/JavaEE powerhouse -
> > >>>   JavaEE Consulting, Development and
> > >>>   Courses in English and German
> > >>>
> > >>>   Professional Support for Apache MyFaces
> > >>>
> > >>>
> > >>>   2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > >>>
> > >>>   > Hi again,
> > >>>   >
> > >>>   > "it will work with a4j as soon as you
> > >>>   > ensure that it gets restored for requests triggered by a4j "
> > > you
> > >>  mean i
> > >>>   > should send WindowContextIdHolderComponent  within the ajax
> > > request?
> > >>>   >
> > >>>   > somethink like <a4j:support
> > >>  process="WindowContextIdHolderComponent"/> ?
> > >>>   >
> > >>>   > if so whats the id of the generated component?
> > >>>   >
> > >>>   > i also have another question, in the javadoc
> > >>>   > of WindowContextConfig isUrlParameterSuported() says
> > >>>   >
> > >>>   > "Specifies if it is allowed to use URL params for forwarding
> > > the
> > >>  current
> > >>>   > window-id. (deactivate it e.g. for higher security - in this case
> > >
> > >>  it's
> > >>>   > required to use a window id provided by a component lib or a
> > >>  server-side
> > >>>   > window-handler"
> > >>>   >
> > >>>   > how can i create a component to handle the window id? can i do
> > > that
> > >>  with
> > >>>   > an h:inputHidden for example?
> > >>>   >
> > >>>   > thanks for the help.
> > >>>   >
> > >>>   >
> > >>>   >
> > >>>   > Att,
> > >>>   >
> > >>>   > Rafael M. Pestano
> > >>>   >
> > >>>   > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande
> > > do Sul
> > >>>   > Graduando em Ciência da Computação UFRGS
> > >>>   > @realpestano
> > >>>   > http://code.google.com/p/jsf-conventions-framework/
> > >>>   >
> > >>>   >
> > >>>   >
> > >>>   > ________________________________
> > >>>   > De: Gerhard Petracek <ge...@gmail.com>
> > >>>   > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > >>>   > Enviadas: Quinta-feira, 15 de Março de 2012 10:37
> > >>>   > Assunto: Re: MyFaces and CODI
> > >>>   >
> > >>>   > hi rafael,
> > >>>   >
> > >>>   > the fallback adds a component (WindowContextIdHolderComponent)
> > >>>   dynamically
> > >>>   > (as a direct child of UiViewRoot) -> it will work with a4j as
> > > soon
> > >>  as you
> > >>>   > ensure that it gets restored for requests triggered by a4j.
> > >>>   >
> > >>>   > regards,
> > >>>   > gerhard
> > >>>   >
> > >>>   > http://www.irian.at
> > >>>   >
> > >>>   > Your JSF/JavaEE powerhouse -
> > >>>   > JavaEE Consulting, Development and
> > >>>   > Courses in English and German
> > >>>   >
> > >>>   > Professional Support for Apache MyFaces
> > >>>   >
> > >>>   >
> > >>>   > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > >>>   >
> > >>>   > > well its not 100% yet ;(...on every ajaxCall my
> > > ViewAccessScoped
> > >>  bean
> > >>>   is
> > >>>   > > being instantiated,
> > >>>   > >
> > >>>   > > im using a4j, there is any known issue with it?
> > >>>   > >
> > >>>   > > for example <h:selectOneMenu .....>
> > >>>   > >                         <a4j:support
> > >>  event="onchange" ....action="when
> > >>>   > the
> > >>>   > > action is called the bean constructor gets called"/>
> > >>>   > >                     </h:selectOneMenu>
> > >>>   > >
> > >>>   > > if i change from View to RequestScoped the bahavior is the
> > > same,
> > >>  any
> > >>>   > ideas?
> > >>>   > >
> > >>>   > >
> > >>>   > > thanks in advance.
> > >>>   > >
> > >>>   > >
> > >>>   > > Att,
> > >>>   > >
> > >>>   > > Rafael M. Pestano
> > >>>   > >
> > >>>   > > Desenvolvedor Java Cia. de Processamento de Dados do Rio
> > > Grande
> > >>  do Sul
> > >>>   > > Graduando em Ciência da Computação UFRGS
> > >>>   > > @realpestano
> > >>>   > > http://code.google.com/p/jsf-conventions-framework/
> > >>>   > >
> > >>>   > >
> > >>>   > >
> > >>>   > > ________________________________
> > >>>   > >  De: Rafael Pestano <rm...@yahoo.com.br>
> > >>>   > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > >>>   > > Enviadas: Quinta-feira, 15 de Março de 2012 8:45
> > >>>   > > Assunto: Re: MyFaces and CODI
> > >>>   > >
> > >>>   > > "if you don't need redirects, you could have a look
> > > at
> > >>  e.g. [1] which
> > >>>   > uses
> > >>>   > > an internal fallback." yea, its our case and it just
> > > works!
> > >>>   > >
> > >>>   > > many thanks for your help, keep the great work!
> > >>>   > >
> > >>>   > > Att,
> > >>>   > >
> > >>>   > > Rafael M. Pestano
> > >>>   > >
> > >>>   > > Desenvolvedor Java Cia. de Processamento de Dados do Rio
> > > Grande
> > >>  do Sul
> > >>>   > > Graduando em Ciência da Computação UFRGS
> > >>>   > > @realpestano
> > >>>   > > http://code.google.com/p/jsf-conventions-framework/
> > >>>   > >
> > >>>   > >
> > >>>   > >
> > >>>   > > ________________________________
> > >>>   > > De: Gerhard Petracek <ge...@gmail.com>
> > >>>   > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > >>>   > > Enviadas: Quarta-feira, 14 de Março de 2012 23:19
> > >>>   > > Assunto: Re: MyFaces and CODI
> > >>>   > >
> > >>>   > > hi rafael,
> > >>>   > >
> > >>>   > > as you have seen it's easy to provide a custom
> > > WindowHandler
> > >>  (just
> > >>>   > > implement the interface and provide your implementation as
> > >>  alternative
> > >>>   > cdi
> > >>>   > > bean)
> > >>>   > > -> you can integrate every custom approach which is
> > > enough to
> > >>  solve you
> > >>>   > > requirements.
> > >>>   > >
> > >>>   > > if you don't need redirects, you could have a look at
> > > e.g.
> > >>  [1] which
> > >>>   uses
> > >>>   > > an internal fallback.
> > >>>   > >
> > >>>   > > regards,
> > >>>   > > gerhard
> > >>>   > >
> > >>>   > > [1] http://s.apache.org/SAs
> > >>>   > >
> > >>>   > > http://www.irian.at
> > >>>   > >
> > >>>   > > Your JSF/JavaEE powerhouse -
> > >>>   > > JavaEE Consulting, Development and
> > >>>   > > Courses in English and German
> > >>>   > >
> > >>>   > > Professional Support for Apache MyFaces
> > >>>   > >
> > >>>   > >
> > >>>   > >
> > >>>   > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > >>>   > >
> > >>>   > > > Hi Gehard,
> > >>>   > > >
> > >>>   > > > its a stopper to us cause we are still dependent on JSF
> > > 1.2
> > >>>   > > > Can i implement an alternative
> > >>>   > > > to
> > >>>   > >
> > >>>   >
> > >>>
> > >>
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > >>>   > > > based on JSF 1.2?
> > >>>   > > >
> > >>>   > > > i see you use flash scope to span the windowId through
> > >>  requests in
> > >>>   the
> > >>>   > > > server side solution:
> > >>>   > > >
> > >>>   > > > if (windowId != null)
> > >>>   > > > 79         {
> > >>>   > > >
> > >>>   > > > 80
> > >>>   > >
> > >>  externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY,
> > >>>   > > windowId);
> > >>>   > > >
> > >>>   > > > 81
> > >>>   > >
> > > externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
> > >>>   > > > 82         }
> > >>>   > > >
> > >>>   > > > if i put the windownId in the sessionMap it would still
> > >
> > >>  work? i think
> > >>>   > ill
> > >>>   > > > find hard time trying to remove the windowId from the
> > > map
> > >>  when user
> > >>>   > leave
> > >>>   > > > the page.
> > >>>   > > >
> > >>>   > > >
> > >>>   > > >
> > >>>   > > > thanks for your help i really appreciated it.
> > >>>   > > >
> > >>>   > > > Att,
> > >>>   > > > Rafael M. Pestano
> > >>>   > > > Desenvolvedor Java Cia. de Processamento de Dados do
> > > Rio
> > >>  Grande do
> > >>>   Sul
> > >>>   > > > Graduando em Ciência da Computação UFRGS
> > >>>   > > > @realpestano
> > >>>   > > > http://code.google.com/p/jsf-conventions-framework/
> > >>>   > > >
> > >>>   > > >
> > >>>   > > >
> > >>>   > > > ----- Mensagem original -----
> > >>>   > > > De: Gerhard Petracek <ge...@gmail.com>
> > >>>   > > > Para: MyFaces Discussion
> > > <us...@myfaces.apache.org>
> > >>>   > > > Cc:
> > >>>   > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:55
> > >>>   > > > Assunto: Re: MyFaces and CODI
> > >>>   > > >
> > >>>   > > > hi rafael,
> > >>>   > > >
> > >>>   > > > internally the ServerSideWindowHandler is based on the
> > > flash
> > >>  scope
> > >>>   > > (that's
> > >>>   > > > one of the mentioned disadvantages)
> > >>>   > > > -> it's bound to jsf 2+ -> it is:
> > >>>   > > >
> > >>>   > > >
> > >>>   > >
> > >>>   >
> > >>>
> > >>
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > >>>   > > > (and you can't use the additional js.)
> > >>>   > > >
> > >>>   > > > with some constellations you just hit the restrictions
> > > of
> > >>  browsers ->
> > >>>   > you
> > >>>   > > > have to choose what you really need.
> > >>>   > > >
> > >>>   > > > regards,
> > >>>   > > > gerhard
> > >>>   > > >
> > >>>   > > > http://www.irian.at
> > >>>   > > >
> > >>>   > > > Your JSF/JavaEE powerhouse -
> > >>>   > > > JavaEE Consulting, Development and
> > >>>   > > > Courses in English and German
> > >>>   > > >
> > >>>   > > > Professional Support for Apache MyFaces
> > >>>   > > >
> > >>>   > > >
> > >>>   > > >
> > >>>   > > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > >>>   > > >
> > >>>   > > > > i see, i have used the client side one
> > >>>   > > > >
> > >>>   > > > > <alternatives>
> > >>>   > > > >
> > >>>   > > >
> > >>>   > >
> > >>>   >
> > >>>
> > >>
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
> > >>>   > > > > </alternatives>
> > >>>   > > > >
> > >>>   > > > > i imagine the server side should be
> > >>>   > > > >
> > >>>   > > > > <alternatives>
> > >>>   > > > >
> > >>>   > > >
> > >>>   > >
> > >>>   >
> > >>>
> > >>
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
> > >>>   > > > > </alternatives>alright?
> > >>>   > > > >
> > >>>   > > > > i will test it tomorrow and give the feedback,
> > > thanks.
> > >>>   > > > >
> > >>>   > > > > Att,
> > >>>   > > > > Rafael M. Pestano
> > >>>   > > > > Desenvolvedor Java Cia. de Processamento de Dados
> > > do
> > >>  Rio Grande do
> > >>>   > Sul
> > >>>   > > > > Graduando em Ciência da Computação UFRGS
> > >>>   > > > > @realpestano
> > >>>   > > > >
> > > http://code.google.com/p/jsf-conventions-framework/
> > >>>   > > > >
> > >>>   > > > >
> > >>>   > > > >
> > >>>   > > > > ----- Mensagem original -----
> > >>>   > > > > De: Gerhard Petracek
> > > <ge...@gmail.com>
> > >>>   > > > > Para: MyFaces Discussion
> > >>  <us...@myfaces.apache.org>
> > >>>   > > > > Cc:
> > >>>   > > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:11
> > >>>   > > > > Assunto: Re: MyFaces and CODI
> > >>>   > > > >
> > >>>   > > > > hi rafael,
> > >>>   > > > >
> > >>>   > > > > the easiest approach to test an alternative for
> > > this
> > >>  constellation
> > >>>   is
> > >>>   > > the
> > >>>   > > > > activation of the ServerSideWindowHandler
> > > (it's a
> > >>  std. cdi
> > >>>   > @Alternative
> > >>>   > > > > implementation -> you can activate it in the
> > >>  beans.xml file of your
> > >>>   > > > > application).
> > >>>   > > > > (however, please be aware that this alternative
> > >>  implementation has
> > >>>   > some
> > >>>   > > > > disadvantages.)
> > >>>   > > > >
> > >>>   > > > > regards,
> > >>>   > > > > gerhard
> > >>>   > > > >
> > >>>   > > > > http://www.irian.at
> > >>>   > > > >
> > >>>   > > > > Your JSF/JavaEE powerhouse -
> > >>>   > > > > JavaEE Consulting, Development and
> > >>>   > > > > Courses in English and German
> > >>>   > > > >
> > >>>   > > > > Professional Support for Apache MyFaces
> > >>>   > > > >
> > >>>   > > > >
> > >>>   > > > >
> > >>>   > > > > 2012/3/14 Rafael Pestano
> > > <rm...@yahoo.com.br>
> > >>>   > > > >
> > >>>   > > > > > Hi Gerhard, i successfuly added codi and
> > >>  openwebbeans to an
> > >>>   > > application
> > >>>   > > > > > running on weblogic 11g
> > >>>   > > > > >
> > >>>   > > > > > however its a  legacy application which uses
> > >>  frames, basicaly we
> > >>>   > > have a
> > >>>   > > > > > menu on the left frame that targets the
> > > center
> > >>  frame, something
> > >>>   > like:
> > >>>   > > > > >
> > >>>   > > > > > <h:commandLink value="menuLink"
> > >>  action="#{myBean.init}"
> > >>>   > > > target="frmDados"
> > >>>   > > > > > />
> > >>>   > > > > >
> > >>>   > > > > >
> > >>>   > > > > > the problem is, when a add CODI to the
> > > application
> > >>  and mark
> > >>>   myBean
> > >>>   > as
> > >>>   > > > > > ViewAccessScoped (and thus the windowId
> > > starts to
> > >>  be append to
> > >>>   the
> > >>>   > > url)
> > >>>   > > > > > the above menuLink always open the center
> > > frame in
> > >>  a new browser
> > >>>   > tab.
> > >>>   > > > > >
> > >>>   > > > > > If i remove CODI and set myBean as
> > >>  RequestScoped(or any other CDI
> > >>>   > > > Scope)
> > >>>   > > > > > the application behaves  as expected.
> > >>>   > > > > >
> > >>>   > > > > > So i think the windowId generated by CODI  is
> > >
> > >>  causing this
> > >>>   issue, i
> > >>>   > > > tried
> > >>>   > > > > > your solution without success, the windowId
> > > isnt
> > >>  removed from the
> > >>>   > url
> > >>>   > > > > and a
> > >>>   > > > > > new tab opens when i click in the menuLink.
> > >>>   > > > > >
> > >>>   > > > > > Any thoughs?
> > >>>   > > > > >
> > >>>   > > > > >
> > >>>   > > > > > thanks for all your help.
> > >>>   > > > > >
> > >>>   > > > > >
> > >>>   > > > > >
> > >>>   > > > > > Att,
> > >>>   > > > > >
> > >>>   > > > > > Rafael M. Pestano
> > >>>   > > > > >
> > >>>   > > > > > Desenvolvedor Java Cia. de Processamento de
> > > Dados
> > >>  do Rio Grande
> > >>>   do
> > >>>   > > Sul
> > >>>   > > > > > Graduando em Ciência da Computação UFRGS
> > >>>   > > > > > @realpestano
> > >>>   > > > > >
> > >>  http://code.google.com/p/jsf-conventions-framework/
> > >>>   > > > > >
> > >>>   > > > > >
> > >>>   > > > > >
> > >>>   > > > > > ________________________________
> > >>>   > > > > > De: Gerhard Petracek
> > >>  <ge...@gmail.com>
> > >>>   > > > > > Para: MyFaces Discussion
> > >>  <us...@myfaces.apache.org>
> > >>>   > > > > > Enviadas: Sexta-feira, 9 de Março de 2012
> > > 12:38
> > >>>   > > > > > Assunto: Re: MyFaces and CODI
> > >>>   > > > > >
> > >>>   > > > > > hi stephen,
> > >>>   > > > > >
> > >>>   > > > > > that's right [1] doesn't support it.
> > >>>   > > > > > werner committed his improvement and you can
> > > try
> > >>  [2] and [3] as
> > >>>   you
> > >>>   > > see
> > >>>   > > > > > them right now.
> > >>>   > > > > >
> > >>>   > > > > > regards,
> > >>>   > > > > > gerhard
> > >>>   > > > > >
> > >>>   > > > > > [1]
> > >>>   > > > >
> > >>>   >
> > > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > >>>   > > > > > [2] http://s.apache.org/rr
> > >>>   > > > > > [3] http://s.apache.org/23p
> > >>>   > > > > >
> > >>>   > > > > > http://www.irian.at
> > >>>   > > > > >
> > >>>   > > > > > Your JSF/JavaEE powerhouse -
> > >>>   > > > > > JavaEE Consulting, Development and
> > >>>   > > > > > Courses in English and German
> > >>>   > > > > >
> > >>>   > > > > > Professional Support for Apache MyFaces
> > >>>   > > > > >
> > >>>   > > > > >
> > >>>   > > > > >
> > >>>   > > > > > 2012/3/9 Stephen More
> > >>  <st...@gmail.com>
> > >>>   > > > > >
> > >>>   > > > > > > I was referring to [1]
> > >>>   > > > > > >
> > >>>   > > >
> > >>>
> > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > >>>   > > > > > >
> > >>>   > > > > > > I guess I just need to wait until the
> > > correct
> > >>  way is tested and
> > >>>   > > > > > > documented in the wiki using:
> > >>>   > > > > > >   [1] http://s.apache.org/rr
> > >>>   > > > > > >  [2] http://s.apache.org/23p
> > >>>   > > > > > >
> > >>>   > > > > > >
> > >>>   > > > > > >
> > >>>   > > > > > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard
> > >>  Petracek
> > >>>   > > > > > > <ge...@gmail.com>
> > > wrote:
> > >>>   > > > > > > > @ mark:
> > >>>   > > > > > > > i just tested it and it works with
> > > [1]
> > >>  in combination
> > >>>   > > > > > > > with ClientSideWindowHandler [2].
> > >>>   > > > > > > >
> > >>>   > > > > > > > regards,
> > >>>   > > > > > > > gerhard
> > >>>   > > > > > > >
> > >>>   > > > > > > > [1] http://s.apache.org/rr
> > >>>   > > > > > > > [2] http://s.apache.org/23p
> > >>>   > > > > > > >
> > >>>   > > > > > > > http://www.irian.at
> > >>>   > > > > > > >
> > >>>   > > > > > > > Your JSF/JavaEE powerhouse -
> > >>>   > > > > > > > JavaEE Consulting, Development and
> > >>>   > > > > > > > Courses in English and German
> > >>>   > > > > > > >
> > >>>   > > > > > > > Professional Support for Apache
> > > MyFaces
> > >>>   > > > > > > >
> > >>>   > > > > > > >
> > >>>   > > > > > > >
> > >>>   > > > > > > > 2012/3/9 Mark Struberg
> > >>  <st...@yahoo.de>
> > >>>   > > > > > > >
> > >>>   > > > > > > >> Hi Stephen!
> > >>>   > > > > > > >>
> > >>>   > > > > > > >> Well, the current approach in
> > > CODI
> > >>  is currently under
> > >>>   > discussion
> > >>>   > > > in
> > >>>   > > > > > the
> > >>>   > > > > > > >> JSF EG. The whole windowId
> > > stuff of
> > >>  CODI might end up in the
> > >>>   > > > JSF-2.2
> > >>>   > > > > > or
> > >>>   > > > > > > 2.3
> > >>>   > > > > > > >> spec.
> > >>>   > > > > > > >>
> > >>>   > > > > > > >> >T hat seems to work fine
> > > when
> > >>  pasting into a new empty
> > >>>   > window,
> > >>>   > > > but
> > >>>   > > > > it
> > >>>   > > > > > > >> > still allows you to
> > > copy-paste
> > >>  the url from one codi
> > >>>   window
> > >>>   > to
> > >>>   > > > an
> > >>>   > > > > > > >> > existing codi window.
> > >>>   > > > > > > >>
> > >>>   > > > > > > >> Nope, because the
> > > windowhandler.js
> > >>  script will first check
> > >>>   the
> > >>>   > > > > > > window.name.
> > >>>   > > > > > > >> And if this is
> > > empty/doesn't fit
> > >>  the windowId in the URL,
> > >>>   then
> > >>>   > > it
> > >>>   > > > > will
> > >>>   > > > > > > >> reload the page with a freshly
> > >>  requested windowId.
> > >>>   > > > > > > >>
> > >>>   > > > > > > >> LieGrue,
> > >>>   > > > > > > >> strub
> > >>>   > > > > > > >>
> > >>>   > > > > > > >>
> > >>>   > > > > > > >>
> > >>>   > > > > > > >>
> > >>>   > > > > > > >> ----- Original Message -----
> > >>>   > > > > > > >> > From: Stephen More
> > >>  <st...@gmail.com>
> > >>>   > > > > > > >> > To: MyFaces Discussion
> > >>  <us...@myfaces.apache.org>
> > >>>   > > > > > > >> > Cc:
> > >>>   > > > > > > >> > Sent: Friday, March 9,
> > > 2012
> > >>  1:27 PM
> > >>>   > > > > > > >> > Subject: Re: MyFaces and
> > > CODI
> > >>>   > > > > > > >> >
> > >>>   > > > > > > >> > Included in the JSF jar is
> > >>>   > > META-INF/resources/javax.faces/jsf.js
> > >>>   > > > > > which
> > >>>   > > > > > > >> > enables its use by
> > >>  <h:outputScript name="jsf.js"
> > >>>   > > > > > > >> >
> > > library="javax.faces"
> > >>>   > > > > > > >> >
> > > target="head"/>
> > >>>   > > > > > > >> >
> > >>>   > > > > > > >> > Should windowhandler.js be
> > >
> > >>  moved from the examples into a
> > >>>   > core
> > >>>   > > > > > library
> > >>>   > > > > > > >> > so that it can be utilized
> > > the
> > >>  same way ?
> > >>>   > > > > > > >> >
> > >>>   > > > > > > >> >
> > >>>   > > > > > > >> >
> > >>>   > > > > > > >> > On Fri, Mar 9, 2012 at
> > > 7:10 AM,
> > >>  Gerhard Petracek
> > >>>   > > > > > > >> >
> > >>  <ge...@gmail.com> wrote:
> > >>>   > > > > > > >> >>  hi stephen,
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>  yes - you can add a
> > > small
> > >>  js (see e.g. [1]) to support
> > >>>   > this
> > >>>   > > > > > > use-case.
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>  regards,
> > >>>   > > > > > > >> >>  gerhard
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>  [1]
> > >>  http://s.apache.org/YTq
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>  http://www.irian.at
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>  Your JSF/JavaEE
> > > powerhouse
> > >>  -
> > >>>   > > > > > > >> >>  JavaEE Consulting,
> > >>  Development and
> > >>>   > > > > > > >> >>  Courses in English
> > > and
> > >>  German
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>  Professional Support
> > > for
> > >>  Apache MyFaces
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>  2012/3/9 Stephen More
> > >
> > >>  <st...@gmail.com>
> > >>>   > > > > > > >> >>
> > >>>   > > > > > > >> >>>  Great. I am
> > > mainly
> > >>  interested in WindowScoped i.e.
> > >>>   every
> > >>>   > > > > browser
> > >>>   > > > > > > tab
> > >>>   > > > > > > >> >>>  has its own
> > >>  mini-session.
> > >>>   > > > > > > >> >>>
> > >>>   > > > > > > >> >>>  I see that CODI
> > > is
> > >>  adding a ?windowId=595 to keep these
> > >>>   > > > > > > conversations
> > >>>   > > > > > > >> >>>  separate. If a
> > > user
> > >>  simply copies the url and pastes
> > >>>   in a
> > >>>   > > new
> > >>>   > > > > tab
> > >>>   > > > > > > now
> > >>>   > > > > > > >> >>>  two browser tabs
> > > are
> > >>  sharing the same conversation. How
> > >>>   > > can I
> > >>>   > > > > > > prevent
> > >>>   > > > > > > >> >>>  this ? I want to
> > >>  enforce that EVERY browser tab has its
> > >>>   > own
> > >>>   > > > > > > >> >>>  conversation.
> > > Perhaps
> > >>  a simple error to the user saying
> > >>>   > > > > > > >> > "Sorry" or
> > >>>   > > > > > > >> >>>  start a new
> > >>  conversation.
> > >>>   > > > > > > >> >>>
> > >>>   > > > > > > >> >>>  -Thanks
> > >>>   > > > > > > >> >>>
> > >>>   > > > > > > >> >>>  On Fri, Mar 9,
> > > 2012 at
> > >>  3:18 AM, Gerhard Petracek
> > >>>   > > > > > > >> >>>
> > >>  <ge...@gmail.com> wrote:
> > >>>   > > > > > > >> >>>  > hi stephen,
> > >>>   > > > > > > >> >>>  >
> > >>>   > > > > > > >> >>>  > (that's
> > > an
> > >>  issue with the setup of weld and not
> > >>>   related
> > >>>   > > to
> > >>>   > > > > > > >> > myfaces codi.)
> > >>>   > > > > > > >> >>>  > however,
> > > myfaces
> > >>  codi doesn't need this support -> if
> > >>>   > you
> > >>>   > > > > > > >> > also don't need
> > >>>   > > > > > > >> >>>  > cdi support
> > > for
> > >>  servlets, filters or listeners, you
> > >>>   can
> > >>>   > > run
> > >>>   > > > > the
> > >>>   > > > > > > >> >>>  application
> > >>>   > > > > > > >> >>>  > without
> > > those
> > >>  features.
> > >>>   > > > > > > >> >>>  >
> > >>>   > > > > > > >> >>>  > regards,
> > >>>   > > > > > > >> >>>  > gerhard
> > >>>   > > > > > > >> >>>  >
> > >>>   > > > > > > >> >>>  >
> > >>  http://www.irian.at
> > >>>   > > > > > > >> >>>  >
> > >>>   > > > > > > >> >>>  > Your
> > > JSF/JavaEE
> > >>  powerhouse -
> > >>>   > > > > > > >> >>>  > JavaEE
> > >>  Consulting, Development and
> > >>>   > > > > > > >> >>>  > Courses in
> > >>  English and German
> > >>>   > > > > > > >> >>>  >
> > >>>   > > > > > > >> >>>  > Professional
> > >
> > >>  Support for Apache MyFaces
> > >>>   > > > > > > >> >>>  >
> > >>>   > > > > > > >> >>>  >
> > >>>   > > > > > > >> >>>  > 2012/3/9
> > > Stephen
> > >>  More <st...@gmail.com>
> > >>>   > > > > > > >> >>>  >
> > >>>   > > > > > > >> >>>  >> I too am
> > >
> > >>  trying to get a simple example working. I
> > >>>   > have
> > >>>   > > > put
> > >>>   > > > > > > >> > together
> > >>>   > > > > > > >> >>>  >> this
> > > project:
> > >>>   > > > > > > >> >
> > >>  http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> > >>>   > > > > > > >> >>>  >>
> > >>>   > > > > > > >> >>>  >> mvn
> > >>  jetty:run-war   results in
> > >>>   > > > > > > >> >>>  >>
> > >>>   > > > > > > >> >>>  >> SEVERE:
> > >>  Unable to create JettyWeldInjector. CDI
> > >>>   > > injection
> > >>>   > > > > will
> > >>>   > > > > > > >> > not be
> > >>>   > > > > > > >> >>>  >>
> > > available in
> > >>  Servlets, Filters or Listeners
> > >>>   > > > > > > >> >>>  >>
> > >>>   > > > > > > >> >>>  >> What
> > > else do
> > >>  I need to get this simple example
> > >>>   > working ?
> > >>>   > > > > > > >> >>>  >>
> > >>>   > > > > > > >> >>>  >> -Thanks
> > >>>   > > > > > > >> >>>  >>
> > >>>   > > > > > > >> >>>  >> On Thu,
> > > Mar
> > >>  8, 2012 at 11:07 AM, Gerhard Petracek
> > >>>   > > > > > > >> >>>  >>
> > >>  <ge...@gmail.com> wrote:
> > >>>   > > > > > > >> >>>  >> > hi
> > > jose,
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > > first of
> > >>  all: welcome @ myfaces!
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > > concrete
> > >>  questions are very welcome and we will
> > >>>   > > improve
> > >>>   > > > > > > >> > the wiki
> > >>>   > > > > > > >> >>>  based on
> > >>>   > > > > > > >> >>>  >> >
> > > them.
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > > regards,
> > >>>   > > > > > > >> >>>  >> >
> > > gerhard
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > >>  http://www.irian.at
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > > Your
> > >>  JSF/JavaEE powerhouse -
> > >>>   > > > > > > >> >>>  >> >
> > > JavaEE
> > >>  Consulting, Development and
> > >>>   > > > > > > >> >>>  >> >
> > > Courses
> > >>  in English and German
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > >>  Professional Support for Apache MyFaces
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >
> > > 2012/3/8
> > >>  José Luis Cetina <ma...@gmail.com>
> > >>>   > > > > > > >> >>>  >> >
> > >>>   > > > > > > >> >>>  >> >>
> > > Hi
> > >>  im so excited to start and use MyFaces and
> > >>>   CODI
> > >>>   > > > > > > >> > but i cant get any
> > >>>   > > > > > > >> >>>  >> >>
> > >
> > >>  "good" documentation in fact i only can get
> > >>>   > > > > > > >> > like 2 or 3 mini tutorial
> > >>>   > > > > > > >> >>>  >> but
> > >>>   > > > > > > >> >>>  >> >>
> > > they
> > >>  are really incomplete, can somebody
> > >>>   recommend
> > >>>   > me
> > >>>   > > > > > > >> > to some
> > >>>   > > > > > > >> >>>  tutorial
> > >>>   > > > > > > >> >>>  >> or
> > >>>   > > > > > > >> >>>  >> >>
> > > book
> > >>  to start with *CODI *y see this is an
> > >>>   > excellent
> > >>>   > > > > > > >> > extension, im
> > >>>   > > > > > > >> >>>  >> moving
> > >>>   > > > > > > >> >>>  >> >>
> > > from
> > >>  mojarra and CDI to MyFaces and MyFaces
> > >>>   > > > > > > >> > extensions, please where
> > >>>   > > > > > > >> >>>  i
> > >>>   > > > > > > >> >>>  >> can
> > >>>   > > > > > > >> >>>  >> >>
> > > find
> > >>  value information
> > >>>   > > > > > > >> >>>  >> >>
> > >>>   > > > > > > >> >>>  >> >>
> > > The
> > >>  only URL where i found a little info is this:
> > >>>   > > > > > > >> >>>  >> >>
> > >>>   > > > > > > >> >
> > >>  https://cwiki.apache.org/confluence/display/EXTCDI/Index
> > >>>   > > > > > > >> >>>  >> >>
> > >>>   > > > > > > >> >>>  >> >>
> > > --
> > >>>   > > > > > > >> >>>  >> >>
> > >>>   > > > > > > >> >
> > >>>   > > > >
> > >>  -------------------------------------------------------------------
> > >>>   > > > > > > >> >>>  >> >>
> > >
> > >>  *SCJA. José Luis Cetina*
> > >>>   > > > > > > >> >>>  >> >>
> > >>>   > > > > > > >> >
> > >>>   > > > >
> > >>  -------------------------------------------------------------------
> > >>>   > > > > > > >> >>>  >> >>
> > >>>   > > > > > > >> >>>  >>
> > >>>   > > > > > > >> >>>
> > >>>   > > > > > > >> >
> > >>>   > > > > > > >>
> > >>>   > > > > > >
> > >>>   > > > > >
> > >>>   > > > >
> > >>>   > > > >
> > >>>   > > >
> > >>>   > >
> > >>>   >
> > >>>
> > >>>
> > >>
> > >
> >
>
>

Re: MyFaces and CODI

Posted by Rafael Pestano <rm...@yahoo.com.br>.
Hi guys,
 

I think that what Mark stated can be happening in the environment at my company(weblogic 11g, mojarra 1.2, owb and CODI) cause a simple forward is also causing the bean to be instantiated(tested with ViewAccess and WindowScoped),  

How can i ensure that the whole Context is being initialized?   



About the server side solution Gerhard proposed i can confirm it is working here at home, the main problem is something with the"constalation" that the application at my company is using, maybe the frame based layout, jspx extension or something else.

i also tried to deploy Gerhard example here in weblogic here at home without success, the CDI container cannot start.

i just changed from myfaces to mojarra, instaled the example via maven and deployed the war in weblogic 11g(10.3.2), to try simulate the enviroment at my company, here is the error:


INFO: Initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS) for context '/playground-jsf12-1.0.4'
18/03/2012 17:10:46 org.apache.myfaces.extensions.cdi.core.api.provider.ServiceProvider <clinit>
INFO: org.apache.myfaces.extensions.cdi.core.impl.provider.DefaultServiceProvider installed successfully.
18/03/2012 17:10:46 org.apache.myfaces.extensions.cdi.core.api.provider.ServiceProvider <clinit>
INFO: org.apache.myfaces.extensions.cdi.core.impl.provider.DefaultServiceProviderContext installed successfully.
java.lang.IllegalStateException: no org.apache.myfaces.extensions.cdi.core.api.provider.BeanManagerProvider in place! Please ensur
e that you configured the CDI implementation of your choice properly. If your setup is correct, please clear all caches and compil
ed artifacts. If there is still a problem, try one of the controlled bootstrapping add-ons for the CDI implementation you are usin
g.
        at org.apache.myfaces.extensions.cdi.core.api.provider.BeanManagerProvider.getInstance(BeanManagerProvider.java:81)
        at org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils.getContextualReferenceByClass(CodiUtils.java:124)
        at org.apache.myfaces.extensions.cdi.jsf.impl.listener.phase.PhaseListenerExtension.consumePhaseListeners(PhaseListenerExt
ension.java:110)
        at org.apache.myfaces.extensions.cdi.jsf.impl.listener.phase.CodiLifecycleFactoryWrapper.getLifecycle(CodiLifecycleFactory
Wrapper.java:65)
        at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:1115)
        at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:766)
        at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:529)
        at com.sun.faces.config.GlassFishConfigureListener.contextInitialized(GlassFishConfigureListener.java:47)
        at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
        at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
        at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1801)
        at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3045)
        at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1397)
        at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
        at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
        at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
        at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
        at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
        at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
        at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:39)
        at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
        at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
        at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
        at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
        at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
        at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
        at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
        at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCa
llbackDeliverer.java:181)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallback
Deliverer.java:12)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliv
erer.java:67)
        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
18/03/2012 17:10:47 com.sun.faces.config.ConfigureListener contextInitialized
 
thanks for your time.

 
Att, 
Rafael M. Pestano
Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
Graduando em Ciência da Computação UFRGS
@realpestano
http://code.google.com/p/jsf-conventions-framework/



----- Mensagem original -----
De: Gerhard Petracek <ge...@gmail.com>
Para: MyFaces Discussion <us...@myfaces.apache.org>
Cc: 
Enviadas: Domingo, 18 de Março de 2012 16:47
Assunto: Re: MyFaces and CODI

hi mark,

since rafael mentioned that it works without a4j and there is no issue with
a4j in the demo, i don't think that it is such a basic issue.

regards,
gerhard

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/18 Mark Struberg <st...@yahoo.de>

>
>
> Gerhard pinged me that you are using @ViewAccessScoped. In that case I'd
> recomment to debug if the whole Context Extension gets properly registrated.
>
> If the CDI container doesn't know the @ViewAccessScoped annotation then
> all your beans will end up as @Dependent...
>
> LieGrue,
> strub
>
>
> ----- Original Message -----
> > From: Mark Struberg <st...@yahoo.de>
> > To: MyFaces Discussion <us...@myfaces.apache.org>
> > Cc:
> > Sent: Sunday, March 18, 2012 7:42 PM
> > Subject: Re: MyFaces and CODI
> >
> >>  when i find out what's causing my bean to be instantiated on every ajax
> > call
> >>  i'll come back here to report.
> >
> > That sounds familiar - good luck ;)
> >
> > Which scope does your bean have? You are sure that you are really using
> CDI
> > javax.enterprise.context.* scopes and not javax.faces.bean.* scopes due
> to a
> > wrong auto-import  of your IDE?
> >
> > LieGrue,
> > strub
> >
> >
> >
> > ----- Original Message -----
> >>  From: Rafael Pestano <rm...@yahoo.com.br>
> >>  To: MyFaces Discussion <us...@myfaces.apache.org>
> >>  Cc:
> >>  Sent: Saturday, March 17, 2012 4:34 PM
> >>  Subject: Re: MyFaces and CODI
> >>
> >>  yeap, i also deployed the server side demo in tomcat and it works as
> > expected,
> >>  when i find out what's causing my bean to be instantiated on every ajax
> > call
> >>  i'll come back here to report.
> >>
> >>  many thanks for the assistance.
> >>
> >>  Att,
> >>
> >>  Rafael M. Pestano
> >>
> >>  Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> >>  Graduando em Ciência da Computação UFRGS
> >>  @realpestano
> >>  http://code.google.com/p/jsf-conventions-framework/
> >>
> >>
> >>
> >>  ________________________________
> >>  De: Gerhard Petracek <ge...@gmail.com>
> >>  Para: MyFaces Discussion <us...@myfaces.apache.org>
> >>  Enviadas: Sexta-feira, 16 de Março de 2012 22:46
> >>  Assunto: Re: MyFaces and CODI
> >>
> >>  hi rafael,
> >>
> >>  i can't reproduce it. i added richfaces to the previous demo as well as
> > a4j
> >>  support to the input component and everything works as expected.
> >>
> >>  regards,
> >>  gerhard
> >>
> >>  http://www.irian.at
> >>
> >>  Your JSF/JavaEE powerhouse -
> >>  JavaEE Consulting, Development and
> >>  Courses in English and German
> >>
> >>  Professional Support for Apache MyFaces
> >>
> >>
> >>
> >>  2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> >>
> >>>   Hi Gehard,
> >>>
> >>>   i didnt got the ideia, do you have any example or a link showing this
> >>>   approach?
> >>>
> >>>   what i have got til now is:
> >>>   1 - WindowContextIdHolderComponent is a jsf component which is added
> >>>   dynamically to the view
> >>>   2 - this component holds the windowId
> >>>   3 - i have,somehow , to keep the windowId the same between requests
> so
> > my
> >>>   ViewAccessScoped bean  is "keeped alive" <- here is where
> > im
> >>  stuck
> >>>
> >>>
> >>>
> >>>
> >>>   Att,
> >>>   Rafael M. Pestano
> >>>   Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> Sul
> >>>   Graduando em Ciência da Computação UFRGS
> >>>   @realpestano
> >>>  http://code.google.com/p/jsf-conventions-framework/
> >>>
> >>>
> >>>
> >>>   ----- Mensagem original -----
> >>>   De: Gerhard Petracek <ge...@gmail.com>
> >>>   Para: MyFaces Discussion <us...@myfaces.apache.org>
> >>>   Cc:
> >>>   Enviadas: Quinta-feira, 15 de Março de 2012 11:28
> >>>   Assunto: Re: MyFaces and CODI
> >>>
> >>>   hi rafael,
> >>>
> >>>   @ WindowContextIdHolderComponent:
> >>>
> >>>   that's the name of the class. you have to resolve the component
> > (by
> >>  type)
> >>>   before the view gets rendered and add it to the ajax enabled a4j
> > components
> >>>   via the corresponding java-api.
> >>>
> >>>   @ custom approach:
> >>>   independent of the concrete approach you would like to use, you just
> > have
> >>>   to ensure that the information is available on the server-side (for
> > every
> >>>   jsf request which starts the jsf request-lifecycle).
> >>>
> >>>   regards,
> >>>   gerhard
> >>>
> >>>   Your JSF/JavaEE powerhouse -
> >>>   JavaEE Consulting, Development and
> >>>   Courses in English and German
> >>>
> >>>   Professional Support for Apache MyFaces
> >>>
> >>>
> >>>   2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> >>>
> >>>   > Hi again,
> >>>   >
> >>>   > "it will work with a4j as soon as you
> >>>   > ensure that it gets restored for requests triggered by a4j "
> > you
> >>  mean i
> >>>   > should send WindowContextIdHolderComponent  within the ajax
> > request?
> >>>   >
> >>>   > somethink like <a4j:support
> >>  process="WindowContextIdHolderComponent"/> ?
> >>>   >
> >>>   > if so whats the id of the generated component?
> >>>   >
> >>>   > i also have another question, in the javadoc
> >>>   > of WindowContextConfig isUrlParameterSuported() says
> >>>   >
> >>>   > "Specifies if it is allowed to use URL params for forwarding
> > the
> >>  current
> >>>   > window-id. (deactivate it e.g. for higher security - in this case
> >
> >>  it's
> >>>   > required to use a window id provided by a component lib or a
> >>  server-side
> >>>   > window-handler"
> >>>   >
> >>>   > how can i create a component to handle the window id? can i do
> > that
> >>  with
> >>>   > an h:inputHidden for example?
> >>>   >
> >>>   > thanks for the help.
> >>>   >
> >>>   >
> >>>   >
> >>>   > Att,
> >>>   >
> >>>   > Rafael M. Pestano
> >>>   >
> >>>   > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande
> > do Sul
> >>>   > Graduando em Ciência da Computação UFRGS
> >>>   > @realpestano
> >>>   > http://code.google.com/p/jsf-conventions-framework/
> >>>   >
> >>>   >
> >>>   >
> >>>   > ________________________________
> >>>   > De: Gerhard Petracek <ge...@gmail.com>
> >>>   > Para: MyFaces Discussion <us...@myfaces.apache.org>
> >>>   > Enviadas: Quinta-feira, 15 de Março de 2012 10:37
> >>>   > Assunto: Re: MyFaces and CODI
> >>>   >
> >>>   > hi rafael,
> >>>   >
> >>>   > the fallback adds a component (WindowContextIdHolderComponent)
> >>>   dynamically
> >>>   > (as a direct child of UiViewRoot) -> it will work with a4j as
> > soon
> >>  as you
> >>>   > ensure that it gets restored for requests triggered by a4j.
> >>>   >
> >>>   > regards,
> >>>   > gerhard
> >>>   >
> >>>   > http://www.irian.at
> >>>   >
> >>>   > Your JSF/JavaEE powerhouse -
> >>>   > JavaEE Consulting, Development and
> >>>   > Courses in English and German
> >>>   >
> >>>   > Professional Support for Apache MyFaces
> >>>   >
> >>>   >
> >>>   > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> >>>   >
> >>>   > > well its not 100% yet ;(...on every ajaxCall my
> > ViewAccessScoped
> >>  bean
> >>>   is
> >>>   > > being instantiated,
> >>>   > >
> >>>   > > im using a4j, there is any known issue with it?
> >>>   > >
> >>>   > > for example <h:selectOneMenu .....>
> >>>   > >                         <a4j:support
> >>  event="onchange" ....action="when
> >>>   > the
> >>>   > > action is called the bean constructor gets called"/>
> >>>   > >                     </h:selectOneMenu>
> >>>   > >
> >>>   > > if i change from View to RequestScoped the bahavior is the
> > same,
> >>  any
> >>>   > ideas?
> >>>   > >
> >>>   > >
> >>>   > > thanks in advance.
> >>>   > >
> >>>   > >
> >>>   > > Att,
> >>>   > >
> >>>   > > Rafael M. Pestano
> >>>   > >
> >>>   > > Desenvolvedor Java Cia. de Processamento de Dados do Rio
> > Grande
> >>  do Sul
> >>>   > > Graduando em Ciência da Computação UFRGS
> >>>   > > @realpestano
> >>>   > > http://code.google.com/p/jsf-conventions-framework/
> >>>   > >
> >>>   > >
> >>>   > >
> >>>   > > ________________________________
> >>>   > >  De: Rafael Pestano <rm...@yahoo.com.br>
> >>>   > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> >>>   > > Enviadas: Quinta-feira, 15 de Março de 2012 8:45
> >>>   > > Assunto: Re: MyFaces and CODI
> >>>   > >
> >>>   > > "if you don't need redirects, you could have a look
> > at
> >>  e.g. [1] which
> >>>   > uses
> >>>   > > an internal fallback." yea, its our case and it just
> > works!
> >>>   > >
> >>>   > > many thanks for your help, keep the great work!
> >>>   > >
> >>>   > > Att,
> >>>   > >
> >>>   > > Rafael M. Pestano
> >>>   > >
> >>>   > > Desenvolvedor Java Cia. de Processamento de Dados do Rio
> > Grande
> >>  do Sul
> >>>   > > Graduando em Ciência da Computação UFRGS
> >>>   > > @realpestano
> >>>   > > http://code.google.com/p/jsf-conventions-framework/
> >>>   > >
> >>>   > >
> >>>   > >
> >>>   > > ________________________________
> >>>   > > De: Gerhard Petracek <ge...@gmail.com>
> >>>   > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> >>>   > > Enviadas: Quarta-feira, 14 de Março de 2012 23:19
> >>>   > > Assunto: Re: MyFaces and CODI
> >>>   > >
> >>>   > > hi rafael,
> >>>   > >
> >>>   > > as you have seen it's easy to provide a custom
> > WindowHandler
> >>  (just
> >>>   > > implement the interface and provide your implementation as
> >>  alternative
> >>>   > cdi
> >>>   > > bean)
> >>>   > > -> you can integrate every custom approach which is
> > enough to
> >>  solve you
> >>>   > > requirements.
> >>>   > >
> >>>   > > if you don't need redirects, you could have a look at
> > e.g.
> >>  [1] which
> >>>   uses
> >>>   > > an internal fallback.
> >>>   > >
> >>>   > > regards,
> >>>   > > gerhard
> >>>   > >
> >>>   > > [1] http://s.apache.org/SAs
> >>>   > >
> >>>   > > http://www.irian.at
> >>>   > >
> >>>   > > Your JSF/JavaEE powerhouse -
> >>>   > > JavaEE Consulting, Development and
> >>>   > > Courses in English and German
> >>>   > >
> >>>   > > Professional Support for Apache MyFaces
> >>>   > >
> >>>   > >
> >>>   > >
> >>>   > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> >>>   > >
> >>>   > > > Hi Gehard,
> >>>   > > >
> >>>   > > > its a stopper to us cause we are still dependent on JSF
> > 1.2
> >>>   > > > Can i implement an alternative
> >>>   > > > to
> >>>   > >
> >>>   >
> >>>
> >>
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> >>>   > > > based on JSF 1.2?
> >>>   > > >
> >>>   > > > i see you use flash scope to span the windowId through
> >>  requests in
> >>>   the
> >>>   > > > server side solution:
> >>>   > > >
> >>>   > > > if (windowId != null)
> >>>   > > > 79         {
> >>>   > > >
> >>>   > > > 80
> >>>   > >
> >>  externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY,
> >>>   > > windowId);
> >>>   > > >
> >>>   > > > 81
> >>>   > >
> > externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
> >>>   > > > 82         }
> >>>   > > >
> >>>   > > > if i put the windownId in the sessionMap it would still
> >
> >>  work? i think
> >>>   > ill
> >>>   > > > find hard time trying to remove the windowId from the
> > map
> >>  when user
> >>>   > leave
> >>>   > > > the page.
> >>>   > > >
> >>>   > > >
> >>>   > > >
> >>>   > > > thanks for your help i really appreciated it.
> >>>   > > >
> >>>   > > > Att,
> >>>   > > > Rafael M. Pestano
> >>>   > > > Desenvolvedor Java Cia. de Processamento de Dados do
> > Rio
> >>  Grande do
> >>>   Sul
> >>>   > > > Graduando em Ciência da Computação UFRGS
> >>>   > > > @realpestano
> >>>   > > > http://code.google.com/p/jsf-conventions-framework/
> >>>   > > >
> >>>   > > >
> >>>   > > >
> >>>   > > > ----- Mensagem original -----
> >>>   > > > De: Gerhard Petracek <ge...@gmail.com>
> >>>   > > > Para: MyFaces Discussion
> > <us...@myfaces.apache.org>
> >>>   > > > Cc:
> >>>   > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:55
> >>>   > > > Assunto: Re: MyFaces and CODI
> >>>   > > >
> >>>   > > > hi rafael,
> >>>   > > >
> >>>   > > > internally the ServerSideWindowHandler is based on the
> > flash
> >>  scope
> >>>   > > (that's
> >>>   > > > one of the mentioned disadvantages)
> >>>   > > > -> it's bound to jsf 2+ -> it is:
> >>>   > > >
> >>>   > > >
> >>>   > >
> >>>   >
> >>>
> >>
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> >>>   > > > (and you can't use the additional js.)
> >>>   > > >
> >>>   > > > with some constellations you just hit the restrictions
> > of
> >>  browsers ->
> >>>   > you
> >>>   > > > have to choose what you really need.
> >>>   > > >
> >>>   > > > regards,
> >>>   > > > gerhard
> >>>   > > >
> >>>   > > > http://www.irian.at
> >>>   > > >
> >>>   > > > Your JSF/JavaEE powerhouse -
> >>>   > > > JavaEE Consulting, Development and
> >>>   > > > Courses in English and German
> >>>   > > >
> >>>   > > > Professional Support for Apache MyFaces
> >>>   > > >
> >>>   > > >
> >>>   > > >
> >>>   > > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> >>>   > > >
> >>>   > > > > i see, i have used the client side one
> >>>   > > > >
> >>>   > > > > <alternatives>
> >>>   > > > >
> >>>   > > >
> >>>   > >
> >>>   >
> >>>
> >>
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
> >>>   > > > > </alternatives>
> >>>   > > > >
> >>>   > > > > i imagine the server side should be
> >>>   > > > >
> >>>   > > > > <alternatives>
> >>>   > > > >
> >>>   > > >
> >>>   > >
> >>>   >
> >>>
> >>
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
> >>>   > > > > </alternatives>alright?
> >>>   > > > >
> >>>   > > > > i will test it tomorrow and give the feedback,
> > thanks.
> >>>   > > > >
> >>>   > > > > Att,
> >>>   > > > > Rafael M. Pestano
> >>>   > > > > Desenvolvedor Java Cia. de Processamento de Dados
> > do
> >>  Rio Grande do
> >>>   > Sul
> >>>   > > > > Graduando em Ciência da Computação UFRGS
> >>>   > > > > @realpestano
> >>>   > > > >
> > http://code.google.com/p/jsf-conventions-framework/
> >>>   > > > >
> >>>   > > > >
> >>>   > > > >
> >>>   > > > > ----- Mensagem original -----
> >>>   > > > > De: Gerhard Petracek
> > <ge...@gmail.com>
> >>>   > > > > Para: MyFaces Discussion
> >>  <us...@myfaces.apache.org>
> >>>   > > > > Cc:
> >>>   > > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:11
> >>>   > > > > Assunto: Re: MyFaces and CODI
> >>>   > > > >
> >>>   > > > > hi rafael,
> >>>   > > > >
> >>>   > > > > the easiest approach to test an alternative for
> > this
> >>  constellation
> >>>   is
> >>>   > > the
> >>>   > > > > activation of the ServerSideWindowHandler
> > (it's a
> >>  std. cdi
> >>>   > @Alternative
> >>>   > > > > implementation -> you can activate it in the
> >>  beans.xml file of your
> >>>   > > > > application).
> >>>   > > > > (however, please be aware that this alternative
> >>  implementation has
> >>>   > some
> >>>   > > > > disadvantages.)
> >>>   > > > >
> >>>   > > > > regards,
> >>>   > > > > gerhard
> >>>   > > > >
> >>>   > > > > http://www.irian.at
> >>>   > > > >
> >>>   > > > > Your JSF/JavaEE powerhouse -
> >>>   > > > > JavaEE Consulting, Development and
> >>>   > > > > Courses in English and German
> >>>   > > > >
> >>>   > > > > Professional Support for Apache MyFaces
> >>>   > > > >
> >>>   > > > >
> >>>   > > > >
> >>>   > > > > 2012/3/14 Rafael Pestano
> > <rm...@yahoo.com.br>
> >>>   > > > >
> >>>   > > > > > Hi Gerhard, i successfuly added codi and
> >>  openwebbeans to an
> >>>   > > application
> >>>   > > > > > running on weblogic 11g
> >>>   > > > > >
> >>>   > > > > > however its a  legacy application which uses
> >>  frames, basicaly we
> >>>   > > have a
> >>>   > > > > > menu on the left frame that targets the
> > center
> >>  frame, something
> >>>   > like:
> >>>   > > > > >
> >>>   > > > > > <h:commandLink value="menuLink"
> >>  action="#{myBean.init}"
> >>>   > > > target="frmDados"
> >>>   > > > > > />
> >>>   > > > > >
> >>>   > > > > >
> >>>   > > > > > the problem is, when a add CODI to the
> > application
> >>  and mark
> >>>   myBean
> >>>   > as
> >>>   > > > > > ViewAccessScoped (and thus the windowId
> > starts to
> >>  be append to
> >>>   the
> >>>   > > url)
> >>>   > > > > > the above menuLink always open the center
> > frame in
> >>  a new browser
> >>>   > tab.
> >>>   > > > > >
> >>>   > > > > > If i remove CODI and set myBean as
> >>  RequestScoped(or any other CDI
> >>>   > > > Scope)
> >>>   > > > > > the application behaves  as expected.
> >>>   > > > > >
> >>>   > > > > > So i think the windowId generated by CODI  is
> >
> >>  causing this
> >>>   issue, i
> >>>   > > > tried
> >>>   > > > > > your solution without success, the windowId
> > isnt
> >>  removed from the
> >>>   > url
> >>>   > > > > and a
> >>>   > > > > > new tab opens when i click in the menuLink.
> >>>   > > > > >
> >>>   > > > > > Any thoughs?
> >>>   > > > > >
> >>>   > > > > >
> >>>   > > > > > thanks for all your help.
> >>>   > > > > >
> >>>   > > > > >
> >>>   > > > > >
> >>>   > > > > > Att,
> >>>   > > > > >
> >>>   > > > > > Rafael M. Pestano
> >>>   > > > > >
> >>>   > > > > > Desenvolvedor Java Cia. de Processamento de
> > Dados
> >>  do Rio Grande
> >>>   do
> >>>   > > Sul
> >>>   > > > > > Graduando em Ciência da Computação UFRGS
> >>>   > > > > > @realpestano
> >>>   > > > > >
> >>  http://code.google.com/p/jsf-conventions-framework/
> >>>   > > > > >
> >>>   > > > > >
> >>>   > > > > >
> >>>   > > > > > ________________________________
> >>>   > > > > > De: Gerhard Petracek
> >>  <ge...@gmail.com>
> >>>   > > > > > Para: MyFaces Discussion
> >>  <us...@myfaces.apache.org>
> >>>   > > > > > Enviadas: Sexta-feira, 9 de Março de 2012
> > 12:38
> >>>   > > > > > Assunto: Re: MyFaces and CODI
> >>>   > > > > >
> >>>   > > > > > hi stephen,
> >>>   > > > > >
> >>>   > > > > > that's right [1] doesn't support it.
> >>>   > > > > > werner committed his improvement and you can
> > try
> >>  [2] and [3] as
> >>>   you
> >>>   > > see
> >>>   > > > > > them right now.
> >>>   > > > > >
> >>>   > > > > > regards,
> >>>   > > > > > gerhard
> >>>   > > > > >
> >>>   > > > > > [1]
> >>>   > > > >
> >>>   >
> > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> >>>   > > > > > [2] http://s.apache.org/rr
> >>>   > > > > > [3] http://s.apache.org/23p
> >>>   > > > > >
> >>>   > > > > > http://www.irian.at
> >>>   > > > > >
> >>>   > > > > > Your JSF/JavaEE powerhouse -
> >>>   > > > > > JavaEE Consulting, Development and
> >>>   > > > > > Courses in English and German
> >>>   > > > > >
> >>>   > > > > > Professional Support for Apache MyFaces
> >>>   > > > > >
> >>>   > > > > >
> >>>   > > > > >
> >>>   > > > > > 2012/3/9 Stephen More
> >>  <st...@gmail.com>
> >>>   > > > > >
> >>>   > > > > > > I was referring to [1]
> >>>   > > > > > >
> >>>   > > >
> >>>
> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> >>>   > > > > > >
> >>>   > > > > > > I guess I just need to wait until the
> > correct
> >>  way is tested and
> >>>   > > > > > > documented in the wiki using:
> >>>   > > > > > >   [1] http://s.apache.org/rr
> >>>   > > > > > >  [2] http://s.apache.org/23p
> >>>   > > > > > >
> >>>   > > > > > >
> >>>   > > > > > >
> >>>   > > > > > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard
> >>  Petracek
> >>>   > > > > > > <ge...@gmail.com>
> > wrote:
> >>>   > > > > > > > @ mark:
> >>>   > > > > > > > i just tested it and it works with
> > [1]
> >>  in combination
> >>>   > > > > > > > with ClientSideWindowHandler [2].
> >>>   > > > > > > >
> >>>   > > > > > > > regards,
> >>>   > > > > > > > gerhard
> >>>   > > > > > > >
> >>>   > > > > > > > [1] http://s.apache.org/rr
> >>>   > > > > > > > [2] http://s.apache.org/23p
> >>>   > > > > > > >
> >>>   > > > > > > > http://www.irian.at
> >>>   > > > > > > >
> >>>   > > > > > > > Your JSF/JavaEE powerhouse -
> >>>   > > > > > > > JavaEE Consulting, Development and
> >>>   > > > > > > > Courses in English and German
> >>>   > > > > > > >
> >>>   > > > > > > > Professional Support for Apache
> > MyFaces
> >>>   > > > > > > >
> >>>   > > > > > > >
> >>>   > > > > > > >
> >>>   > > > > > > > 2012/3/9 Mark Struberg
> >>  <st...@yahoo.de>
> >>>   > > > > > > >
> >>>   > > > > > > >> Hi Stephen!
> >>>   > > > > > > >>
> >>>   > > > > > > >> Well, the current approach in
> > CODI
> >>  is currently under
> >>>   > discussion
> >>>   > > > in
> >>>   > > > > > the
> >>>   > > > > > > >> JSF EG. The whole windowId
> > stuff of
> >>  CODI might end up in the
> >>>   > > > JSF-2.2
> >>>   > > > > > or
> >>>   > > > > > > 2.3
> >>>   > > > > > > >> spec.
> >>>   > > > > > > >>
> >>>   > > > > > > >> >T hat seems to work fine
> > when
> >>  pasting into a new empty
> >>>   > window,
> >>>   > > > but
> >>>   > > > > it
> >>>   > > > > > > >> > still allows you to
> > copy-paste
> >>  the url from one codi
> >>>   window
> >>>   > to
> >>>   > > > an
> >>>   > > > > > > >> > existing codi window.
> >>>   > > > > > > >>
> >>>   > > > > > > >> Nope, because the
> > windowhandler.js
> >>  script will first check
> >>>   the
> >>>   > > > > > > window.name.
> >>>   > > > > > > >> And if this is
> > empty/doesn't fit
> >>  the windowId in the URL,
> >>>   then
> >>>   > > it
> >>>   > > > > will
> >>>   > > > > > > >> reload the page with a freshly
> >>  requested windowId.
> >>>   > > > > > > >>
> >>>   > > > > > > >> LieGrue,
> >>>   > > > > > > >> strub
> >>>   > > > > > > >>
> >>>   > > > > > > >>
> >>>   > > > > > > >>
> >>>   > > > > > > >>
> >>>   > > > > > > >> ----- Original Message -----
> >>>   > > > > > > >> > From: Stephen More
> >>  <st...@gmail.com>
> >>>   > > > > > > >> > To: MyFaces Discussion
> >>  <us...@myfaces.apache.org>
> >>>   > > > > > > >> > Cc:
> >>>   > > > > > > >> > Sent: Friday, March 9,
> > 2012
> >>  1:27 PM
> >>>   > > > > > > >> > Subject: Re: MyFaces and
> > CODI
> >>>   > > > > > > >> >
> >>>   > > > > > > >> > Included in the JSF jar is
> >>>   > > META-INF/resources/javax.faces/jsf.js
> >>>   > > > > > which
> >>>   > > > > > > >> > enables its use by
> >>  <h:outputScript name="jsf.js"
> >>>   > > > > > > >> >
> > library="javax.faces"
> >>>   > > > > > > >> >
> > target="head"/>
> >>>   > > > > > > >> >
> >>>   > > > > > > >> > Should windowhandler.js be
> >
> >>  moved from the examples into a
> >>>   > core
> >>>   > > > > > library
> >>>   > > > > > > >> > so that it can be utilized
> > the
> >>  same way ?
> >>>   > > > > > > >> >
> >>>   > > > > > > >> >
> >>>   > > > > > > >> >
> >>>   > > > > > > >> > On Fri, Mar 9, 2012 at
> > 7:10 AM,
> >>  Gerhard Petracek
> >>>   > > > > > > >> >
> >>  <ge...@gmail.com> wrote:
> >>>   > > > > > > >> >>  hi stephen,
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>  yes - you can add a
> > small
> >>  js (see e.g. [1]) to support
> >>>   > this
> >>>   > > > > > > use-case.
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>  regards,
> >>>   > > > > > > >> >>  gerhard
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>  [1]
> >>  http://s.apache.org/YTq
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>  http://www.irian.at
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>  Your JSF/JavaEE
> > powerhouse
> >>  -
> >>>   > > > > > > >> >>  JavaEE Consulting,
> >>  Development and
> >>>   > > > > > > >> >>  Courses in English
> > and
> >>  German
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>  Professional Support
> > for
> >>  Apache MyFaces
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>  2012/3/9 Stephen More
> >
> >>  <st...@gmail.com>
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>>  Great. I am
> > mainly
> >>  interested in WindowScoped i.e.
> >>>   every
> >>>   > > > > browser
> >>>   > > > > > > tab
> >>>   > > > > > > >> >>>  has its own
> >>  mini-session.
> >>>   > > > > > > >> >>>
> >>>   > > > > > > >> >>>  I see that CODI
> > is
> >>  adding a ?windowId=595 to keep these
> >>>   > > > > > > conversations
> >>>   > > > > > > >> >>>  separate. If a
> > user
> >>  simply copies the url and pastes
> >>>   in a
> >>>   > > new
> >>>   > > > > tab
> >>>   > > > > > > now
> >>>   > > > > > > >> >>>  two browser tabs
> > are
> >>  sharing the same conversation. How
> >>>   > > can I
> >>>   > > > > > > prevent
> >>>   > > > > > > >> >>>  this ? I want to
> >>  enforce that EVERY browser tab has its
> >>>   > own
> >>>   > > > > > > >> >>>  conversation.
> > Perhaps
> >>  a simple error to the user saying
> >>>   > > > > > > >> > "Sorry" or
> >>>   > > > > > > >> >>>  start a new
> >>  conversation.
> >>>   > > > > > > >> >>>
> >>>   > > > > > > >> >>>  -Thanks
> >>>   > > > > > > >> >>>
> >>>   > > > > > > >> >>>  On Fri, Mar 9,
> > 2012 at
> >>  3:18 AM, Gerhard Petracek
> >>>   > > > > > > >> >>>
> >>  <ge...@gmail.com> wrote:
> >>>   > > > > > > >> >>>  > hi stephen,
> >>>   > > > > > > >> >>>  >
> >>>   > > > > > > >> >>>  > (that's
> > an
> >>  issue with the setup of weld and not
> >>>   related
> >>>   > > to
> >>>   > > > > > > >> > myfaces codi.)
> >>>   > > > > > > >> >>>  > however,
> > myfaces
> >>  codi doesn't need this support -> if
> >>>   > you
> >>>   > > > > > > >> > also don't need
> >>>   > > > > > > >> >>>  > cdi support
> > for
> >>  servlets, filters or listeners, you
> >>>   can
> >>>   > > run
> >>>   > > > > the
> >>>   > > > > > > >> >>>  application
> >>>   > > > > > > >> >>>  > without
> > those
> >>  features.
> >>>   > > > > > > >> >>>  >
> >>>   > > > > > > >> >>>  > regards,
> >>>   > > > > > > >> >>>  > gerhard
> >>>   > > > > > > >> >>>  >
> >>>   > > > > > > >> >>>  >
> >>  http://www.irian.at
> >>>   > > > > > > >> >>>  >
> >>>   > > > > > > >> >>>  > Your
> > JSF/JavaEE
> >>  powerhouse -
> >>>   > > > > > > >> >>>  > JavaEE
> >>  Consulting, Development and
> >>>   > > > > > > >> >>>  > Courses in
> >>  English and German
> >>>   > > > > > > >> >>>  >
> >>>   > > > > > > >> >>>  > Professional
> >
> >>  Support for Apache MyFaces
> >>>   > > > > > > >> >>>  >
> >>>   > > > > > > >> >>>  >
> >>>   > > > > > > >> >>>  > 2012/3/9
> > Stephen
> >>  More <st...@gmail.com>
> >>>   > > > > > > >> >>>  >
> >>>   > > > > > > >> >>>  >> I too am
> >
> >>  trying to get a simple example working. I
> >>>   > have
> >>>   > > > put
> >>>   > > > > > > >> > together
> >>>   > > > > > > >> >>>  >> this
> > project:
> >>>   > > > > > > >> >
> >>  http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> >>>   > > > > > > >> >>>  >>
> >>>   > > > > > > >> >>>  >> mvn
> >>  jetty:run-war   results in
> >>>   > > > > > > >> >>>  >>
> >>>   > > > > > > >> >>>  >> SEVERE:
> >>  Unable to create JettyWeldInjector. CDI
> >>>   > > injection
> >>>   > > > > will
> >>>   > > > > > > >> > not be
> >>>   > > > > > > >> >>>  >>
> > available in
> >>  Servlets, Filters or Listeners
> >>>   > > > > > > >> >>>  >>
> >>>   > > > > > > >> >>>  >> What
> > else do
> >>  I need to get this simple example
> >>>   > working ?
> >>>   > > > > > > >> >>>  >>
> >>>   > > > > > > >> >>>  >> -Thanks
> >>>   > > > > > > >> >>>  >>
> >>>   > > > > > > >> >>>  >> On Thu,
> > Mar
> >>  8, 2012 at 11:07 AM, Gerhard Petracek
> >>>   > > > > > > >> >>>  >>
> >>  <ge...@gmail.com> wrote:
> >>>   > > > > > > >> >>>  >> > hi
> > jose,
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> > first of
> >>  all: welcome @ myfaces!
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> > concrete
> >>  questions are very welcome and we will
> >>>   > > improve
> >>>   > > > > > > >> > the wiki
> >>>   > > > > > > >> >>>  based on
> >>>   > > > > > > >> >>>  >> >
> > them.
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> > regards,
> >>>   > > > > > > >> >>>  >> >
> > gerhard
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> >>  http://www.irian.at
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> > Your
> >>  JSF/JavaEE powerhouse -
> >>>   > > > > > > >> >>>  >> >
> > JavaEE
> >>  Consulting, Development and
> >>>   > > > > > > >> >>>  >> >
> > Courses
> >>  in English and German
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> >>  Professional Support for Apache MyFaces
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> > 2012/3/8
> >>  José Luis Cetina <ma...@gmail.com>
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >>
> > Hi
> >>  im so excited to start and use MyFaces and
> >>>   CODI
> >>>   > > > > > > >> > but i cant get any
> >>>   > > > > > > >> >>>  >> >>
> >
> >>  "good" documentation in fact i only can get
> >>>   > > > > > > >> > like 2 or 3 mini tutorial
> >>>   > > > > > > >> >>>  >> but
> >>>   > > > > > > >> >>>  >> >>
> > they
> >>  are really incomplete, can somebody
> >>>   recommend
> >>>   > me
> >>>   > > > > > > >> > to some
> >>>   > > > > > > >> >>>  tutorial
> >>>   > > > > > > >> >>>  >> or
> >>>   > > > > > > >> >>>  >> >>
> > book
> >>  to start with *CODI *y see this is an
> >>>   > excellent
> >>>   > > > > > > >> > extension, im
> >>>   > > > > > > >> >>>  >> moving
> >>>   > > > > > > >> >>>  >> >>
> > from
> >>  mojarra and CDI to MyFaces and MyFaces
> >>>   > > > > > > >> > extensions, please where
> >>>   > > > > > > >> >>>  i
> >>>   > > > > > > >> >>>  >> can
> >>>   > > > > > > >> >>>  >> >>
> > find
> >>  value information
> >>>   > > > > > > >> >>>  >> >>
> >>>   > > > > > > >> >>>  >> >>
> > The
> >>  only URL where i found a little info is this:
> >>>   > > > > > > >> >>>  >> >>
> >>>   > > > > > > >> >
> >>  https://cwiki.apache.org/confluence/display/EXTCDI/Index
> >>>   > > > > > > >> >>>  >> >>
> >>>   > > > > > > >> >>>  >> >>
> > --
> >>>   > > > > > > >> >>>  >> >>
> >>>   > > > > > > >> >
> >>>   > > > >
> >>  -------------------------------------------------------------------
> >>>   > > > > > > >> >>>  >> >>
> >
> >>  *SCJA. José Luis Cetina*
> >>>   > > > > > > >> >>>  >> >>
> >>>   > > > > > > >> >
> >>>   > > > >
> >>  -------------------------------------------------------------------
> >>>   > > > > > > >> >>>  >> >>
> >>>   > > > > > > >> >>>  >>
> >>>   > > > > > > >> >>>
> >>>   > > > > > > >> >
> >>>   > > > > > > >>
> >>>   > > > > > >
> >>>   > > > > >
> >>>   > > > >
> >>>   > > > >
> >>>   > > >
> >>>   > >
> >>>   >
> >>>
> >>>
> >>
> >
>


Re: MyFaces and CODI

Posted by Mark Struberg <st...@yahoo.de>.
Oops, overlooked that.

In that case I'd say the following things might get checked.

a.) If you get an AJAX request, does the windowId get propagated properly?
Does a CODI @WindowScoped bean show the correct context, or do you loose it with each request?

     -> windowId gets lost somewhere

b.) If the WindowScoped bean works, then I'd look if the view might gets ditched or wrongly touched due to the additional handling in a4j.
You could set a breakpoint in ViewAccessConversationExpirationEvaluator#isExpored() to see whether/when the bean gets ditched.

LieGrue,
strub


----- Original Message -----
> From: Gerhard Petracek <ge...@gmail.com>
> To: MyFaces Discussion <us...@myfaces.apache.org>
> Cc: 
> Sent: Sunday, March 18, 2012 8:47 PM
> Subject: Re: MyFaces and CODI
> 
> hi mark,
> 
> since rafael mentioned that it works without a4j and there is no issue with
> a4j in the demo, i don't think that it is such a basic issue.
> 
> regards,
> gerhard
> 
> http://www.irian.at
> 
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
> 
> Professional Support for Apache MyFaces
> 
> 
> 
> 2012/3/18 Mark Struberg <st...@yahoo.de>
> 
>> 
>> 
>>  Gerhard pinged me that you are using @ViewAccessScoped. In that case 
> I'd
>>  recomment to debug if the whole Context Extension gets properly 
> registrated.
>> 
>>  If the CDI container doesn't know the @ViewAccessScoped annotation then
>>  all your beans will end up as @Dependent...
>> 
>>  LieGrue,
>>  strub
>> 
>> 
>>  ----- Original Message -----
>>  > From: Mark Struberg <st...@yahoo.de>
>>  > To: MyFaces Discussion <us...@myfaces.apache.org>
>>  > Cc:
>>  > Sent: Sunday, March 18, 2012 7:42 PM
>>  > Subject: Re: MyFaces and CODI
>>  >
>>  >>  when i find out what's causing my bean to be instantiated on 
> every ajax
>>  > call
>>  >>  i'll come back here to report.
>>  >
>>  > That sounds familiar - good luck ;)
>>  >
>>  > Which scope does your bean have? You are sure that you are really 
> using
>>  CDI
>>  > javax.enterprise.context.* scopes and not javax.faces.bean.* scopes 
> due
>>  to a
>>  > wrong auto-import  of your IDE?
>>  >
>>  > LieGrue,
>>  > strub
>>  >
>>  >
>>  >
>>  > ----- Original Message -----
>>  >>  From: Rafael Pestano <rm...@yahoo.com.br>
>>  >>  To: MyFaces Discussion <us...@myfaces.apache.org>
>>  >>  Cc:
>>  >>  Sent: Saturday, March 17, 2012 4:34 PM
>>  >>  Subject: Re: MyFaces and CODI
>>  >>
>>  >>  yeap, i also deployed the server side demo in tomcat and it works 
> as
>>  > expected,
>>  >>  when i find out what's causing my bean to be instantiated on 
> every ajax
>>  > call
>>  >>  i'll come back here to report.
>>  >>
>>  >>  many thanks for the assistance.
>>  >>
>>  >>  Att,
>>  >>
>>  >>  Rafael M. Pestano
>>  >>
>>  >>  Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande 
> do Sul
>>  >>  Graduando em Ciência da Computação UFRGS
>>  >>  @realpestano
>>  >>  http://code.google.com/p/jsf-conventions-framework/
>>  >>
>>  >>
>>  >>
>>  >>  ________________________________
>>  >>  De: Gerhard Petracek <ge...@gmail.com>
>>  >>  Para: MyFaces Discussion <us...@myfaces.apache.org>
>>  >>  Enviadas: Sexta-feira, 16 de Março de 2012 22:46
>>  >>  Assunto: Re: MyFaces and CODI
>>  >>
>>  >>  hi rafael,
>>  >>
>>  >>  i can't reproduce it. i added richfaces to the previous demo 
> as well as
>>  > a4j
>>  >>  support to the input component and everything works as expected.
>>  >>
>>  >>  regards,
>>  >>  gerhard
>>  >>
>>  >>  http://www.irian.at
>>  >>
>>  >>  Your JSF/JavaEE powerhouse -
>>  >>  JavaEE Consulting, Development and
>>  >>  Courses in English and German
>>  >>
>>  >>  Professional Support for Apache MyFaces
>>  >>
>>  >>
>>  >>
>>  >>  2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>>  >>
>>  >>>   Hi Gehard,
>>  >>>
>>  >>>   i didnt got the ideia, do you have any example or a link 
> showing this
>>  >>>   approach?
>>  >>>
>>  >>>   what i have got til now is:
>>  >>>   1 - WindowContextIdHolderComponent is a jsf component which 
> is added
>>  >>>   dynamically to the view
>>  >>>   2 - this component holds the windowId
>>  >>>   3 - i have,somehow , to keep the windowId the same between 
> requests
>>  so
>>  > my
>>  >>>   ViewAccessScoped bean  is "keeped alive" <- 
> here is where
>>  > im
>>  >>  stuck
>>  >>>
>>  >>>
>>  >>>
>>  >>>
>>  >>>   Att,
>>  >>>   Rafael M. Pestano
>>  >>>   Desenvolvedor Java Cia. de Processamento de Dados do Rio 
> Grande do
>>  Sul
>>  >>>   Graduando em Ciência da Computação UFRGS
>>  >>>   @realpestano
>>  >>>  http://code.google.com/p/jsf-conventions-framework/
>>  >>>
>>  >>>
>>  >>>
>>  >>>   ----- Mensagem original -----
>>  >>>   De: Gerhard Petracek <ge...@gmail.com>
>>  >>>   Para: MyFaces Discussion <us...@myfaces.apache.org>
>>  >>>   Cc:
>>  >>>   Enviadas: Quinta-feira, 15 de Março de 2012 11:28
>>  >>>   Assunto: Re: MyFaces and CODI
>>  >>>
>>  >>>   hi rafael,
>>  >>>
>>  >>>   @ WindowContextIdHolderComponent:
>>  >>>
>>  >>>   that's the name of the class. you have to resolve the 
> component
>>  > (by
>>  >>  type)
>>  >>>   before the view gets rendered and add it to the ajax enabled 
> a4j
>>  > components
>>  >>>   via the corresponding java-api.
>>  >>>
>>  >>>   @ custom approach:
>>  >>>   independent of the concrete approach you would like to use, 
> you just
>>  > have
>>  >>>   to ensure that the information is available on the 
> server-side (for
>>  > every
>>  >>>   jsf request which starts the jsf request-lifecycle).
>>  >>>
>>  >>>   regards,
>>  >>>   gerhard
>>  >>>
>>  >>>   Your JSF/JavaEE powerhouse -
>>  >>>   JavaEE Consulting, Development and
>>  >>>   Courses in English and German
>>  >>>
>>  >>>   Professional Support for Apache MyFaces
>>  >>>
>>  >>>
>>  >>>   2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>>  >>>
>>  >>>   > Hi again,
>>  >>>   >
>>  >>>   > "it will work with a4j as soon as you
>>  >>>   > ensure that it gets restored for requests triggered by 
> a4j "
>>  > you
>>  >>  mean i
>>  >>>   > should send WindowContextIdHolderComponent  within the 
> ajax
>>  > request?
>>  >>>   >
>>  >>>   > somethink like <a4j:support
>>  >>  process="WindowContextIdHolderComponent"/> ?
>>  >>>   >
>>  >>>   > if so whats the id of the generated component?
>>  >>>   >
>>  >>>   > i also have another question, in the javadoc
>>  >>>   > of WindowContextConfig isUrlParameterSuported() says
>>  >>>   >
>>  >>>   > "Specifies if it is allowed to use URL params for 
> forwarding
>>  > the
>>  >>  current
>>  >>>   > window-id. (deactivate it e.g. for higher security - in 
> this case
>>  >
>>  >>  it's
>>  >>>   > required to use a window id provided by a component lib 
> or a
>>  >>  server-side
>>  >>>   > window-handler"
>>  >>>   >
>>  >>>   > how can i create a component to handle the window id? 
> can i do
>>  > that
>>  >>  with
>>  >>>   > an h:inputHidden for example?
>>  >>>   >
>>  >>>   > thanks for the help.
>>  >>>   >
>>  >>>   >
>>  >>>   >
>>  >>>   > Att,
>>  >>>   >
>>  >>>   > Rafael M. Pestano
>>  >>>   >
>>  >>>   > Desenvolvedor Java Cia. de Processamento de Dados do 
> Rio Grande
>>  > do Sul
>>  >>>   > Graduando em Ciência da Computação UFRGS
>>  >>>   > @realpestano
>>  >>>   > http://code.google.com/p/jsf-conventions-framework/
>>  >>>   >
>>  >>>   >
>>  >>>   >
>>  >>>   > ________________________________
>>  >>>   > De: Gerhard Petracek <ge...@gmail.com>
>>  >>>   > Para: MyFaces Discussion 
> <us...@myfaces.apache.org>
>>  >>>   > Enviadas: Quinta-feira, 15 de Março de 2012 10:37
>>  >>>   > Assunto: Re: MyFaces and CODI
>>  >>>   >
>>  >>>   > hi rafael,
>>  >>>   >
>>  >>>   > the fallback adds a component 
> (WindowContextIdHolderComponent)
>>  >>>   dynamically
>>  >>>   > (as a direct child of UiViewRoot) -> it will work 
> with a4j as
>>  > soon
>>  >>  as you
>>  >>>   > ensure that it gets restored for requests triggered by 
> a4j.
>>  >>>   >
>>  >>>   > regards,
>>  >>>   > gerhard
>>  >>>   >
>>  >>>   > http://www.irian.at
>>  >>>   >
>>  >>>   > Your JSF/JavaEE powerhouse -
>>  >>>   > JavaEE Consulting, Development and
>>  >>>   > Courses in English and German
>>  >>>   >
>>  >>>   > Professional Support for Apache MyFaces
>>  >>>   >
>>  >>>   >
>>  >>>   > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>>  >>>   >
>>  >>>   > > well its not 100% yet ;(...on every ajaxCall my
>>  > ViewAccessScoped
>>  >>  bean
>>  >>>   is
>>  >>>   > > being instantiated,
>>  >>>   > >
>>  >>>   > > im using a4j, there is any known issue with it?
>>  >>>   > >
>>  >>>   > > for example <h:selectOneMenu .....>
>>  >>>   > >                         <a4j:support
>>  >>  event="onchange" ....action="when
>>  >>>   > the
>>  >>>   > > action is called the bean constructor gets 
> called"/>
>>  >>>   > >                     </h:selectOneMenu>
>>  >>>   > >
>>  >>>   > > if i change from View to RequestScoped the 
> bahavior is the
>>  > same,
>>  >>  any
>>  >>>   > ideas?
>>  >>>   > >
>>  >>>   > >
>>  >>>   > > thanks in advance.
>>  >>>   > >
>>  >>>   > >
>>  >>>   > > Att,
>>  >>>   > >
>>  >>>   > > Rafael M. Pestano
>>  >>>   > >
>>  >>>   > > Desenvolvedor Java Cia. de Processamento de Dados 
> do Rio
>>  > Grande
>>  >>  do Sul
>>  >>>   > > Graduando em Ciência da Computação UFRGS
>>  >>>   > > @realpestano
>>  >>>   > > 
> http://code.google.com/p/jsf-conventions-framework/
>>  >>>   > >
>>  >>>   > >
>>  >>>   > >
>>  >>>   > > ________________________________
>>  >>>   > >  De: Rafael Pestano <rm...@yahoo.com.br>
>>  >>>   > > Para: MyFaces Discussion 
> <us...@myfaces.apache.org>
>>  >>>   > > Enviadas: Quinta-feira, 15 de Março de 2012 8:45
>>  >>>   > > Assunto: Re: MyFaces and CODI
>>  >>>   > >
>>  >>>   > > "if you don't need redirects, you could 
> have a look
>>  > at
>>  >>  e.g. [1] which
>>  >>>   > uses
>>  >>>   > > an internal fallback." yea, its our case and 
> it just
>>  > works!
>>  >>>   > >
>>  >>>   > > many thanks for your help, keep the great work!
>>  >>>   > >
>>  >>>   > > Att,
>>  >>>   > >
>>  >>>   > > Rafael M. Pestano
>>  >>>   > >
>>  >>>   > > Desenvolvedor Java Cia. de Processamento de Dados 
> do Rio
>>  > Grande
>>  >>  do Sul
>>  >>>   > > Graduando em Ciência da Computação UFRGS
>>  >>>   > > @realpestano
>>  >>>   > > 
> http://code.google.com/p/jsf-conventions-framework/
>>  >>>   > >
>>  >>>   > >
>>  >>>   > >
>>  >>>   > > ________________________________
>>  >>>   > > De: Gerhard Petracek 
> <ge...@gmail.com>
>>  >>>   > > Para: MyFaces Discussion 
> <us...@myfaces.apache.org>
>>  >>>   > > Enviadas: Quarta-feira, 14 de Março de 2012 23:19
>>  >>>   > > Assunto: Re: MyFaces and CODI
>>  >>>   > >
>>  >>>   > > hi rafael,
>>  >>>   > >
>>  >>>   > > as you have seen it's easy to provide a custom
>>  > WindowHandler
>>  >>  (just
>>  >>>   > > implement the interface and provide your 
> implementation as
>>  >>  alternative
>>  >>>   > cdi
>>  >>>   > > bean)
>>  >>>   > > -> you can integrate every custom approach 
> which is
>>  > enough to
>>  >>  solve you
>>  >>>   > > requirements.
>>  >>>   > >
>>  >>>   > > if you don't need redirects, you could have a 
> look at
>>  > e.g.
>>  >>  [1] which
>>  >>>   uses
>>  >>>   > > an internal fallback.
>>  >>>   > >
>>  >>>   > > regards,
>>  >>>   > > gerhard
>>  >>>   > >
>>  >>>   > > [1] http://s.apache.org/SAs
>>  >>>   > >
>>  >>>   > > http://www.irian.at
>>  >>>   > >
>>  >>>   > > Your JSF/JavaEE powerhouse -
>>  >>>   > > JavaEE Consulting, Development and
>>  >>>   > > Courses in English and German
>>  >>>   > >
>>  >>>   > > Professional Support for Apache MyFaces
>>  >>>   > >
>>  >>>   > >
>>  >>>   > >
>>  >>>   > > 2012/3/15 Rafael Pestano 
> <rm...@yahoo.com.br>
>>  >>>   > >
>>  >>>   > > > Hi Gehard,
>>  >>>   > > >
>>  >>>   > > > its a stopper to us cause we are still 
> dependent on JSF
>>  > 1.2
>>  >>>   > > > Can i implement an alternative
>>  >>>   > > > to
>>  >>>   > >
>>  >>>   >
>>  >>>
>>  >>
>>  >
>> 
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
>>  >>>   > > > based on JSF 1.2?
>>  >>>   > > >
>>  >>>   > > > i see you use flash scope to span the 
> windowId through
>>  >>  requests in
>>  >>>   the
>>  >>>   > > > server side solution:
>>  >>>   > > >
>>  >>>   > > > if (windowId != null)
>>  >>>   > > > 79         {
>>  >>>   > > >
>>  >>>   > > > 80
>>  >>>   > >
>>  >>  
> externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY,
>>  >>>   > > windowId);
>>  >>>   > > >
>>  >>>   > > > 81
>>  >>>   > >
>>  > externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
>>  >>>   > > > 82         }
>>  >>>   > > >
>>  >>>   > > > if i put the windownId in the sessionMap it 
> would still
>>  >
>>  >>  work? i think
>>  >>>   > ill
>>  >>>   > > > find hard time trying to remove the windowId 
> from the
>>  > map
>>  >>  when user
>>  >>>   > leave
>>  >>>   > > > the page.
>>  >>>   > > >
>>  >>>   > > >
>>  >>>   > > >
>>  >>>   > > > thanks for your help i really appreciated it.
>>  >>>   > > >
>>  >>>   > > > Att,
>>  >>>   > > > Rafael M. Pestano
>>  >>>   > > > Desenvolvedor Java Cia. de Processamento de 
> Dados do
>>  > Rio
>>  >>  Grande do
>>  >>>   Sul
>>  >>>   > > > Graduando em Ciência da Computação UFRGS
>>  >>>   > > > @realpestano
>>  >>>   > > > 
> http://code.google.com/p/jsf-conventions-framework/
>>  >>>   > > >
>>  >>>   > > >
>>  >>>   > > >
>>  >>>   > > > ----- Mensagem original -----
>>  >>>   > > > De: Gerhard Petracek 
> <ge...@gmail.com>
>>  >>>   > > > Para: MyFaces Discussion
>>  > <us...@myfaces.apache.org>
>>  >>>   > > > Cc:
>>  >>>   > > > Enviadas: Quarta-feira, 14 de Março de 2012 
> 20:55
>>  >>>   > > > Assunto: Re: MyFaces and CODI
>>  >>>   > > >
>>  >>>   > > > hi rafael,
>>  >>>   > > >
>>  >>>   > > > internally the ServerSideWindowHandler is 
> based on the
>>  > flash
>>  >>  scope
>>  >>>   > > (that's
>>  >>>   > > > one of the mentioned disadvantages)
>>  >>>   > > > -> it's bound to jsf 2+ -> it is:
>>  >>>   > > >
>>  >>>   > > >
>>  >>>   > >
>>  >>>   >
>>  >>>
>>  >>
>>  >
>> 
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
>>  >>>   > > > (and you can't use the additional js.)
>>  >>>   > > >
>>  >>>   > > > with some constellations you just hit the 
> restrictions
>>  > of
>>  >>  browsers ->
>>  >>>   > you
>>  >>>   > > > have to choose what you really need.
>>  >>>   > > >
>>  >>>   > > > regards,
>>  >>>   > > > gerhard
>>  >>>   > > >
>>  >>>   > > > http://www.irian.at
>>  >>>   > > >
>>  >>>   > > > Your JSF/JavaEE powerhouse -
>>  >>>   > > > JavaEE Consulting, Development and
>>  >>>   > > > Courses in English and German
>>  >>>   > > >
>>  >>>   > > > Professional Support for Apache MyFaces
>>  >>>   > > >
>>  >>>   > > >
>>  >>>   > > >
>>  >>>   > > > 2012/3/15 Rafael Pestano 
> <rm...@yahoo.com.br>
>>  >>>   > > >
>>  >>>   > > > > i see, i have used the client side one
>>  >>>   > > > >
>>  >>>   > > > > <alternatives>
>>  >>>   > > > >
>>  >>>   > > >
>>  >>>   > >
>>  >>>   >
>>  >>>
>>  >>
>>  >
>> 
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
>>  >>>   > > > > </alternatives>
>>  >>>   > > > >
>>  >>>   > > > > i imagine the server side should be
>>  >>>   > > > >
>>  >>>   > > > > <alternatives>
>>  >>>   > > > >
>>  >>>   > > >
>>  >>>   > >
>>  >>>   >
>>  >>>
>>  >>
>>  >
>> 
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
>>  >>>   > > > > </alternatives>alright?
>>  >>>   > > > >
>>  >>>   > > > > i will test it tomorrow and give the 
> feedback,
>>  > thanks.
>>  >>>   > > > >
>>  >>>   > > > > Att,
>>  >>>   > > > > Rafael M. Pestano
>>  >>>   > > > > Desenvolvedor Java Cia. de Processamento 
> de Dados
>>  > do
>>  >>  Rio Grande do
>>  >>>   > Sul
>>  >>>   > > > > Graduando em Ciência da Computação UFRGS
>>  >>>   > > > > @realpestano
>>  >>>   > > > >
>>  > http://code.google.com/p/jsf-conventions-framework/
>>  >>>   > > > >
>>  >>>   > > > >
>>  >>>   > > > >
>>  >>>   > > > > ----- Mensagem original -----
>>  >>>   > > > > De: Gerhard Petracek
>>  > <ge...@gmail.com>
>>  >>>   > > > > Para: MyFaces Discussion
>>  >>  <us...@myfaces.apache.org>
>>  >>>   > > > > Cc:
>>  >>>   > > > > Enviadas: Quarta-feira, 14 de Março de 
> 2012 20:11
>>  >>>   > > > > Assunto: Re: MyFaces and CODI
>>  >>>   > > > >
>>  >>>   > > > > hi rafael,
>>  >>>   > > > >
>>  >>>   > > > > the easiest approach to test an 
> alternative for
>>  > this
>>  >>  constellation
>>  >>>   is
>>  >>>   > > the
>>  >>>   > > > > activation of the 
> ServerSideWindowHandler
>>  > (it's a
>>  >>  std. cdi
>>  >>>   > @Alternative
>>  >>>   > > > > implementation -> you can activate it 
> in the
>>  >>  beans.xml file of your
>>  >>>   > > > > application).
>>  >>>   > > > > (however, please be aware that this 
> alternative
>>  >>  implementation has
>>  >>>   > some
>>  >>>   > > > > disadvantages.)
>>  >>>   > > > >
>>  >>>   > > > > regards,
>>  >>>   > > > > gerhard
>>  >>>   > > > >
>>  >>>   > > > > http://www.irian.at
>>  >>>   > > > >
>>  >>>   > > > > Your JSF/JavaEE powerhouse -
>>  >>>   > > > > JavaEE Consulting, Development and
>>  >>>   > > > > Courses in English and German
>>  >>>   > > > >
>>  >>>   > > > > Professional Support for Apache MyFaces
>>  >>>   > > > >
>>  >>>   > > > >
>>  >>>   > > > >
>>  >>>   > > > > 2012/3/14 Rafael Pestano
>>  > <rm...@yahoo.com.br>
>>  >>>   > > > >
>>  >>>   > > > > > Hi Gerhard, i successfuly added 
> codi and
>>  >>  openwebbeans to an
>>  >>>   > > application
>>  >>>   > > > > > running on weblogic 11g
>>  >>>   > > > > >
>>  >>>   > > > > > however its a  legacy application 
> which uses
>>  >>  frames, basicaly we
>>  >>>   > > have a
>>  >>>   > > > > > menu on the left frame that targets 
> the
>>  > center
>>  >>  frame, something
>>  >>>   > like:
>>  >>>   > > > > >
>>  >>>   > > > > > <h:commandLink 
> value="menuLink"
>>  >>  action="#{myBean.init}"
>>  >>>   > > > target="frmDados"
>>  >>>   > > > > > />
>>  >>>   > > > > >
>>  >>>   > > > > >
>>  >>>   > > > > > the problem is, when a add CODI to 
> the
>>  > application
>>  >>  and mark
>>  >>>   myBean
>>  >>>   > as
>>  >>>   > > > > > ViewAccessScoped (and thus the 
> windowId
>>  > starts to
>>  >>  be append to
>>  >>>   the
>>  >>>   > > url)
>>  >>>   > > > > > the above menuLink always open the 
> center
>>  > frame in
>>  >>  a new browser
>>  >>>   > tab.
>>  >>>   > > > > >
>>  >>>   > > > > > If i remove CODI and set myBean as
>>  >>  RequestScoped(or any other CDI
>>  >>>   > > > Scope)
>>  >>>   > > > > > the application behaves  as 
> expected.
>>  >>>   > > > > >
>>  >>>   > > > > > So i think the windowId generated 
> by CODI  is
>>  >
>>  >>  causing this
>>  >>>   issue, i
>>  >>>   > > > tried
>>  >>>   > > > > > your solution without success, the 
> windowId
>>  > isnt
>>  >>  removed from the
>>  >>>   > url
>>  >>>   > > > > and a
>>  >>>   > > > > > new tab opens when i click in the 
> menuLink.
>>  >>>   > > > > >
>>  >>>   > > > > > Any thoughs?
>>  >>>   > > > > >
>>  >>>   > > > > >
>>  >>>   > > > > > thanks for all your help.
>>  >>>   > > > > >
>>  >>>   > > > > >
>>  >>>   > > > > >
>>  >>>   > > > > > Att,
>>  >>>   > > > > >
>>  >>>   > > > > > Rafael M. Pestano
>>  >>>   > > > > >
>>  >>>   > > > > > Desenvolvedor Java Cia. de 
> Processamento de
>>  > Dados
>>  >>  do Rio Grande
>>  >>>   do
>>  >>>   > > Sul
>>  >>>   > > > > > Graduando em Ciência da Computação 
> UFRGS
>>  >>>   > > > > > @realpestano
>>  >>>   > > > > >
>>  >>  http://code.google.com/p/jsf-conventions-framework/
>>  >>>   > > > > >
>>  >>>   > > > > >
>>  >>>   > > > > >
>>  >>>   > > > > > ________________________________
>>  >>>   > > > > > De: Gerhard Petracek
>>  >>  <ge...@gmail.com>
>>  >>>   > > > > > Para: MyFaces Discussion
>>  >>  <us...@myfaces.apache.org>
>>  >>>   > > > > > Enviadas: Sexta-feira, 9 de Março 
> de 2012
>>  > 12:38
>>  >>>   > > > > > Assunto: Re: MyFaces and CODI
>>  >>>   > > > > >
>>  >>>   > > > > > hi stephen,
>>  >>>   > > > > >
>>  >>>   > > > > > that's right [1] doesn't 
> support it.
>>  >>>   > > > > > werner committed his improvement 
> and you can
>>  > try
>>  >>  [2] and [3] as
>>  >>>   you
>>  >>>   > > see
>>  >>>   > > > > > them right now.
>>  >>>   > > > > >
>>  >>>   > > > > > regards,
>>  >>>   > > > > > gerhard
>>  >>>   > > > > >
>>  >>>   > > > > > [1]
>>  >>>   > > > >
>>  >>>   >
>>  > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
>>  >>>   > > > > > [2] http://s.apache.org/rr
>>  >>>   > > > > > [3] http://s.apache.org/23p
>>  >>>   > > > > >
>>  >>>   > > > > > http://www.irian.at
>>  >>>   > > > > >
>>  >>>   > > > > > Your JSF/JavaEE powerhouse -
>>  >>>   > > > > > JavaEE Consulting, Development and
>>  >>>   > > > > > Courses in English and German
>>  >>>   > > > > >
>>  >>>   > > > > > Professional Support for Apache 
> MyFaces
>>  >>>   > > > > >
>>  >>>   > > > > >
>>  >>>   > > > > >
>>  >>>   > > > > > 2012/3/9 Stephen More
>>  >>  <st...@gmail.com>
>>  >>>   > > > > >
>>  >>>   > > > > > > I was referring to [1]
>>  >>>   > > > > > >
>>  >>>   > > >
>>  >>>
>>  http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
>>  >>>   > > > > > >
>>  >>>   > > > > > > I guess I just need to wait 
> until the
>>  > correct
>>  >>  way is tested and
>>  >>>   > > > > > > documented in the wiki using:
>>  >>>   > > > > > >   [1] http://s.apache.org/rr
>>  >>>   > > > > > >  [2] http://s.apache.org/23p
>>  >>>   > > > > > >
>>  >>>   > > > > > >
>>  >>>   > > > > > >
>>  >>>   > > > > > > On Fri, Mar 9, 2012 at 9:20 
> AM, Gerhard
>>  >>  Petracek
>>  >>>   > > > > > > 
> <ge...@gmail.com>
>>  > wrote:
>>  >>>   > > > > > > > @ mark:
>>  >>>   > > > > > > > i just tested it and it 
> works with
>>  > [1]
>>  >>  in combination
>>  >>>   > > > > > > > with 
> ClientSideWindowHandler [2].
>>  >>>   > > > > > > >
>>  >>>   > > > > > > > regards,
>>  >>>   > > > > > > > gerhard
>>  >>>   > > > > > > >
>>  >>>   > > > > > > > [1] 
> http://s.apache.org/rr
>>  >>>   > > > > > > > [2] 
> http://s.apache.org/23p
>>  >>>   > > > > > > >
>>  >>>   > > > > > > > http://www.irian.at
>>  >>>   > > > > > > >
>>  >>>   > > > > > > > Your JSF/JavaEE 
> powerhouse -
>>  >>>   > > > > > > > JavaEE Consulting, 
> Development and
>>  >>>   > > > > > > > Courses in English and 
> German
>>  >>>   > > > > > > >
>>  >>>   > > > > > > > Professional Support for 
> Apache
>>  > MyFaces
>>  >>>   > > > > > > >
>>  >>>   > > > > > > >
>>  >>>   > > > > > > >
>>  >>>   > > > > > > > 2012/3/9 Mark Struberg
>>  >>  <st...@yahoo.de>
>>  >>>   > > > > > > >
>>  >>>   > > > > > > >> Hi Stephen!
>>  >>>   > > > > > > >>
>>  >>>   > > > > > > >> Well, the current 
> approach in
>>  > CODI
>>  >>  is currently under
>>  >>>   > discussion
>>  >>>   > > > in
>>  >>>   > > > > > the
>>  >>>   > > > > > > >> JSF EG. The whole 
> windowId
>>  > stuff of
>>  >>  CODI might end up in the
>>  >>>   > > > JSF-2.2
>>  >>>   > > > > > or
>>  >>>   > > > > > > 2.3
>>  >>>   > > > > > > >> spec.
>>  >>>   > > > > > > >>
>>  >>>   > > > > > > >> >T hat seems to 
> work fine
>>  > when
>>  >>  pasting into a new empty
>>  >>>   > window,
>>  >>>   > > > but
>>  >>>   > > > > it
>>  >>>   > > > > > > >> > still allows you 
> to
>>  > copy-paste
>>  >>  the url from one codi
>>  >>>   window
>>  >>>   > to
>>  >>>   > > > an
>>  >>>   > > > > > > >> > existing codi 
> window.
>>  >>>   > > > > > > >>
>>  >>>   > > > > > > >> Nope, because the
>>  > windowhandler.js
>>  >>  script will first check
>>  >>>   the
>>  >>>   > > > > > > window.name.
>>  >>>   > > > > > > >> And if this is
>>  > empty/doesn't fit
>>  >>  the windowId in the URL,
>>  >>>   then
>>  >>>   > > it
>>  >>>   > > > > will
>>  >>>   > > > > > > >> reload the page with 
> a freshly
>>  >>  requested windowId.
>>  >>>   > > > > > > >>
>>  >>>   > > > > > > >> LieGrue,
>>  >>>   > > > > > > >> strub
>>  >>>   > > > > > > >>
>>  >>>   > > > > > > >>
>>  >>>   > > > > > > >>
>>  >>>   > > > > > > >>
>>  >>>   > > > > > > >> ----- Original 
> Message -----
>>  >>>   > > > > > > >> > From: Stephen 
> More
>>  >>  <st...@gmail.com>
>>  >>>   > > > > > > >> > To: MyFaces 
> Discussion
>>  >>  <us...@myfaces.apache.org>
>>  >>>   > > > > > > >> > Cc:
>>  >>>   > > > > > > >> > Sent: Friday, 
> March 9,
>>  > 2012
>>  >>  1:27 PM
>>  >>>   > > > > > > >> > Subject: Re: 
> MyFaces and
>>  > CODI
>>  >>>   > > > > > > >> >
>>  >>>   > > > > > > >> > Included in the 
> JSF jar is
>>  >>>   > > META-INF/resources/javax.faces/jsf.js
>>  >>>   > > > > > which
>>  >>>   > > > > > > >> > enables its use 
> by
>>  >>  <h:outputScript name="jsf.js"
>>  >>>   > > > > > > >> >
>>  > library="javax.faces"
>>  >>>   > > > > > > >> >
>>  > target="head"/>
>>  >>>   > > > > > > >> >
>>  >>>   > > > > > > >> > Should 
> windowhandler.js be
>>  >
>>  >>  moved from the examples into a
>>  >>>   > core
>>  >>>   > > > > > library
>>  >>>   > > > > > > >> > so that it can 
> be utilized
>>  > the
>>  >>  same way ?
>>  >>>   > > > > > > >> >
>>  >>>   > > > > > > >> >
>>  >>>   > > > > > > >> >
>>  >>>   > > > > > > >> > On Fri, Mar 9, 
> 2012 at
>>  > 7:10 AM,
>>  >>  Gerhard Petracek
>>  >>>   > > > > > > >> >
>>  >>  <ge...@gmail.com> wrote:
>>  >>>   > > > > > > >> >>  hi stephen,
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>  yes - you 
> can add a
>>  > small
>>  >>  js (see e.g. [1]) to support
>>  >>>   > this
>>  >>>   > > > > > > use-case.
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>  regards,
>>  >>>   > > > > > > >> >>  gerhard
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>  [1]
>>  >>  http://s.apache.org/YTq
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>  
> http://www.irian.at
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>  Your 
> JSF/JavaEE
>>  > powerhouse
>>  >>  -
>>  >>>   > > > > > > >> >>  JavaEE 
> Consulting,
>>  >>  Development and
>>  >>>   > > > > > > >> >>  Courses in 
> English
>>  > and
>>  >>  German
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>  
> Professional Support
>>  > for
>>  >>  Apache MyFaces
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>  2012/3/9 
> Stephen More
>>  >
>>  >>  <st...@gmail.com>
>>  >>>   > > > > > > >> >>
>>  >>>   > > > > > > >> >>>  Great. 
> I am
>>  > mainly
>>  >>  interested in WindowScoped i.e.
>>  >>>   every
>>  >>>   > > > > browser
>>  >>>   > > > > > > tab
>>  >>>   > > > > > > >> >>>  has its 
> own
>>  >>  mini-session.
>>  >>>   > > > > > > >> >>>
>>  >>>   > > > > > > >> >>>  I see 
> that CODI
>>  > is
>>  >>  adding a ?windowId=595 to keep these
>>  >>>   > > > > > > conversations
>>  >>>   > > > > > > >> >>>  
> separate. If a
>>  > user
>>  >>  simply copies the url and pastes
>>  >>>   in a
>>  >>>   > > new
>>  >>>   > > > > tab
>>  >>>   > > > > > > now
>>  >>>   > > > > > > >> >>>  two 
> browser tabs
>>  > are
>>  >>  sharing the same conversation. How
>>  >>>   > > can I
>>  >>>   > > > > > > prevent
>>  >>>   > > > > > > >> >>>  this ? 
> I want to
>>  >>  enforce that EVERY browser tab has its
>>  >>>   > own
>>  >>>   > > > > > > >> >>>  
> conversation.
>>  > Perhaps
>>  >>  a simple error to the user saying
>>  >>>   > > > > > > >> > 
> "Sorry" or
>>  >>>   > > > > > > >> >>>  start a 
> new
>>  >>  conversation.
>>  >>>   > > > > > > >> >>>
>>  >>>   > > > > > > >> >>>  -Thanks
>>  >>>   > > > > > > >> >>>
>>  >>>   > > > > > > >> >>>  On Fri, 
> Mar 9,
>>  > 2012 at
>>  >>  3:18 AM, Gerhard Petracek
>>  >>>   > > > > > > >> >>>
>>  >>  <ge...@gmail.com> wrote:
>>  >>>   > > > > > > >> >>>  > hi 
> stephen,
>>  >>>   > > > > > > >> >>>  >
>>  >>>   > > > > > > >> >>>  > 
> (that's
>>  > an
>>  >>  issue with the setup of weld and not
>>  >>>   related
>>  >>>   > > to
>>  >>>   > > > > > > >> > myfaces codi.)
>>  >>>   > > > > > > >> >>>  > 
> however,
>>  > myfaces
>>  >>  codi doesn't need this support -> if
>>  >>>   > you
>>  >>>   > > > > > > >> > also don't 
> need
>>  >>>   > > > > > > >> >>>  > 
> cdi support
>>  > for
>>  >>  servlets, filters or listeners, you
>>  >>>   can
>>  >>>   > > run
>>  >>>   > > > > the
>>  >>>   > > > > > > >> >>>  
> application
>>  >>>   > > > > > > >> >>>  > 
> without
>>  > those
>>  >>  features.
>>  >>>   > > > > > > >> >>>  >
>>  >>>   > > > > > > >> >>>  > 
> regards,
>>  >>>   > > > > > > >> >>>  > 
> gerhard
>>  >>>   > > > > > > >> >>>  >
>>  >>>   > > > > > > >> >>>  >
>>  >>  http://www.irian.at
>>  >>>   > > > > > > >> >>>  >
>>  >>>   > > > > > > >> >>>  > 
> Your
>>  > JSF/JavaEE
>>  >>  powerhouse -
>>  >>>   > > > > > > >> >>>  > 
> JavaEE
>>  >>  Consulting, Development and
>>  >>>   > > > > > > >> >>>  > 
> Courses in
>>  >>  English and German
>>  >>>   > > > > > > >> >>>  >
>>  >>>   > > > > > > >> >>>  > 
> Professional
>>  >
>>  >>  Support for Apache MyFaces
>>  >>>   > > > > > > >> >>>  >
>>  >>>   > > > > > > >> >>>  >
>>  >>>   > > > > > > >> >>>  > 
> 2012/3/9
>>  > Stephen
>>  >>  More <st...@gmail.com>
>>  >>>   > > > > > > >> >>>  >
>>  >>>   > > > > > > >> >>>  
>>>  I too am
>>  >
>>  >>  trying to get a simple example working. I
>>  >>>   > have
>>  >>>   > > > put
>>  >>>   > > > > > > >> > together
>>  >>>   > > > > > > >> >>>  
>>>  this
>>  > project:
>>  >>>   > > > > > > >> >
>>  >>  http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
>>  >>>   > > > > > > >> >>>  
>>> 
>>  >>>   > > > > > > >> >>>  
>>>  mvn
>>  >>  jetty:run-war   results in
>>  >>>   > > > > > > >> >>>  
>>> 
>>  >>>   > > > > > > >> >>>  
>>>  SEVERE:
>>  >>  Unable to create JettyWeldInjector. CDI
>>  >>>   > > injection
>>  >>>   > > > > will
>>  >>>   > > > > > > >> > not be
>>  >>>   > > > > > > >> >>>  
>>> 
>>  > available in
>>  >>  Servlets, Filters or Listeners
>>  >>>   > > > > > > >> >>>  
>>> 
>>  >>>   > > > > > > >> >>>  
>>>  What
>>  > else do
>>  >>  I need to get this simple example
>>  >>>   > working ?
>>  >>>   > > > > > > >> >>>  
>>> 
>>  >>>   > > > > > > >> >>>  
>>>  -Thanks
>>  >>>   > > > > > > >> >>>  
>>> 
>>  >>>   > > > > > > >> >>>  
>>>  On Thu,
>>  > Mar
>>  >>  8, 2012 at 11:07 AM, Gerhard Petracek
>>  >>>   > > > > > > >> >>>  
>>> 
>>  >>  <ge...@gmail.com> wrote:
>>  >>>   > > > > > > >> >>>  
>>>  > hi
>>  > jose,
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > first of
>>  >>  all: welcome @ myfaces!
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > concrete
>>  >>  questions are very welcome and we will
>>  >>>   > > improve
>>  >>>   > > > > > > >> > the wiki
>>  >>>   > > > > > > >> >>>  based 
> on
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > them.
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > regards,
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > gerhard
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>  http://www.irian.at
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > Your
>>  >>  JSF/JavaEE powerhouse -
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > JavaEE
>>  >>  Consulting, Development and
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > Courses
>>  >>  in English and German
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>  Professional Support for Apache MyFaces
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  > 2012/3/8
>>  >>  José Luis Cetina <ma...@gmail.com>
>>  >>>   > > > > > > >> >>>  
>>>  >
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  > Hi
>>  >>  im so excited to start and use MyFaces and
>>  >>>   CODI
>>  >>>   > > > > > > >> > but i cant get 
> any
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  >
>>  >>  "good" documentation in fact i only can get
>>  >>>   > > > > > > >> > like 2 or 3 mini 
> tutorial
>>  >>>   > > > > > > >> >>>  
>>>  but
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  > they
>>  >>  are really incomplete, can somebody
>>  >>>   recommend
>>  >>>   > me
>>  >>>   > > > > > > >> > to some
>>  >>>   > > > > > > >> >>>  
> tutorial
>>  >>>   > > > > > > >> >>>  
>>>  or
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  > book
>>  >>  to start with *CODI *y see this is an
>>  >>>   > excellent
>>  >>>   > > > > > > >> > extension, im
>>  >>>   > > > > > > >> >>>  
>>>  moving
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  > from
>>  >>  mojarra and CDI to MyFaces and MyFaces
>>  >>>   > > > > > > >> > extensions, 
> please where
>>  >>>   > > > > > > >> >>>  i
>>  >>>   > > > > > > >> >>>  
>>>  can
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  > find
>>  >>  value information
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  > The
>>  >>  only URL where i found a little info is this:
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  >>>   > > > > > > >> >
>>  >>  https://cwiki.apache.org/confluence/display/EXTCDI/Index
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  > --
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  >>>   > > > > > > >> >
>>  >>>   > > > >
>>  >>  
> -------------------------------------------------------------------
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  >
>>  >>  *SCJA. José Luis Cetina*
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  >>>   > > > > > > >> >
>>  >>>   > > > >
>>  >>  
> -------------------------------------------------------------------
>>  >>>   > > > > > > >> >>>  
>>>  >>
>>  >>>   > > > > > > >> >>>  
>>> 
>>  >>>   > > > > > > >> >>>
>>  >>>   > > > > > > >> >
>>  >>>   > > > > > > >>
>>  >>>   > > > > > >
>>  >>>   > > > > >
>>  >>>   > > > >
>>  >>>   > > > >
>>  >>>   > > >
>>  >>>   > >
>>  >>>   >
>>  >>>
>>  >>>
>>  >>
>>  >
>> 
> 

Re: MyFaces and CODI

Posted by Gerhard Petracek <ge...@gmail.com>.
hi mark,

since rafael mentioned that it works without a4j and there is no issue with
a4j in the demo, i don't think that it is such a basic issue.

regards,
gerhard

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/18 Mark Struberg <st...@yahoo.de>

>
>
> Gerhard pinged me that you are using @ViewAccessScoped. In that case I'd
> recomment to debug if the whole Context Extension gets properly registrated.
>
> If the CDI container doesn't know the @ViewAccessScoped annotation then
> all your beans will end up as @Dependent...
>
> LieGrue,
> strub
>
>
> ----- Original Message -----
> > From: Mark Struberg <st...@yahoo.de>
> > To: MyFaces Discussion <us...@myfaces.apache.org>
> > Cc:
> > Sent: Sunday, March 18, 2012 7:42 PM
> > Subject: Re: MyFaces and CODI
> >
> >>  when i find out what's causing my bean to be instantiated on every ajax
> > call
> >>  i'll come back here to report.
> >
> > That sounds familiar - good luck ;)
> >
> > Which scope does your bean have? You are sure that you are really using
> CDI
> > javax.enterprise.context.* scopes and not javax.faces.bean.* scopes due
> to a
> > wrong auto-import  of your IDE?
> >
> > LieGrue,
> > strub
> >
> >
> >
> > ----- Original Message -----
> >>  From: Rafael Pestano <rm...@yahoo.com.br>
> >>  To: MyFaces Discussion <us...@myfaces.apache.org>
> >>  Cc:
> >>  Sent: Saturday, March 17, 2012 4:34 PM
> >>  Subject: Re: MyFaces and CODI
> >>
> >>  yeap, i also deployed the server side demo in tomcat and it works as
> > expected,
> >>  when i find out what's causing my bean to be instantiated on every ajax
> > call
> >>  i'll come back here to report.
> >>
> >>  many thanks for the assistance.
> >>
> >>  Att,
> >>
> >>  Rafael M. Pestano
> >>
> >>  Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> >>  Graduando em Ciência da Computação UFRGS
> >>  @realpestano
> >>  http://code.google.com/p/jsf-conventions-framework/
> >>
> >>
> >>
> >>  ________________________________
> >>  De: Gerhard Petracek <ge...@gmail.com>
> >>  Para: MyFaces Discussion <us...@myfaces.apache.org>
> >>  Enviadas: Sexta-feira, 16 de Março de 2012 22:46
> >>  Assunto: Re: MyFaces and CODI
> >>
> >>  hi rafael,
> >>
> >>  i can't reproduce it. i added richfaces to the previous demo as well as
> > a4j
> >>  support to the input component and everything works as expected.
> >>
> >>  regards,
> >>  gerhard
> >>
> >>  http://www.irian.at
> >>
> >>  Your JSF/JavaEE powerhouse -
> >>  JavaEE Consulting, Development and
> >>  Courses in English and German
> >>
> >>  Professional Support for Apache MyFaces
> >>
> >>
> >>
> >>  2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> >>
> >>>   Hi Gehard,
> >>>
> >>>   i didnt got the ideia, do you have any example or a link showing this
> >>>   approach?
> >>>
> >>>   what i have got til now is:
> >>>   1 - WindowContextIdHolderComponent is a jsf component which is added
> >>>   dynamically to the view
> >>>   2 - this component holds the windowId
> >>>   3 - i have,somehow , to keep the windowId the same between requests
> so
> > my
> >>>   ViewAccessScoped bean  is "keeped alive" <- here is where
> > im
> >>  stuck
> >>>
> >>>
> >>>
> >>>
> >>>   Att,
> >>>   Rafael M. Pestano
> >>>   Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> Sul
> >>>   Graduando em Ciência da Computação UFRGS
> >>>   @realpestano
> >>>   http://code.google.com/p/jsf-conventions-framework/
> >>>
> >>>
> >>>
> >>>   ----- Mensagem original -----
> >>>   De: Gerhard Petracek <ge...@gmail.com>
> >>>   Para: MyFaces Discussion <us...@myfaces.apache.org>
> >>>   Cc:
> >>>   Enviadas: Quinta-feira, 15 de Março de 2012 11:28
> >>>   Assunto: Re: MyFaces and CODI
> >>>
> >>>   hi rafael,
> >>>
> >>>   @ WindowContextIdHolderComponent:
> >>>
> >>>   that's the name of the class. you have to resolve the component
> > (by
> >>  type)
> >>>   before the view gets rendered and add it to the ajax enabled a4j
> > components
> >>>   via the corresponding java-api.
> >>>
> >>>   @ custom approach:
> >>>   independent of the concrete approach you would like to use, you just
> > have
> >>>   to ensure that the information is available on the server-side (for
> > every
> >>>   jsf request which starts the jsf request-lifecycle).
> >>>
> >>>   regards,
> >>>   gerhard
> >>>
> >>>   Your JSF/JavaEE powerhouse -
> >>>   JavaEE Consulting, Development and
> >>>   Courses in English and German
> >>>
> >>>   Professional Support for Apache MyFaces
> >>>
> >>>
> >>>   2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> >>>
> >>>   > Hi again,
> >>>   >
> >>>   > "it will work with a4j as soon as you
> >>>   > ensure that it gets restored for requests triggered by a4j "
> > you
> >>  mean i
> >>>   > should send WindowContextIdHolderComponent  within the ajax
> > request?
> >>>   >
> >>>   > somethink like <a4j:support
> >>  process="WindowContextIdHolderComponent"/> ?
> >>>   >
> >>>   > if so whats the id of the generated component?
> >>>   >
> >>>   > i also have another question, in the javadoc
> >>>   > of WindowContextConfig isUrlParameterSuported() says
> >>>   >
> >>>   > "Specifies if it is allowed to use URL params for forwarding
> > the
> >>  current
> >>>   > window-id. (deactivate it e.g. for higher security - in this case
> >
> >>  it's
> >>>   > required to use a window id provided by a component lib or a
> >>  server-side
> >>>   > window-handler"
> >>>   >
> >>>   > how can i create a component to handle the window id? can i do
> > that
> >>  with
> >>>   > an h:inputHidden for example?
> >>>   >
> >>>   > thanks for the help.
> >>>   >
> >>>   >
> >>>   >
> >>>   > Att,
> >>>   >
> >>>   > Rafael M. Pestano
> >>>   >
> >>>   > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande
> > do Sul
> >>>   > Graduando em Ciência da Computação UFRGS
> >>>   > @realpestano
> >>>   > http://code.google.com/p/jsf-conventions-framework/
> >>>   >
> >>>   >
> >>>   >
> >>>   > ________________________________
> >>>   > De: Gerhard Petracek <ge...@gmail.com>
> >>>   > Para: MyFaces Discussion <us...@myfaces.apache.org>
> >>>   > Enviadas: Quinta-feira, 15 de Março de 2012 10:37
> >>>   > Assunto: Re: MyFaces and CODI
> >>>   >
> >>>   > hi rafael,
> >>>   >
> >>>   > the fallback adds a component (WindowContextIdHolderComponent)
> >>>   dynamically
> >>>   > (as a direct child of UiViewRoot) -> it will work with a4j as
> > soon
> >>  as you
> >>>   > ensure that it gets restored for requests triggered by a4j.
> >>>   >
> >>>   > regards,
> >>>   > gerhard
> >>>   >
> >>>   > http://www.irian.at
> >>>   >
> >>>   > Your JSF/JavaEE powerhouse -
> >>>   > JavaEE Consulting, Development and
> >>>   > Courses in English and German
> >>>   >
> >>>   > Professional Support for Apache MyFaces
> >>>   >
> >>>   >
> >>>   > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> >>>   >
> >>>   > > well its not 100% yet ;(...on every ajaxCall my
> > ViewAccessScoped
> >>  bean
> >>>   is
> >>>   > > being instantiated,
> >>>   > >
> >>>   > > im using a4j, there is any known issue with it?
> >>>   > >
> >>>   > > for example <h:selectOneMenu .....>
> >>>   > >                         <a4j:support
> >>  event="onchange" ....action="when
> >>>   > the
> >>>   > > action is called the bean constructor gets called"/>
> >>>   > >                     </h:selectOneMenu>
> >>>   > >
> >>>   > > if i change from View to RequestScoped the bahavior is the
> > same,
> >>  any
> >>>   > ideas?
> >>>   > >
> >>>   > >
> >>>   > > thanks in advance.
> >>>   > >
> >>>   > >
> >>>   > > Att,
> >>>   > >
> >>>   > > Rafael M. Pestano
> >>>   > >
> >>>   > > Desenvolvedor Java Cia. de Processamento de Dados do Rio
> > Grande
> >>  do Sul
> >>>   > > Graduando em Ciência da Computação UFRGS
> >>>   > > @realpestano
> >>>   > > http://code.google.com/p/jsf-conventions-framework/
> >>>   > >
> >>>   > >
> >>>   > >
> >>>   > > ________________________________
> >>>   > >  De: Rafael Pestano <rm...@yahoo.com.br>
> >>>   > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> >>>   > > Enviadas: Quinta-feira, 15 de Março de 2012 8:45
> >>>   > > Assunto: Re: MyFaces and CODI
> >>>   > >
> >>>   > > "if you don't need redirects, you could have a look
> > at
> >>  e.g. [1] which
> >>>   > uses
> >>>   > > an internal fallback." yea, its our case and it just
> > works!
> >>>   > >
> >>>   > > many thanks for your help, keep the great work!
> >>>   > >
> >>>   > > Att,
> >>>   > >
> >>>   > > Rafael M. Pestano
> >>>   > >
> >>>   > > Desenvolvedor Java Cia. de Processamento de Dados do Rio
> > Grande
> >>  do Sul
> >>>   > > Graduando em Ciência da Computação UFRGS
> >>>   > > @realpestano
> >>>   > > http://code.google.com/p/jsf-conventions-framework/
> >>>   > >
> >>>   > >
> >>>   > >
> >>>   > > ________________________________
> >>>   > > De: Gerhard Petracek <ge...@gmail.com>
> >>>   > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> >>>   > > Enviadas: Quarta-feira, 14 de Março de 2012 23:19
> >>>   > > Assunto: Re: MyFaces and CODI
> >>>   > >
> >>>   > > hi rafael,
> >>>   > >
> >>>   > > as you have seen it's easy to provide a custom
> > WindowHandler
> >>  (just
> >>>   > > implement the interface and provide your implementation as
> >>  alternative
> >>>   > cdi
> >>>   > > bean)
> >>>   > > -> you can integrate every custom approach which is
> > enough to
> >>  solve you
> >>>   > > requirements.
> >>>   > >
> >>>   > > if you don't need redirects, you could have a look at
> > e.g.
> >>  [1] which
> >>>   uses
> >>>   > > an internal fallback.
> >>>   > >
> >>>   > > regards,
> >>>   > > gerhard
> >>>   > >
> >>>   > > [1] http://s.apache.org/SAs
> >>>   > >
> >>>   > > http://www.irian.at
> >>>   > >
> >>>   > > Your JSF/JavaEE powerhouse -
> >>>   > > JavaEE Consulting, Development and
> >>>   > > Courses in English and German
> >>>   > >
> >>>   > > Professional Support for Apache MyFaces
> >>>   > >
> >>>   > >
> >>>   > >
> >>>   > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> >>>   > >
> >>>   > > > Hi Gehard,
> >>>   > > >
> >>>   > > > its a stopper to us cause we are still dependent on JSF
> > 1.2
> >>>   > > > Can i implement an alternative
> >>>   > > > to
> >>>   > >
> >>>   >
> >>>
> >>
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> >>>   > > > based on JSF 1.2?
> >>>   > > >
> >>>   > > > i see you use flash scope to span the windowId through
> >>  requests in
> >>>   the
> >>>   > > > server side solution:
> >>>   > > >
> >>>   > > > if (windowId != null)
> >>>   > > > 79         {
> >>>   > > >
> >>>   > > > 80
> >>>   > >
> >>  externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY,
> >>>   > > windowId);
> >>>   > > >
> >>>   > > > 81
> >>>   > >
> > externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
> >>>   > > > 82         }
> >>>   > > >
> >>>   > > > if i put the windownId in the sessionMap it would still
> >
> >>  work? i think
> >>>   > ill
> >>>   > > > find hard time trying to remove the windowId from the
> > map
> >>  when user
> >>>   > leave
> >>>   > > > the page.
> >>>   > > >
> >>>   > > >
> >>>   > > >
> >>>   > > > thanks for your help i really appreciated it.
> >>>   > > >
> >>>   > > > Att,
> >>>   > > > Rafael M. Pestano
> >>>   > > > Desenvolvedor Java Cia. de Processamento de Dados do
> > Rio
> >>  Grande do
> >>>   Sul
> >>>   > > > Graduando em Ciência da Computação UFRGS
> >>>   > > > @realpestano
> >>>   > > > http://code.google.com/p/jsf-conventions-framework/
> >>>   > > >
> >>>   > > >
> >>>   > > >
> >>>   > > > ----- Mensagem original -----
> >>>   > > > De: Gerhard Petracek <ge...@gmail.com>
> >>>   > > > Para: MyFaces Discussion
> > <us...@myfaces.apache.org>
> >>>   > > > Cc:
> >>>   > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:55
> >>>   > > > Assunto: Re: MyFaces and CODI
> >>>   > > >
> >>>   > > > hi rafael,
> >>>   > > >
> >>>   > > > internally the ServerSideWindowHandler is based on the
> > flash
> >>  scope
> >>>   > > (that's
> >>>   > > > one of the mentioned disadvantages)
> >>>   > > > -> it's bound to jsf 2+ -> it is:
> >>>   > > >
> >>>   > > >
> >>>   > >
> >>>   >
> >>>
> >>
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> >>>   > > > (and you can't use the additional js.)
> >>>   > > >
> >>>   > > > with some constellations you just hit the restrictions
> > of
> >>  browsers ->
> >>>   > you
> >>>   > > > have to choose what you really need.
> >>>   > > >
> >>>   > > > regards,
> >>>   > > > gerhard
> >>>   > > >
> >>>   > > > http://www.irian.at
> >>>   > > >
> >>>   > > > Your JSF/JavaEE powerhouse -
> >>>   > > > JavaEE Consulting, Development and
> >>>   > > > Courses in English and German
> >>>   > > >
> >>>   > > > Professional Support for Apache MyFaces
> >>>   > > >
> >>>   > > >
> >>>   > > >
> >>>   > > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> >>>   > > >
> >>>   > > > > i see, i have used the client side one
> >>>   > > > >
> >>>   > > > > <alternatives>
> >>>   > > > >
> >>>   > > >
> >>>   > >
> >>>   >
> >>>
> >>
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
> >>>   > > > > </alternatives>
> >>>   > > > >
> >>>   > > > > i imagine the server side should be
> >>>   > > > >
> >>>   > > > > <alternatives>
> >>>   > > > >
> >>>   > > >
> >>>   > >
> >>>   >
> >>>
> >>
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
> >>>   > > > > </alternatives>alright?
> >>>   > > > >
> >>>   > > > > i will test it tomorrow and give the feedback,
> > thanks.
> >>>   > > > >
> >>>   > > > > Att,
> >>>   > > > > Rafael M. Pestano
> >>>   > > > > Desenvolvedor Java Cia. de Processamento de Dados
> > do
> >>  Rio Grande do
> >>>   > Sul
> >>>   > > > > Graduando em Ciência da Computação UFRGS
> >>>   > > > > @realpestano
> >>>   > > > >
> > http://code.google.com/p/jsf-conventions-framework/
> >>>   > > > >
> >>>   > > > >
> >>>   > > > >
> >>>   > > > > ----- Mensagem original -----
> >>>   > > > > De: Gerhard Petracek
> > <ge...@gmail.com>
> >>>   > > > > Para: MyFaces Discussion
> >>  <us...@myfaces.apache.org>
> >>>   > > > > Cc:
> >>>   > > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:11
> >>>   > > > > Assunto: Re: MyFaces and CODI
> >>>   > > > >
> >>>   > > > > hi rafael,
> >>>   > > > >
> >>>   > > > > the easiest approach to test an alternative for
> > this
> >>  constellation
> >>>   is
> >>>   > > the
> >>>   > > > > activation of the ServerSideWindowHandler
> > (it's a
> >>  std. cdi
> >>>   > @Alternative
> >>>   > > > > implementation -> you can activate it in the
> >>  beans.xml file of your
> >>>   > > > > application).
> >>>   > > > > (however, please be aware that this alternative
> >>  implementation has
> >>>   > some
> >>>   > > > > disadvantages.)
> >>>   > > > >
> >>>   > > > > regards,
> >>>   > > > > gerhard
> >>>   > > > >
> >>>   > > > > http://www.irian.at
> >>>   > > > >
> >>>   > > > > Your JSF/JavaEE powerhouse -
> >>>   > > > > JavaEE Consulting, Development and
> >>>   > > > > Courses in English and German
> >>>   > > > >
> >>>   > > > > Professional Support for Apache MyFaces
> >>>   > > > >
> >>>   > > > >
> >>>   > > > >
> >>>   > > > > 2012/3/14 Rafael Pestano
> > <rm...@yahoo.com.br>
> >>>   > > > >
> >>>   > > > > > Hi Gerhard, i successfuly added codi and
> >>  openwebbeans to an
> >>>   > > application
> >>>   > > > > > running on weblogic 11g
> >>>   > > > > >
> >>>   > > > > > however its a  legacy application which uses
> >>  frames, basicaly we
> >>>   > > have a
> >>>   > > > > > menu on the left frame that targets the
> > center
> >>  frame, something
> >>>   > like:
> >>>   > > > > >
> >>>   > > > > > <h:commandLink value="menuLink"
> >>  action="#{myBean.init}"
> >>>   > > > target="frmDados"
> >>>   > > > > > />
> >>>   > > > > >
> >>>   > > > > >
> >>>   > > > > > the problem is, when a add CODI to the
> > application
> >>  and mark
> >>>   myBean
> >>>   > as
> >>>   > > > > > ViewAccessScoped (and thus the windowId
> > starts to
> >>  be append to
> >>>   the
> >>>   > > url)
> >>>   > > > > > the above menuLink always open the center
> > frame in
> >>  a new browser
> >>>   > tab.
> >>>   > > > > >
> >>>   > > > > > If i remove CODI and set myBean as
> >>  RequestScoped(or any other CDI
> >>>   > > > Scope)
> >>>   > > > > > the application behaves  as expected.
> >>>   > > > > >
> >>>   > > > > > So i think the windowId generated by CODI  is
> >
> >>  causing this
> >>>   issue, i
> >>>   > > > tried
> >>>   > > > > > your solution without success, the windowId
> > isnt
> >>  removed from the
> >>>   > url
> >>>   > > > > and a
> >>>   > > > > > new tab opens when i click in the menuLink.
> >>>   > > > > >
> >>>   > > > > > Any thoughs?
> >>>   > > > > >
> >>>   > > > > >
> >>>   > > > > > thanks for all your help.
> >>>   > > > > >
> >>>   > > > > >
> >>>   > > > > >
> >>>   > > > > > Att,
> >>>   > > > > >
> >>>   > > > > > Rafael M. Pestano
> >>>   > > > > >
> >>>   > > > > > Desenvolvedor Java Cia. de Processamento de
> > Dados
> >>  do Rio Grande
> >>>   do
> >>>   > > Sul
> >>>   > > > > > Graduando em Ciência da Computação UFRGS
> >>>   > > > > > @realpestano
> >>>   > > > > >
> >>  http://code.google.com/p/jsf-conventions-framework/
> >>>   > > > > >
> >>>   > > > > >
> >>>   > > > > >
> >>>   > > > > > ________________________________
> >>>   > > > > > De: Gerhard Petracek
> >>  <ge...@gmail.com>
> >>>   > > > > > Para: MyFaces Discussion
> >>  <us...@myfaces.apache.org>
> >>>   > > > > > Enviadas: Sexta-feira, 9 de Março de 2012
> > 12:38
> >>>   > > > > > Assunto: Re: MyFaces and CODI
> >>>   > > > > >
> >>>   > > > > > hi stephen,
> >>>   > > > > >
> >>>   > > > > > that's right [1] doesn't support it.
> >>>   > > > > > werner committed his improvement and you can
> > try
> >>  [2] and [3] as
> >>>   you
> >>>   > > see
> >>>   > > > > > them right now.
> >>>   > > > > >
> >>>   > > > > > regards,
> >>>   > > > > > gerhard
> >>>   > > > > >
> >>>   > > > > > [1]
> >>>   > > > >
> >>>   >
> > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> >>>   > > > > > [2] http://s.apache.org/rr
> >>>   > > > > > [3] http://s.apache.org/23p
> >>>   > > > > >
> >>>   > > > > > http://www.irian.at
> >>>   > > > > >
> >>>   > > > > > Your JSF/JavaEE powerhouse -
> >>>   > > > > > JavaEE Consulting, Development and
> >>>   > > > > > Courses in English and German
> >>>   > > > > >
> >>>   > > > > > Professional Support for Apache MyFaces
> >>>   > > > > >
> >>>   > > > > >
> >>>   > > > > >
> >>>   > > > > > 2012/3/9 Stephen More
> >>  <st...@gmail.com>
> >>>   > > > > >
> >>>   > > > > > > I was referring to [1]
> >>>   > > > > > >
> >>>   > > >
> >>>
> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> >>>   > > > > > >
> >>>   > > > > > > I guess I just need to wait until the
> > correct
> >>  way is tested and
> >>>   > > > > > > documented in the wiki using:
> >>>   > > > > > >   [1] http://s.apache.org/rr
> >>>   > > > > > >  [2] http://s.apache.org/23p
> >>>   > > > > > >
> >>>   > > > > > >
> >>>   > > > > > >
> >>>   > > > > > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard
> >>  Petracek
> >>>   > > > > > > <ge...@gmail.com>
> > wrote:
> >>>   > > > > > > > @ mark:
> >>>   > > > > > > > i just tested it and it works with
> > [1]
> >>  in combination
> >>>   > > > > > > > with ClientSideWindowHandler [2].
> >>>   > > > > > > >
> >>>   > > > > > > > regards,
> >>>   > > > > > > > gerhard
> >>>   > > > > > > >
> >>>   > > > > > > > [1] http://s.apache.org/rr
> >>>   > > > > > > > [2] http://s.apache.org/23p
> >>>   > > > > > > >
> >>>   > > > > > > > http://www.irian.at
> >>>   > > > > > > >
> >>>   > > > > > > > Your JSF/JavaEE powerhouse -
> >>>   > > > > > > > JavaEE Consulting, Development and
> >>>   > > > > > > > Courses in English and German
> >>>   > > > > > > >
> >>>   > > > > > > > Professional Support for Apache
> > MyFaces
> >>>   > > > > > > >
> >>>   > > > > > > >
> >>>   > > > > > > >
> >>>   > > > > > > > 2012/3/9 Mark Struberg
> >>  <st...@yahoo.de>
> >>>   > > > > > > >
> >>>   > > > > > > >> Hi Stephen!
> >>>   > > > > > > >>
> >>>   > > > > > > >> Well, the current approach in
> > CODI
> >>  is currently under
> >>>   > discussion
> >>>   > > > in
> >>>   > > > > > the
> >>>   > > > > > > >> JSF EG. The whole windowId
> > stuff of
> >>  CODI might end up in the
> >>>   > > > JSF-2.2
> >>>   > > > > > or
> >>>   > > > > > > 2.3
> >>>   > > > > > > >> spec.
> >>>   > > > > > > >>
> >>>   > > > > > > >> >T hat seems to work fine
> > when
> >>  pasting into a new empty
> >>>   > window,
> >>>   > > > but
> >>>   > > > > it
> >>>   > > > > > > >> > still allows you to
> > copy-paste
> >>  the url from one codi
> >>>   window
> >>>   > to
> >>>   > > > an
> >>>   > > > > > > >> > existing codi window.
> >>>   > > > > > > >>
> >>>   > > > > > > >> Nope, because the
> > windowhandler.js
> >>  script will first check
> >>>   the
> >>>   > > > > > > window.name.
> >>>   > > > > > > >> And if this is
> > empty/doesn't fit
> >>  the windowId in the URL,
> >>>   then
> >>>   > > it
> >>>   > > > > will
> >>>   > > > > > > >> reload the page with a freshly
> >>  requested windowId.
> >>>   > > > > > > >>
> >>>   > > > > > > >> LieGrue,
> >>>   > > > > > > >> strub
> >>>   > > > > > > >>
> >>>   > > > > > > >>
> >>>   > > > > > > >>
> >>>   > > > > > > >>
> >>>   > > > > > > >> ----- Original Message -----
> >>>   > > > > > > >> > From: Stephen More
> >>  <st...@gmail.com>
> >>>   > > > > > > >> > To: MyFaces Discussion
> >>  <us...@myfaces.apache.org>
> >>>   > > > > > > >> > Cc:
> >>>   > > > > > > >> > Sent: Friday, March 9,
> > 2012
> >>  1:27 PM
> >>>   > > > > > > >> > Subject: Re: MyFaces and
> > CODI
> >>>   > > > > > > >> >
> >>>   > > > > > > >> > Included in the JSF jar is
> >>>   > > META-INF/resources/javax.faces/jsf.js
> >>>   > > > > > which
> >>>   > > > > > > >> > enables its use by
> >>  <h:outputScript name="jsf.js"
> >>>   > > > > > > >> >
> > library="javax.faces"
> >>>   > > > > > > >> >
> > target="head"/>
> >>>   > > > > > > >> >
> >>>   > > > > > > >> > Should windowhandler.js be
> >
> >>  moved from the examples into a
> >>>   > core
> >>>   > > > > > library
> >>>   > > > > > > >> > so that it can be utilized
> > the
> >>  same way ?
> >>>   > > > > > > >> >
> >>>   > > > > > > >> >
> >>>   > > > > > > >> >
> >>>   > > > > > > >> > On Fri, Mar 9, 2012 at
> > 7:10 AM,
> >>  Gerhard Petracek
> >>>   > > > > > > >> >
> >>  <ge...@gmail.com> wrote:
> >>>   > > > > > > >> >>  hi stephen,
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>  yes - you can add a
> > small
> >>  js (see e.g. [1]) to support
> >>>   > this
> >>>   > > > > > > use-case.
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>  regards,
> >>>   > > > > > > >> >>  gerhard
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>  [1]
> >>  http://s.apache.org/YTq
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>  http://www.irian.at
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>  Your JSF/JavaEE
> > powerhouse
> >>  -
> >>>   > > > > > > >> >>  JavaEE Consulting,
> >>  Development and
> >>>   > > > > > > >> >>  Courses in English
> > and
> >>  German
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>  Professional Support
> > for
> >>  Apache MyFaces
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>  2012/3/9 Stephen More
> >
> >>  <st...@gmail.com>
> >>>   > > > > > > >> >>
> >>>   > > > > > > >> >>>  Great. I am
> > mainly
> >>  interested in WindowScoped i.e.
> >>>   every
> >>>   > > > > browser
> >>>   > > > > > > tab
> >>>   > > > > > > >> >>>  has its own
> >>  mini-session.
> >>>   > > > > > > >> >>>
> >>>   > > > > > > >> >>>  I see that CODI
> > is
> >>  adding a ?windowId=595 to keep these
> >>>   > > > > > > conversations
> >>>   > > > > > > >> >>>  separate. If a
> > user
> >>  simply copies the url and pastes
> >>>   in a
> >>>   > > new
> >>>   > > > > tab
> >>>   > > > > > > now
> >>>   > > > > > > >> >>>  two browser tabs
> > are
> >>  sharing the same conversation. How
> >>>   > > can I
> >>>   > > > > > > prevent
> >>>   > > > > > > >> >>>  this ? I want to
> >>  enforce that EVERY browser tab has its
> >>>   > own
> >>>   > > > > > > >> >>>  conversation.
> > Perhaps
> >>  a simple error to the user saying
> >>>   > > > > > > >> > "Sorry" or
> >>>   > > > > > > >> >>>  start a new
> >>  conversation.
> >>>   > > > > > > >> >>>
> >>>   > > > > > > >> >>>  -Thanks
> >>>   > > > > > > >> >>>
> >>>   > > > > > > >> >>>  On Fri, Mar 9,
> > 2012 at
> >>  3:18 AM, Gerhard Petracek
> >>>   > > > > > > >> >>>
> >>  <ge...@gmail.com> wrote:
> >>>   > > > > > > >> >>>  > hi stephen,
> >>>   > > > > > > >> >>>  >
> >>>   > > > > > > >> >>>  > (that's
> > an
> >>  issue with the setup of weld and not
> >>>   related
> >>>   > > to
> >>>   > > > > > > >> > myfaces codi.)
> >>>   > > > > > > >> >>>  > however,
> > myfaces
> >>  codi doesn't need this support -> if
> >>>   > you
> >>>   > > > > > > >> > also don't need
> >>>   > > > > > > >> >>>  > cdi support
> > for
> >>  servlets, filters or listeners, you
> >>>   can
> >>>   > > run
> >>>   > > > > the
> >>>   > > > > > > >> >>>  application
> >>>   > > > > > > >> >>>  > without
> > those
> >>  features.
> >>>   > > > > > > >> >>>  >
> >>>   > > > > > > >> >>>  > regards,
> >>>   > > > > > > >> >>>  > gerhard
> >>>   > > > > > > >> >>>  >
> >>>   > > > > > > >> >>>  >
> >>  http://www.irian.at
> >>>   > > > > > > >> >>>  >
> >>>   > > > > > > >> >>>  > Your
> > JSF/JavaEE
> >>  powerhouse -
> >>>   > > > > > > >> >>>  > JavaEE
> >>  Consulting, Development and
> >>>   > > > > > > >> >>>  > Courses in
> >>  English and German
> >>>   > > > > > > >> >>>  >
> >>>   > > > > > > >> >>>  > Professional
> >
> >>  Support for Apache MyFaces
> >>>   > > > > > > >> >>>  >
> >>>   > > > > > > >> >>>  >
> >>>   > > > > > > >> >>>  > 2012/3/9
> > Stephen
> >>  More <st...@gmail.com>
> >>>   > > > > > > >> >>>  >
> >>>   > > > > > > >> >>>  >> I too am
> >
> >>  trying to get a simple example working. I
> >>>   > have
> >>>   > > > put
> >>>   > > > > > > >> > together
> >>>   > > > > > > >> >>>  >> this
> > project:
> >>>   > > > > > > >> >
> >>  http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> >>>   > > > > > > >> >>>  >>
> >>>   > > > > > > >> >>>  >> mvn
> >>  jetty:run-war   results in
> >>>   > > > > > > >> >>>  >>
> >>>   > > > > > > >> >>>  >> SEVERE:
> >>  Unable to create JettyWeldInjector. CDI
> >>>   > > injection
> >>>   > > > > will
> >>>   > > > > > > >> > not be
> >>>   > > > > > > >> >>>  >>
> > available in
> >>  Servlets, Filters or Listeners
> >>>   > > > > > > >> >>>  >>
> >>>   > > > > > > >> >>>  >> What
> > else do
> >>  I need to get this simple example
> >>>   > working ?
> >>>   > > > > > > >> >>>  >>
> >>>   > > > > > > >> >>>  >> -Thanks
> >>>   > > > > > > >> >>>  >>
> >>>   > > > > > > >> >>>  >> On Thu,
> > Mar
> >>  8, 2012 at 11:07 AM, Gerhard Petracek
> >>>   > > > > > > >> >>>  >>
> >>  <ge...@gmail.com> wrote:
> >>>   > > > > > > >> >>>  >> > hi
> > jose,
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> > first of
> >>  all: welcome @ myfaces!
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> > concrete
> >>  questions are very welcome and we will
> >>>   > > improve
> >>>   > > > > > > >> > the wiki
> >>>   > > > > > > >> >>>  based on
> >>>   > > > > > > >> >>>  >> >
> > them.
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> > regards,
> >>>   > > > > > > >> >>>  >> >
> > gerhard
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> >>  http://www.irian.at
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> > Your
> >>  JSF/JavaEE powerhouse -
> >>>   > > > > > > >> >>>  >> >
> > JavaEE
> >>  Consulting, Development and
> >>>   > > > > > > >> >>>  >> >
> > Courses
> >>  in English and German
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> >>  Professional Support for Apache MyFaces
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >
> > 2012/3/8
> >>  José Luis Cetina <ma...@gmail.com>
> >>>   > > > > > > >> >>>  >> >
> >>>   > > > > > > >> >>>  >> >>
> > Hi
> >>  im so excited to start and use MyFaces and
> >>>   CODI
> >>>   > > > > > > >> > but i cant get any
> >>>   > > > > > > >> >>>  >> >>
> >
> >>  "good" documentation in fact i only can get
> >>>   > > > > > > >> > like 2 or 3 mini tutorial
> >>>   > > > > > > >> >>>  >> but
> >>>   > > > > > > >> >>>  >> >>
> > they
> >>  are really incomplete, can somebody
> >>>   recommend
> >>>   > me
> >>>   > > > > > > >> > to some
> >>>   > > > > > > >> >>>  tutorial
> >>>   > > > > > > >> >>>  >> or
> >>>   > > > > > > >> >>>  >> >>
> > book
> >>  to start with *CODI *y see this is an
> >>>   > excellent
> >>>   > > > > > > >> > extension, im
> >>>   > > > > > > >> >>>  >> moving
> >>>   > > > > > > >> >>>  >> >>
> > from
> >>  mojarra and CDI to MyFaces and MyFaces
> >>>   > > > > > > >> > extensions, please where
> >>>   > > > > > > >> >>>  i
> >>>   > > > > > > >> >>>  >> can
> >>>   > > > > > > >> >>>  >> >>
> > find
> >>  value information
> >>>   > > > > > > >> >>>  >> >>
> >>>   > > > > > > >> >>>  >> >>
> > The
> >>  only URL where i found a little info is this:
> >>>   > > > > > > >> >>>  >> >>
> >>>   > > > > > > >> >
> >>  https://cwiki.apache.org/confluence/display/EXTCDI/Index
> >>>   > > > > > > >> >>>  >> >>
> >>>   > > > > > > >> >>>  >> >>
> > --
> >>>   > > > > > > >> >>>  >> >>
> >>>   > > > > > > >> >
> >>>   > > > >
> >>  -------------------------------------------------------------------
> >>>   > > > > > > >> >>>  >> >>
> >
> >>  *SCJA. José Luis Cetina*
> >>>   > > > > > > >> >>>  >> >>
> >>>   > > > > > > >> >
> >>>   > > > >
> >>  -------------------------------------------------------------------
> >>>   > > > > > > >> >>>  >> >>
> >>>   > > > > > > >> >>>  >>
> >>>   > > > > > > >> >>>
> >>>   > > > > > > >> >
> >>>   > > > > > > >>
> >>>   > > > > > >
> >>>   > > > > >
> >>>   > > > >
> >>>   > > > >
> >>>   > > >
> >>>   > >
> >>>   >
> >>>
> >>>
> >>
> >
>

Re: MyFaces and CODI

Posted by Mark Struberg <st...@yahoo.de>.

Gerhard pinged me that you are using @ViewAccessScoped. In that case I'd recomment to debug if the whole Context Extension gets properly registrated.

If the CDI container doesn't know the @ViewAccessScoped annotation then all your beans will end up as @Dependent...

LieGrue,
strub


----- Original Message -----
> From: Mark Struberg <st...@yahoo.de>
> To: MyFaces Discussion <us...@myfaces.apache.org>
> Cc: 
> Sent: Sunday, March 18, 2012 7:42 PM
> Subject: Re: MyFaces and CODI
> 
>>  when i find out what's causing my bean to be instantiated on every ajax 
> call 
>>  i'll come back here to report.
> 
> That sounds familiar - good luck ;)
> 
> Which scope does your bean have? You are sure that you are really using CDI 
> javax.enterprise.context.* scopes and not javax.faces.bean.* scopes due to a 
> wrong auto-import  of your IDE?
> 
> LieGrue,
> strub
> 
> 
> 
> ----- Original Message -----
>>  From: Rafael Pestano <rm...@yahoo.com.br>
>>  To: MyFaces Discussion <us...@myfaces.apache.org>
>>  Cc: 
>>  Sent: Saturday, March 17, 2012 4:34 PM
>>  Subject: Re: MyFaces and CODI
>> 
>>  yeap, i also deployed the server side demo in tomcat and it works as 
> expected, 
>>  when i find out what's causing my bean to be instantiated on every ajax 
> call 
>>  i'll come back here to report.
>> 
>>  many thanks for the assistance.
>>   
>>  Att, 
>> 
>>  Rafael M. Pestano
>> 
>>  Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
>>  Graduando em Ciência da Computação UFRGS
>>  @realpestano
>>  http://code.google.com/p/jsf-conventions-framework/
>> 
>> 
>> 
>>  ________________________________
>>  De: Gerhard Petracek <ge...@gmail.com>
>>  Para: MyFaces Discussion <us...@myfaces.apache.org> 
>>  Enviadas: Sexta-feira, 16 de Março de 2012 22:46
>>  Assunto: Re: MyFaces and CODI
>> 
>>  hi rafael,
>> 
>>  i can't reproduce it. i added richfaces to the previous demo as well as 
> a4j
>>  support to the input component and everything works as expected.
>> 
>>  regards,
>>  gerhard
>> 
>>  http://www.irian.at
>> 
>>  Your JSF/JavaEE powerhouse -
>>  JavaEE Consulting, Development and
>>  Courses in English and German
>> 
>>  Professional Support for Apache MyFaces
>> 
>> 
>> 
>>  2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>> 
>>>   Hi Gehard,
>>> 
>>>   i didnt got the ideia, do you have any example or a link showing this
>>>   approach?
>>> 
>>>   what i have got til now is:
>>>   1 - WindowContextIdHolderComponent is a jsf component which is added
>>>   dynamically to the view
>>>   2 - this component holds the windowId
>>>   3 - i have,somehow , to keep the windowId the same between requests so 
> my
>>>   ViewAccessScoped bean  is "keeped alive" <- here is where 
> im 
>>  stuck
>>> 
>>> 
>>> 
>>> 
>>>   Att,
>>>   Rafael M. Pestano
>>>   Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
>>>   Graduando em Ciência da Computação UFRGS
>>>   @realpestano
>>>   http://code.google.com/p/jsf-conventions-framework/
>>> 
>>> 
>>> 
>>>   ----- Mensagem original -----
>>>   De: Gerhard Petracek <ge...@gmail.com>
>>>   Para: MyFaces Discussion <us...@myfaces.apache.org>
>>>   Cc:
>>>   Enviadas: Quinta-feira, 15 de Março de 2012 11:28
>>>   Assunto: Re: MyFaces and CODI
>>> 
>>>   hi rafael,
>>> 
>>>   @ WindowContextIdHolderComponent:
>>> 
>>>   that's the name of the class. you have to resolve the component 
> (by 
>>  type)
>>>   before the view gets rendered and add it to the ajax enabled a4j 
> components
>>>   via the corresponding java-api.
>>> 
>>>   @ custom approach:
>>>   independent of the concrete approach you would like to use, you just 
> have
>>>   to ensure that the information is available on the server-side (for 
> every
>>>   jsf request which starts the jsf request-lifecycle).
>>> 
>>>   regards,
>>>   gerhard
>>> 
>>>   Your JSF/JavaEE powerhouse -
>>>   JavaEE Consulting, Development and
>>>   Courses in English and German
>>> 
>>>   Professional Support for Apache MyFaces
>>> 
>>> 
>>>   2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>>> 
>>>   > Hi again,
>>>   >
>>>   > "it will work with a4j as soon as you
>>>   > ensure that it gets restored for requests triggered by a4j " 
> you 
>>  mean i
>>>   > should send WindowContextIdHolderComponent  within the ajax 
> request?
>>>   >
>>>   > somethink like <a4j:support 
>>  process="WindowContextIdHolderComponent"/> ?
>>>   >
>>>   > if so whats the id of the generated component?
>>>   >
>>>   > i also have another question, in the javadoc
>>>   > of WindowContextConfig isUrlParameterSuported() says
>>>   >
>>>   > "Specifies if it is allowed to use URL params for forwarding 
> the 
>>  current
>>>   > window-id. (deactivate it e.g. for higher security - in this case 
> 
>>  it's
>>>   > required to use a window id provided by a component lib or a 
>>  server-side
>>>   > window-handler"
>>>   >
>>>   > how can i create a component to handle the window id? can i do 
> that 
>>  with
>>>   > an h:inputHidden for example?
>>>   >
>>>   > thanks for the help.
>>>   >
>>>   >
>>>   >
>>>   > Att,
>>>   >
>>>   > Rafael M. Pestano
>>>   >
>>>   > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande 
> do Sul
>>>   > Graduando em Ciência da Computação UFRGS
>>>   > @realpestano
>>>   > http://code.google.com/p/jsf-conventions-framework/
>>>   >
>>>   >
>>>   >
>>>   > ________________________________
>>>   > De: Gerhard Petracek <ge...@gmail.com>
>>>   > Para: MyFaces Discussion <us...@myfaces.apache.org>
>>>   > Enviadas: Quinta-feira, 15 de Março de 2012 10:37
>>>   > Assunto: Re: MyFaces and CODI
>>>   >
>>>   > hi rafael,
>>>   >
>>>   > the fallback adds a component (WindowContextIdHolderComponent)
>>>   dynamically
>>>   > (as a direct child of UiViewRoot) -> it will work with a4j as 
> soon 
>>  as you
>>>   > ensure that it gets restored for requests triggered by a4j.
>>>   >
>>>   > regards,
>>>   > gerhard
>>>   >
>>>   > http://www.irian.at
>>>   >
>>>   > Your JSF/JavaEE powerhouse -
>>>   > JavaEE Consulting, Development and
>>>   > Courses in English and German
>>>   >
>>>   > Professional Support for Apache MyFaces
>>>   >
>>>   >
>>>   > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>>>   >
>>>   > > well its not 100% yet ;(...on every ajaxCall my 
> ViewAccessScoped 
>>  bean
>>>   is
>>>   > > being instantiated,
>>>   > >
>>>   > > im using a4j, there is any known issue with it?
>>>   > >
>>>   > > for example <h:selectOneMenu .....>
>>>   > >                         <a4j:support 
>>  event="onchange" ....action="when
>>>   > the
>>>   > > action is called the bean constructor gets called"/>
>>>   > >                     </h:selectOneMenu>
>>>   > >
>>>   > > if i change from View to RequestScoped the bahavior is the 
> same, 
>>  any
>>>   > ideas?
>>>   > >
>>>   > >
>>>   > > thanks in advance.
>>>   > >
>>>   > >
>>>   > > Att,
>>>   > >
>>>   > > Rafael M. Pestano
>>>   > >
>>>   > > Desenvolvedor Java Cia. de Processamento de Dados do Rio 
> Grande 
>>  do Sul
>>>   > > Graduando em Ciência da Computação UFRGS
>>>   > > @realpestano
>>>   > > http://code.google.com/p/jsf-conventions-framework/
>>>   > >
>>>   > >
>>>   > >
>>>   > > ________________________________
>>>   > >  De: Rafael Pestano <rm...@yahoo.com.br>
>>>   > > Para: MyFaces Discussion <us...@myfaces.apache.org>
>>>   > > Enviadas: Quinta-feira, 15 de Março de 2012 8:45
>>>   > > Assunto: Re: MyFaces and CODI
>>>   > >
>>>   > > "if you don't need redirects, you could have a look 
> at 
>>  e.g. [1] which
>>>   > uses
>>>   > > an internal fallback." yea, its our case and it just 
> works!
>>>   > >
>>>   > > many thanks for your help, keep the great work!
>>>   > >
>>>   > > Att,
>>>   > >
>>>   > > Rafael M. Pestano
>>>   > >
>>>   > > Desenvolvedor Java Cia. de Processamento de Dados do Rio 
> Grande 
>>  do Sul
>>>   > > Graduando em Ciência da Computação UFRGS
>>>   > > @realpestano
>>>   > > http://code.google.com/p/jsf-conventions-framework/
>>>   > >
>>>   > >
>>>   > >
>>>   > > ________________________________
>>>   > > De: Gerhard Petracek <ge...@gmail.com>
>>>   > > Para: MyFaces Discussion <us...@myfaces.apache.org>
>>>   > > Enviadas: Quarta-feira, 14 de Março de 2012 23:19
>>>   > > Assunto: Re: MyFaces and CODI
>>>   > >
>>>   > > hi rafael,
>>>   > >
>>>   > > as you have seen it's easy to provide a custom 
> WindowHandler 
>>  (just
>>>   > > implement the interface and provide your implementation as 
>>  alternative
>>>   > cdi
>>>   > > bean)
>>>   > > -> you can integrate every custom approach which is 
> enough to 
>>  solve you
>>>   > > requirements.
>>>   > >
>>>   > > if you don't need redirects, you could have a look at 
> e.g. 
>>  [1] which
>>>   uses
>>>   > > an internal fallback.
>>>   > >
>>>   > > regards,
>>>   > > gerhard
>>>   > >
>>>   > > [1] http://s.apache.org/SAs
>>>   > >
>>>   > > http://www.irian.at
>>>   > >
>>>   > > Your JSF/JavaEE powerhouse -
>>>   > > JavaEE Consulting, Development and
>>>   > > Courses in English and German
>>>   > >
>>>   > > Professional Support for Apache MyFaces
>>>   > >
>>>   > >
>>>   > >
>>>   > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>>>   > >
>>>   > > > Hi Gehard,
>>>   > > >
>>>   > > > its a stopper to us cause we are still dependent on JSF 
> 1.2
>>>   > > > Can i implement an alternative
>>>   > > > to
>>>   > >
>>>   >
>>> 
>> 
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
>>>   > > > based on JSF 1.2?
>>>   > > >
>>>   > > > i see you use flash scope to span the windowId through 
>>  requests in
>>>   the
>>>   > > > server side solution:
>>>   > > >
>>>   > > > if (windowId != null)
>>>   > > > 79         {
>>>   > > >
>>>   > > > 80
>>>   > > 
>>  externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY,
>>>   > > windowId);
>>>   > > >
>>>   > > > 81
>>>   > > 
> externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
>>>   > > > 82         }
>>>   > > >
>>>   > > > if i put the windownId in the sessionMap it would still 
> 
>>  work? i think
>>>   > ill
>>>   > > > find hard time trying to remove the windowId from the 
> map 
>>  when user
>>>   > leave
>>>   > > > the page.
>>>   > > >
>>>   > > >
>>>   > > >
>>>   > > > thanks for your help i really appreciated it.
>>>   > > >
>>>   > > > Att,
>>>   > > > Rafael M. Pestano
>>>   > > > Desenvolvedor Java Cia. de Processamento de Dados do 
> Rio 
>>  Grande do
>>>   Sul
>>>   > > > Graduando em Ciência da Computação UFRGS
>>>   > > > @realpestano
>>>   > > > http://code.google.com/p/jsf-conventions-framework/
>>>   > > >
>>>   > > >
>>>   > > >
>>>   > > > ----- Mensagem original -----
>>>   > > > De: Gerhard Petracek <ge...@gmail.com>
>>>   > > > Para: MyFaces Discussion 
> <us...@myfaces.apache.org>
>>>   > > > Cc:
>>>   > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:55
>>>   > > > Assunto: Re: MyFaces and CODI
>>>   > > >
>>>   > > > hi rafael,
>>>   > > >
>>>   > > > internally the ServerSideWindowHandler is based on the 
> flash 
>>  scope
>>>   > > (that's
>>>   > > > one of the mentioned disadvantages)
>>>   > > > -> it's bound to jsf 2+ -> it is:
>>>   > > >
>>>   > > >
>>>   > >
>>>   >
>>> 
>> 
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
>>>   > > > (and you can't use the additional js.)
>>>   > > >
>>>   > > > with some constellations you just hit the restrictions 
> of 
>>  browsers ->
>>>   > you
>>>   > > > have to choose what you really need.
>>>   > > >
>>>   > > > regards,
>>>   > > > gerhard
>>>   > > >
>>>   > > > http://www.irian.at
>>>   > > >
>>>   > > > Your JSF/JavaEE powerhouse -
>>>   > > > JavaEE Consulting, Development and
>>>   > > > Courses in English and German
>>>   > > >
>>>   > > > Professional Support for Apache MyFaces
>>>   > > >
>>>   > > >
>>>   > > >
>>>   > > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>>>   > > >
>>>   > > > > i see, i have used the client side one
>>>   > > > >
>>>   > > > > <alternatives>
>>>   > > > >
>>>   > > >
>>>   > >
>>>   >
>>> 
>> 
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
>>>   > > > > </alternatives>
>>>   > > > >
>>>   > > > > i imagine the server side should be
>>>   > > > >
>>>   > > > > <alternatives>
>>>   > > > >
>>>   > > >
>>>   > >
>>>   >
>>> 
>> 
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
>>>   > > > > </alternatives>alright?
>>>   > > > >
>>>   > > > > i will test it tomorrow and give the feedback, 
> thanks.
>>>   > > > >
>>>   > > > > Att,
>>>   > > > > Rafael M. Pestano
>>>   > > > > Desenvolvedor Java Cia. de Processamento de Dados 
> do 
>>  Rio Grande do
>>>   > Sul
>>>   > > > > Graduando em Ciência da Computação UFRGS
>>>   > > > > @realpestano
>>>   > > > > 
> http://code.google.com/p/jsf-conventions-framework/
>>>   > > > >
>>>   > > > >
>>>   > > > >
>>>   > > > > ----- Mensagem original -----
>>>   > > > > De: Gerhard Petracek 
> <ge...@gmail.com>
>>>   > > > > Para: MyFaces Discussion 
>>  <us...@myfaces.apache.org>
>>>   > > > > Cc:
>>>   > > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:11
>>>   > > > > Assunto: Re: MyFaces and CODI
>>>   > > > >
>>>   > > > > hi rafael,
>>>   > > > >
>>>   > > > > the easiest approach to test an alternative for 
> this 
>>  constellation
>>>   is
>>>   > > the
>>>   > > > > activation of the ServerSideWindowHandler 
> (it's a 
>>  std. cdi
>>>   > @Alternative
>>>   > > > > implementation -> you can activate it in the 
>>  beans.xml file of your
>>>   > > > > application).
>>>   > > > > (however, please be aware that this alternative 
>>  implementation has
>>>   > some
>>>   > > > > disadvantages.)
>>>   > > > >
>>>   > > > > regards,
>>>   > > > > gerhard
>>>   > > > >
>>>   > > > > http://www.irian.at
>>>   > > > >
>>>   > > > > Your JSF/JavaEE powerhouse -
>>>   > > > > JavaEE Consulting, Development and
>>>   > > > > Courses in English and German
>>>   > > > >
>>>   > > > > Professional Support for Apache MyFaces
>>>   > > > >
>>>   > > > >
>>>   > > > >
>>>   > > > > 2012/3/14 Rafael Pestano 
> <rm...@yahoo.com.br>
>>>   > > > >
>>>   > > > > > Hi Gerhard, i successfuly added codi and 
>>  openwebbeans to an
>>>   > > application
>>>   > > > > > running on weblogic 11g
>>>   > > > > >
>>>   > > > > > however its a  legacy application which uses 
>>  frames, basicaly we
>>>   > > have a
>>>   > > > > > menu on the left frame that targets the 
> center 
>>  frame, something
>>>   > like:
>>>   > > > > >
>>>   > > > > > <h:commandLink value="menuLink" 
>>  action="#{myBean.init}"
>>>   > > > target="frmDados"
>>>   > > > > > />
>>>   > > > > >
>>>   > > > > >
>>>   > > > > > the problem is, when a add CODI to the 
> application 
>>  and mark
>>>   myBean
>>>   > as
>>>   > > > > > ViewAccessScoped (and thus the windowId 
> starts to 
>>  be append to
>>>   the
>>>   > > url)
>>>   > > > > > the above menuLink always open the center 
> frame in 
>>  a new browser
>>>   > tab.
>>>   > > > > >
>>>   > > > > > If i remove CODI and set myBean as 
>>  RequestScoped(or any other CDI
>>>   > > > Scope)
>>>   > > > > > the application behaves  as expected.
>>>   > > > > >
>>>   > > > > > So i think the windowId generated by CODI  is 
> 
>>  causing this
>>>   issue, i
>>>   > > > tried
>>>   > > > > > your solution without success, the windowId 
> isnt 
>>  removed from the
>>>   > url
>>>   > > > > and a
>>>   > > > > > new tab opens when i click in the menuLink.
>>>   > > > > >
>>>   > > > > > Any thoughs?
>>>   > > > > >
>>>   > > > > >
>>>   > > > > > thanks for all your help.
>>>   > > > > >
>>>   > > > > >
>>>   > > > > >
>>>   > > > > > Att,
>>>   > > > > >
>>>   > > > > > Rafael M. Pestano
>>>   > > > > >
>>>   > > > > > Desenvolvedor Java Cia. de Processamento de 
> Dados 
>>  do Rio Grande
>>>   do
>>>   > > Sul
>>>   > > > > > Graduando em Ciência da Computação UFRGS
>>>   > > > > > @realpestano
>>>   > > > > > 
>>  http://code.google.com/p/jsf-conventions-framework/
>>>   > > > > >
>>>   > > > > >
>>>   > > > > >
>>>   > > > > > ________________________________
>>>   > > > > > De: Gerhard Petracek 
>>  <ge...@gmail.com>
>>>   > > > > > Para: MyFaces Discussion 
>>  <us...@myfaces.apache.org>
>>>   > > > > > Enviadas: Sexta-feira, 9 de Março de 2012 
> 12:38
>>>   > > > > > Assunto: Re: MyFaces and CODI
>>>   > > > > >
>>>   > > > > > hi stephen,
>>>   > > > > >
>>>   > > > > > that's right [1] doesn't support it.
>>>   > > > > > werner committed his improvement and you can 
> try 
>>  [2] and [3] as
>>>   you
>>>   > > see
>>>   > > > > > them right now.
>>>   > > > > >
>>>   > > > > > regards,
>>>   > > > > > gerhard
>>>   > > > > >
>>>   > > > > > [1]
>>>   > > > >
>>>   > 
> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
>>>   > > > > > [2] http://s.apache.org/rr
>>>   > > > > > [3] http://s.apache.org/23p
>>>   > > > > >
>>>   > > > > > http://www.irian.at
>>>   > > > > >
>>>   > > > > > Your JSF/JavaEE powerhouse -
>>>   > > > > > JavaEE Consulting, Development and
>>>   > > > > > Courses in English and German
>>>   > > > > >
>>>   > > > > > Professional Support for Apache MyFaces
>>>   > > > > >
>>>   > > > > >
>>>   > > > > >
>>>   > > > > > 2012/3/9 Stephen More 
>>  <st...@gmail.com>
>>>   > > > > >
>>>   > > > > > > I was referring to [1]
>>>   > > > > > >
>>>   > > >
>>>   http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
>>>   > > > > > >
>>>   > > > > > > I guess I just need to wait until the 
> correct 
>>  way is tested and
>>>   > > > > > > documented in the wiki using:
>>>   > > > > > >   [1] http://s.apache.org/rr
>>>   > > > > > >  [2] http://s.apache.org/23p
>>>   > > > > > >
>>>   > > > > > >
>>>   > > > > > >
>>>   > > > > > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard 
>>  Petracek
>>>   > > > > > > <ge...@gmail.com> 
> wrote:
>>>   > > > > > > > @ mark:
>>>   > > > > > > > i just tested it and it works with 
> [1] 
>>  in combination
>>>   > > > > > > > with ClientSideWindowHandler [2].
>>>   > > > > > > >
>>>   > > > > > > > regards,
>>>   > > > > > > > gerhard
>>>   > > > > > > >
>>>   > > > > > > > [1] http://s.apache.org/rr
>>>   > > > > > > > [2] http://s.apache.org/23p
>>>   > > > > > > >
>>>   > > > > > > > http://www.irian.at
>>>   > > > > > > >
>>>   > > > > > > > Your JSF/JavaEE powerhouse -
>>>   > > > > > > > JavaEE Consulting, Development and
>>>   > > > > > > > Courses in English and German
>>>   > > > > > > >
>>>   > > > > > > > Professional Support for Apache 
> MyFaces
>>>   > > > > > > >
>>>   > > > > > > >
>>>   > > > > > > >
>>>   > > > > > > > 2012/3/9 Mark Struberg 
>>  <st...@yahoo.de>
>>>   > > > > > > >
>>>   > > > > > > >> Hi Stephen!
>>>   > > > > > > >>
>>>   > > > > > > >> Well, the current approach in 
> CODI 
>>  is currently under
>>>   > discussion
>>>   > > > in
>>>   > > > > > the
>>>   > > > > > > >> JSF EG. The whole windowId 
> stuff of 
>>  CODI might end up in the
>>>   > > > JSF-2.2
>>>   > > > > > or
>>>   > > > > > > 2.3
>>>   > > > > > > >> spec.
>>>   > > > > > > >>
>>>   > > > > > > >> >T hat seems to work fine 
> when 
>>  pasting into a new empty
>>>   > window,
>>>   > > > but
>>>   > > > > it
>>>   > > > > > > >> > still allows you to 
> copy-paste 
>>  the url from one codi
>>>   window
>>>   > to
>>>   > > > an
>>>   > > > > > > >> > existing codi window.
>>>   > > > > > > >>
>>>   > > > > > > >> Nope, because the 
> windowhandler.js 
>>  script will first check
>>>   the
>>>   > > > > > > window.name.
>>>   > > > > > > >> And if this is 
> empty/doesn't fit 
>>  the windowId in the URL,
>>>   then
>>>   > > it
>>>   > > > > will
>>>   > > > > > > >> reload the page with a freshly 
>>  requested windowId.
>>>   > > > > > > >>
>>>   > > > > > > >> LieGrue,
>>>   > > > > > > >> strub
>>>   > > > > > > >>
>>>   > > > > > > >>
>>>   > > > > > > >>
>>>   > > > > > > >>
>>>   > > > > > > >> ----- Original Message -----
>>>   > > > > > > >> > From: Stephen More 
>>  <st...@gmail.com>
>>>   > > > > > > >> > To: MyFaces Discussion 
>>  <us...@myfaces.apache.org>
>>>   > > > > > > >> > Cc:
>>>   > > > > > > >> > Sent: Friday, March 9, 
> 2012 
>>  1:27 PM
>>>   > > > > > > >> > Subject: Re: MyFaces and 
> CODI
>>>   > > > > > > >> >
>>>   > > > > > > >> > Included in the JSF jar is
>>>   > > META-INF/resources/javax.faces/jsf.js
>>>   > > > > > which
>>>   > > > > > > >> > enables its use by 
>>  <h:outputScript name="jsf.js"
>>>   > > > > > > >> > 
> library="javax.faces"
>>>   > > > > > > >> > 
> target="head"/>
>>>   > > > > > > >> >
>>>   > > > > > > >> > Should windowhandler.js be 
> 
>>  moved from the examples into a
>>>   > core
>>>   > > > > > library
>>>   > > > > > > >> > so that it can be utilized 
> the 
>>  same way ?
>>>   > > > > > > >> >
>>>   > > > > > > >> >
>>>   > > > > > > >> >
>>>   > > > > > > >> > On Fri, Mar 9, 2012 at 
> 7:10 AM, 
>>  Gerhard Petracek
>>>   > > > > > > >> > 
>>  <ge...@gmail.com> wrote:
>>>   > > > > > > >> >>  hi stephen,
>>>   > > > > > > >> >>
>>>   > > > > > > >> >>  yes - you can add a 
> small 
>>  js (see e.g. [1]) to support
>>>   > this
>>>   > > > > > > use-case.
>>>   > > > > > > >> >>
>>>   > > > > > > >> >>  regards,
>>>   > > > > > > >> >>  gerhard
>>>   > > > > > > >> >>
>>>   > > > > > > >> >>  [1] 
>>  http://s.apache.org/YTq
>>>   > > > > > > >> >>
>>>   > > > > > > >> >>  http://www.irian.at
>>>   > > > > > > >> >>
>>>   > > > > > > >> >>  Your JSF/JavaEE 
> powerhouse 
>>  -
>>>   > > > > > > >> >>  JavaEE Consulting, 
>>  Development and
>>>   > > > > > > >> >>  Courses in English 
> and 
>>  German
>>>   > > > > > > >> >>
>>>   > > > > > > >> >>  Professional Support 
> for 
>>  Apache MyFaces
>>>   > > > > > > >> >>
>>>   > > > > > > >> >>
>>>   > > > > > > >> >>
>>>   > > > > > > >> >>  2012/3/9 Stephen More 
> 
>>  <st...@gmail.com>
>>>   > > > > > > >> >>
>>>   > > > > > > >> >>>  Great. I am 
> mainly 
>>  interested in WindowScoped i.e.
>>>   every
>>>   > > > > browser
>>>   > > > > > > tab
>>>   > > > > > > >> >>>  has its own 
>>  mini-session.
>>>   > > > > > > >> >>>
>>>   > > > > > > >> >>>  I see that CODI 
> is 
>>  adding a ?windowId=595 to keep these
>>>   > > > > > > conversations
>>>   > > > > > > >> >>>  separate. If a 
> user 
>>  simply copies the url and pastes
>>>   in a
>>>   > > new
>>>   > > > > tab
>>>   > > > > > > now
>>>   > > > > > > >> >>>  two browser tabs 
> are 
>>  sharing the same conversation. How
>>>   > > can I
>>>   > > > > > > prevent
>>>   > > > > > > >> >>>  this ? I want to 
>>  enforce that EVERY browser tab has its
>>>   > own
>>>   > > > > > > >> >>>  conversation. 
> Perhaps 
>>  a simple error to the user saying
>>>   > > > > > > >> > "Sorry" or
>>>   > > > > > > >> >>>  start a new 
>>  conversation.
>>>   > > > > > > >> >>>
>>>   > > > > > > >> >>>  -Thanks
>>>   > > > > > > >> >>>
>>>   > > > > > > >> >>>  On Fri, Mar 9, 
> 2012 at 
>>  3:18 AM, Gerhard Petracek
>>>   > > > > > > >> >>>  
>>  <ge...@gmail.com> wrote:
>>>   > > > > > > >> >>>  > hi stephen,
>>>   > > > > > > >> >>>  >
>>>   > > > > > > >> >>>  > (that's 
> an 
>>  issue with the setup of weld and not
>>>   related
>>>   > > to
>>>   > > > > > > >> > myfaces codi.)
>>>   > > > > > > >> >>>  > however, 
> myfaces 
>>  codi doesn't need this support -> if
>>>   > you
>>>   > > > > > > >> > also don't need
>>>   > > > > > > >> >>>  > cdi support 
> for 
>>  servlets, filters or listeners, you
>>>   can
>>>   > > run
>>>   > > > > the
>>>   > > > > > > >> >>>  application
>>>   > > > > > > >> >>>  > without 
> those 
>>  features.
>>>   > > > > > > >> >>>  >
>>>   > > > > > > >> >>>  > regards,
>>>   > > > > > > >> >>>  > gerhard
>>>   > > > > > > >> >>>  >
>>>   > > > > > > >> >>>  > 
>>  http://www.irian.at
>>>   > > > > > > >> >>>  >
>>>   > > > > > > >> >>>  > Your 
> JSF/JavaEE 
>>  powerhouse -
>>>   > > > > > > >> >>>  > JavaEE 
>>  Consulting, Development and
>>>   > > > > > > >> >>>  > Courses in 
>>  English and German
>>>   > > > > > > >> >>>  >
>>>   > > > > > > >> >>>  > Professional 
> 
>>  Support for Apache MyFaces
>>>   > > > > > > >> >>>  >
>>>   > > > > > > >> >>>  >
>>>   > > > > > > >> >>>  > 2012/3/9 
> Stephen 
>>  More <st...@gmail.com>
>>>   > > > > > > >> >>>  >
>>>   > > > > > > >> >>>  >> I too am 
> 
>>  trying to get a simple example working. I
>>>   > have
>>>   > > > put
>>>   > > > > > > >> > together
>>>   > > > > > > >> >>>  >> this 
> project:
>>>   > > > > > > >> > 
>>  http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
>>>   > > > > > > >> >>>  >>
>>>   > > > > > > >> >>>  >> mvn 
>>  jetty:run-war   results in
>>>   > > > > > > >> >>>  >>
>>>   > > > > > > >> >>>  >> SEVERE: 
>>  Unable to create JettyWeldInjector. CDI
>>>   > > injection
>>>   > > > > will
>>>   > > > > > > >> > not be
>>>   > > > > > > >> >>>  >> 
> available in 
>>  Servlets, Filters or Listeners
>>>   > > > > > > >> >>>  >>
>>>   > > > > > > >> >>>  >> What 
> else do 
>>  I need to get this simple example
>>>   > working ?
>>>   > > > > > > >> >>>  >>
>>>   > > > > > > >> >>>  >> -Thanks
>>>   > > > > > > >> >>>  >>
>>>   > > > > > > >> >>>  >> On Thu, 
> Mar 
>>  8, 2012 at 11:07 AM, Gerhard Petracek
>>>   > > > > > > >> >>>  >> 
>>  <ge...@gmail.com> wrote:
>>>   > > > > > > >> >>>  >> > hi 
> jose,
>>>   > > > > > > >> >>>  >> >
>>>   > > > > > > >> >>>  >> > 
> first of 
>>  all: welcome @ myfaces!
>>>   > > > > > > >> >>>  >> >
>>>   > > > > > > >> >>>  >> > 
> concrete 
>>  questions are very welcome and we will
>>>   > > improve
>>>   > > > > > > >> > the wiki
>>>   > > > > > > >> >>>  based on
>>>   > > > > > > >> >>>  >> > 
> them.
>>>   > > > > > > >> >>>  >> >
>>>   > > > > > > >> >>>  >> > 
> regards,
>>>   > > > > > > >> >>>  >> > 
> gerhard
>>>   > > > > > > >> >>>  >> >
>>>   > > > > > > >> >>>  >> > 
>>  http://www.irian.at
>>>   > > > > > > >> >>>  >> >
>>>   > > > > > > >> >>>  >> > 
> Your 
>>  JSF/JavaEE powerhouse -
>>>   > > > > > > >> >>>  >> > 
> JavaEE 
>>  Consulting, Development and
>>>   > > > > > > >> >>>  >> > 
> Courses 
>>  in English and German
>>>   > > > > > > >> >>>  >> >
>>>   > > > > > > >> >>>  >> > 
>>  Professional Support for Apache MyFaces
>>>   > > > > > > >> >>>  >> >
>>>   > > > > > > >> >>>  >> >
>>>   > > > > > > >> >>>  >> >
>>>   > > > > > > >> >>>  >> > 
> 2012/3/8 
>>  José Luis Cetina <ma...@gmail.com>
>>>   > > > > > > >> >>>  >> >
>>>   > > > > > > >> >>>  >> >> 
> Hi 
>>  im so excited to start and use MyFaces and
>>>   CODI
>>>   > > > > > > >> > but i cant get any
>>>   > > > > > > >> >>>  >> >> 
> 
>>  "good" documentation in fact i only can get
>>>   > > > > > > >> > like 2 or 3 mini tutorial
>>>   > > > > > > >> >>>  >> but
>>>   > > > > > > >> >>>  >> >> 
> they 
>>  are really incomplete, can somebody
>>>   recommend
>>>   > me
>>>   > > > > > > >> > to some
>>>   > > > > > > >> >>>  tutorial
>>>   > > > > > > >> >>>  >> or
>>>   > > > > > > >> >>>  >> >> 
> book 
>>  to start with *CODI *y see this is an
>>>   > excellent
>>>   > > > > > > >> > extension, im
>>>   > > > > > > >> >>>  >> moving
>>>   > > > > > > >> >>>  >> >> 
> from 
>>  mojarra and CDI to MyFaces and MyFaces
>>>   > > > > > > >> > extensions, please where
>>>   > > > > > > >> >>>  i
>>>   > > > > > > >> >>>  >> can
>>>   > > > > > > >> >>>  >> >> 
> find 
>>  value information
>>>   > > > > > > >> >>>  >> >>
>>>   > > > > > > >> >>>  >> >> 
> The 
>>  only URL where i found a little info is this:
>>>   > > > > > > >> >>>  >> >>
>>>   > > > > > > >> > 
>>  https://cwiki.apache.org/confluence/display/EXTCDI/Index
>>>   > > > > > > >> >>>  >> >>
>>>   > > > > > > >> >>>  >> >> 
> --
>>>   > > > > > > >> >>>  >> >>
>>>   > > > > > > >> >
>>>   > > > > 
>>  -------------------------------------------------------------------
>>>   > > > > > > >> >>>  >> >> 
> 
>>  *SCJA. José Luis Cetina*
>>>   > > > > > > >> >>>  >> >>
>>>   > > > > > > >> >
>>>   > > > > 
>>  -------------------------------------------------------------------
>>>   > > > > > > >> >>>  >> >>
>>>   > > > > > > >> >>>  >>
>>>   > > > > > > >> >>>
>>>   > > > > > > >> >
>>>   > > > > > > >>
>>>   > > > > > >
>>>   > > > > >
>>>   > > > >
>>>   > > > >
>>>   > > >
>>>   > >
>>>   >
>>> 
>>> 
>> 
> 

Re: MyFaces and CODI

Posted by Mark Struberg <st...@yahoo.de>.
> when i find out what's causing my bean to be instantiated on every ajax call 
> i'll come back here to report.

That sounds familiar - good luck ;)

Which scope does your bean have? You are sure that you are really using CDI javax.enterprise.context.* scopes and not javax.faces.bean.* scopes due to a wrong auto-import  of your IDE?

LieGrue,
strub



----- Original Message -----
> From: Rafael Pestano <rm...@yahoo.com.br>
> To: MyFaces Discussion <us...@myfaces.apache.org>
> Cc: 
> Sent: Saturday, March 17, 2012 4:34 PM
> Subject: Re: MyFaces and CODI
> 
> yeap, i also deployed the server side demo in tomcat and it works as expected, 
> when i find out what's causing my bean to be instantiated on every ajax call 
> i'll come back here to report.
> 
> many thanks for the assistance.
>  
> Att, 
> 
> Rafael M. Pestano
> 
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
> 
> 
> 
> ________________________________
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org> 
> Enviadas: Sexta-feira, 16 de Março de 2012 22:46
> Assunto: Re: MyFaces and CODI
> 
> hi rafael,
> 
> i can't reproduce it. i added richfaces to the previous demo as well as a4j
> support to the input component and everything works as expected.
> 
> regards,
> gerhard
> 
> http://www.irian.at
> 
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
> 
> Professional Support for Apache MyFaces
> 
> 
> 
> 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> 
>>  Hi Gehard,
>> 
>>  i didnt got the ideia, do you have any example or a link showing this
>>  approach?
>> 
>>  what i have got til now is:
>>  1 - WindowContextIdHolderComponent is a jsf component which is added
>>  dynamically to the view
>>  2 - this component holds the windowId
>>  3 - i have,somehow , to keep the windowId the same between requests so my
>>  ViewAccessScoped bean  is "keeped alive" <- here is where im 
> stuck
>> 
>> 
>> 
>> 
>>  Att,
>>  Rafael M. Pestano
>>  Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
>>  Graduando em Ciência da Computação UFRGS
>>  @realpestano
>>  http://code.google.com/p/jsf-conventions-framework/
>> 
>> 
>> 
>>  ----- Mensagem original -----
>>  De: Gerhard Petracek <ge...@gmail.com>
>>  Para: MyFaces Discussion <us...@myfaces.apache.org>
>>  Cc:
>>  Enviadas: Quinta-feira, 15 de Março de 2012 11:28
>>  Assunto: Re: MyFaces and CODI
>> 
>>  hi rafael,
>> 
>>  @ WindowContextIdHolderComponent:
>> 
>>  that's the name of the class. you have to resolve the component (by 
> type)
>>  before the view gets rendered and add it to the ajax enabled a4j components
>>  via the corresponding java-api.
>> 
>>  @ custom approach:
>>  independent of the concrete approach you would like to use, you just have
>>  to ensure that the information is available on the server-side (for every
>>  jsf request which starts the jsf request-lifecycle).
>> 
>>  regards,
>>  gerhard
>> 
>>  Your JSF/JavaEE powerhouse -
>>  JavaEE Consulting, Development and
>>  Courses in English and German
>> 
>>  Professional Support for Apache MyFaces
>> 
>> 
>>  2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>> 
>>  > Hi again,
>>  >
>>  > "it will work with a4j as soon as you
>>  > ensure that it gets restored for requests triggered by a4j " you 
> mean i
>>  > should send WindowContextIdHolderComponent  within the ajax request?
>>  >
>>  > somethink like <a4j:support 
> process="WindowContextIdHolderComponent"/> ?
>>  >
>>  > if so whats the id of the generated component?
>>  >
>>  > i also have another question, in the javadoc
>>  > of WindowContextConfig isUrlParameterSuported() says
>>  >
>>  > "Specifies if it is allowed to use URL params for forwarding the 
> current
>>  > window-id. (deactivate it e.g. for higher security - in this case 
> it's
>>  > required to use a window id provided by a component lib or a 
> server-side
>>  > window-handler"
>>  >
>>  > how can i create a component to handle the window id? can i do that 
> with
>>  > an h:inputHidden for example?
>>  >
>>  > thanks for the help.
>>  >
>>  >
>>  >
>>  > Att,
>>  >
>>  > Rafael M. Pestano
>>  >
>>  > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
>>  > Graduando em Ciência da Computação UFRGS
>>  > @realpestano
>>  > http://code.google.com/p/jsf-conventions-framework/
>>  >
>>  >
>>  >
>>  > ________________________________
>>  > De: Gerhard Petracek <ge...@gmail.com>
>>  > Para: MyFaces Discussion <us...@myfaces.apache.org>
>>  > Enviadas: Quinta-feira, 15 de Março de 2012 10:37
>>  > Assunto: Re: MyFaces and CODI
>>  >
>>  > hi rafael,
>>  >
>>  > the fallback adds a component (WindowContextIdHolderComponent)
>>  dynamically
>>  > (as a direct child of UiViewRoot) -> it will work with a4j as soon 
> as you
>>  > ensure that it gets restored for requests triggered by a4j.
>>  >
>>  > regards,
>>  > gerhard
>>  >
>>  > http://www.irian.at
>>  >
>>  > Your JSF/JavaEE powerhouse -
>>  > JavaEE Consulting, Development and
>>  > Courses in English and German
>>  >
>>  > Professional Support for Apache MyFaces
>>  >
>>  >
>>  > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>>  >
>>  > > well its not 100% yet ;(...on every ajaxCall my ViewAccessScoped 
> bean
>>  is
>>  > > being instantiated,
>>  > >
>>  > > im using a4j, there is any known issue with it?
>>  > >
>>  > > for example <h:selectOneMenu .....>
>>  > >                         <a4j:support 
> event="onchange" ....action="when
>>  > the
>>  > > action is called the bean constructor gets called"/>
>>  > >                     </h:selectOneMenu>
>>  > >
>>  > > if i change from View to RequestScoped the bahavior is the same, 
> any
>>  > ideas?
>>  > >
>>  > >
>>  > > thanks in advance.
>>  > >
>>  > >
>>  > > Att,
>>  > >
>>  > > Rafael M. Pestano
>>  > >
>>  > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande 
> do Sul
>>  > > Graduando em Ciência da Computação UFRGS
>>  > > @realpestano
>>  > > http://code.google.com/p/jsf-conventions-framework/
>>  > >
>>  > >
>>  > >
>>  > > ________________________________
>>  > >  De: Rafael Pestano <rm...@yahoo.com.br>
>>  > > Para: MyFaces Discussion <us...@myfaces.apache.org>
>>  > > Enviadas: Quinta-feira, 15 de Março de 2012 8:45
>>  > > Assunto: Re: MyFaces and CODI
>>  > >
>>  > > "if you don't need redirects, you could have a look at 
> e.g. [1] which
>>  > uses
>>  > > an internal fallback." yea, its our case and it just works!
>>  > >
>>  > > many thanks for your help, keep the great work!
>>  > >
>>  > > Att,
>>  > >
>>  > > Rafael M. Pestano
>>  > >
>>  > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande 
> do Sul
>>  > > Graduando em Ciência da Computação UFRGS
>>  > > @realpestano
>>  > > http://code.google.com/p/jsf-conventions-framework/
>>  > >
>>  > >
>>  > >
>>  > > ________________________________
>>  > > De: Gerhard Petracek <ge...@gmail.com>
>>  > > Para: MyFaces Discussion <us...@myfaces.apache.org>
>>  > > Enviadas: Quarta-feira, 14 de Março de 2012 23:19
>>  > > Assunto: Re: MyFaces and CODI
>>  > >
>>  > > hi rafael,
>>  > >
>>  > > as you have seen it's easy to provide a custom WindowHandler 
> (just
>>  > > implement the interface and provide your implementation as 
> alternative
>>  > cdi
>>  > > bean)
>>  > > -> you can integrate every custom approach which is enough to 
> solve you
>>  > > requirements.
>>  > >
>>  > > if you don't need redirects, you could have a look at e.g. 
> [1] which
>>  uses
>>  > > an internal fallback.
>>  > >
>>  > > regards,
>>  > > gerhard
>>  > >
>>  > > [1] http://s.apache.org/SAs
>>  > >
>>  > > http://www.irian.at
>>  > >
>>  > > Your JSF/JavaEE powerhouse -
>>  > > JavaEE Consulting, Development and
>>  > > Courses in English and German
>>  > >
>>  > > Professional Support for Apache MyFaces
>>  > >
>>  > >
>>  > >
>>  > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>>  > >
>>  > > > Hi Gehard,
>>  > > >
>>  > > > its a stopper to us cause we are still dependent on JSF 1.2
>>  > > > Can i implement an alternative
>>  > > > to
>>  > >
>>  >
>> 
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
>>  > > > based on JSF 1.2?
>>  > > >
>>  > > > i see you use flash scope to span the windowId through 
> requests in
>>  the
>>  > > > server side solution:
>>  > > >
>>  > > > if (windowId != null)
>>  > > > 79         {
>>  > > >
>>  > > > 80
>>  > > 
> externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY,
>>  > > windowId);
>>  > > >
>>  > > > 81
>>  > > externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
>>  > > > 82         }
>>  > > >
>>  > > > if i put the windownId in the sessionMap it would still 
> work? i think
>>  > ill
>>  > > > find hard time trying to remove the windowId from the map 
> when user
>>  > leave
>>  > > > the page.
>>  > > >
>>  > > >
>>  > > >
>>  > > > thanks for your help i really appreciated it.
>>  > > >
>>  > > > Att,
>>  > > > Rafael M. Pestano
>>  > > > Desenvolvedor Java Cia. de Processamento de Dados do Rio 
> Grande do
>>  Sul
>>  > > > Graduando em Ciência da Computação UFRGS
>>  > > > @realpestano
>>  > > > http://code.google.com/p/jsf-conventions-framework/
>>  > > >
>>  > > >
>>  > > >
>>  > > > ----- Mensagem original -----
>>  > > > De: Gerhard Petracek <ge...@gmail.com>
>>  > > > Para: MyFaces Discussion <us...@myfaces.apache.org>
>>  > > > Cc:
>>  > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:55
>>  > > > Assunto: Re: MyFaces and CODI
>>  > > >
>>  > > > hi rafael,
>>  > > >
>>  > > > internally the ServerSideWindowHandler is based on the flash 
> scope
>>  > > (that's
>>  > > > one of the mentioned disadvantages)
>>  > > > -> it's bound to jsf 2+ -> it is:
>>  > > >
>>  > > >
>>  > >
>>  >
>> 
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
>>  > > > (and you can't use the additional js.)
>>  > > >
>>  > > > with some constellations you just hit the restrictions of 
> browsers ->
>>  > you
>>  > > > have to choose what you really need.
>>  > > >
>>  > > > regards,
>>  > > > gerhard
>>  > > >
>>  > > > http://www.irian.at
>>  > > >
>>  > > > Your JSF/JavaEE powerhouse -
>>  > > > JavaEE Consulting, Development and
>>  > > > Courses in English and German
>>  > > >
>>  > > > Professional Support for Apache MyFaces
>>  > > >
>>  > > >
>>  > > >
>>  > > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>>  > > >
>>  > > > > i see, i have used the client side one
>>  > > > >
>>  > > > > <alternatives>
>>  > > > >
>>  > > >
>>  > >
>>  >
>> 
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
>>  > > > > </alternatives>
>>  > > > >
>>  > > > > i imagine the server side should be
>>  > > > >
>>  > > > > <alternatives>
>>  > > > >
>>  > > >
>>  > >
>>  >
>> 
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
>>  > > > > </alternatives>alright?
>>  > > > >
>>  > > > > i will test it tomorrow and give the feedback, thanks.
>>  > > > >
>>  > > > > Att,
>>  > > > > Rafael M. Pestano
>>  > > > > Desenvolvedor Java Cia. de Processamento de Dados do 
> Rio Grande do
>>  > Sul
>>  > > > > Graduando em Ciência da Computação UFRGS
>>  > > > > @realpestano
>>  > > > > http://code.google.com/p/jsf-conventions-framework/
>>  > > > >
>>  > > > >
>>  > > > >
>>  > > > > ----- Mensagem original -----
>>  > > > > De: Gerhard Petracek <ge...@gmail.com>
>>  > > > > Para: MyFaces Discussion 
> <us...@myfaces.apache.org>
>>  > > > > Cc:
>>  > > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:11
>>  > > > > Assunto: Re: MyFaces and CODI
>>  > > > >
>>  > > > > hi rafael,
>>  > > > >
>>  > > > > the easiest approach to test an alternative for this 
> constellation
>>  is
>>  > > the
>>  > > > > activation of the ServerSideWindowHandler (it's a 
> std. cdi
>>  > @Alternative
>>  > > > > implementation -> you can activate it in the 
> beans.xml file of your
>>  > > > > application).
>>  > > > > (however, please be aware that this alternative 
> implementation has
>>  > some
>>  > > > > disadvantages.)
>>  > > > >
>>  > > > > regards,
>>  > > > > gerhard
>>  > > > >
>>  > > > > http://www.irian.at
>>  > > > >
>>  > > > > Your JSF/JavaEE powerhouse -
>>  > > > > JavaEE Consulting, Development and
>>  > > > > Courses in English and German
>>  > > > >
>>  > > > > Professional Support for Apache MyFaces
>>  > > > >
>>  > > > >
>>  > > > >
>>  > > > > 2012/3/14 Rafael Pestano <rm...@yahoo.com.br>
>>  > > > >
>>  > > > > > Hi Gerhard, i successfuly added codi and 
> openwebbeans to an
>>  > > application
>>  > > > > > running on weblogic 11g
>>  > > > > >
>>  > > > > > however its a  legacy application which uses 
> frames, basicaly we
>>  > > have a
>>  > > > > > menu on the left frame that targets the center 
> frame, something
>>  > like:
>>  > > > > >
>>  > > > > > <h:commandLink value="menuLink" 
> action="#{myBean.init}"
>>  > > > target="frmDados"
>>  > > > > > />
>>  > > > > >
>>  > > > > >
>>  > > > > > the problem is, when a add CODI to the application 
> and mark
>>  myBean
>>  > as
>>  > > > > > ViewAccessScoped (and thus the windowId starts to 
> be append to
>>  the
>>  > > url)
>>  > > > > > the above menuLink always open the center frame in 
> a new browser
>>  > tab.
>>  > > > > >
>>  > > > > > If i remove CODI and set myBean as 
> RequestScoped(or any other CDI
>>  > > > Scope)
>>  > > > > > the application behaves  as expected.
>>  > > > > >
>>  > > > > > So i think the windowId generated by CODI  is 
> causing this
>>  issue, i
>>  > > > tried
>>  > > > > > your solution without success, the windowId isnt 
> removed from the
>>  > url
>>  > > > > and a
>>  > > > > > new tab opens when i click in the menuLink.
>>  > > > > >
>>  > > > > > Any thoughs?
>>  > > > > >
>>  > > > > >
>>  > > > > > thanks for all your help.
>>  > > > > >
>>  > > > > >
>>  > > > > >
>>  > > > > > Att,
>>  > > > > >
>>  > > > > > Rafael M. Pestano
>>  > > > > >
>>  > > > > > Desenvolvedor Java Cia. de Processamento de Dados 
> do Rio Grande
>>  do
>>  > > Sul
>>  > > > > > Graduando em Ciência da Computação UFRGS
>>  > > > > > @realpestano
>>  > > > > > 
> http://code.google.com/p/jsf-conventions-framework/
>>  > > > > >
>>  > > > > >
>>  > > > > >
>>  > > > > > ________________________________
>>  > > > > > De: Gerhard Petracek 
> <ge...@gmail.com>
>>  > > > > > Para: MyFaces Discussion 
> <us...@myfaces.apache.org>
>>  > > > > > Enviadas: Sexta-feira, 9 de Março de 2012 12:38
>>  > > > > > Assunto: Re: MyFaces and CODI
>>  > > > > >
>>  > > > > > hi stephen,
>>  > > > > >
>>  > > > > > that's right [1] doesn't support it.
>>  > > > > > werner committed his improvement and you can try 
> [2] and [3] as
>>  you
>>  > > see
>>  > > > > > them right now.
>>  > > > > >
>>  > > > > > regards,
>>  > > > > > gerhard
>>  > > > > >
>>  > > > > > [1]
>>  > > > >
>>  > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
>>  > > > > > [2] http://s.apache.org/rr
>>  > > > > > [3] http://s.apache.org/23p
>>  > > > > >
>>  > > > > > http://www.irian.at
>>  > > > > >
>>  > > > > > Your JSF/JavaEE powerhouse -
>>  > > > > > JavaEE Consulting, Development and
>>  > > > > > Courses in English and German
>>  > > > > >
>>  > > > > > Professional Support for Apache MyFaces
>>  > > > > >
>>  > > > > >
>>  > > > > >
>>  > > > > > 2012/3/9 Stephen More 
> <st...@gmail.com>
>>  > > > > >
>>  > > > > > > I was referring to [1]
>>  > > > > > >
>>  > > >
>>  http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
>>  > > > > > >
>>  > > > > > > I guess I just need to wait until the correct 
> way is tested and
>>  > > > > > > documented in the wiki using:
>>  > > > > > >   [1] http://s.apache.org/rr
>>  > > > > > >  [2] http://s.apache.org/23p
>>  > > > > > >
>>  > > > > > >
>>  > > > > > >
>>  > > > > > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard 
> Petracek
>>  > > > > > > <ge...@gmail.com> wrote:
>>  > > > > > > > @ mark:
>>  > > > > > > > i just tested it and it works with [1] 
> in combination
>>  > > > > > > > with ClientSideWindowHandler [2].
>>  > > > > > > >
>>  > > > > > > > regards,
>>  > > > > > > > gerhard
>>  > > > > > > >
>>  > > > > > > > [1] http://s.apache.org/rr
>>  > > > > > > > [2] http://s.apache.org/23p
>>  > > > > > > >
>>  > > > > > > > http://www.irian.at
>>  > > > > > > >
>>  > > > > > > > Your JSF/JavaEE powerhouse -
>>  > > > > > > > JavaEE Consulting, Development and
>>  > > > > > > > Courses in English and German
>>  > > > > > > >
>>  > > > > > > > Professional Support for Apache MyFaces
>>  > > > > > > >
>>  > > > > > > >
>>  > > > > > > >
>>  > > > > > > > 2012/3/9 Mark Struberg 
> <st...@yahoo.de>
>>  > > > > > > >
>>  > > > > > > >> Hi Stephen!
>>  > > > > > > >>
>>  > > > > > > >> Well, the current approach in CODI 
> is currently under
>>  > discussion
>>  > > > in
>>  > > > > > the
>>  > > > > > > >> JSF EG. The whole windowId stuff of 
> CODI might end up in the
>>  > > > JSF-2.2
>>  > > > > > or
>>  > > > > > > 2.3
>>  > > > > > > >> spec.
>>  > > > > > > >>
>>  > > > > > > >> >T hat seems to work fine when 
> pasting into a new empty
>>  > window,
>>  > > > but
>>  > > > > it
>>  > > > > > > >> > still allows you to copy-paste 
> the url from one codi
>>  window
>>  > to
>>  > > > an
>>  > > > > > > >> > existing codi window.
>>  > > > > > > >>
>>  > > > > > > >> Nope, because the windowhandler.js 
> script will first check
>>  the
>>  > > > > > > window.name.
>>  > > > > > > >> And if this is empty/doesn't fit 
> the windowId in the URL,
>>  then
>>  > > it
>>  > > > > will
>>  > > > > > > >> reload the page with a freshly 
> requested windowId.
>>  > > > > > > >>
>>  > > > > > > >> LieGrue,
>>  > > > > > > >> strub
>>  > > > > > > >>
>>  > > > > > > >>
>>  > > > > > > >>
>>  > > > > > > >>
>>  > > > > > > >> ----- Original Message -----
>>  > > > > > > >> > From: Stephen More 
> <st...@gmail.com>
>>  > > > > > > >> > To: MyFaces Discussion 
> <us...@myfaces.apache.org>
>>  > > > > > > >> > Cc:
>>  > > > > > > >> > Sent: Friday, March 9, 2012 
> 1:27 PM
>>  > > > > > > >> > Subject: Re: MyFaces and CODI
>>  > > > > > > >> >
>>  > > > > > > >> > Included in the JSF jar is
>>  > > META-INF/resources/javax.faces/jsf.js
>>  > > > > > which
>>  > > > > > > >> > enables its use by 
> <h:outputScript name="jsf.js"
>>  > > > > > > >> > library="javax.faces"
>>  > > > > > > >> > target="head"/>
>>  > > > > > > >> >
>>  > > > > > > >> > Should windowhandler.js be 
> moved from the examples into a
>>  > core
>>  > > > > > library
>>  > > > > > > >> > so that it can be utilized the 
> same way ?
>>  > > > > > > >> >
>>  > > > > > > >> >
>>  > > > > > > >> >
>>  > > > > > > >> > On Fri, Mar 9, 2012 at 7:10 AM, 
> Gerhard Petracek
>>  > > > > > > >> > 
> <ge...@gmail.com> wrote:
>>  > > > > > > >> >>  hi stephen,
>>  > > > > > > >> >>
>>  > > > > > > >> >>  yes - you can add a small 
> js (see e.g. [1]) to support
>>  > this
>>  > > > > > > use-case.
>>  > > > > > > >> >>
>>  > > > > > > >> >>  regards,
>>  > > > > > > >> >>  gerhard
>>  > > > > > > >> >>
>>  > > > > > > >> >>  [1] 
> http://s.apache.org/YTq
>>  > > > > > > >> >>
>>  > > > > > > >> >>  http://www.irian.at
>>  > > > > > > >> >>
>>  > > > > > > >> >>  Your JSF/JavaEE powerhouse 
> -
>>  > > > > > > >> >>  JavaEE Consulting, 
> Development and
>>  > > > > > > >> >>  Courses in English and 
> German
>>  > > > > > > >> >>
>>  > > > > > > >> >>  Professional Support for 
> Apache MyFaces
>>  > > > > > > >> >>
>>  > > > > > > >> >>
>>  > > > > > > >> >>
>>  > > > > > > >> >>  2012/3/9 Stephen More 
> <st...@gmail.com>
>>  > > > > > > >> >>
>>  > > > > > > >> >>>  Great. I am mainly 
> interested in WindowScoped i.e.
>>  every
>>  > > > > browser
>>  > > > > > > tab
>>  > > > > > > >> >>>  has its own 
> mini-session.
>>  > > > > > > >> >>>
>>  > > > > > > >> >>>  I see that CODI is 
> adding a ?windowId=595 to keep these
>>  > > > > > > conversations
>>  > > > > > > >> >>>  separate. If a user 
> simply copies the url and pastes
>>  in a
>>  > > new
>>  > > > > tab
>>  > > > > > > now
>>  > > > > > > >> >>>  two browser tabs are 
> sharing the same conversation. How
>>  > > can I
>>  > > > > > > prevent
>>  > > > > > > >> >>>  this ? I want to 
> enforce that EVERY browser tab has its
>>  > own
>>  > > > > > > >> >>>  conversation. Perhaps 
> a simple error to the user saying
>>  > > > > > > >> > "Sorry" or
>>  > > > > > > >> >>>  start a new 
> conversation.
>>  > > > > > > >> >>>
>>  > > > > > > >> >>>  -Thanks
>>  > > > > > > >> >>>
>>  > > > > > > >> >>>  On Fri, Mar 9, 2012 at 
> 3:18 AM, Gerhard Petracek
>>  > > > > > > >> >>>  
> <ge...@gmail.com> wrote:
>>  > > > > > > >> >>>  > hi stephen,
>>  > > > > > > >> >>>  >
>>  > > > > > > >> >>>  > (that's an 
> issue with the setup of weld and not
>>  related
>>  > > to
>>  > > > > > > >> > myfaces codi.)
>>  > > > > > > >> >>>  > however, myfaces 
> codi doesn't need this support -> if
>>  > you
>>  > > > > > > >> > also don't need
>>  > > > > > > >> >>>  > cdi support for 
> servlets, filters or listeners, you
>>  can
>>  > > run
>>  > > > > the
>>  > > > > > > >> >>>  application
>>  > > > > > > >> >>>  > without those 
> features.
>>  > > > > > > >> >>>  >
>>  > > > > > > >> >>>  > regards,
>>  > > > > > > >> >>>  > gerhard
>>  > > > > > > >> >>>  >
>>  > > > > > > >> >>>  > 
> http://www.irian.at
>>  > > > > > > >> >>>  >
>>  > > > > > > >> >>>  > Your JSF/JavaEE 
> powerhouse -
>>  > > > > > > >> >>>  > JavaEE 
> Consulting, Development and
>>  > > > > > > >> >>>  > Courses in 
> English and German
>>  > > > > > > >> >>>  >
>>  > > > > > > >> >>>  > Professional 
> Support for Apache MyFaces
>>  > > > > > > >> >>>  >
>>  > > > > > > >> >>>  >
>>  > > > > > > >> >>>  > 2012/3/9 Stephen 
> More <st...@gmail.com>
>>  > > > > > > >> >>>  >
>>  > > > > > > >> >>>  >> I too am 
> trying to get a simple example working. I
>>  > have
>>  > > > put
>>  > > > > > > >> > together
>>  > > > > > > >> >>>  >> this project:
>>  > > > > > > >> > 
> http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
>>  > > > > > > >> >>>  >>
>>  > > > > > > >> >>>  >> mvn 
> jetty:run-war   results in
>>  > > > > > > >> >>>  >>
>>  > > > > > > >> >>>  >> SEVERE: 
> Unable to create JettyWeldInjector. CDI
>>  > > injection
>>  > > > > will
>>  > > > > > > >> > not be
>>  > > > > > > >> >>>  >> available in 
> Servlets, Filters or Listeners
>>  > > > > > > >> >>>  >>
>>  > > > > > > >> >>>  >> What else do 
> I need to get this simple example
>>  > working ?
>>  > > > > > > >> >>>  >>
>>  > > > > > > >> >>>  >> -Thanks
>>  > > > > > > >> >>>  >>
>>  > > > > > > >> >>>  >> On Thu, Mar 
> 8, 2012 at 11:07 AM, Gerhard Petracek
>>  > > > > > > >> >>>  >> 
> <ge...@gmail.com> wrote:
>>  > > > > > > >> >>>  >> > hi jose,
>>  > > > > > > >> >>>  >> >
>>  > > > > > > >> >>>  >> > first of 
> all: welcome @ myfaces!
>>  > > > > > > >> >>>  >> >
>>  > > > > > > >> >>>  >> > concrete 
> questions are very welcome and we will
>>  > > improve
>>  > > > > > > >> > the wiki
>>  > > > > > > >> >>>  based on
>>  > > > > > > >> >>>  >> > them.
>>  > > > > > > >> >>>  >> >
>>  > > > > > > >> >>>  >> > regards,
>>  > > > > > > >> >>>  >> > gerhard
>>  > > > > > > >> >>>  >> >
>>  > > > > > > >> >>>  >> > 
> http://www.irian.at
>>  > > > > > > >> >>>  >> >
>>  > > > > > > >> >>>  >> > Your 
> JSF/JavaEE powerhouse -
>>  > > > > > > >> >>>  >> > JavaEE 
> Consulting, Development and
>>  > > > > > > >> >>>  >> > Courses 
> in English and German
>>  > > > > > > >> >>>  >> >
>>  > > > > > > >> >>>  >> > 
> Professional Support for Apache MyFaces
>>  > > > > > > >> >>>  >> >
>>  > > > > > > >> >>>  >> >
>>  > > > > > > >> >>>  >> >
>>  > > > > > > >> >>>  >> > 2012/3/8 
> José Luis Cetina <ma...@gmail.com>
>>  > > > > > > >> >>>  >> >
>>  > > > > > > >> >>>  >> >> Hi 
> im so excited to start and use MyFaces and
>>  CODI
>>  > > > > > > >> > but i cant get any
>>  > > > > > > >> >>>  >> >> 
> "good" documentation in fact i only can get
>>  > > > > > > >> > like 2 or 3 mini tutorial
>>  > > > > > > >> >>>  >> but
>>  > > > > > > >> >>>  >> >> they 
> are really incomplete, can somebody
>>  recommend
>>  > me
>>  > > > > > > >> > to some
>>  > > > > > > >> >>>  tutorial
>>  > > > > > > >> >>>  >> or
>>  > > > > > > >> >>>  >> >> book 
> to start with *CODI *y see this is an
>>  > excellent
>>  > > > > > > >> > extension, im
>>  > > > > > > >> >>>  >> moving
>>  > > > > > > >> >>>  >> >> from 
> mojarra and CDI to MyFaces and MyFaces
>>  > > > > > > >> > extensions, please where
>>  > > > > > > >> >>>  i
>>  > > > > > > >> >>>  >> can
>>  > > > > > > >> >>>  >> >> find 
> value information
>>  > > > > > > >> >>>  >> >>
>>  > > > > > > >> >>>  >> >> The 
> only URL where i found a little info is this:
>>  > > > > > > >> >>>  >> >>
>>  > > > > > > >> > 
> https://cwiki.apache.org/confluence/display/EXTCDI/Index
>>  > > > > > > >> >>>  >> >>
>>  > > > > > > >> >>>  >> >> --
>>  > > > > > > >> >>>  >> >>
>>  > > > > > > >> >
>>  > > > > 
> -------------------------------------------------------------------
>>  > > > > > > >> >>>  >> >> 
> *SCJA. José Luis Cetina*
>>  > > > > > > >> >>>  >> >>
>>  > > > > > > >> >
>>  > > > > 
> -------------------------------------------------------------------
>>  > > > > > > >> >>>  >> >>
>>  > > > > > > >> >>>  >>
>>  > > > > > > >> >>>
>>  > > > > > > >> >
>>  > > > > > > >>
>>  > > > > > >
>>  > > > > >
>>  > > > >
>>  > > > >
>>  > > >
>>  > >
>>  >
>> 
>> 
> 

Re: MyFaces and CODI

Posted by Rafael Pestano <rm...@yahoo.com.br>.
yeap, i also deployed the server side demo in tomcat and it works as expected, when i find out what's causing my bean to be instantiated on every ajax call i'll come back here to report.

many thanks for the assistance.
 
Att, 

Rafael M. Pestano

Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
Graduando em Ciência da Computação UFRGS
@realpestano
http://code.google.com/p/jsf-conventions-framework/



________________________________
 De: Gerhard Petracek <ge...@gmail.com>
Para: MyFaces Discussion <us...@myfaces.apache.org> 
Enviadas: Sexta-feira, 16 de Março de 2012 22:46
Assunto: Re: MyFaces and CODI
 
hi rafael,

i can't reproduce it. i added richfaces to the previous demo as well as a4j
support to the input component and everything works as expected.

regards,
gerhard

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/15 Rafael Pestano <rm...@yahoo.com.br>

> Hi Gehard,
>
> i didnt got the ideia, do you have any example or a link showing this
> approach?
>
> what i have got til now is:
> 1 - WindowContextIdHolderComponent is a jsf component which is added
> dynamically to the view
> 2 - this component holds the windowId
> 3 - i have,somehow , to keep the windowId the same between requests so my
> ViewAccessScoped bean  is "keeped alive" <- here is where im stuck
>
>
>
>
> Att,
> Rafael M. Pestano
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ----- Mensagem original -----
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Cc:
> Enviadas: Quinta-feira, 15 de Março de 2012 11:28
> Assunto: Re: MyFaces and CODI
>
> hi rafael,
>
> @ WindowContextIdHolderComponent:
>
> that's the name of the class. you have to resolve the component (by type)
> before the view gets rendered and add it to the ajax enabled a4j components
> via the corresponding java-api.
>
> @ custom approach:
> independent of the concrete approach you would like to use, you just have
> to ensure that the information is available on the server-side (for every
> jsf request which starts the jsf request-lifecycle).
>
> regards,
> gerhard
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>
> > Hi again,
> >
> > "it will work with a4j as soon as you
> > ensure that it gets restored for requests triggered by a4j " you mean i
> > should send WindowContextIdHolderComponent  within the ajax request?
> >
> > somethink like <a4j:support process="WindowContextIdHolderComponent"/> ?
> >
> > if so whats the id of the generated component?
> >
> > i also have another question, in the javadoc
> > of WindowContextConfig isUrlParameterSuported() says
> >
> > "Specifies if it is allowed to use URL params for forwarding the current
> > window-id. (deactivate it e.g. for higher security - in this case it's
> > required to use a window id provided by a component lib or a server-side
> > window-handler"
> >
> > how can i create a component to handle the window id? can i do that with
> > an h:inputHidden for example?
> >
> > thanks for the help.
> >
> >
> >
> > Att,
> >
> > Rafael M. Pestano
> >
> > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > Graduando em Ciência da Computação UFRGS
> > @realpestano
> > http://code.google.com/p/jsf-conventions-framework/
> >
> >
> >
> > ________________________________
> > De: Gerhard Petracek <ge...@gmail.com>
> > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > Enviadas: Quinta-feira, 15 de Março de 2012 10:37
> > Assunto: Re: MyFaces and CODI
> >
> > hi rafael,
> >
> > the fallback adds a component (WindowContextIdHolderComponent)
> dynamically
> > (as a direct child of UiViewRoot) -> it will work with a4j as soon as you
> > ensure that it gets restored for requests triggered by a4j.
> >
> > regards,
> > gerhard
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> >
> > > well its not 100% yet ;(...on every ajaxCall my ViewAccessScoped bean
> is
> > > being instantiated,
> > >
> > > im using a4j, there is any known issue with it?
> > >
> > > for example <h:selectOneMenu .....>
> > >                         <a4j:support event="onchange" ....action="when
> > the
> > > action is called the bean constructor gets called"/>
> > >                     </h:selectOneMenu>
> > >
> > > if i change from View to RequestScoped the bahavior is the same, any
> > ideas?
> > >
> > >
> > > thanks in advance.
> > >
> > >
> > > Att,
> > >
> > > Rafael M. Pestano
> > >
> > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > > Graduando em Ciência da Computação UFRGS
> > > @realpestano
> > > http://code.google.com/p/jsf-conventions-framework/
> > >
> > >
> > >
> > > ________________________________
> > >  De: Rafael Pestano <rm...@yahoo.com.br>
> > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > Enviadas: Quinta-feira, 15 de Março de 2012 8:45
> > > Assunto: Re: MyFaces and CODI
> > >
> > > "if you don't need redirects, you could have a look at e.g. [1] which
> > uses
> > > an internal fallback." yea, its our case and it just works!
> > >
> > > many thanks for your help, keep the great work!
> > >
> > > Att,
> > >
> > > Rafael M. Pestano
> > >
> > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > > Graduando em Ciência da Computação UFRGS
> > > @realpestano
> > > http://code.google.com/p/jsf-conventions-framework/
> > >
> > >
> > >
> > > ________________________________
> > > De: Gerhard Petracek <ge...@gmail.com>
> > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > Enviadas: Quarta-feira, 14 de Março de 2012 23:19
> > > Assunto: Re: MyFaces and CODI
> > >
> > > hi rafael,
> > >
> > > as you have seen it's easy to provide a custom WindowHandler (just
> > > implement the interface and provide your implementation as alternative
> > cdi
> > > bean)
> > > -> you can integrate every custom approach which is enough to solve you
> > > requirements.
> > >
> > > if you don't need redirects, you could have a look at e.g. [1] which
> uses
> > > an internal fallback.
> > >
> > > regards,
> > > gerhard
> > >
> > > [1] http://s.apache.org/SAs
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > >
> > > > Hi Gehard,
> > > >
> > > > its a stopper to us cause we are still dependent on JSF 1.2
> > > > Can i implement an alternative
> > > > to
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > > > based on JSF 1.2?
> > > >
> > > > i see you use flash scope to span the windowId through requests in
> the
> > > > server side solution:
> > > >
> > > > if (windowId != null)
> > > > 79         {
> > > >
> > > > 80
> > > externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY,
> > > windowId);
> > > >
> > > > 81
> > > externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
> > > > 82         }
> > > >
> > > > if i put the windownId in the sessionMap it would still work? i think
> > ill
> > > > find hard time trying to remove the windowId from the map when user
> > leave
> > > > the page.
> > > >
> > > >
> > > >
> > > > thanks for your help i really appreciated it.
> > > >
> > > > Att,
> > > > Rafael M. Pestano
> > > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> Sul
> > > > Graduando em Ciência da Computação UFRGS
> > > > @realpestano
> > > > http://code.google.com/p/jsf-conventions-framework/
> > > >
> > > >
> > > >
> > > > ----- Mensagem original -----
> > > > De: Gerhard Petracek <ge...@gmail.com>
> > > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > > Cc:
> > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:55
> > > > Assunto: Re: MyFaces and CODI
> > > >
> > > > hi rafael,
> > > >
> > > > internally the ServerSideWindowHandler is based on the flash scope
> > > (that's
> > > > one of the mentioned disadvantages)
> > > > -> it's bound to jsf 2+ -> it is:
> > > >
> > > >
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > > > (and you can't use the additional js.)
> > > >
> > > > with some constellations you just hit the restrictions of browsers ->
> > you
> > > > have to choose what you really need.
> > > >
> > > > regards,
> > > > gerhard
> > > >
> > > > http://www.irian.at
> > > >
> > > > Your JSF/JavaEE powerhouse -
> > > > JavaEE Consulting, Development and
> > > > Courses in English and German
> > > >
> > > > Professional Support for Apache MyFaces
> > > >
> > > >
> > > >
> > > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > > >
> > > > > i see, i have used the client side one
> > > > >
> > > > > <alternatives>
> > > > >
> > > >
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
> > > > > </alternatives>
> > > > >
> > > > > i imagine the server side should be
> > > > >
> > > > > <alternatives>
> > > > >
> > > >
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
> > > > > </alternatives>alright?
> > > > >
> > > > > i will test it tomorrow and give the feedback, thanks.
> > > > >
> > > > > Att,
> > > > > Rafael M. Pestano
> > > > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> > Sul
> > > > > Graduando em Ciência da Computação UFRGS
> > > > > @realpestano
> > > > > http://code.google.com/p/jsf-conventions-framework/
> > > > >
> > > > >
> > > > >
> > > > > ----- Mensagem original -----
> > > > > De: Gerhard Petracek <ge...@gmail.com>
> > > > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > > > Cc:
> > > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:11
> > > > > Assunto: Re: MyFaces and CODI
> > > > >
> > > > > hi rafael,
> > > > >
> > > > > the easiest approach to test an alternative for this constellation
> is
> > > the
> > > > > activation of the ServerSideWindowHandler (it's a std. cdi
> > @Alternative
> > > > > implementation -> you can activate it in the beans.xml file of your
> > > > > application).
> > > > > (however, please be aware that this alternative implementation has
> > some
> > > > > disadvantages.)
> > > > >
> > > > > regards,
> > > > > gerhard
> > > > >
> > > > > http://www.irian.at
> > > > >
> > > > > Your JSF/JavaEE powerhouse -
> > > > > JavaEE Consulting, Development and
> > > > > Courses in English and German
> > > > >
> > > > > Professional Support for Apache MyFaces
> > > > >
> > > > >
> > > > >
> > > > > 2012/3/14 Rafael Pestano <rm...@yahoo.com.br>
> > > > >
> > > > > > Hi Gerhard, i successfuly added codi and openwebbeans to an
> > > application
> > > > > > running on weblogic 11g
> > > > > >
> > > > > > however its a  legacy application which uses frames, basicaly we
> > > have a
> > > > > > menu on the left frame that targets the center frame, something
> > like:
> > > > > >
> > > > > > <h:commandLink value="menuLink" action="#{myBean.init}"
> > > > target="frmDados"
> > > > > > />
> > > > > >
> > > > > >
> > > > > > the problem is, when a add CODI to the application and mark
> myBean
> > as
> > > > > > ViewAccessScoped (and thus the windowId starts to be append to
> the
> > > url)
> > > > > > the above menuLink always open the center frame in a new browser
> > tab.
> > > > > >
> > > > > > If i remove CODI and set myBean as RequestScoped(or any other CDI
> > > > Scope)
> > > > > > the application behaves  as expected.
> > > > > >
> > > > > > So i think the windowId generated by CODI  is causing this
> issue, i
> > > > tried
> > > > > > your solution without success, the windowId isnt removed from the
> > url
> > > > > and a
> > > > > > new tab opens when i click in the menuLink.
> > > > > >
> > > > > > Any thoughs?
> > > > > >
> > > > > >
> > > > > > thanks for all your help.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Att,
> > > > > >
> > > > > > Rafael M. Pestano
> > > > > >
> > > > > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande
> do
> > > Sul
> > > > > > Graduando em Ciência da Computação UFRGS
> > > > > > @realpestano
> > > > > > http://code.google.com/p/jsf-conventions-framework/
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > De: Gerhard Petracek <ge...@gmail.com>
> > > > > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > > > > Enviadas: Sexta-feira, 9 de Março de 2012 12:38
> > > > > > Assunto: Re: MyFaces and CODI
> > > > > >
> > > > > > hi stephen,
> > > > > >
> > > > > > that's right [1] doesn't support it.
> > > > > > werner committed his improvement and you can try [2] and [3] as
> you
> > > see
> > > > > > them right now.
> > > > > >
> > > > > > regards,
> > > > > > gerhard
> > > > > >
> > > > > > [1]
> > > > >
> > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > > > > [2] http://s.apache.org/rr
> > > > > > [3] http://s.apache.org/23p
> > > > > >
> > > > > > http://www.irian.at
> > > > > >
> > > > > > Your JSF/JavaEE powerhouse -
> > > > > > JavaEE Consulting, Development and
> > > > > > Courses in English and German
> > > > > >
> > > > > > Professional Support for Apache MyFaces
> > > > > >
> > > > > >
> > > > > >
> > > > > > 2012/3/9 Stephen More <st...@gmail.com>
> > > > > >
> > > > > > > I was referring to [1]
> > > > > > >
> > > >
> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > > > > >
> > > > > > > I guess I just need to wait until the correct way is tested and
> > > > > > > documented in the wiki using:
> > > > > > >   [1] http://s.apache.org/rr
> > > > > > >  [2] http://s.apache.org/23p
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
> > > > > > > <ge...@gmail.com> wrote:
> > > > > > > > @ mark:
> > > > > > > > i just tested it and it works with [1] in combination
> > > > > > > > with ClientSideWindowHandler [2].
> > > > > > > >
> > > > > > > > regards,
> > > > > > > > gerhard
> > > > > > > >
> > > > > > > > [1] http://s.apache.org/rr
> > > > > > > > [2] http://s.apache.org/23p
> > > > > > > >
> > > > > > > > http://www.irian.at
> > > > > > > >
> > > > > > > > Your JSF/JavaEE powerhouse -
> > > > > > > > JavaEE Consulting, Development and
> > > > > > > > Courses in English and German
> > > > > > > >
> > > > > > > > Professional Support for Apache MyFaces
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > 2012/3/9 Mark Struberg <st...@yahoo.de>
> > > > > > > >
> > > > > > > >> Hi Stephen!
> > > > > > > >>
> > > > > > > >> Well, the current approach in CODI is currently under
> > discussion
> > > > in
> > > > > > the
> > > > > > > >> JSF EG. The whole windowId stuff of CODI might end up in the
> > > > JSF-2.2
> > > > > > or
> > > > > > > 2.3
> > > > > > > >> spec.
> > > > > > > >>
> > > > > > > >> >T hat seems to work fine when pasting into a new empty
> > window,
> > > > but
> > > > > it
> > > > > > > >> > still allows you to copy-paste the url from one codi
> window
> > to
> > > > an
> > > > > > > >> > existing codi window.
> > > > > > > >>
> > > > > > > >> Nope, because the windowhandler.js script will first check
> the
> > > > > > > window.name.
> > > > > > > >> And if this is empty/doesn't fit the windowId in the URL,
> then
> > > it
> > > > > will
> > > > > > > >> reload the page with a freshly requested windowId.
> > > > > > > >>
> > > > > > > >> LieGrue,
> > > > > > > >> strub
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> ----- Original Message -----
> > > > > > > >> > From: Stephen More <st...@gmail.com>
> > > > > > > >> > To: MyFaces Discussion <us...@myfaces.apache.org>
> > > > > > > >> > Cc:
> > > > > > > >> > Sent: Friday, March 9, 2012 1:27 PM
> > > > > > > >> > Subject: Re: MyFaces and CODI
> > > > > > > >> >
> > > > > > > >> > Included in the JSF jar is
> > > META-INF/resources/javax.faces/jsf.js
> > > > > > which
> > > > > > > >> > enables its use by <h:outputScript name="jsf.js"
> > > > > > > >> > library="javax.faces"
> > > > > > > >> > target="head"/>
> > > > > > > >> >
> > > > > > > >> > Should windowhandler.js be moved from the examples into a
> > core
> > > > > > library
> > > > > > > >> > so that it can be utilized the same way ?
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> > > > > > > >> > <ge...@gmail.com> wrote:
> > > > > > > >> >>  hi stephen,
> > > > > > > >> >>
> > > > > > > >> >>  yes - you can add a small js (see e.g. [1]) to support
> > this
> > > > > > > use-case.
> > > > > > > >> >>
> > > > > > > >> >>  regards,
> > > > > > > >> >>  gerhard
> > > > > > > >> >>
> > > > > > > >> >>  [1] http://s.apache.org/YTq
> > > > > > > >> >>
> > > > > > > >> >>  http://www.irian.at
> > > > > > > >> >>
> > > > > > > >> >>  Your JSF/JavaEE powerhouse -
> > > > > > > >> >>  JavaEE Consulting, Development and
> > > > > > > >> >>  Courses in English and German
> > > > > > > >> >>
> > > > > > > >> >>  Professional Support for Apache MyFaces
> > > > > > > >> >>
> > > > > > > >> >>
> > > > > > > >> >>
> > > > > > > >> >>  2012/3/9 Stephen More <st...@gmail.com>
> > > > > > > >> >>
> > > > > > > >> >>>  Great. I am mainly interested in WindowScoped i.e.
> every
> > > > > browser
> > > > > > > tab
> > > > > > > >> >>>  has its own mini-session.
> > > > > > > >> >>>
> > > > > > > >> >>>  I see that CODI is adding a ?windowId=595 to keep these
> > > > > > > conversations
> > > > > > > >> >>>  separate. If a user simply copies the url and pastes
> in a
> > > new
> > > > > tab
> > > > > > > now
> > > > > > > >> >>>  two browser tabs are sharing the same conversation. How
> > > can I
> > > > > > > prevent
> > > > > > > >> >>>  this ? I want to enforce that EVERY browser tab has its
> > own
> > > > > > > >> >>>  conversation. Perhaps a simple error to the user saying
> > > > > > > >> > "Sorry" or
> > > > > > > >> >>>  start a new conversation.
> > > > > > > >> >>>
> > > > > > > >> >>>  -Thanks
> > > > > > > >> >>>
> > > > > > > >> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> > > > > > > >> >>>  <ge...@gmail.com> wrote:
> > > > > > > >> >>>  > hi stephen,
> > > > > > > >> >>>  >
> > > > > > > >> >>>  > (that's an issue with the setup of weld and not
> related
> > > to
> > > > > > > >> > myfaces codi.)
> > > > > > > >> >>>  > however, myfaces codi doesn't need this support -> if
> > you
> > > > > > > >> > also don't need
> > > > > > > >> >>>  > cdi support for servlets, filters or listeners, you
> can
> > > run
> > > > > the
> > > > > > > >> >>>  application
> > > > > > > >> >>>  > without those features.
> > > > > > > >> >>>  >
> > > > > > > >> >>>  > regards,
> > > > > > > >> >>>  > gerhard
> > > > > > > >> >>>  >
> > > > > > > >> >>>  > http://www.irian.at
> > > > > > > >> >>>  >
> > > > > > > >> >>>  > Your JSF/JavaEE powerhouse -
> > > > > > > >> >>>  > JavaEE Consulting, Development and
> > > > > > > >> >>>  > Courses in English and German
> > > > > > > >> >>>  >
> > > > > > > >> >>>  > Professional Support for Apache MyFaces
> > > > > > > >> >>>  >
> > > > > > > >> >>>  >
> > > > > > > >> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
> > > > > > > >> >>>  >
> > > > > > > >> >>>  >> I too am trying to get a simple example working. I
> > have
> > > > put
> > > > > > > >> > together
> > > > > > > >> >>>  >> this project:
> > > > > > > >> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> > > > > > > >> >>>  >>
> > > > > > > >> >>>  >> mvn jetty:run-war   results in
> > > > > > > >> >>>  >>
> > > > > > > >> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI
> > > injection
> > > > > will
> > > > > > > >> > not be
> > > > > > > >> >>>  >> available in Servlets, Filters or Listeners
> > > > > > > >> >>>  >>
> > > > > > > >> >>>  >> What else do I need to get this simple example
> > working ?
> > > > > > > >> >>>  >>
> > > > > > > >> >>>  >> -Thanks
> > > > > > > >> >>>  >>
> > > > > > > >> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> > > > > > > >> >>>  >> <ge...@gmail.com> wrote:
> > > > > > > >> >>>  >> > hi jose,
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> > first of all: welcome @ myfaces!
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> > concrete questions are very welcome and we will
> > > improve
> > > > > > > >> > the wiki
> > > > > > > >> >>>  based on
> > > > > > > >> >>>  >> > them.
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> > regards,
> > > > > > > >> >>>  >> > gerhard
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> > http://www.irian.at
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> > Your JSF/JavaEE powerhouse -
> > > > > > > >> >>>  >> > JavaEE Consulting, Development and
> > > > > > > >> >>>  >> > Courses in English and German
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> > Professional Support for Apache MyFaces
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> >> Hi im so excited to start and use MyFaces and
> CODI
> > > > > > > >> > but i cant get any
> > > > > > > >> >>>  >> >> "good" documentation in fact i only can get
> > > > > > > >> > like 2 or 3 mini tutorial
> > > > > > > >> >>>  >> but
> > > > > > > >> >>>  >> >> they are really incomplete, can somebody
> recommend
> > me
> > > > > > > >> > to some
> > > > > > > >> >>>  tutorial
> > > > > > > >> >>>  >> or
> > > > > > > >> >>>  >> >> book to start with *CODI *y see this is an
> > excellent
> > > > > > > >> > extension, im
> > > > > > > >> >>>  >> moving
> > > > > > > >> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
> > > > > > > >> > extensions, please where
> > > > > > > >> >>>  i
> > > > > > > >> >>>  >> can
> > > > > > > >> >>>  >> >> find value information
> > > > > > > >> >>>  >> >>
> > > > > > > >> >>>  >> >> The only URL where i found a little info is this:
> > > > > > > >> >>>  >> >>
> > > > > > > >> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
> > > > > > > >> >>>  >> >>
> > > > > > > >> >>>  >> >> --
> > > > > > > >> >>>  >> >>
> > > > > > > >> >
> > > > > -------------------------------------------------------------------
> > > > > > > >> >>>  >> >> *SCJA. José Luis Cetina*
> > > > > > > >> >>>  >> >>
> > > > > > > >> >
> > > > > -------------------------------------------------------------------
> > > > > > > >> >>>  >> >>
> > > > > > > >> >>>  >>
> > > > > > > >> >>>
> > > > > > > >> >
> > > > > > > >>
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
>

Re: MyFaces and CODI

Posted by Gerhard Petracek <ge...@gmail.com>.
hi rafael,

i can't reproduce it. i added richfaces to the previous demo as well as a4j
support to the input component and everything works as expected.

regards,
gerhard

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/15 Rafael Pestano <rm...@yahoo.com.br>

> Hi Gehard,
>
> i didnt got the ideia, do you have any example or a link showing this
> approach?
>
> what i have got til now is:
> 1 - WindowContextIdHolderComponent is a jsf component which is added
> dynamically to the view
> 2 - this component holds the windowId
> 3 - i have,somehow , to keep the windowId the same between requests so my
> ViewAccessScoped bean  is "keeped alive" <- here is where im stuck
>
>
>
>
> Att,
> Rafael M. Pestano
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ----- Mensagem original -----
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Cc:
> Enviadas: Quinta-feira, 15 de Março de 2012 11:28
> Assunto: Re: MyFaces and CODI
>
> hi rafael,
>
> @ WindowContextIdHolderComponent:
>
> that's the name of the class. you have to resolve the component (by type)
> before the view gets rendered and add it to the ajax enabled a4j components
> via the corresponding java-api.
>
> @ custom approach:
> independent of the concrete approach you would like to use, you just have
> to ensure that the information is available on the server-side (for every
> jsf request which starts the jsf request-lifecycle).
>
> regards,
> gerhard
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>
> > Hi again,
> >
> > "it will work with a4j as soon as you
> > ensure that it gets restored for requests triggered by a4j " you mean i
> > should send WindowContextIdHolderComponent  within the ajax request?
> >
> > somethink like <a4j:support process="WindowContextIdHolderComponent"/> ?
> >
> > if so whats the id of the generated component?
> >
> > i also have another question, in the javadoc
> > of WindowContextConfig isUrlParameterSuported() says
> >
> > "Specifies if it is allowed to use URL params for forwarding the current
> > window-id. (deactivate it e.g. for higher security - in this case it's
> > required to use a window id provided by a component lib or a server-side
> > window-handler"
> >
> > how can i create a component to handle the window id? can i do that with
> > an h:inputHidden for example?
> >
> > thanks for the help.
> >
> >
> >
> > Att,
> >
> > Rafael M. Pestano
> >
> > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > Graduando em Ciência da Computação UFRGS
> > @realpestano
> > http://code.google.com/p/jsf-conventions-framework/
> >
> >
> >
> > ________________________________
> > De: Gerhard Petracek <ge...@gmail.com>
> > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > Enviadas: Quinta-feira, 15 de Março de 2012 10:37
> > Assunto: Re: MyFaces and CODI
> >
> > hi rafael,
> >
> > the fallback adds a component (WindowContextIdHolderComponent)
> dynamically
> > (as a direct child of UiViewRoot) -> it will work with a4j as soon as you
> > ensure that it gets restored for requests triggered by a4j.
> >
> > regards,
> > gerhard
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> >
> > > well its not 100% yet ;(...on every ajaxCall my ViewAccessScoped bean
> is
> > > being instantiated,
> > >
> > > im using a4j, there is any known issue with it?
> > >
> > > for example <h:selectOneMenu .....>
> > >                         <a4j:support event="onchange" ....action="when
> > the
> > > action is called the bean constructor gets called"/>
> > >                     </h:selectOneMenu>
> > >
> > > if i change from View to RequestScoped the bahavior is the same, any
> > ideas?
> > >
> > >
> > > thanks in advance.
> > >
> > >
> > > Att,
> > >
> > > Rafael M. Pestano
> > >
> > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > > Graduando em Ciência da Computação UFRGS
> > > @realpestano
> > > http://code.google.com/p/jsf-conventions-framework/
> > >
> > >
> > >
> > > ________________________________
> > >  De: Rafael Pestano <rm...@yahoo.com.br>
> > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > Enviadas: Quinta-feira, 15 de Março de 2012 8:45
> > > Assunto: Re: MyFaces and CODI
> > >
> > > "if you don't need redirects, you could have a look at e.g. [1] which
> > uses
> > > an internal fallback." yea, its our case and it just works!
> > >
> > > many thanks for your help, keep the great work!
> > >
> > > Att,
> > >
> > > Rafael M. Pestano
> > >
> > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > > Graduando em Ciência da Computação UFRGS
> > > @realpestano
> > > http://code.google.com/p/jsf-conventions-framework/
> > >
> > >
> > >
> > > ________________________________
> > > De: Gerhard Petracek <ge...@gmail.com>
> > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > Enviadas: Quarta-feira, 14 de Março de 2012 23:19
> > > Assunto: Re: MyFaces and CODI
> > >
> > > hi rafael,
> > >
> > > as you have seen it's easy to provide a custom WindowHandler (just
> > > implement the interface and provide your implementation as alternative
> > cdi
> > > bean)
> > > -> you can integrate every custom approach which is enough to solve you
> > > requirements.
> > >
> > > if you don't need redirects, you could have a look at e.g. [1] which
> uses
> > > an internal fallback.
> > >
> > > regards,
> > > gerhard
> > >
> > > [1] http://s.apache.org/SAs
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > >
> > > > Hi Gehard,
> > > >
> > > > its a stopper to us cause we are still dependent on JSF 1.2
> > > > Can i implement an alternative
> > > > to
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > > > based on JSF 1.2?
> > > >
> > > > i see you use flash scope to span the windowId through requests in
> the
> > > > server side solution:
> > > >
> > > > if (windowId != null)
> > > > 79         {
> > > >
> > > > 80
> > > externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY,
> > > windowId);
> > > >
> > > > 81
> > > externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
> > > > 82         }
> > > >
> > > > if i put the windownId in the sessionMap it would still work? i think
> > ill
> > > > find hard time trying to remove the windowId from the map when user
> > leave
> > > > the page.
> > > >
> > > >
> > > >
> > > > thanks for your help i really appreciated it.
> > > >
> > > > Att,
> > > > Rafael M. Pestano
> > > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> Sul
> > > > Graduando em Ciência da Computação UFRGS
> > > > @realpestano
> > > > http://code.google.com/p/jsf-conventions-framework/
> > > >
> > > >
> > > >
> > > > ----- Mensagem original -----
> > > > De: Gerhard Petracek <ge...@gmail.com>
> > > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > > Cc:
> > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:55
> > > > Assunto: Re: MyFaces and CODI
> > > >
> > > > hi rafael,
> > > >
> > > > internally the ServerSideWindowHandler is based on the flash scope
> > > (that's
> > > > one of the mentioned disadvantages)
> > > > -> it's bound to jsf 2+ -> it is:
> > > >
> > > >
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > > > (and you can't use the additional js.)
> > > >
> > > > with some constellations you just hit the restrictions of browsers ->
> > you
> > > > have to choose what you really need.
> > > >
> > > > regards,
> > > > gerhard
> > > >
> > > > http://www.irian.at
> > > >
> > > > Your JSF/JavaEE powerhouse -
> > > > JavaEE Consulting, Development and
> > > > Courses in English and German
> > > >
> > > > Professional Support for Apache MyFaces
> > > >
> > > >
> > > >
> > > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > > >
> > > > > i see, i have used the client side one
> > > > >
> > > > > <alternatives>
> > > > >
> > > >
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
> > > > > </alternatives>
> > > > >
> > > > > i imagine the server side should be
> > > > >
> > > > > <alternatives>
> > > > >
> > > >
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
> > > > > </alternatives>alright?
> > > > >
> > > > > i will test it tomorrow and give the feedback, thanks.
> > > > >
> > > > > Att,
> > > > > Rafael M. Pestano
> > > > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> > Sul
> > > > > Graduando em Ciência da Computação UFRGS
> > > > > @realpestano
> > > > > http://code.google.com/p/jsf-conventions-framework/
> > > > >
> > > > >
> > > > >
> > > > > ----- Mensagem original -----
> > > > > De: Gerhard Petracek <ge...@gmail.com>
> > > > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > > > Cc:
> > > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:11
> > > > > Assunto: Re: MyFaces and CODI
> > > > >
> > > > > hi rafael,
> > > > >
> > > > > the easiest approach to test an alternative for this constellation
> is
> > > the
> > > > > activation of the ServerSideWindowHandler (it's a std. cdi
> > @Alternative
> > > > > implementation -> you can activate it in the beans.xml file of your
> > > > > application).
> > > > > (however, please be aware that this alternative implementation has
> > some
> > > > > disadvantages.)
> > > > >
> > > > > regards,
> > > > > gerhard
> > > > >
> > > > > http://www.irian.at
> > > > >
> > > > > Your JSF/JavaEE powerhouse -
> > > > > JavaEE Consulting, Development and
> > > > > Courses in English and German
> > > > >
> > > > > Professional Support for Apache MyFaces
> > > > >
> > > > >
> > > > >
> > > > > 2012/3/14 Rafael Pestano <rm...@yahoo.com.br>
> > > > >
> > > > > > Hi Gerhard, i successfuly added codi and openwebbeans to an
> > > application
> > > > > > running on weblogic 11g
> > > > > >
> > > > > > however its a  legacy application which uses frames, basicaly we
> > > have a
> > > > > > menu on the left frame that targets the center frame, something
> > like:
> > > > > >
> > > > > > <h:commandLink value="menuLink" action="#{myBean.init}"
> > > > target="frmDados"
> > > > > > />
> > > > > >
> > > > > >
> > > > > > the problem is, when a add CODI to the application and mark
> myBean
> > as
> > > > > > ViewAccessScoped (and thus the windowId starts to be append to
> the
> > > url)
> > > > > > the above menuLink always open the center frame in a new browser
> > tab.
> > > > > >
> > > > > > If i remove CODI and set myBean as RequestScoped(or any other CDI
> > > > Scope)
> > > > > > the application behaves  as expected.
> > > > > >
> > > > > > So i think the windowId generated by CODI  is causing this
> issue, i
> > > > tried
> > > > > > your solution without success, the windowId isnt removed from the
> > url
> > > > > and a
> > > > > > new tab opens when i click in the menuLink.
> > > > > >
> > > > > > Any thoughs?
> > > > > >
> > > > > >
> > > > > > thanks for all your help.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Att,
> > > > > >
> > > > > > Rafael M. Pestano
> > > > > >
> > > > > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande
> do
> > > Sul
> > > > > > Graduando em Ciência da Computação UFRGS
> > > > > > @realpestano
> > > > > > http://code.google.com/p/jsf-conventions-framework/
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > De: Gerhard Petracek <ge...@gmail.com>
> > > > > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > > > > Enviadas: Sexta-feira, 9 de Março de 2012 12:38
> > > > > > Assunto: Re: MyFaces and CODI
> > > > > >
> > > > > > hi stephen,
> > > > > >
> > > > > > that's right [1] doesn't support it.
> > > > > > werner committed his improvement and you can try [2] and [3] as
> you
> > > see
> > > > > > them right now.
> > > > > >
> > > > > > regards,
> > > > > > gerhard
> > > > > >
> > > > > > [1]
> > > > >
> > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > > > > [2] http://s.apache.org/rr
> > > > > > [3] http://s.apache.org/23p
> > > > > >
> > > > > > http://www.irian.at
> > > > > >
> > > > > > Your JSF/JavaEE powerhouse -
> > > > > > JavaEE Consulting, Development and
> > > > > > Courses in English and German
> > > > > >
> > > > > > Professional Support for Apache MyFaces
> > > > > >
> > > > > >
> > > > > >
> > > > > > 2012/3/9 Stephen More <st...@gmail.com>
> > > > > >
> > > > > > > I was referring to [1]
> > > > > > >
> > > >
> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > > > > >
> > > > > > > I guess I just need to wait until the correct way is tested and
> > > > > > > documented in the wiki using:
> > > > > > >   [1] http://s.apache.org/rr
> > > > > > >  [2] http://s.apache.org/23p
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
> > > > > > > <ge...@gmail.com> wrote:
> > > > > > > > @ mark:
> > > > > > > > i just tested it and it works with [1] in combination
> > > > > > > > with ClientSideWindowHandler [2].
> > > > > > > >
> > > > > > > > regards,
> > > > > > > > gerhard
> > > > > > > >
> > > > > > > > [1] http://s.apache.org/rr
> > > > > > > > [2] http://s.apache.org/23p
> > > > > > > >
> > > > > > > > http://www.irian.at
> > > > > > > >
> > > > > > > > Your JSF/JavaEE powerhouse -
> > > > > > > > JavaEE Consulting, Development and
> > > > > > > > Courses in English and German
> > > > > > > >
> > > > > > > > Professional Support for Apache MyFaces
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > 2012/3/9 Mark Struberg <st...@yahoo.de>
> > > > > > > >
> > > > > > > >> Hi Stephen!
> > > > > > > >>
> > > > > > > >> Well, the current approach in CODI is currently under
> > discussion
> > > > in
> > > > > > the
> > > > > > > >> JSF EG. The whole windowId stuff of CODI might end up in the
> > > > JSF-2.2
> > > > > > or
> > > > > > > 2.3
> > > > > > > >> spec.
> > > > > > > >>
> > > > > > > >> >T hat seems to work fine when pasting into a new empty
> > window,
> > > > but
> > > > > it
> > > > > > > >> > still allows you to copy-paste the url from one codi
> window
> > to
> > > > an
> > > > > > > >> > existing codi window.
> > > > > > > >>
> > > > > > > >> Nope, because the windowhandler.js script will first check
> the
> > > > > > > window.name.
> > > > > > > >> And if this is empty/doesn't fit the windowId in the URL,
> then
> > > it
> > > > > will
> > > > > > > >> reload the page with a freshly requested windowId.
> > > > > > > >>
> > > > > > > >> LieGrue,
> > > > > > > >> strub
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> ----- Original Message -----
> > > > > > > >> > From: Stephen More <st...@gmail.com>
> > > > > > > >> > To: MyFaces Discussion <us...@myfaces.apache.org>
> > > > > > > >> > Cc:
> > > > > > > >> > Sent: Friday, March 9, 2012 1:27 PM
> > > > > > > >> > Subject: Re: MyFaces and CODI
> > > > > > > >> >
> > > > > > > >> > Included in the JSF jar is
> > > META-INF/resources/javax.faces/jsf.js
> > > > > > which
> > > > > > > >> > enables its use by <h:outputScript name="jsf.js"
> > > > > > > >> > library="javax.faces"
> > > > > > > >> > target="head"/>
> > > > > > > >> >
> > > > > > > >> > Should windowhandler.js be moved from the examples into a
> > core
> > > > > > library
> > > > > > > >> > so that it can be utilized the same way ?
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> > > > > > > >> > <ge...@gmail.com> wrote:
> > > > > > > >> >>  hi stephen,
> > > > > > > >> >>
> > > > > > > >> >>  yes - you can add a small js (see e.g. [1]) to support
> > this
> > > > > > > use-case.
> > > > > > > >> >>
> > > > > > > >> >>  regards,
> > > > > > > >> >>  gerhard
> > > > > > > >> >>
> > > > > > > >> >>  [1] http://s.apache.org/YTq
> > > > > > > >> >>
> > > > > > > >> >>  http://www.irian.at
> > > > > > > >> >>
> > > > > > > >> >>  Your JSF/JavaEE powerhouse -
> > > > > > > >> >>  JavaEE Consulting, Development and
> > > > > > > >> >>  Courses in English and German
> > > > > > > >> >>
> > > > > > > >> >>  Professional Support for Apache MyFaces
> > > > > > > >> >>
> > > > > > > >> >>
> > > > > > > >> >>
> > > > > > > >> >>  2012/3/9 Stephen More <st...@gmail.com>
> > > > > > > >> >>
> > > > > > > >> >>>  Great. I am mainly interested in WindowScoped i.e.
> every
> > > > > browser
> > > > > > > tab
> > > > > > > >> >>>  has its own mini-session.
> > > > > > > >> >>>
> > > > > > > >> >>>  I see that CODI is adding a ?windowId=595 to keep these
> > > > > > > conversations
> > > > > > > >> >>>  separate. If a user simply copies the url and pastes
> in a
> > > new
> > > > > tab
> > > > > > > now
> > > > > > > >> >>>  two browser tabs are sharing the same conversation. How
> > > can I
> > > > > > > prevent
> > > > > > > >> >>>  this ? I want to enforce that EVERY browser tab has its
> > own
> > > > > > > >> >>>  conversation. Perhaps a simple error to the user saying
> > > > > > > >> > "Sorry" or
> > > > > > > >> >>>  start a new conversation.
> > > > > > > >> >>>
> > > > > > > >> >>>  -Thanks
> > > > > > > >> >>>
> > > > > > > >> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> > > > > > > >> >>>  <ge...@gmail.com> wrote:
> > > > > > > >> >>>  > hi stephen,
> > > > > > > >> >>>  >
> > > > > > > >> >>>  > (that's an issue with the setup of weld and not
> related
> > > to
> > > > > > > >> > myfaces codi.)
> > > > > > > >> >>>  > however, myfaces codi doesn't need this support -> if
> > you
> > > > > > > >> > also don't need
> > > > > > > >> >>>  > cdi support for servlets, filters or listeners, you
> can
> > > run
> > > > > the
> > > > > > > >> >>>  application
> > > > > > > >> >>>  > without those features.
> > > > > > > >> >>>  >
> > > > > > > >> >>>  > regards,
> > > > > > > >> >>>  > gerhard
> > > > > > > >> >>>  >
> > > > > > > >> >>>  > http://www.irian.at
> > > > > > > >> >>>  >
> > > > > > > >> >>>  > Your JSF/JavaEE powerhouse -
> > > > > > > >> >>>  > JavaEE Consulting, Development and
> > > > > > > >> >>>  > Courses in English and German
> > > > > > > >> >>>  >
> > > > > > > >> >>>  > Professional Support for Apache MyFaces
> > > > > > > >> >>>  >
> > > > > > > >> >>>  >
> > > > > > > >> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
> > > > > > > >> >>>  >
> > > > > > > >> >>>  >> I too am trying to get a simple example working. I
> > have
> > > > put
> > > > > > > >> > together
> > > > > > > >> >>>  >> this project:
> > > > > > > >> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> > > > > > > >> >>>  >>
> > > > > > > >> >>>  >> mvn jetty:run-war   results in
> > > > > > > >> >>>  >>
> > > > > > > >> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI
> > > injection
> > > > > will
> > > > > > > >> > not be
> > > > > > > >> >>>  >> available in Servlets, Filters or Listeners
> > > > > > > >> >>>  >>
> > > > > > > >> >>>  >> What else do I need to get this simple example
> > working ?
> > > > > > > >> >>>  >>
> > > > > > > >> >>>  >> -Thanks
> > > > > > > >> >>>  >>
> > > > > > > >> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> > > > > > > >> >>>  >> <ge...@gmail.com> wrote:
> > > > > > > >> >>>  >> > hi jose,
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> > first of all: welcome @ myfaces!
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> > concrete questions are very welcome and we will
> > > improve
> > > > > > > >> > the wiki
> > > > > > > >> >>>  based on
> > > > > > > >> >>>  >> > them.
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> > regards,
> > > > > > > >> >>>  >> > gerhard
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> > http://www.irian.at
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> > Your JSF/JavaEE powerhouse -
> > > > > > > >> >>>  >> > JavaEE Consulting, Development and
> > > > > > > >> >>>  >> > Courses in English and German
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> > Professional Support for Apache MyFaces
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> > > > > > > >> >>>  >> >
> > > > > > > >> >>>  >> >> Hi im so excited to start and use MyFaces and
> CODI
> > > > > > > >> > but i cant get any
> > > > > > > >> >>>  >> >> "good" documentation in fact i only can get
> > > > > > > >> > like 2 or 3 mini tutorial
> > > > > > > >> >>>  >> but
> > > > > > > >> >>>  >> >> they are really incomplete, can somebody
> recommend
> > me
> > > > > > > >> > to some
> > > > > > > >> >>>  tutorial
> > > > > > > >> >>>  >> or
> > > > > > > >> >>>  >> >> book to start with *CODI *y see this is an
> > excellent
> > > > > > > >> > extension, im
> > > > > > > >> >>>  >> moving
> > > > > > > >> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
> > > > > > > >> > extensions, please where
> > > > > > > >> >>>  i
> > > > > > > >> >>>  >> can
> > > > > > > >> >>>  >> >> find value information
> > > > > > > >> >>>  >> >>
> > > > > > > >> >>>  >> >> The only URL where i found a little info is this:
> > > > > > > >> >>>  >> >>
> > > > > > > >> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
> > > > > > > >> >>>  >> >>
> > > > > > > >> >>>  >> >> --
> > > > > > > >> >>>  >> >>
> > > > > > > >> >
> > > > > -------------------------------------------------------------------
> > > > > > > >> >>>  >> >> *SCJA. José Luis Cetina*
> > > > > > > >> >>>  >> >>
> > > > > > > >> >
> > > > > -------------------------------------------------------------------
> > > > > > > >> >>>  >> >>
> > > > > > > >> >>>  >>
> > > > > > > >> >>>
> > > > > > > >> >
> > > > > > > >>
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
>

Re: MyFaces and CODI

Posted by Rafael Pestano <rm...@yahoo.com.br>.
Hi Gehard,

i didnt got the ideia, do you have any example or a link showing this approach?

what i have got til now is:  
1 - WindowContextIdHolderComponent is a jsf component which is added dynamically to the view 
2 - this component holds the windowId
3 - i have,somehow , to keep the windowId the same between requests so my ViewAccessScoped bean  is "keeped alive" <- here is where im stuck


 
 
Att, 
Rafael M. Pestano
Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
Graduando em Ciência da Computação UFRGS
@realpestano
http://code.google.com/p/jsf-conventions-framework/



----- Mensagem original -----
De: Gerhard Petracek <ge...@gmail.com>
Para: MyFaces Discussion <us...@myfaces.apache.org>
Cc: 
Enviadas: Quinta-feira, 15 de Março de 2012 11:28
Assunto: Re: MyFaces and CODI

hi rafael,

@ WindowContextIdHolderComponent:

that's the name of the class. you have to resolve the component (by type)
before the view gets rendered and add it to the ajax enabled a4j components
via the corresponding java-api.

@ custom approach:
independent of the concrete approach you would like to use, you just have
to ensure that the information is available on the server-side (for every
jsf request which starts the jsf request-lifecycle).

regards,
gerhard

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


2012/3/15 Rafael Pestano <rm...@yahoo.com.br>

> Hi again,
>
> "it will work with a4j as soon as you
> ensure that it gets restored for requests triggered by a4j " you mean i
> should send WindowContextIdHolderComponent  within the ajax request?
>
> somethink like <a4j:support process="WindowContextIdHolderComponent"/> ?
>
> if so whats the id of the generated component?
>
> i also have another question, in the javadoc
> of WindowContextConfig isUrlParameterSuported() says
>
> "Specifies if it is allowed to use URL params for forwarding the current
> window-id. (deactivate it e.g. for higher security - in this case it's
> required to use a window id provided by a component lib or a server-side
> window-handler"
>
> how can i create a component to handle the window id? can i do that with
> an h:inputHidden for example?
>
> thanks for the help.
>
>
>
> Att,
>
> Rafael M. Pestano
>
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ________________________________
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Enviadas: Quinta-feira, 15 de Março de 2012 10:37
> Assunto: Re: MyFaces and CODI
>
> hi rafael,
>
> the fallback adds a component (WindowContextIdHolderComponent) dynamically
> (as a direct child of UiViewRoot) -> it will work with a4j as soon as you
> ensure that it gets restored for requests triggered by a4j.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>
> > well its not 100% yet ;(...on every ajaxCall my ViewAccessScoped bean is
> > being instantiated,
> >
> > im using a4j, there is any known issue with it?
> >
> > for example <h:selectOneMenu .....>
> >                         <a4j:support event="onchange" ....action="when
> the
> > action is called the bean constructor gets called"/>
> >                     </h:selectOneMenu>
> >
> > if i change from View to RequestScoped the bahavior is the same, any
> ideas?
> >
> >
> > thanks in advance.
> >
> >
> > Att,
> >
> > Rafael M. Pestano
> >
> > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > Graduando em Ciência da Computação UFRGS
> > @realpestano
> > http://code.google.com/p/jsf-conventions-framework/
> >
> >
> >
> > ________________________________
> >  De: Rafael Pestano <rm...@yahoo.com.br>
> > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > Enviadas: Quinta-feira, 15 de Março de 2012 8:45
> > Assunto: Re: MyFaces and CODI
> >
> > "if you don't need redirects, you could have a look at e.g. [1] which
> uses
> > an internal fallback." yea, its our case and it just works!
> >
> > many thanks for your help, keep the great work!
> >
> > Att,
> >
> > Rafael M. Pestano
> >
> > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > Graduando em Ciência da Computação UFRGS
> > @realpestano
> > http://code.google.com/p/jsf-conventions-framework/
> >
> >
> >
> > ________________________________
> > De: Gerhard Petracek <ge...@gmail.com>
> > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > Enviadas: Quarta-feira, 14 de Março de 2012 23:19
> > Assunto: Re: MyFaces and CODI
> >
> > hi rafael,
> >
> > as you have seen it's easy to provide a custom WindowHandler (just
> > implement the interface and provide your implementation as alternative
> cdi
> > bean)
> > -> you can integrate every custom approach which is enough to solve you
> > requirements.
> >
> > if you don't need redirects, you could have a look at e.g. [1] which uses
> > an internal fallback.
> >
> > regards,
> > gerhard
> >
> > [1] http://s.apache.org/SAs
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> >
> > > Hi Gehard,
> > >
> > > its a stopper to us cause we are still dependent on JSF 1.2
> > > Can i implement an alternative
> > > to
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > > based on JSF 1.2?
> > >
> > > i see you use flash scope to span the windowId through requests in the
> > > server side solution:
> > >
> > > if (windowId != null)
> > > 79         {
> > >
> > > 80
> > externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY,
> > windowId);
> > >
> > > 81
> > externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
> > > 82         }
> > >
> > > if i put the windownId in the sessionMap it would still work? i think
> ill
> > > find hard time trying to remove the windowId from the map when user
> leave
> > > the page.
> > >
> > >
> > >
> > > thanks for your help i really appreciated it.
> > >
> > > Att,
> > > Rafael M. Pestano
> > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > > Graduando em Ciência da Computação UFRGS
> > > @realpestano
> > > http://code.google.com/p/jsf-conventions-framework/
> > >
> > >
> > >
> > > ----- Mensagem original -----
> > > De: Gerhard Petracek <ge...@gmail.com>
> > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > Cc:
> > > Enviadas: Quarta-feira, 14 de Março de 2012 20:55
> > > Assunto: Re: MyFaces and CODI
> > >
> > > hi rafael,
> > >
> > > internally the ServerSideWindowHandler is based on the flash scope
> > (that's
> > > one of the mentioned disadvantages)
> > > -> it's bound to jsf 2+ -> it is:
> > >
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > > (and you can't use the additional js.)
> > >
> > > with some constellations you just hit the restrictions of browsers ->
> you
> > > have to choose what you really need.
> > >
> > > regards,
> > > gerhard
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > >
> > > > i see, i have used the client side one
> > > >
> > > > <alternatives>
> > > >
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
> > > > </alternatives>
> > > >
> > > > i imagine the server side should be
> > > >
> > > > <alternatives>
> > > >
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
> > > > </alternatives>alright?
> > > >
> > > > i will test it tomorrow and give the feedback, thanks.
> > > >
> > > > Att,
> > > > Rafael M. Pestano
> > > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> Sul
> > > > Graduando em Ciência da Computação UFRGS
> > > > @realpestano
> > > > http://code.google.com/p/jsf-conventions-framework/
> > > >
> > > >
> > > >
> > > > ----- Mensagem original -----
> > > > De: Gerhard Petracek <ge...@gmail.com>
> > > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > > Cc:
> > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:11
> > > > Assunto: Re: MyFaces and CODI
> > > >
> > > > hi rafael,
> > > >
> > > > the easiest approach to test an alternative for this constellation is
> > the
> > > > activation of the ServerSideWindowHandler (it's a std. cdi
> @Alternative
> > > > implementation -> you can activate it in the beans.xml file of your
> > > > application).
> > > > (however, please be aware that this alternative implementation has
> some
> > > > disadvantages.)
> > > >
> > > > regards,
> > > > gerhard
> > > >
> > > > http://www.irian.at
> > > >
> > > > Your JSF/JavaEE powerhouse -
> > > > JavaEE Consulting, Development and
> > > > Courses in English and German
> > > >
> > > > Professional Support for Apache MyFaces
> > > >
> > > >
> > > >
> > > > 2012/3/14 Rafael Pestano <rm...@yahoo.com.br>
> > > >
> > > > > Hi Gerhard, i successfuly added codi and openwebbeans to an
> > application
> > > > > running on weblogic 11g
> > > > >
> > > > > however its a  legacy application which uses frames, basicaly we
> > have a
> > > > > menu on the left frame that targets the center frame, something
> like:
> > > > >
> > > > > <h:commandLink value="menuLink" action="#{myBean.init}"
> > > target="frmDados"
> > > > > />
> > > > >
> > > > >
> > > > > the problem is, when a add CODI to the application and mark myBean
> as
> > > > > ViewAccessScoped (and thus the windowId starts to be append to the
> > url)
> > > > > the above menuLink always open the center frame in a new browser
> tab.
> > > > >
> > > > > If i remove CODI and set myBean as RequestScoped(or any other CDI
> > > Scope)
> > > > > the application behaves  as expected.
> > > > >
> > > > > So i think the windowId generated by CODI  is causing this issue, i
> > > tried
> > > > > your solution without success, the windowId isnt removed from the
> url
> > > > and a
> > > > > new tab opens when i click in the menuLink.
> > > > >
> > > > > Any thoughs?
> > > > >
> > > > >
> > > > > thanks for all your help.
> > > > >
> > > > >
> > > > >
> > > > > Att,
> > > > >
> > > > > Rafael M. Pestano
> > > > >
> > > > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> > Sul
> > > > > Graduando em Ciência da Computação UFRGS
> > > > > @realpestano
> > > > > http://code.google.com/p/jsf-conventions-framework/
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > De: Gerhard Petracek <ge...@gmail.com>
> > > > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > > > Enviadas: Sexta-feira, 9 de Março de 2012 12:38
> > > > > Assunto: Re: MyFaces and CODI
> > > > >
> > > > > hi stephen,
> > > > >
> > > > > that's right [1] doesn't support it.
> > > > > werner committed his improvement and you can try [2] and [3] as you
> > see
> > > > > them right now.
> > > > >
> > > > > regards,
> > > > > gerhard
> > > > >
> > > > > [1]
> > > >
> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > > > [2] http://s.apache.org/rr
> > > > > [3] http://s.apache.org/23p
> > > > >
> > > > > http://www.irian.at
> > > > >
> > > > > Your JSF/JavaEE powerhouse -
> > > > > JavaEE Consulting, Development and
> > > > > Courses in English and German
> > > > >
> > > > > Professional Support for Apache MyFaces
> > > > >
> > > > >
> > > > >
> > > > > 2012/3/9 Stephen More <st...@gmail.com>
> > > > >
> > > > > > I was referring to [1]
> > > > > >
> > > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > > > >
> > > > > > I guess I just need to wait until the correct way is tested and
> > > > > > documented in the wiki using:
> > > > > >   [1] http://s.apache.org/rr
> > > > > >  [2] http://s.apache.org/23p
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
> > > > > > <ge...@gmail.com> wrote:
> > > > > > > @ mark:
> > > > > > > i just tested it and it works with [1] in combination
> > > > > > > with ClientSideWindowHandler [2].
> > > > > > >
> > > > > > > regards,
> > > > > > > gerhard
> > > > > > >
> > > > > > > [1] http://s.apache.org/rr
> > > > > > > [2] http://s.apache.org/23p
> > > > > > >
> > > > > > > http://www.irian.at
> > > > > > >
> > > > > > > Your JSF/JavaEE powerhouse -
> > > > > > > JavaEE Consulting, Development and
> > > > > > > Courses in English and German
> > > > > > >
> > > > > > > Professional Support for Apache MyFaces
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > 2012/3/9 Mark Struberg <st...@yahoo.de>
> > > > > > >
> > > > > > >> Hi Stephen!
> > > > > > >>
> > > > > > >> Well, the current approach in CODI is currently under
> discussion
> > > in
> > > > > the
> > > > > > >> JSF EG. The whole windowId stuff of CODI might end up in the
> > > JSF-2.2
> > > > > or
> > > > > > 2.3
> > > > > > >> spec.
> > > > > > >>
> > > > > > >> >T hat seems to work fine when pasting into a new empty
> window,
> > > but
> > > > it
> > > > > > >> > still allows you to copy-paste the url from one codi window
> to
> > > an
> > > > > > >> > existing codi window.
> > > > > > >>
> > > > > > >> Nope, because the windowhandler.js script will first check the
> > > > > > window.name.
> > > > > > >> And if this is empty/doesn't fit the windowId in the URL, then
> > it
> > > > will
> > > > > > >> reload the page with a freshly requested windowId.
> > > > > > >>
> > > > > > >> LieGrue,
> > > > > > >> strub
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >> ----- Original Message -----
> > > > > > >> > From: Stephen More <st...@gmail.com>
> > > > > > >> > To: MyFaces Discussion <us...@myfaces.apache.org>
> > > > > > >> > Cc:
> > > > > > >> > Sent: Friday, March 9, 2012 1:27 PM
> > > > > > >> > Subject: Re: MyFaces and CODI
> > > > > > >> >
> > > > > > >> > Included in the JSF jar is
> > META-INF/resources/javax.faces/jsf.js
> > > > > which
> > > > > > >> > enables its use by <h:outputScript name="jsf.js"
> > > > > > >> > library="javax.faces"
> > > > > > >> > target="head"/>
> > > > > > >> >
> > > > > > >> > Should windowhandler.js be moved from the examples into a
> core
> > > > > library
> > > > > > >> > so that it can be utilized the same way ?
> > > > > > >> >
> > > > > > >> >
> > > > > > >> >
> > > > > > >> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> > > > > > >> > <ge...@gmail.com> wrote:
> > > > > > >> >>  hi stephen,
> > > > > > >> >>
> > > > > > >> >>  yes - you can add a small js (see e.g. [1]) to support
> this
> > > > > > use-case.
> > > > > > >> >>
> > > > > > >> >>  regards,
> > > > > > >> >>  gerhard
> > > > > > >> >>
> > > > > > >> >>  [1] http://s.apache.org/YTq
> > > > > > >> >>
> > > > > > >> >>  http://www.irian.at
> > > > > > >> >>
> > > > > > >> >>  Your JSF/JavaEE powerhouse -
> > > > > > >> >>  JavaEE Consulting, Development and
> > > > > > >> >>  Courses in English and German
> > > > > > >> >>
> > > > > > >> >>  Professional Support for Apache MyFaces
> > > > > > >> >>
> > > > > > >> >>
> > > > > > >> >>
> > > > > > >> >>  2012/3/9 Stephen More <st...@gmail.com>
> > > > > > >> >>
> > > > > > >> >>>  Great. I am mainly interested in WindowScoped i.e. every
> > > > browser
> > > > > > tab
> > > > > > >> >>>  has its own mini-session.
> > > > > > >> >>>
> > > > > > >> >>>  I see that CODI is adding a ?windowId=595 to keep these
> > > > > > conversations
> > > > > > >> >>>  separate. If a user simply copies the url and pastes in a
> > new
> > > > tab
> > > > > > now
> > > > > > >> >>>  two browser tabs are sharing the same conversation. How
> > can I
> > > > > > prevent
> > > > > > >> >>>  this ? I want to enforce that EVERY browser tab has its
> own
> > > > > > >> >>>  conversation. Perhaps a simple error to the user saying
> > > > > > >> > "Sorry" or
> > > > > > >> >>>  start a new conversation.
> > > > > > >> >>>
> > > > > > >> >>>  -Thanks
> > > > > > >> >>>
> > > > > > >> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> > > > > > >> >>>  <ge...@gmail.com> wrote:
> > > > > > >> >>>  > hi stephen,
> > > > > > >> >>>  >
> > > > > > >> >>>  > (that's an issue with the setup of weld and not related
> > to
> > > > > > >> > myfaces codi.)
> > > > > > >> >>>  > however, myfaces codi doesn't need this support -> if
> you
> > > > > > >> > also don't need
> > > > > > >> >>>  > cdi support for servlets, filters or listeners, you can
> > run
> > > > the
> > > > > > >> >>>  application
> > > > > > >> >>>  > without those features.
> > > > > > >> >>>  >
> > > > > > >> >>>  > regards,
> > > > > > >> >>>  > gerhard
> > > > > > >> >>>  >
> > > > > > >> >>>  > http://www.irian.at
> > > > > > >> >>>  >
> > > > > > >> >>>  > Your JSF/JavaEE powerhouse -
> > > > > > >> >>>  > JavaEE Consulting, Development and
> > > > > > >> >>>  > Courses in English and German
> > > > > > >> >>>  >
> > > > > > >> >>>  > Professional Support for Apache MyFaces
> > > > > > >> >>>  >
> > > > > > >> >>>  >
> > > > > > >> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
> > > > > > >> >>>  >
> > > > > > >> >>>  >> I too am trying to get a simple example working. I
> have
> > > put
> > > > > > >> > together
> > > > > > >> >>>  >> this project:
> > > > > > >> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> > > > > > >> >>>  >>
> > > > > > >> >>>  >> mvn jetty:run-war   results in
> > > > > > >> >>>  >>
> > > > > > >> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI
> > injection
> > > > will
> > > > > > >> > not be
> > > > > > >> >>>  >> available in Servlets, Filters or Listeners
> > > > > > >> >>>  >>
> > > > > > >> >>>  >> What else do I need to get this simple example
> working ?
> > > > > > >> >>>  >>
> > > > > > >> >>>  >> -Thanks
> > > > > > >> >>>  >>
> > > > > > >> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> > > > > > >> >>>  >> <ge...@gmail.com> wrote:
> > > > > > >> >>>  >> > hi jose,
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> > first of all: welcome @ myfaces!
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> > concrete questions are very welcome and we will
> > improve
> > > > > > >> > the wiki
> > > > > > >> >>>  based on
> > > > > > >> >>>  >> > them.
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> > regards,
> > > > > > >> >>>  >> > gerhard
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> > http://www.irian.at
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> > Your JSF/JavaEE powerhouse -
> > > > > > >> >>>  >> > JavaEE Consulting, Development and
> > > > > > >> >>>  >> > Courses in English and German
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> > Professional Support for Apache MyFaces
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> >> Hi im so excited to start and use MyFaces and CODI
> > > > > > >> > but i cant get any
> > > > > > >> >>>  >> >> "good" documentation in fact i only can get
> > > > > > >> > like 2 or 3 mini tutorial
> > > > > > >> >>>  >> but
> > > > > > >> >>>  >> >> they are really incomplete, can somebody recommend
> me
> > > > > > >> > to some
> > > > > > >> >>>  tutorial
> > > > > > >> >>>  >> or
> > > > > > >> >>>  >> >> book to start with *CODI *y see this is an
> excellent
> > > > > > >> > extension, im
> > > > > > >> >>>  >> moving
> > > > > > >> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
> > > > > > >> > extensions, please where
> > > > > > >> >>>  i
> > > > > > >> >>>  >> can
> > > > > > >> >>>  >> >> find value information
> > > > > > >> >>>  >> >>
> > > > > > >> >>>  >> >> The only URL where i found a little info is this:
> > > > > > >> >>>  >> >>
> > > > > > >> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
> > > > > > >> >>>  >> >>
> > > > > > >> >>>  >> >> --
> > > > > > >> >>>  >> >>
> > > > > > >> >
> > > > -------------------------------------------------------------------
> > > > > > >> >>>  >> >> *SCJA. José Luis Cetina*
> > > > > > >> >>>  >> >>
> > > > > > >> >
> > > > -------------------------------------------------------------------
> > > > > > >> >>>  >> >>
> > > > > > >> >>>  >>
> > > > > > >> >>>
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
>


Re: MyFaces and CODI

Posted by Gerhard Petracek <ge...@gmail.com>.
hi rafael,

@ WindowContextIdHolderComponent:

that's the name of the class. you have to resolve the component (by type)
before the view gets rendered and add it to the ajax enabled a4j components
via the corresponding java-api.

@ custom approach:
independent of the concrete approach you would like to use, you just have
to ensure that the information is available on the server-side (for every
jsf request which starts the jsf request-lifecycle).

regards,
gerhard

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


2012/3/15 Rafael Pestano <rm...@yahoo.com.br>

> Hi again,
>
> "it will work with a4j as soon as you
> ensure that it gets restored for requests triggered by a4j " you mean i
> should send WindowContextIdHolderComponent  within the ajax request?
>
> somethink like <a4j:support process="WindowContextIdHolderComponent"/> ?
>
> if so whats the id of the generated component?
>
> i also have another question, in the javadoc
> of WindowContextConfig isUrlParameterSuported() says
>
> "Specifies if it is allowed to use URL params for forwarding the current
> window-id. (deactivate it e.g. for higher security - in this case it's
> required to use a window id provided by a component lib or a server-side
> window-handler"
>
> how can i create a component to handle the window id? can i do that with
> an h:inputHidden for example?
>
> thanks for the help.
>
>
>
> Att,
>
> Rafael M. Pestano
>
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ________________________________
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Enviadas: Quinta-feira, 15 de Março de 2012 10:37
> Assunto: Re: MyFaces and CODI
>
> hi rafael,
>
> the fallback adds a component (WindowContextIdHolderComponent) dynamically
> (as a direct child of UiViewRoot) -> it will work with a4j as soon as you
> ensure that it gets restored for requests triggered by a4j.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>
> > well its not 100% yet ;(...on every ajaxCall my ViewAccessScoped bean is
> > being instantiated,
> >
> > im using a4j, there is any known issue with it?
> >
> > for example <h:selectOneMenu .....>
> >                         <a4j:support event="onchange" ....action="when
> the
> > action is called the bean constructor gets called"/>
> >                     </h:selectOneMenu>
> >
> > if i change from View to RequestScoped the bahavior is the same, any
> ideas?
> >
> >
> > thanks in advance.
> >
> >
> > Att,
> >
> > Rafael M. Pestano
> >
> > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > Graduando em Ciência da Computação UFRGS
> > @realpestano
> > http://code.google.com/p/jsf-conventions-framework/
> >
> >
> >
> > ________________________________
> >  De: Rafael Pestano <rm...@yahoo.com.br>
> > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > Enviadas: Quinta-feira, 15 de Março de 2012 8:45
> > Assunto: Re: MyFaces and CODI
> >
> > "if you don't need redirects, you could have a look at e.g. [1] which
> uses
> > an internal fallback." yea, its our case and it just works!
> >
> > many thanks for your help, keep the great work!
> >
> > Att,
> >
> > Rafael M. Pestano
> >
> > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > Graduando em Ciência da Computação UFRGS
> > @realpestano
> > http://code.google.com/p/jsf-conventions-framework/
> >
> >
> >
> > ________________________________
> > De: Gerhard Petracek <ge...@gmail.com>
> > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > Enviadas: Quarta-feira, 14 de Março de 2012 23:19
> > Assunto: Re: MyFaces and CODI
> >
> > hi rafael,
> >
> > as you have seen it's easy to provide a custom WindowHandler (just
> > implement the interface and provide your implementation as alternative
> cdi
> > bean)
> > -> you can integrate every custom approach which is enough to solve you
> > requirements.
> >
> > if you don't need redirects, you could have a look at e.g. [1] which uses
> > an internal fallback.
> >
> > regards,
> > gerhard
> >
> > [1] http://s.apache.org/SAs
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> >
> > > Hi Gehard,
> > >
> > > its a stopper to us cause we are still dependent on JSF 1.2
> > > Can i implement an alternative
> > > to
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > > based on JSF 1.2?
> > >
> > > i see you use flash scope to span the windowId through requests in the
> > > server side solution:
> > >
> > > if (windowId != null)
> > > 79         {
> > >
> > > 80
> > externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY,
> > windowId);
> > >
> > > 81
> > externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
> > > 82         }
> > >
> > > if i put the windownId in the sessionMap it would still work? i think
> ill
> > > find hard time trying to remove the windowId from the map when user
> leave
> > > the page.
> > >
> > >
> > >
> > > thanks for your help i really appreciated it.
> > >
> > > Att,
> > > Rafael M. Pestano
> > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > > Graduando em Ciência da Computação UFRGS
> > > @realpestano
> > > http://code.google.com/p/jsf-conventions-framework/
> > >
> > >
> > >
> > > ----- Mensagem original -----
> > > De: Gerhard Petracek <ge...@gmail.com>
> > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > Cc:
> > > Enviadas: Quarta-feira, 14 de Março de 2012 20:55
> > > Assunto: Re: MyFaces and CODI
> > >
> > > hi rafael,
> > >
> > > internally the ServerSideWindowHandler is based on the flash scope
> > (that's
> > > one of the mentioned disadvantages)
> > > -> it's bound to jsf 2+ -> it is:
> > >
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > > (and you can't use the additional js.)
> > >
> > > with some constellations you just hit the restrictions of browsers ->
> you
> > > have to choose what you really need.
> > >
> > > regards,
> > > gerhard
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> > >
> > > > i see, i have used the client side one
> > > >
> > > > <alternatives>
> > > >
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
> > > > </alternatives>
> > > >
> > > > i imagine the server side should be
> > > >
> > > > <alternatives>
> > > >
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
> > > > </alternatives>alright?
> > > >
> > > > i will test it tomorrow and give the feedback, thanks.
> > > >
> > > > Att,
> > > > Rafael M. Pestano
> > > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> Sul
> > > > Graduando em Ciência da Computação UFRGS
> > > > @realpestano
> > > > http://code.google.com/p/jsf-conventions-framework/
> > > >
> > > >
> > > >
> > > > ----- Mensagem original -----
> > > > De: Gerhard Petracek <ge...@gmail.com>
> > > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > > Cc:
> > > > Enviadas: Quarta-feira, 14 de Março de 2012 20:11
> > > > Assunto: Re: MyFaces and CODI
> > > >
> > > > hi rafael,
> > > >
> > > > the easiest approach to test an alternative for this constellation is
> > the
> > > > activation of the ServerSideWindowHandler (it's a std. cdi
> @Alternative
> > > > implementation -> you can activate it in the beans.xml file of your
> > > > application).
> > > > (however, please be aware that this alternative implementation has
> some
> > > > disadvantages.)
> > > >
> > > > regards,
> > > > gerhard
> > > >
> > > > http://www.irian.at
> > > >
> > > > Your JSF/JavaEE powerhouse -
> > > > JavaEE Consulting, Development and
> > > > Courses in English and German
> > > >
> > > > Professional Support for Apache MyFaces
> > > >
> > > >
> > > >
> > > > 2012/3/14 Rafael Pestano <rm...@yahoo.com.br>
> > > >
> > > > > Hi Gerhard, i successfuly added codi and openwebbeans to an
> > application
> > > > > running on weblogic 11g
> > > > >
> > > > > however its a  legacy application which uses frames, basicaly we
> > have a
> > > > > menu on the left frame that targets the center frame, something
> like:
> > > > >
> > > > > <h:commandLink value="menuLink" action="#{myBean.init}"
> > > target="frmDados"
> > > > > />
> > > > >
> > > > >
> > > > > the problem is, when a add CODI to the application and mark myBean
> as
> > > > > ViewAccessScoped (and thus the windowId starts to be append to the
> > url)
> > > > > the above menuLink always open the center frame in a new browser
> tab.
> > > > >
> > > > > If i remove CODI and set myBean as RequestScoped(or any other CDI
> > > Scope)
> > > > > the application behaves  as expected.
> > > > >
> > > > > So i think the windowId generated by CODI  is causing this issue, i
> > > tried
> > > > > your solution without success, the windowId isnt removed from the
> url
> > > > and a
> > > > > new tab opens when i click in the menuLink.
> > > > >
> > > > > Any thoughs?
> > > > >
> > > > >
> > > > > thanks for all your help.
> > > > >
> > > > >
> > > > >
> > > > > Att,
> > > > >
> > > > > Rafael M. Pestano
> > > > >
> > > > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> > Sul
> > > > > Graduando em Ciência da Computação UFRGS
> > > > > @realpestano
> > > > > http://code.google.com/p/jsf-conventions-framework/
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > De: Gerhard Petracek <ge...@gmail.com>
> > > > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > > > Enviadas: Sexta-feira, 9 de Março de 2012 12:38
> > > > > Assunto: Re: MyFaces and CODI
> > > > >
> > > > > hi stephen,
> > > > >
> > > > > that's right [1] doesn't support it.
> > > > > werner committed his improvement and you can try [2] and [3] as you
> > see
> > > > > them right now.
> > > > >
> > > > > regards,
> > > > > gerhard
> > > > >
> > > > > [1]
> > > >
> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > > > [2] http://s.apache.org/rr
> > > > > [3] http://s.apache.org/23p
> > > > >
> > > > > http://www.irian.at
> > > > >
> > > > > Your JSF/JavaEE powerhouse -
> > > > > JavaEE Consulting, Development and
> > > > > Courses in English and German
> > > > >
> > > > > Professional Support for Apache MyFaces
> > > > >
> > > > >
> > > > >
> > > > > 2012/3/9 Stephen More <st...@gmail.com>
> > > > >
> > > > > > I was referring to [1]
> > > > > >
> > > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > > > >
> > > > > > I guess I just need to wait until the correct way is tested and
> > > > > > documented in the wiki using:
> > > > > >   [1] http://s.apache.org/rr
> > > > > >  [2] http://s.apache.org/23p
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
> > > > > > <ge...@gmail.com> wrote:
> > > > > > > @ mark:
> > > > > > > i just tested it and it works with [1] in combination
> > > > > > > with ClientSideWindowHandler [2].
> > > > > > >
> > > > > > > regards,
> > > > > > > gerhard
> > > > > > >
> > > > > > > [1] http://s.apache.org/rr
> > > > > > > [2] http://s.apache.org/23p
> > > > > > >
> > > > > > > http://www.irian.at
> > > > > > >
> > > > > > > Your JSF/JavaEE powerhouse -
> > > > > > > JavaEE Consulting, Development and
> > > > > > > Courses in English and German
> > > > > > >
> > > > > > > Professional Support for Apache MyFaces
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > 2012/3/9 Mark Struberg <st...@yahoo.de>
> > > > > > >
> > > > > > >> Hi Stephen!
> > > > > > >>
> > > > > > >> Well, the current approach in CODI is currently under
> discussion
> > > in
> > > > > the
> > > > > > >> JSF EG. The whole windowId stuff of CODI might end up in the
> > > JSF-2.2
> > > > > or
> > > > > > 2.3
> > > > > > >> spec.
> > > > > > >>
> > > > > > >> >T hat seems to work fine when pasting into a new empty
> window,
> > > but
> > > > it
> > > > > > >> > still allows you to copy-paste the url from one codi window
> to
> > > an
> > > > > > >> > existing codi window.
> > > > > > >>
> > > > > > >> Nope, because the windowhandler.js script will first check the
> > > > > > window.name.
> > > > > > >> And if this is empty/doesn't fit the windowId in the URL, then
> > it
> > > > will
> > > > > > >> reload the page with a freshly requested windowId.
> > > > > > >>
> > > > > > >> LieGrue,
> > > > > > >> strub
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >> ----- Original Message -----
> > > > > > >> > From: Stephen More <st...@gmail.com>
> > > > > > >> > To: MyFaces Discussion <us...@myfaces.apache.org>
> > > > > > >> > Cc:
> > > > > > >> > Sent: Friday, March 9, 2012 1:27 PM
> > > > > > >> > Subject: Re: MyFaces and CODI
> > > > > > >> >
> > > > > > >> > Included in the JSF jar is
> > META-INF/resources/javax.faces/jsf.js
> > > > > which
> > > > > > >> > enables its use by <h:outputScript name="jsf.js"
> > > > > > >> > library="javax.faces"
> > > > > > >> > target="head"/>
> > > > > > >> >
> > > > > > >> > Should windowhandler.js be moved from the examples into a
> core
> > > > > library
> > > > > > >> > so that it can be utilized the same way ?
> > > > > > >> >
> > > > > > >> >
> > > > > > >> >
> > > > > > >> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> > > > > > >> > <ge...@gmail.com> wrote:
> > > > > > >> >>  hi stephen,
> > > > > > >> >>
> > > > > > >> >>  yes - you can add a small js (see e.g. [1]) to support
> this
> > > > > > use-case.
> > > > > > >> >>
> > > > > > >> >>  regards,
> > > > > > >> >>  gerhard
> > > > > > >> >>
> > > > > > >> >>  [1] http://s.apache.org/YTq
> > > > > > >> >>
> > > > > > >> >>  http://www.irian.at
> > > > > > >> >>
> > > > > > >> >>  Your JSF/JavaEE powerhouse -
> > > > > > >> >>  JavaEE Consulting, Development and
> > > > > > >> >>  Courses in English and German
> > > > > > >> >>
> > > > > > >> >>  Professional Support for Apache MyFaces
> > > > > > >> >>
> > > > > > >> >>
> > > > > > >> >>
> > > > > > >> >>  2012/3/9 Stephen More <st...@gmail.com>
> > > > > > >> >>
> > > > > > >> >>>  Great. I am mainly interested in WindowScoped i.e. every
> > > > browser
> > > > > > tab
> > > > > > >> >>>  has its own mini-session.
> > > > > > >> >>>
> > > > > > >> >>>  I see that CODI is adding a ?windowId=595 to keep these
> > > > > > conversations
> > > > > > >> >>>  separate. If a user simply copies the url and pastes in a
> > new
> > > > tab
> > > > > > now
> > > > > > >> >>>  two browser tabs are sharing the same conversation. How
> > can I
> > > > > > prevent
> > > > > > >> >>>  this ? I want to enforce that EVERY browser tab has its
> own
> > > > > > >> >>>  conversation. Perhaps a simple error to the user saying
> > > > > > >> > "Sorry" or
> > > > > > >> >>>  start a new conversation.
> > > > > > >> >>>
> > > > > > >> >>>  -Thanks
> > > > > > >> >>>
> > > > > > >> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> > > > > > >> >>>  <ge...@gmail.com> wrote:
> > > > > > >> >>>  > hi stephen,
> > > > > > >> >>>  >
> > > > > > >> >>>  > (that's an issue with the setup of weld and not related
> > to
> > > > > > >> > myfaces codi.)
> > > > > > >> >>>  > however, myfaces codi doesn't need this support -> if
> you
> > > > > > >> > also don't need
> > > > > > >> >>>  > cdi support for servlets, filters or listeners, you can
> > run
> > > > the
> > > > > > >> >>>  application
> > > > > > >> >>>  > without those features.
> > > > > > >> >>>  >
> > > > > > >> >>>  > regards,
> > > > > > >> >>>  > gerhard
> > > > > > >> >>>  >
> > > > > > >> >>>  > http://www.irian.at
> > > > > > >> >>>  >
> > > > > > >> >>>  > Your JSF/JavaEE powerhouse -
> > > > > > >> >>>  > JavaEE Consulting, Development and
> > > > > > >> >>>  > Courses in English and German
> > > > > > >> >>>  >
> > > > > > >> >>>  > Professional Support for Apache MyFaces
> > > > > > >> >>>  >
> > > > > > >> >>>  >
> > > > > > >> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
> > > > > > >> >>>  >
> > > > > > >> >>>  >> I too am trying to get a simple example working. I
> have
> > > put
> > > > > > >> > together
> > > > > > >> >>>  >> this project:
> > > > > > >> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> > > > > > >> >>>  >>
> > > > > > >> >>>  >> mvn jetty:run-war   results in
> > > > > > >> >>>  >>
> > > > > > >> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI
> > injection
> > > > will
> > > > > > >> > not be
> > > > > > >> >>>  >> available in Servlets, Filters or Listeners
> > > > > > >> >>>  >>
> > > > > > >> >>>  >> What else do I need to get this simple example
> working ?
> > > > > > >> >>>  >>
> > > > > > >> >>>  >> -Thanks
> > > > > > >> >>>  >>
> > > > > > >> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> > > > > > >> >>>  >> <ge...@gmail.com> wrote:
> > > > > > >> >>>  >> > hi jose,
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> > first of all: welcome @ myfaces!
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> > concrete questions are very welcome and we will
> > improve
> > > > > > >> > the wiki
> > > > > > >> >>>  based on
> > > > > > >> >>>  >> > them.
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> > regards,
> > > > > > >> >>>  >> > gerhard
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> > http://www.irian.at
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> > Your JSF/JavaEE powerhouse -
> > > > > > >> >>>  >> > JavaEE Consulting, Development and
> > > > > > >> >>>  >> > Courses in English and German
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> > Professional Support for Apache MyFaces
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> > > > > > >> >>>  >> >
> > > > > > >> >>>  >> >> Hi im so excited to start and use MyFaces and CODI
> > > > > > >> > but i cant get any
> > > > > > >> >>>  >> >> "good" documentation in fact i only can get
> > > > > > >> > like 2 or 3 mini tutorial
> > > > > > >> >>>  >> but
> > > > > > >> >>>  >> >> they are really incomplete, can somebody recommend
> me
> > > > > > >> > to some
> > > > > > >> >>>  tutorial
> > > > > > >> >>>  >> or
> > > > > > >> >>>  >> >> book to start with *CODI *y see this is an
> excellent
> > > > > > >> > extension, im
> > > > > > >> >>>  >> moving
> > > > > > >> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
> > > > > > >> > extensions, please where
> > > > > > >> >>>  i
> > > > > > >> >>>  >> can
> > > > > > >> >>>  >> >> find value information
> > > > > > >> >>>  >> >>
> > > > > > >> >>>  >> >> The only URL where i found a little info is this:
> > > > > > >> >>>  >> >>
> > > > > > >> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
> > > > > > >> >>>  >> >>
> > > > > > >> >>>  >> >> --
> > > > > > >> >>>  >> >>
> > > > > > >> >
> > > > -------------------------------------------------------------------
> > > > > > >> >>>  >> >> *SCJA. José Luis Cetina*
> > > > > > >> >>>  >> >>
> > > > > > >> >
> > > > -------------------------------------------------------------------
> > > > > > >> >>>  >> >>
> > > > > > >> >>>  >>
> > > > > > >> >>>
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
>

Re: MyFaces and CODI

Posted by Rafael Pestano <rm...@yahoo.com.br>.
Hi again, 

"it will work with a4j as soon as you
ensure that it gets restored for requests triggered by a4j " you mean i should send WindowContextIdHolderComponent  within the ajax request?

somethink like <a4j:support process="WindowContextIdHolderComponent"/> ?

if so whats the id of the generated component?

i also have another question, in the javadoc of WindowContextConfig isUrlParameterSuported() says

"Specifies if it is allowed to use URL params for forwarding the current window-id. (deactivate it e.g. for higher security - in this case it's required to use a window id provided by a component lib or a server-side window-handler"

how can i create a component to handle the window id? can i do that with an h:inputHidden for example?

thanks for the help.



Att, 

Rafael M. Pestano

Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
Graduando em Ciência da Computação UFRGS
@realpestano
http://code.google.com/p/jsf-conventions-framework/



________________________________
De: Gerhard Petracek <ge...@gmail.com>
Para: MyFaces Discussion <us...@myfaces.apache.org> 
Enviadas: Quinta-feira, 15 de Março de 2012 10:37
Assunto: Re: MyFaces and CODI

hi rafael,

the fallback adds a component (WindowContextIdHolderComponent) dynamically
(as a direct child of UiViewRoot) -> it will work with a4j as soon as you
ensure that it gets restored for requests triggered by a4j.

regards,
gerhard

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


2012/3/15 Rafael Pestano <rm...@yahoo.com.br>

> well its not 100% yet ;(...on every ajaxCall my ViewAccessScoped bean is
> being instantiated,
>
> im using a4j, there is any known issue with it?
>
> for example <h:selectOneMenu .....>
>                         <a4j:support event="onchange" ....action="when the
> action is called the bean constructor gets called"/>
>                     </h:selectOneMenu>
>
> if i change from View to RequestScoped the bahavior is the same, any ideas?
>
>
> thanks in advance.
>
>
> Att,
>
> Rafael M. Pestano
>
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ________________________________
>  De: Rafael Pestano <rm...@yahoo.com.br>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Enviadas: Quinta-feira, 15 de Março de 2012 8:45
> Assunto: Re: MyFaces and CODI
>
> "if you don't need redirects, you could have a look at e.g. [1] which uses
> an internal fallback." yea, its our case and it just works!
>
> many thanks for your help, keep the great work!
>
> Att,
>
> Rafael M. Pestano
>
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ________________________________
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Enviadas: Quarta-feira, 14 de Março de 2012 23:19
> Assunto: Re: MyFaces and CODI
>
> hi rafael,
>
> as you have seen it's easy to provide a custom WindowHandler (just
> implement the interface and provide your implementation as alternative cdi
> bean)
> -> you can integrate every custom approach which is enough to solve you
> requirements.
>
> if you don't need redirects, you could have a look at e.g. [1] which uses
> an internal fallback.
>
> regards,
> gerhard
>
> [1] http://s.apache.org/SAs
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>
> > Hi Gehard,
> >
> > its a stopper to us cause we are still dependent on JSF 1.2
> > Can i implement an alternative
> > to
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > based on JSF 1.2?
> >
> > i see you use flash scope to span the windowId through requests in the
> > server side solution:
> >
> > if (windowId != null)
> > 79         {
> >
> > 80
> externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY,
> windowId);
> >
> > 81
> externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
> > 82         }
> >
> > if i put the windownId in the sessionMap it would still work? i think ill
> > find hard time trying to remove the windowId from the map when user leave
> > the page.
> >
> >
> >
> > thanks for your help i really appreciated it.
> >
> > Att,
> > Rafael M. Pestano
> > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > Graduando em Ciência da Computação UFRGS
> > @realpestano
> > http://code.google.com/p/jsf-conventions-framework/
> >
> >
> >
> > ----- Mensagem original -----
> > De: Gerhard Petracek <ge...@gmail.com>
> > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > Cc:
> > Enviadas: Quarta-feira, 14 de Março de 2012 20:55
> > Assunto: Re: MyFaces and CODI
> >
> > hi rafael,
> >
> > internally the ServerSideWindowHandler is based on the flash scope
> (that's
> > one of the mentioned disadvantages)
> > -> it's bound to jsf 2+ -> it is:
> >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > (and you can't use the additional js.)
> >
> > with some constellations you just hit the restrictions of browsers -> you
> > have to choose what you really need.
> >
> > regards,
> > gerhard
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> >
> > > i see, i have used the client side one
> > >
> > > <alternatives>
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
> > > </alternatives>
> > >
> > > i imagine the server side should be
> > >
> > > <alternatives>
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
> > > </alternatives>alright?
> > >
> > > i will test it tomorrow and give the feedback, thanks.
> > >
> > > Att,
> > > Rafael M. Pestano
> > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > > Graduando em Ciência da Computação UFRGS
> > > @realpestano
> > > http://code.google.com/p/jsf-conventions-framework/
> > >
> > >
> > >
> > > ----- Mensagem original -----
> > > De: Gerhard Petracek <ge...@gmail.com>
> > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > Cc:
> > > Enviadas: Quarta-feira, 14 de Março de 2012 20:11
> > > Assunto: Re: MyFaces and CODI
> > >
> > > hi rafael,
> > >
> > > the easiest approach to test an alternative for this constellation is
> the
> > > activation of the ServerSideWindowHandler (it's a std. cdi @Alternative
> > > implementation -> you can activate it in the beans.xml file of your
> > > application).
> > > (however, please be aware that this alternative implementation has some
> > > disadvantages.)
> > >
> > > regards,
> > > gerhard
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2012/3/14 Rafael Pestano <rm...@yahoo.com.br>
> > >
> > > > Hi Gerhard, i successfuly added codi and openwebbeans to an
> application
> > > > running on weblogic 11g
> > > >
> > > > however its a  legacy application which uses frames, basicaly we
> have a
> > > > menu on the left frame that targets the center frame, something like:
> > > >
> > > > <h:commandLink value="menuLink" action="#{myBean.init}"
> > target="frmDados"
> > > > />
> > > >
> > > >
> > > > the problem is, when a add CODI to the application and mark myBean as
> > > > ViewAccessScoped (and thus the windowId starts to be append to the
> url)
> > > > the above menuLink always open the center frame in a new browser tab.
> > > >
> > > > If i remove CODI and set myBean as RequestScoped(or any other CDI
> > Scope)
> > > > the application behaves  as expected.
> > > >
> > > > So i think the windowId generated by CODI  is causing this issue, i
> > tried
> > > > your solution without success, the windowId isnt removed from the url
> > > and a
> > > > new tab opens when i click in the menuLink.
> > > >
> > > > Any thoughs?
> > > >
> > > >
> > > > thanks for all your help.
> > > >
> > > >
> > > >
> > > > Att,
> > > >
> > > > Rafael M. Pestano
> > > >
> > > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> Sul
> > > > Graduando em Ciência da Computação UFRGS
> > > > @realpestano
> > > > http://code.google.com/p/jsf-conventions-framework/
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > De: Gerhard Petracek <ge...@gmail.com>
> > > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > > Enviadas: Sexta-feira, 9 de Março de 2012 12:38
> > > > Assunto: Re: MyFaces and CODI
> > > >
> > > > hi stephen,
> > > >
> > > > that's right [1] doesn't support it.
> > > > werner committed his improvement and you can try [2] and [3] as you
> see
> > > > them right now.
> > > >
> > > > regards,
> > > > gerhard
> > > >
> > > > [1]
> > > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > > [2] http://s.apache.org/rr
> > > > [3] http://s.apache.org/23p
> > > >
> > > > http://www.irian.at
> > > >
> > > > Your JSF/JavaEE powerhouse -
> > > > JavaEE Consulting, Development and
> > > > Courses in English and German
> > > >
> > > > Professional Support for Apache MyFaces
> > > >
> > > >
> > > >
> > > > 2012/3/9 Stephen More <st...@gmail.com>
> > > >
> > > > > I was referring to [1]
> > > > >
> > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > > >
> > > > > I guess I just need to wait until the correct way is tested and
> > > > > documented in the wiki using:
> > > > >   [1] http://s.apache.org/rr
> > > > >  [2] http://s.apache.org/23p
> > > > >
> > > > >
> > > > >
> > > > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
> > > > > <ge...@gmail.com> wrote:
> > > > > > @ mark:
> > > > > > i just tested it and it works with [1] in combination
> > > > > > with ClientSideWindowHandler [2].
> > > > > >
> > > > > > regards,
> > > > > > gerhard
> > > > > >
> > > > > > [1] http://s.apache.org/rr
> > > > > > [2] http://s.apache.org/23p
> > > > > >
> > > > > > http://www.irian.at
> > > > > >
> > > > > > Your JSF/JavaEE powerhouse -
> > > > > > JavaEE Consulting, Development and
> > > > > > Courses in English and German
> > > > > >
> > > > > > Professional Support for Apache MyFaces
> > > > > >
> > > > > >
> > > > > >
> > > > > > 2012/3/9 Mark Struberg <st...@yahoo.de>
> > > > > >
> > > > > >> Hi Stephen!
> > > > > >>
> > > > > >> Well, the current approach in CODI is currently under discussion
> > in
> > > > the
> > > > > >> JSF EG. The whole windowId stuff of CODI might end up in the
> > JSF-2.2
> > > > or
> > > > > 2.3
> > > > > >> spec.
> > > > > >>
> > > > > >> >T hat seems to work fine when pasting into a new empty window,
> > but
> > > it
> > > > > >> > still allows you to copy-paste the url from one codi window to
> > an
> > > > > >> > existing codi window.
> > > > > >>
> > > > > >> Nope, because the windowhandler.js script will first check the
> > > > > window.name.
> > > > > >> And if this is empty/doesn't fit the windowId in the URL, then
> it
> > > will
> > > > > >> reload the page with a freshly requested windowId.
> > > > > >>
> > > > > >> LieGrue,
> > > > > >> strub
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >> ----- Original Message -----
> > > > > >> > From: Stephen More <st...@gmail.com>
> > > > > >> > To: MyFaces Discussion <us...@myfaces.apache.org>
> > > > > >> > Cc:
> > > > > >> > Sent: Friday, March 9, 2012 1:27 PM
> > > > > >> > Subject: Re: MyFaces and CODI
> > > > > >> >
> > > > > >> > Included in the JSF jar is
> META-INF/resources/javax.faces/jsf.js
> > > > which
> > > > > >> > enables its use by <h:outputScript name="jsf.js"
> > > > > >> > library="javax.faces"
> > > > > >> > target="head"/>
> > > > > >> >
> > > > > >> > Should windowhandler.js be moved from the examples into a core
> > > > library
> > > > > >> > so that it can be utilized the same way ?
> > > > > >> >
> > > > > >> >
> > > > > >> >
> > > > > >> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> > > > > >> > <ge...@gmail.com> wrote:
> > > > > >> >>  hi stephen,
> > > > > >> >>
> > > > > >> >>  yes - you can add a small js (see e.g. [1]) to support this
> > > > > use-case.
> > > > > >> >>
> > > > > >> >>  regards,
> > > > > >> >>  gerhard
> > > > > >> >>
> > > > > >> >>  [1] http://s.apache.org/YTq
> > > > > >> >>
> > > > > >> >>  http://www.irian.at
> > > > > >> >>
> > > > > >> >>  Your JSF/JavaEE powerhouse -
> > > > > >> >>  JavaEE Consulting, Development and
> > > > > >> >>  Courses in English and German
> > > > > >> >>
> > > > > >> >>  Professional Support for Apache MyFaces
> > > > > >> >>
> > > > > >> >>
> > > > > >> >>
> > > > > >> >>  2012/3/9 Stephen More <st...@gmail.com>
> > > > > >> >>
> > > > > >> >>>  Great. I am mainly interested in WindowScoped i.e. every
> > > browser
> > > > > tab
> > > > > >> >>>  has its own mini-session.
> > > > > >> >>>
> > > > > >> >>>  I see that CODI is adding a ?windowId=595 to keep these
> > > > > conversations
> > > > > >> >>>  separate. If a user simply copies the url and pastes in a
> new
> > > tab
> > > > > now
> > > > > >> >>>  two browser tabs are sharing the same conversation. How
> can I
> > > > > prevent
> > > > > >> >>>  this ? I want to enforce that EVERY browser tab has its own
> > > > > >> >>>  conversation. Perhaps a simple error to the user saying
> > > > > >> > "Sorry" or
> > > > > >> >>>  start a new conversation.
> > > > > >> >>>
> > > > > >> >>>  -Thanks
> > > > > >> >>>
> > > > > >> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> > > > > >> >>>  <ge...@gmail.com> wrote:
> > > > > >> >>>  > hi stephen,
> > > > > >> >>>  >
> > > > > >> >>>  > (that's an issue with the setup of weld and not related
> to
> > > > > >> > myfaces codi.)
> > > > > >> >>>  > however, myfaces codi doesn't need this support -> if you
> > > > > >> > also don't need
> > > > > >> >>>  > cdi support for servlets, filters or listeners, you can
> run
> > > the
> > > > > >> >>>  application
> > > > > >> >>>  > without those features.
> > > > > >> >>>  >
> > > > > >> >>>  > regards,
> > > > > >> >>>  > gerhard
> > > > > >> >>>  >
> > > > > >> >>>  > http://www.irian.at
> > > > > >> >>>  >
> > > > > >> >>>  > Your JSF/JavaEE powerhouse -
> > > > > >> >>>  > JavaEE Consulting, Development and
> > > > > >> >>>  > Courses in English and German
> > > > > >> >>>  >
> > > > > >> >>>  > Professional Support for Apache MyFaces
> > > > > >> >>>  >
> > > > > >> >>>  >
> > > > > >> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
> > > > > >> >>>  >
> > > > > >> >>>  >> I too am trying to get a simple example working. I have
> > put
> > > > > >> > together
> > > > > >> >>>  >> this project:
> > > > > >> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> > > > > >> >>>  >>
> > > > > >> >>>  >> mvn jetty:run-war   results in
> > > > > >> >>>  >>
> > > > > >> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI
> injection
> > > will
> > > > > >> > not be
> > > > > >> >>>  >> available in Servlets, Filters or Listeners
> > > > > >> >>>  >>
> > > > > >> >>>  >> What else do I need to get this simple example working ?
> > > > > >> >>>  >>
> > > > > >> >>>  >> -Thanks
> > > > > >> >>>  >>
> > > > > >> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> > > > > >> >>>  >> <ge...@gmail.com> wrote:
> > > > > >> >>>  >> > hi jose,
> > > > > >> >>>  >> >
> > > > > >> >>>  >> > first of all: welcome @ myfaces!
> > > > > >> >>>  >> >
> > > > > >> >>>  >> > concrete questions are very welcome and we will
> improve
> > > > > >> > the wiki
> > > > > >> >>>  based on
> > > > > >> >>>  >> > them.
> > > > > >> >>>  >> >
> > > > > >> >>>  >> > regards,
> > > > > >> >>>  >> > gerhard
> > > > > >> >>>  >> >
> > > > > >> >>>  >> > http://www.irian.at
> > > > > >> >>>  >> >
> > > > > >> >>>  >> > Your JSF/JavaEE powerhouse -
> > > > > >> >>>  >> > JavaEE Consulting, Development and
> > > > > >> >>>  >> > Courses in English and German
> > > > > >> >>>  >> >
> > > > > >> >>>  >> > Professional Support for Apache MyFaces
> > > > > >> >>>  >> >
> > > > > >> >>>  >> >
> > > > > >> >>>  >> >
> > > > > >> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> > > > > >> >>>  >> >
> > > > > >> >>>  >> >> Hi im so excited to start and use MyFaces and CODI
> > > > > >> > but i cant get any
> > > > > >> >>>  >> >> "good" documentation in fact i only can get
> > > > > >> > like 2 or 3 mini tutorial
> > > > > >> >>>  >> but
> > > > > >> >>>  >> >> they are really incomplete, can somebody recommend me
> > > > > >> > to some
> > > > > >> >>>  tutorial
> > > > > >> >>>  >> or
> > > > > >> >>>  >> >> book to start with *CODI *y see this is an excellent
> > > > > >> > extension, im
> > > > > >> >>>  >> moving
> > > > > >> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
> > > > > >> > extensions, please where
> > > > > >> >>>  i
> > > > > >> >>>  >> can
> > > > > >> >>>  >> >> find value information
> > > > > >> >>>  >> >>
> > > > > >> >>>  >> >> The only URL where i found a little info is this:
> > > > > >> >>>  >> >>
> > > > > >> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
> > > > > >> >>>  >> >>
> > > > > >> >>>  >> >> --
> > > > > >> >>>  >> >>
> > > > > >> >
> > > -------------------------------------------------------------------
> > > > > >> >>>  >> >> *SCJA. José Luis Cetina*
> > > > > >> >>>  >> >>
> > > > > >> >
> > > -------------------------------------------------------------------
> > > > > >> >>>  >> >>
> > > > > >> >>>  >>
> > > > > >> >>>
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> > >
> >
>  

Re: MyFaces and CODI

Posted by Gerhard Petracek <ge...@gmail.com>.
hi rafael,

the fallback adds a component (WindowContextIdHolderComponent) dynamically
(as a direct child of UiViewRoot) -> it will work with a4j as soon as you
ensure that it gets restored for requests triggered by a4j.

regards,
gerhard

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


2012/3/15 Rafael Pestano <rm...@yahoo.com.br>

> well its not 100% yet ;(...on every ajaxCall my ViewAccessScoped bean is
> being instantiated,
>
> im using a4j, there is any known issue with it?
>
> for example <h:selectOneMenu .....>
>                         <a4j:support event="onchange" ....action="when the
> action is called the bean constructor gets called"/>
>                     </h:selectOneMenu>
>
> if i change from View to RequestScoped the bahavior is the same, any ideas?
>
>
> thanks in advance.
>
>
> Att,
>
> Rafael M. Pestano
>
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ________________________________
>  De: Rafael Pestano <rm...@yahoo.com.br>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Enviadas: Quinta-feira, 15 de Março de 2012 8:45
> Assunto: Re: MyFaces and CODI
>
> "if you don't need redirects, you could have a look at e.g. [1] which uses
> an internal fallback." yea, its our case and it just works!
>
> many thanks for your help, keep the great work!
>
> Att,
>
> Rafael M. Pestano
>
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ________________________________
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Enviadas: Quarta-feira, 14 de Março de 2012 23:19
> Assunto: Re: MyFaces and CODI
>
> hi rafael,
>
> as you have seen it's easy to provide a custom WindowHandler (just
> implement the interface and provide your implementation as alternative cdi
> bean)
> -> you can integrate every custom approach which is enough to solve you
> requirements.
>
> if you don't need redirects, you could have a look at e.g. [1] which uses
> an internal fallback.
>
> regards,
> gerhard
>
> [1] http://s.apache.org/SAs
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>
> > Hi Gehard,
> >
> > its a stopper to us cause we are still dependent on JSF 1.2
> > Can i implement an alternative
> > to
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > based on JSF 1.2?
> >
> > i see you use flash scope to span the windowId through requests in the
> > server side solution:
> >
> > if (windowId != null)
> > 79         {
> >
> > 80
> externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY,
> windowId);
> >
> > 81
> externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
> > 82         }
> >
> > if i put the windownId in the sessionMap it would still work? i think ill
> > find hard time trying to remove the windowId from the map when user leave
> > the page.
> >
> >
> >
> > thanks for your help i really appreciated it.
> >
> > Att,
> > Rafael M. Pestano
> > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > Graduando em Ciência da Computação UFRGS
> > @realpestano
> > http://code.google.com/p/jsf-conventions-framework/
> >
> >
> >
> > ----- Mensagem original -----
> > De: Gerhard Petracek <ge...@gmail.com>
> > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > Cc:
> > Enviadas: Quarta-feira, 14 de Março de 2012 20:55
> > Assunto: Re: MyFaces and CODI
> >
> > hi rafael,
> >
> > internally the ServerSideWindowHandler is based on the flash scope
> (that's
> > one of the mentioned disadvantages)
> > -> it's bound to jsf 2+ -> it is:
> >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> > (and you can't use the additional js.)
> >
> > with some constellations you just hit the restrictions of browsers -> you
> > have to choose what you really need.
> >
> > regards,
> > gerhard
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
> >
> > > i see, i have used the client side one
> > >
> > > <alternatives>
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
> > > </alternatives>
> > >
> > > i imagine the server side should be
> > >
> > > <alternatives>
> > >
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
> > > </alternatives>alright?
> > >
> > > i will test it tomorrow and give the feedback, thanks.
> > >
> > > Att,
> > > Rafael M. Pestano
> > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > > Graduando em Ciência da Computação UFRGS
> > > @realpestano
> > > http://code.google.com/p/jsf-conventions-framework/
> > >
> > >
> > >
> > > ----- Mensagem original -----
> > > De: Gerhard Petracek <ge...@gmail.com>
> > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > Cc:
> > > Enviadas: Quarta-feira, 14 de Março de 2012 20:11
> > > Assunto: Re: MyFaces and CODI
> > >
> > > hi rafael,
> > >
> > > the easiest approach to test an alternative for this constellation is
> the
> > > activation of the ServerSideWindowHandler (it's a std. cdi @Alternative
> > > implementation -> you can activate it in the beans.xml file of your
> > > application).
> > > (however, please be aware that this alternative implementation has some
> > > disadvantages.)
> > >
> > > regards,
> > > gerhard
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2012/3/14 Rafael Pestano <rm...@yahoo.com.br>
> > >
> > > > Hi Gerhard, i successfuly added codi and openwebbeans to an
> application
> > > > running on weblogic 11g
> > > >
> > > > however its a  legacy application which uses frames, basicaly we
> have a
> > > > menu on the left frame that targets the center frame, something like:
> > > >
> > > > <h:commandLink value="menuLink" action="#{myBean.init}"
> > target="frmDados"
> > > > />
> > > >
> > > >
> > > > the problem is, when a add CODI to the application and mark myBean as
> > > > ViewAccessScoped (and thus the windowId starts to be append to the
> url)
> > > > the above menuLink always open the center frame in a new browser tab.
> > > >
> > > > If i remove CODI and set myBean as RequestScoped(or any other CDI
> > Scope)
> > > > the application behaves  as expected.
> > > >
> > > > So i think the windowId generated by CODI  is causing this issue, i
> > tried
> > > > your solution without success, the windowId isnt removed from the url
> > > and a
> > > > new tab opens when i click in the menuLink.
> > > >
> > > > Any thoughs?
> > > >
> > > >
> > > > thanks for all your help.
> > > >
> > > >
> > > >
> > > > Att,
> > > >
> > > > Rafael M. Pestano
> > > >
> > > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do
> Sul
> > > > Graduando em Ciência da Computação UFRGS
> > > > @realpestano
> > > > http://code.google.com/p/jsf-conventions-framework/
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > De: Gerhard Petracek <ge...@gmail.com>
> > > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > > Enviadas: Sexta-feira, 9 de Março de 2012 12:38
> > > > Assunto: Re: MyFaces and CODI
> > > >
> > > > hi stephen,
> > > >
> > > > that's right [1] doesn't support it.
> > > > werner committed his improvement and you can try [2] and [3] as you
> see
> > > > them right now.
> > > >
> > > > regards,
> > > > gerhard
> > > >
> > > > [1]
> > > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > > [2] http://s.apache.org/rr
> > > > [3] http://s.apache.org/23p
> > > >
> > > > http://www.irian.at
> > > >
> > > > Your JSF/JavaEE powerhouse -
> > > > JavaEE Consulting, Development and
> > > > Courses in English and German
> > > >
> > > > Professional Support for Apache MyFaces
> > > >
> > > >
> > > >
> > > > 2012/3/9 Stephen More <st...@gmail.com>
> > > >
> > > > > I was referring to [1]
> > > > >
> > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > > >
> > > > > I guess I just need to wait until the correct way is tested and
> > > > > documented in the wiki using:
> > > > >   [1] http://s.apache.org/rr
> > > > >  [2] http://s.apache.org/23p
> > > > >
> > > > >
> > > > >
> > > > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
> > > > > <ge...@gmail.com> wrote:
> > > > > > @ mark:
> > > > > > i just tested it and it works with [1] in combination
> > > > > > with ClientSideWindowHandler [2].
> > > > > >
> > > > > > regards,
> > > > > > gerhard
> > > > > >
> > > > > > [1] http://s.apache.org/rr
> > > > > > [2] http://s.apache.org/23p
> > > > > >
> > > > > > http://www.irian.at
> > > > > >
> > > > > > Your JSF/JavaEE powerhouse -
> > > > > > JavaEE Consulting, Development and
> > > > > > Courses in English and German
> > > > > >
> > > > > > Professional Support for Apache MyFaces
> > > > > >
> > > > > >
> > > > > >
> > > > > > 2012/3/9 Mark Struberg <st...@yahoo.de>
> > > > > >
> > > > > >> Hi Stephen!
> > > > > >>
> > > > > >> Well, the current approach in CODI is currently under discussion
> > in
> > > > the
> > > > > >> JSF EG. The whole windowId stuff of CODI might end up in the
> > JSF-2.2
> > > > or
> > > > > 2.3
> > > > > >> spec.
> > > > > >>
> > > > > >> >T hat seems to work fine when pasting into a new empty window,
> > but
> > > it
> > > > > >> > still allows you to copy-paste the url from one codi window to
> > an
> > > > > >> > existing codi window.
> > > > > >>
> > > > > >> Nope, because the windowhandler.js script will first check the
> > > > > window.name.
> > > > > >> And if this is empty/doesn't fit the windowId in the URL, then
> it
> > > will
> > > > > >> reload the page with a freshly requested windowId.
> > > > > >>
> > > > > >> LieGrue,
> > > > > >> strub
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >> ----- Original Message -----
> > > > > >> > From: Stephen More <st...@gmail.com>
> > > > > >> > To: MyFaces Discussion <us...@myfaces.apache.org>
> > > > > >> > Cc:
> > > > > >> > Sent: Friday, March 9, 2012 1:27 PM
> > > > > >> > Subject: Re: MyFaces and CODI
> > > > > >> >
> > > > > >> > Included in the JSF jar is
> META-INF/resources/javax.faces/jsf.js
> > > > which
> > > > > >> > enables its use by <h:outputScript name="jsf.js"
> > > > > >> > library="javax.faces"
> > > > > >> > target="head"/>
> > > > > >> >
> > > > > >> > Should windowhandler.js be moved from the examples into a core
> > > > library
> > > > > >> > so that it can be utilized the same way ?
> > > > > >> >
> > > > > >> >
> > > > > >> >
> > > > > >> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> > > > > >> > <ge...@gmail.com> wrote:
> > > > > >> >>  hi stephen,
> > > > > >> >>
> > > > > >> >>  yes - you can add a small js (see e.g. [1]) to support this
> > > > > use-case.
> > > > > >> >>
> > > > > >> >>  regards,
> > > > > >> >>  gerhard
> > > > > >> >>
> > > > > >> >>  [1] http://s.apache.org/YTq
> > > > > >> >>
> > > > > >> >>  http://www.irian.at
> > > > > >> >>
> > > > > >> >>  Your JSF/JavaEE powerhouse -
> > > > > >> >>  JavaEE Consulting, Development and
> > > > > >> >>  Courses in English and German
> > > > > >> >>
> > > > > >> >>  Professional Support for Apache MyFaces
> > > > > >> >>
> > > > > >> >>
> > > > > >> >>
> > > > > >> >>  2012/3/9 Stephen More <st...@gmail.com>
> > > > > >> >>
> > > > > >> >>>  Great. I am mainly interested in WindowScoped i.e. every
> > > browser
> > > > > tab
> > > > > >> >>>  has its own mini-session.
> > > > > >> >>>
> > > > > >> >>>  I see that CODI is adding a ?windowId=595 to keep these
> > > > > conversations
> > > > > >> >>>  separate. If a user simply copies the url and pastes in a
> new
> > > tab
> > > > > now
> > > > > >> >>>  two browser tabs are sharing the same conversation. How
> can I
> > > > > prevent
> > > > > >> >>>  this ? I want to enforce that EVERY browser tab has its own
> > > > > >> >>>  conversation. Perhaps a simple error to the user saying
> > > > > >> > "Sorry" or
> > > > > >> >>>  start a new conversation.
> > > > > >> >>>
> > > > > >> >>>  -Thanks
> > > > > >> >>>
> > > > > >> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> > > > > >> >>>  <ge...@gmail.com> wrote:
> > > > > >> >>>  > hi stephen,
> > > > > >> >>>  >
> > > > > >> >>>  > (that's an issue with the setup of weld and not related
> to
> > > > > >> > myfaces codi.)
> > > > > >> >>>  > however, myfaces codi doesn't need this support -> if you
> > > > > >> > also don't need
> > > > > >> >>>  > cdi support for servlets, filters or listeners, you can
> run
> > > the
> > > > > >> >>>  application
> > > > > >> >>>  > without those features.
> > > > > >> >>>  >
> > > > > >> >>>  > regards,
> > > > > >> >>>  > gerhard
> > > > > >> >>>  >
> > > > > >> >>>  > http://www.irian.at
> > > > > >> >>>  >
> > > > > >> >>>  > Your JSF/JavaEE powerhouse -
> > > > > >> >>>  > JavaEE Consulting, Development and
> > > > > >> >>>  > Courses in English and German
> > > > > >> >>>  >
> > > > > >> >>>  > Professional Support for Apache MyFaces
> > > > > >> >>>  >
> > > > > >> >>>  >
> > > > > >> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
> > > > > >> >>>  >
> > > > > >> >>>  >> I too am trying to get a simple example working. I have
> > put
> > > > > >> > together
> > > > > >> >>>  >> this project:
> > > > > >> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> > > > > >> >>>  >>
> > > > > >> >>>  >> mvn jetty:run-war   results in
> > > > > >> >>>  >>
> > > > > >> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI
> injection
> > > will
> > > > > >> > not be
> > > > > >> >>>  >> available in Servlets, Filters or Listeners
> > > > > >> >>>  >>
> > > > > >> >>>  >> What else do I need to get this simple example working ?
> > > > > >> >>>  >>
> > > > > >> >>>  >> -Thanks
> > > > > >> >>>  >>
> > > > > >> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> > > > > >> >>>  >> <ge...@gmail.com> wrote:
> > > > > >> >>>  >> > hi jose,
> > > > > >> >>>  >> >
> > > > > >> >>>  >> > first of all: welcome @ myfaces!
> > > > > >> >>>  >> >
> > > > > >> >>>  >> > concrete questions are very welcome and we will
> improve
> > > > > >> > the wiki
> > > > > >> >>>  based on
> > > > > >> >>>  >> > them.
> > > > > >> >>>  >> >
> > > > > >> >>>  >> > regards,
> > > > > >> >>>  >> > gerhard
> > > > > >> >>>  >> >
> > > > > >> >>>  >> > http://www.irian.at
> > > > > >> >>>  >> >
> > > > > >> >>>  >> > Your JSF/JavaEE powerhouse -
> > > > > >> >>>  >> > JavaEE Consulting, Development and
> > > > > >> >>>  >> > Courses in English and German
> > > > > >> >>>  >> >
> > > > > >> >>>  >> > Professional Support for Apache MyFaces
> > > > > >> >>>  >> >
> > > > > >> >>>  >> >
> > > > > >> >>>  >> >
> > > > > >> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> > > > > >> >>>  >> >
> > > > > >> >>>  >> >> Hi im so excited to start and use MyFaces and CODI
> > > > > >> > but i cant get any
> > > > > >> >>>  >> >> "good" documentation in fact i only can get
> > > > > >> > like 2 or 3 mini tutorial
> > > > > >> >>>  >> but
> > > > > >> >>>  >> >> they are really incomplete, can somebody recommend me
> > > > > >> > to some
> > > > > >> >>>  tutorial
> > > > > >> >>>  >> or
> > > > > >> >>>  >> >> book to start with *CODI *y see this is an excellent
> > > > > >> > extension, im
> > > > > >> >>>  >> moving
> > > > > >> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
> > > > > >> > extensions, please where
> > > > > >> >>>  i
> > > > > >> >>>  >> can
> > > > > >> >>>  >> >> find value information
> > > > > >> >>>  >> >>
> > > > > >> >>>  >> >> The only URL where i found a little info is this:
> > > > > >> >>>  >> >>
> > > > > >> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
> > > > > >> >>>  >> >>
> > > > > >> >>>  >> >> --
> > > > > >> >>>  >> >>
> > > > > >> >
> > > -------------------------------------------------------------------
> > > > > >> >>>  >> >> *SCJA. José Luis Cetina*
> > > > > >> >>>  >> >>
> > > > > >> >
> > > -------------------------------------------------------------------
> > > > > >> >>>  >> >>
> > > > > >> >>>  >>
> > > > > >> >>>
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> > >
> >
>

Re: MyFaces and CODI

Posted by Rafael Pestano <rm...@yahoo.com.br>.
well its not 100% yet ;(...on every ajaxCall my ViewAccessScoped bean is being instantiated, 

im using a4j, there is any known issue with it? 

for example <h:selectOneMenu .....>
                        <a4j:support event="onchange" ....action="when the action is called the bean constructor gets called"/>
                    </h:selectOneMenu>

if i change from View to RequestScoped the bahavior is the same, any ideas?


thanks in advance.

 
Att, 

Rafael M. Pestano

Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
Graduando em Ciência da Computação UFRGS
@realpestano
http://code.google.com/p/jsf-conventions-framework/



________________________________
 De: Rafael Pestano <rm...@yahoo.com.br>
Para: MyFaces Discussion <us...@myfaces.apache.org> 
Enviadas: Quinta-feira, 15 de Março de 2012 8:45
Assunto: Re: MyFaces and CODI
 
"if you don't need redirects, you could have a look at e.g. [1] which uses
an internal fallback." yea, its our case and it just works! 

many thanks for your help, keep the great work!
 
Att, 

Rafael M. Pestano

Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
Graduando em Ciência da Computação UFRGS
@realpestano
http://code.google.com/p/jsf-conventions-framework/



________________________________
De: Gerhard Petracek <ge...@gmail.com>
Para: MyFaces Discussion <us...@myfaces.apache.org> 
Enviadas: Quarta-feira, 14 de Março de 2012 23:19
Assunto: Re: MyFaces and CODI

hi rafael,

as you have seen it's easy to provide a custom WindowHandler (just
implement the interface and provide your implementation as alternative cdi
bean)
-> you can integrate every custom approach which is enough to solve you
requirements.

if you don't need redirects, you could have a look at e.g. [1] which uses
an internal fallback.

regards,
gerhard

[1] http://s.apache.org/SAs

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/15 Rafael Pestano <rm...@yahoo.com.br>

> Hi Gehard,
>
> its a stopper to us cause we are still dependent on JSF 1.2
> Can i implement an alternative
> to org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> based on JSF 1.2?
>
> i see you use flash scope to span the windowId through requests in the
> server side solution:
>
> if (windowId != null)
> 79         {
>
> 80             externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY, windowId);
>
> 81             externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
> 82         }
>
> if i put the windownId in the sessionMap it would still work? i think ill
> find hard time trying to remove the windowId from the map when user leave
> the page.
>
>
>
> thanks for your help i really appreciated it.
>
> Att,
> Rafael M. Pestano
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ----- Mensagem original -----
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Cc:
> Enviadas: Quarta-feira, 14 de Março de 2012 20:55
> Assunto: Re: MyFaces and CODI
>
> hi rafael,
>
> internally the ServerSideWindowHandler is based on the flash scope (that's
> one of the mentioned disadvantages)
> -> it's bound to jsf 2+ -> it is:
>
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> (and you can't use the additional js.)
>
> with some constellations you just hit the restrictions of browsers -> you
> have to choose what you really need.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>
> > i see, i have used the client side one
> >
> > <alternatives>
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
> > </alternatives>
> >
> > i imagine the server side should be
> >
> > <alternatives>
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
> > </alternatives>alright?
> >
> > i will test it tomorrow and give the feedback, thanks.
> >
> > Att,
> > Rafael M. Pestano
> > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > Graduando em Ciência da Computação UFRGS
> > @realpestano
> > http://code.google.com/p/jsf-conventions-framework/
> >
> >
> >
> > ----- Mensagem original -----
> > De: Gerhard Petracek <ge...@gmail.com>
> > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > Cc:
> > Enviadas: Quarta-feira, 14 de Março de 2012 20:11
> > Assunto: Re: MyFaces and CODI
> >
> > hi rafael,
> >
> > the easiest approach to test an alternative for this constellation is the
> > activation of the ServerSideWindowHandler (it's a std. cdi @Alternative
> > implementation -> you can activate it in the beans.xml file of your
> > application).
> > (however, please be aware that this alternative implementation has some
> > disadvantages.)
> >
> > regards,
> > gerhard
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/3/14 Rafael Pestano <rm...@yahoo.com.br>
> >
> > > Hi Gerhard, i successfuly added codi and openwebbeans to an application
> > > running on weblogic 11g
> > >
> > > however its a  legacy application which uses frames, basicaly we have a
> > > menu on the left frame that targets the center frame, something like:
> > >
> > > <h:commandLink value="menuLink" action="#{myBean.init}"
> target="frmDados"
> > > />
> > >
> > >
> > > the problem is, when a add CODI to the application and mark myBean as
> > > ViewAccessScoped (and thus the windowId starts to be append to the url)
> > > the above menuLink always open the center frame in a new browser tab.
> > >
> > > If i remove CODI and set myBean as RequestScoped(or any other CDI
> Scope)
> > > the application behaves  as expected.
> > >
> > > So i think the windowId generated by CODI  is causing this issue, i
> tried
> > > your solution without success, the windowId isnt removed from the url
> > and a
> > > new tab opens when i click in the menuLink.
> > >
> > > Any thoughs?
> > >
> > >
> > > thanks for all your help.
> > >
> > >
> > >
> > > Att,
> > >
> > > Rafael M. Pestano
> > >
> > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > > Graduando em Ciência da Computação UFRGS
> > > @realpestano
> > > http://code.google.com/p/jsf-conventions-framework/
> > >
> > >
> > >
> > > ________________________________
> > > De: Gerhard Petracek <ge...@gmail.com>
> > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > Enviadas: Sexta-feira, 9 de Março de 2012 12:38
> > > Assunto: Re: MyFaces and CODI
> > >
> > > hi stephen,
> > >
> > > that's right [1] doesn't support it.
> > > werner committed his improvement and you can try [2] and [3] as you see
> > > them right now.
> > >
> > > regards,
> > > gerhard
> > >
> > > [1]
> > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > [2] http://s.apache.org/rr
> > > [3] http://s.apache.org/23p
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2012/3/9 Stephen More <st...@gmail.com>
> > >
> > > > I was referring to [1]
> > > >
> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > >
> > > > I guess I just need to wait until the correct way is tested and
> > > > documented in the wiki using:
> > > >   [1] http://s.apache.org/rr
> > > >  [2] http://s.apache.org/23p
> > > >
> > > >
> > > >
> > > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
> > > > <ge...@gmail.com> wrote:
> > > > > @ mark:
> > > > > i just tested it and it works with [1] in combination
> > > > > with ClientSideWindowHandler [2].
> > > > >
> > > > > regards,
> > > > > gerhard
> > > > >
> > > > > [1] http://s.apache.org/rr
> > > > > [2] http://s.apache.org/23p
> > > > >
> > > > > http://www.irian.at
> > > > >
> > > > > Your JSF/JavaEE powerhouse -
> > > > > JavaEE Consulting, Development and
> > > > > Courses in English and German
> > > > >
> > > > > Professional Support for Apache MyFaces
> > > > >
> > > > >
> > > > >
> > > > > 2012/3/9 Mark Struberg <st...@yahoo.de>
> > > > >
> > > > >> Hi Stephen!
> > > > >>
> > > > >> Well, the current approach in CODI is currently under discussion
> in
> > > the
> > > > >> JSF EG. The whole windowId stuff of CODI might end up in the
> JSF-2.2
> > > or
> > > > 2.3
> > > > >> spec.
> > > > >>
> > > > >> >T hat seems to work fine when pasting into a new empty window,
> but
> > it
> > > > >> > still allows you to copy-paste the url from one codi window to
> an
> > > > >> > existing codi window.
> > > > >>
> > > > >> Nope, because the windowhandler.js script will first check the
> > > > window.name.
> > > > >> And if this is empty/doesn't fit the windowId in the URL, then it
> > will
> > > > >> reload the page with a freshly requested windowId.
> > > > >>
> > > > >> LieGrue,
> > > > >> strub
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >> ----- Original Message -----
> > > > >> > From: Stephen More <st...@gmail.com>
> > > > >> > To: MyFaces Discussion <us...@myfaces.apache.org>
> > > > >> > Cc:
> > > > >> > Sent: Friday, March 9, 2012 1:27 PM
> > > > >> > Subject: Re: MyFaces and CODI
> > > > >> >
> > > > >> > Included in the JSF jar is META-INF/resources/javax.faces/jsf.js
> > > which
> > > > >> > enables its use by <h:outputScript name="jsf.js"
> > > > >> > library="javax.faces"
> > > > >> > target="head"/>
> > > > >> >
> > > > >> > Should windowhandler.js be moved from the examples into a core
> > > library
> > > > >> > so that it can be utilized the same way ?
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> > > > >> > <ge...@gmail.com> wrote:
> > > > >> >>  hi stephen,
> > > > >> >>
> > > > >> >>  yes - you can add a small js (see e.g. [1]) to support this
> > > > use-case.
> > > > >> >>
> > > > >> >>  regards,
> > > > >> >>  gerhard
> > > > >> >>
> > > > >> >>  [1] http://s.apache.org/YTq
> > > > >> >>
> > > > >> >>  http://www.irian.at
> > > > >> >>
> > > > >> >>  Your JSF/JavaEE powerhouse -
> > > > >> >>  JavaEE Consulting, Development and
> > > > >> >>  Courses in English and German
> > > > >> >>
> > > > >> >>  Professional Support for Apache MyFaces
> > > > >> >>
> > > > >> >>
> > > > >> >>
> > > > >> >>  2012/3/9 Stephen More <st...@gmail.com>
> > > > >> >>
> > > > >> >>>  Great. I am mainly interested in WindowScoped i.e. every
> > browser
> > > > tab
> > > > >> >>>  has its own mini-session.
> > > > >> >>>
> > > > >> >>>  I see that CODI is adding a ?windowId=595 to keep these
> > > > conversations
> > > > >> >>>  separate. If a user simply copies the url and pastes in a new
> > tab
> > > > now
> > > > >> >>>  two browser tabs are sharing the same conversation. How can I
> > > > prevent
> > > > >> >>>  this ? I want to enforce that EVERY browser tab has its own
> > > > >> >>>  conversation. Perhaps a simple error to the user saying
> > > > >> > "Sorry" or
> > > > >> >>>  start a new conversation.
> > > > >> >>>
> > > > >> >>>  -Thanks
> > > > >> >>>
> > > > >> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> > > > >> >>>  <ge...@gmail.com> wrote:
> > > > >> >>>  > hi stephen,
> > > > >> >>>  >
> > > > >> >>>  > (that's an issue with the setup of weld and not related to
> > > > >> > myfaces codi.)
> > > > >> >>>  > however, myfaces codi doesn't need this support -> if you
> > > > >> > also don't need
> > > > >> >>>  > cdi support for servlets, filters or listeners, you can run
> > the
> > > > >> >>>  application
> > > > >> >>>  > without those features.
> > > > >> >>>  >
> > > > >> >>>  > regards,
> > > > >> >>>  > gerhard
> > > > >> >>>  >
> > > > >> >>>  > http://www.irian.at
> > > > >> >>>  >
> > > > >> >>>  > Your JSF/JavaEE powerhouse -
> > > > >> >>>  > JavaEE Consulting, Development and
> > > > >> >>>  > Courses in English and German
> > > > >> >>>  >
> > > > >> >>>  > Professional Support for Apache MyFaces
> > > > >> >>>  >
> > > > >> >>>  >
> > > > >> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
> > > > >> >>>  >
> > > > >> >>>  >> I too am trying to get a simple example working. I have
> put
> > > > >> > together
> > > > >> >>>  >> this project:
> > > > >> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> > > > >> >>>  >>
> > > > >> >>>  >> mvn jetty:run-war   results in
> > > > >> >>>  >>
> > > > >> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI injection
> > will
> > > > >> > not be
> > > > >> >>>  >> available in Servlets, Filters or Listeners
> > > > >> >>>  >>
> > > > >> >>>  >> What else do I need to get this simple example working ?
> > > > >> >>>  >>
> > > > >> >>>  >> -Thanks
> > > > >> >>>  >>
> > > > >> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> > > > >> >>>  >> <ge...@gmail.com> wrote:
> > > > >> >>>  >> > hi jose,
> > > > >> >>>  >> >
> > > > >> >>>  >> > first of all: welcome @ myfaces!
> > > > >> >>>  >> >
> > > > >> >>>  >> > concrete questions are very welcome and we will improve
> > > > >> > the wiki
> > > > >> >>>  based on
> > > > >> >>>  >> > them.
> > > > >> >>>  >> >
> > > > >> >>>  >> > regards,
> > > > >> >>>  >> > gerhard
> > > > >> >>>  >> >
> > > > >> >>>  >> > http://www.irian.at
> > > > >> >>>  >> >
> > > > >> >>>  >> > Your JSF/JavaEE powerhouse -
> > > > >> >>>  >> > JavaEE Consulting, Development and
> > > > >> >>>  >> > Courses in English and German
> > > > >> >>>  >> >
> > > > >> >>>  >> > Professional Support for Apache MyFaces
> > > > >> >>>  >> >
> > > > >> >>>  >> >
> > > > >> >>>  >> >
> > > > >> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> > > > >> >>>  >> >
> > > > >> >>>  >> >> Hi im so excited to start and use MyFaces and CODI
> > > > >> > but i cant get any
> > > > >> >>>  >> >> "good" documentation in fact i only can get
> > > > >> > like 2 or 3 mini tutorial
> > > > >> >>>  >> but
> > > > >> >>>  >> >> they are really incomplete, can somebody recommend me
> > > > >> > to some
> > > > >> >>>  tutorial
> > > > >> >>>  >> or
> > > > >> >>>  >> >> book to start with *CODI *y see this is an excellent
> > > > >> > extension, im
> > > > >> >>>  >> moving
> > > > >> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
> > > > >> > extensions, please where
> > > > >> >>>  i
> > > > >> >>>  >> can
> > > > >> >>>  >> >> find value information
> > > > >> >>>  >> >>
> > > > >> >>>  >> >> The only URL where i found a little info is this:
> > > > >> >>>  >> >>
> > > > >> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
> > > > >> >>>  >> >>
> > > > >> >>>  >> >> --
> > > > >> >>>  >> >>
> > > > >> >
> > -------------------------------------------------------------------
> > > > >> >>>  >> >> *SCJA. José Luis Cetina*
> > > > >> >>>  >> >>
> > > > >> >
> > -------------------------------------------------------------------
> > > > >> >>>  >> >>
> > > > >> >>>  >>
> > > > >> >>>
> > > > >> >
> > > > >>
> > > >
> > >
> >
> >
>

Re: MyFaces and CODI

Posted by Rafael Pestano <rm...@yahoo.com.br>.
"if you don't need redirects, you could have a look at e.g. [1] which uses
an internal fallback." yea, its our case and it just works! 

many thanks for your help, keep the great work!
 
Att, 

Rafael M. Pestano

Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
Graduando em Ciência da Computação UFRGS
@realpestano
http://code.google.com/p/jsf-conventions-framework/



________________________________
 De: Gerhard Petracek <ge...@gmail.com>
Para: MyFaces Discussion <us...@myfaces.apache.org> 
Enviadas: Quarta-feira, 14 de Março de 2012 23:19
Assunto: Re: MyFaces and CODI
 
hi rafael,

as you have seen it's easy to provide a custom WindowHandler (just
implement the interface and provide your implementation as alternative cdi
bean)
-> you can integrate every custom approach which is enough to solve you
requirements.

if you don't need redirects, you could have a look at e.g. [1] which uses
an internal fallback.

regards,
gerhard

[1] http://s.apache.org/SAs

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/15 Rafael Pestano <rm...@yahoo.com.br>

> Hi Gehard,
>
> its a stopper to us cause we are still dependent on JSF 1.2
> Can i implement an alternative
> to org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> based on JSF 1.2?
>
> i see you use flash scope to span the windowId through requests in the
> server side solution:
>
> if (windowId != null)
> 79         {
>
> 80             externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY, windowId);
>
> 81             externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
> 82         }
>
> if i put the windownId in the sessionMap it would still work? i think ill
> find hard time trying to remove the windowId from the map when user leave
> the page.
>
>
>
> thanks for your help i really appreciated it.
>
> Att,
> Rafael M. Pestano
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ----- Mensagem original -----
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Cc:
> Enviadas: Quarta-feira, 14 de Março de 2012 20:55
> Assunto: Re: MyFaces and CODI
>
> hi rafael,
>
> internally the ServerSideWindowHandler is based on the flash scope (that's
> one of the mentioned disadvantages)
> -> it's bound to jsf 2+ -> it is:
>
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> (and you can't use the additional js.)
>
> with some constellations you just hit the restrictions of browsers -> you
> have to choose what you really need.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>
> > i see, i have used the client side one
> >
> > <alternatives>
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
> > </alternatives>
> >
> > i imagine the server side should be
> >
> > <alternatives>
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
> > </alternatives>alright?
> >
> > i will test it tomorrow and give the feedback, thanks.
> >
> > Att,
> > Rafael M. Pestano
> > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > Graduando em Ciência da Computação UFRGS
> > @realpestano
> > http://code.google.com/p/jsf-conventions-framework/
> >
> >
> >
> > ----- Mensagem original -----
> > De: Gerhard Petracek <ge...@gmail.com>
> > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > Cc:
> > Enviadas: Quarta-feira, 14 de Março de 2012 20:11
> > Assunto: Re: MyFaces and CODI
> >
> > hi rafael,
> >
> > the easiest approach to test an alternative for this constellation is the
> > activation of the ServerSideWindowHandler (it's a std. cdi @Alternative
> > implementation -> you can activate it in the beans.xml file of your
> > application).
> > (however, please be aware that this alternative implementation has some
> > disadvantages.)
> >
> > regards,
> > gerhard
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/3/14 Rafael Pestano <rm...@yahoo.com.br>
> >
> > > Hi Gerhard, i successfuly added codi and openwebbeans to an application
> > > running on weblogic 11g
> > >
> > > however its a  legacy application which uses frames, basicaly we have a
> > > menu on the left frame that targets the center frame, something like:
> > >
> > > <h:commandLink value="menuLink" action="#{myBean.init}"
> target="frmDados"
> > > />
> > >
> > >
> > > the problem is, when a add CODI to the application and mark myBean as
> > > ViewAccessScoped (and thus the windowId starts to be append to the url)
> > > the above menuLink always open the center frame in a new browser tab.
> > >
> > > If i remove CODI and set myBean as RequestScoped(or any other CDI
> Scope)
> > > the application behaves  as expected.
> > >
> > > So i think the windowId generated by CODI  is causing this issue, i
> tried
> > > your solution without success, the windowId isnt removed from the url
> > and a
> > > new tab opens when i click in the menuLink.
> > >
> > > Any thoughs?
> > >
> > >
> > > thanks for all your help.
> > >
> > >
> > >
> > > Att,
> > >
> > > Rafael M. Pestano
> > >
> > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > > Graduando em Ciência da Computação UFRGS
> > > @realpestano
> > > http://code.google.com/p/jsf-conventions-framework/
> > >
> > >
> > >
> > > ________________________________
> > > De: Gerhard Petracek <ge...@gmail.com>
> > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > Enviadas: Sexta-feira, 9 de Março de 2012 12:38
> > > Assunto: Re: MyFaces and CODI
> > >
> > > hi stephen,
> > >
> > > that's right [1] doesn't support it.
> > > werner committed his improvement and you can try [2] and [3] as you see
> > > them right now.
> > >
> > > regards,
> > > gerhard
> > >
> > > [1]
> > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > [2] http://s.apache.org/rr
> > > [3] http://s.apache.org/23p
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2012/3/9 Stephen More <st...@gmail.com>
> > >
> > > > I was referring to [1]
> > > >
> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > >
> > > > I guess I just need to wait until the correct way is tested and
> > > > documented in the wiki using:
> > > >   [1] http://s.apache.org/rr
> > > >  [2] http://s.apache.org/23p
> > > >
> > > >
> > > >
> > > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
> > > > <ge...@gmail.com> wrote:
> > > > > @ mark:
> > > > > i just tested it and it works with [1] in combination
> > > > > with ClientSideWindowHandler [2].
> > > > >
> > > > > regards,
> > > > > gerhard
> > > > >
> > > > > [1] http://s.apache.org/rr
> > > > > [2] http://s.apache.org/23p
> > > > >
> > > > > http://www.irian.at
> > > > >
> > > > > Your JSF/JavaEE powerhouse -
> > > > > JavaEE Consulting, Development and
> > > > > Courses in English and German
> > > > >
> > > > > Professional Support for Apache MyFaces
> > > > >
> > > > >
> > > > >
> > > > > 2012/3/9 Mark Struberg <st...@yahoo.de>
> > > > >
> > > > >> Hi Stephen!
> > > > >>
> > > > >> Well, the current approach in CODI is currently under discussion
> in
> > > the
> > > > >> JSF EG. The whole windowId stuff of CODI might end up in the
> JSF-2.2
> > > or
> > > > 2.3
> > > > >> spec.
> > > > >>
> > > > >> >T hat seems to work fine when pasting into a new empty window,
> but
> > it
> > > > >> > still allows you to copy-paste the url from one codi window to
> an
> > > > >> > existing codi window.
> > > > >>
> > > > >> Nope, because the windowhandler.js script will first check the
> > > > window.name.
> > > > >> And if this is empty/doesn't fit the windowId in the URL, then it
> > will
> > > > >> reload the page with a freshly requested windowId.
> > > > >>
> > > > >> LieGrue,
> > > > >> strub
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >> ----- Original Message -----
> > > > >> > From: Stephen More <st...@gmail.com>
> > > > >> > To: MyFaces Discussion <us...@myfaces.apache.org>
> > > > >> > Cc:
> > > > >> > Sent: Friday, March 9, 2012 1:27 PM
> > > > >> > Subject: Re: MyFaces and CODI
> > > > >> >
> > > > >> > Included in the JSF jar is META-INF/resources/javax.faces/jsf.js
> > > which
> > > > >> > enables its use by <h:outputScript name="jsf.js"
> > > > >> > library="javax.faces"
> > > > >> > target="head"/>
> > > > >> >
> > > > >> > Should windowhandler.js be moved from the examples into a core
> > > library
> > > > >> > so that it can be utilized the same way ?
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> > > > >> > <ge...@gmail.com> wrote:
> > > > >> >>  hi stephen,
> > > > >> >>
> > > > >> >>  yes - you can add a small js (see e.g. [1]) to support this
> > > > use-case.
> > > > >> >>
> > > > >> >>  regards,
> > > > >> >>  gerhard
> > > > >> >>
> > > > >> >>  [1] http://s.apache.org/YTq
> > > > >> >>
> > > > >> >>  http://www.irian.at
> > > > >> >>
> > > > >> >>  Your JSF/JavaEE powerhouse -
> > > > >> >>  JavaEE Consulting, Development and
> > > > >> >>  Courses in English and German
> > > > >> >>
> > > > >> >>  Professional Support for Apache MyFaces
> > > > >> >>
> > > > >> >>
> > > > >> >>
> > > > >> >>  2012/3/9 Stephen More <st...@gmail.com>
> > > > >> >>
> > > > >> >>>  Great. I am mainly interested in WindowScoped i.e. every
> > browser
> > > > tab
> > > > >> >>>  has its own mini-session.
> > > > >> >>>
> > > > >> >>>  I see that CODI is adding a ?windowId=595 to keep these
> > > > conversations
> > > > >> >>>  separate. If a user simply copies the url and pastes in a new
> > tab
> > > > now
> > > > >> >>>  two browser tabs are sharing the same conversation. How can I
> > > > prevent
> > > > >> >>>  this ? I want to enforce that EVERY browser tab has its own
> > > > >> >>>  conversation. Perhaps a simple error to the user saying
> > > > >> > "Sorry" or
> > > > >> >>>  start a new conversation.
> > > > >> >>>
> > > > >> >>>  -Thanks
> > > > >> >>>
> > > > >> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> > > > >> >>>  <ge...@gmail.com> wrote:
> > > > >> >>>  > hi stephen,
> > > > >> >>>  >
> > > > >> >>>  > (that's an issue with the setup of weld and not related to
> > > > >> > myfaces codi.)
> > > > >> >>>  > however, myfaces codi doesn't need this support -> if you
> > > > >> > also don't need
> > > > >> >>>  > cdi support for servlets, filters or listeners, you can run
> > the
> > > > >> >>>  application
> > > > >> >>>  > without those features.
> > > > >> >>>  >
> > > > >> >>>  > regards,
> > > > >> >>>  > gerhard
> > > > >> >>>  >
> > > > >> >>>  > http://www.irian.at
> > > > >> >>>  >
> > > > >> >>>  > Your JSF/JavaEE powerhouse -
> > > > >> >>>  > JavaEE Consulting, Development and
> > > > >> >>>  > Courses in English and German
> > > > >> >>>  >
> > > > >> >>>  > Professional Support for Apache MyFaces
> > > > >> >>>  >
> > > > >> >>>  >
> > > > >> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
> > > > >> >>>  >
> > > > >> >>>  >> I too am trying to get a simple example working. I have
> put
> > > > >> > together
> > > > >> >>>  >> this project:
> > > > >> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> > > > >> >>>  >>
> > > > >> >>>  >> mvn jetty:run-war   results in
> > > > >> >>>  >>
> > > > >> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI injection
> > will
> > > > >> > not be
> > > > >> >>>  >> available in Servlets, Filters or Listeners
> > > > >> >>>  >>
> > > > >> >>>  >> What else do I need to get this simple example working ?
> > > > >> >>>  >>
> > > > >> >>>  >> -Thanks
> > > > >> >>>  >>
> > > > >> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> > > > >> >>>  >> <ge...@gmail.com> wrote:
> > > > >> >>>  >> > hi jose,
> > > > >> >>>  >> >
> > > > >> >>>  >> > first of all: welcome @ myfaces!
> > > > >> >>>  >> >
> > > > >> >>>  >> > concrete questions are very welcome and we will improve
> > > > >> > the wiki
> > > > >> >>>  based on
> > > > >> >>>  >> > them.
> > > > >> >>>  >> >
> > > > >> >>>  >> > regards,
> > > > >> >>>  >> > gerhard
> > > > >> >>>  >> >
> > > > >> >>>  >> > http://www.irian.at
> > > > >> >>>  >> >
> > > > >> >>>  >> > Your JSF/JavaEE powerhouse -
> > > > >> >>>  >> > JavaEE Consulting, Development and
> > > > >> >>>  >> > Courses in English and German
> > > > >> >>>  >> >
> > > > >> >>>  >> > Professional Support for Apache MyFaces
> > > > >> >>>  >> >
> > > > >> >>>  >> >
> > > > >> >>>  >> >
> > > > >> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> > > > >> >>>  >> >
> > > > >> >>>  >> >> Hi im so excited to start and use MyFaces and CODI
> > > > >> > but i cant get any
> > > > >> >>>  >> >> "good" documentation in fact i only can get
> > > > >> > like 2 or 3 mini tutorial
> > > > >> >>>  >> but
> > > > >> >>>  >> >> they are really incomplete, can somebody recommend me
> > > > >> > to some
> > > > >> >>>  tutorial
> > > > >> >>>  >> or
> > > > >> >>>  >> >> book to start with *CODI *y see this is an excellent
> > > > >> > extension, im
> > > > >> >>>  >> moving
> > > > >> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
> > > > >> > extensions, please where
> > > > >> >>>  i
> > > > >> >>>  >> can
> > > > >> >>>  >> >> find value information
> > > > >> >>>  >> >>
> > > > >> >>>  >> >> The only URL where i found a little info is this:
> > > > >> >>>  >> >>
> > > > >> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
> > > > >> >>>  >> >>
> > > > >> >>>  >> >> --
> > > > >> >>>  >> >>
> > > > >> >
> > -------------------------------------------------------------------
> > > > >> >>>  >> >> *SCJA. José Luis Cetina*
> > > > >> >>>  >> >>
> > > > >> >
> > -------------------------------------------------------------------
> > > > >> >>>  >> >>
> > > > >> >>>  >>
> > > > >> >>>
> > > > >> >
> > > > >>
> > > >
> > >
> >
> >
>

Re: MyFaces and CODI

Posted by Gerhard Petracek <ge...@gmail.com>.
hi rafael,

as you have seen it's easy to provide a custom WindowHandler (just
implement the interface and provide your implementation as alternative cdi
bean)
-> you can integrate every custom approach which is enough to solve you
requirements.

if you don't need redirects, you could have a look at e.g. [1] which uses
an internal fallback.

regards,
gerhard

[1] http://s.apache.org/SAs

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/15 Rafael Pestano <rm...@yahoo.com.br>

> Hi Gehard,
>
> its a stopper to us cause we are still dependent on JSF 1.2
> Can i implement an alternative
> to org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> based on JSF 1.2?
>
> i see you use flash scope to span the windowId through requests in the
> server side solution:
>
> if (windowId != null)
> 79         {
>
> 80             externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY, windowId);
>
> 81             externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
> 82         }
>
> if i put the windownId in the sessionMap it would still work? i think ill
> find hard time trying to remove the windowId from the map when user leave
> the page.
>
>
>
> thanks for your help i really appreciated it.
>
> Att,
> Rafael M. Pestano
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ----- Mensagem original -----
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Cc:
> Enviadas: Quarta-feira, 14 de Março de 2012 20:55
> Assunto: Re: MyFaces and CODI
>
> hi rafael,
>
> internally the ServerSideWindowHandler is based on the flash scope (that's
> one of the mentioned disadvantages)
> -> it's bound to jsf 2+ -> it is:
>
> org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
> (and you can't use the additional js.)
>
> with some constellations you just hit the restrictions of browsers -> you
> have to choose what you really need.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/15 Rafael Pestano <rm...@yahoo.com.br>
>
> > i see, i have used the client side one
> >
> > <alternatives>
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
> > </alternatives>
> >
> > i imagine the server side should be
> >
> > <alternatives>
> >
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
> > </alternatives>alright?
> >
> > i will test it tomorrow and give the feedback, thanks.
> >
> > Att,
> > Rafael M. Pestano
> > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > Graduando em Ciência da Computação UFRGS
> > @realpestano
> > http://code.google.com/p/jsf-conventions-framework/
> >
> >
> >
> > ----- Mensagem original -----
> > De: Gerhard Petracek <ge...@gmail.com>
> > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > Cc:
> > Enviadas: Quarta-feira, 14 de Março de 2012 20:11
> > Assunto: Re: MyFaces and CODI
> >
> > hi rafael,
> >
> > the easiest approach to test an alternative for this constellation is the
> > activation of the ServerSideWindowHandler (it's a std. cdi @Alternative
> > implementation -> you can activate it in the beans.xml file of your
> > application).
> > (however, please be aware that this alternative implementation has some
> > disadvantages.)
> >
> > regards,
> > gerhard
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/3/14 Rafael Pestano <rm...@yahoo.com.br>
> >
> > > Hi Gerhard, i successfuly added codi and openwebbeans to an application
> > > running on weblogic 11g
> > >
> > > however its a  legacy application which uses frames, basicaly we have a
> > > menu on the left frame that targets the center frame, something like:
> > >
> > > <h:commandLink value="menuLink" action="#{myBean.init}"
> target="frmDados"
> > > />
> > >
> > >
> > > the problem is, when a add CODI to the application and mark myBean as
> > > ViewAccessScoped (and thus the windowId starts to be append to the url)
> > > the above menuLink always open the center frame in a new browser tab.
> > >
> > > If i remove CODI and set myBean as RequestScoped(or any other CDI
> Scope)
> > > the application behaves  as expected.
> > >
> > > So i think the windowId generated by CODI  is causing this issue, i
> tried
> > > your solution without success, the windowId isnt removed from the url
> > and a
> > > new tab opens when i click in the menuLink.
> > >
> > > Any thoughs?
> > >
> > >
> > > thanks for all your help.
> > >
> > >
> > >
> > > Att,
> > >
> > > Rafael M. Pestano
> > >
> > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > > Graduando em Ciência da Computação UFRGS
> > > @realpestano
> > > http://code.google.com/p/jsf-conventions-framework/
> > >
> > >
> > >
> > > ________________________________
> > > De: Gerhard Petracek <ge...@gmail.com>
> > > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > > Enviadas: Sexta-feira, 9 de Março de 2012 12:38
> > > Assunto: Re: MyFaces and CODI
> > >
> > > hi stephen,
> > >
> > > that's right [1] doesn't support it.
> > > werner committed his improvement and you can try [2] and [3] as you see
> > > them right now.
> > >
> > > regards,
> > > gerhard
> > >
> > > [1]
> > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > [2] http://s.apache.org/rr
> > > [3] http://s.apache.org/23p
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2012/3/9 Stephen More <st...@gmail.com>
> > >
> > > > I was referring to [1]
> > > >
> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > > >
> > > > I guess I just need to wait until the correct way is tested and
> > > > documented in the wiki using:
> > > >   [1] http://s.apache.org/rr
> > > >  [2] http://s.apache.org/23p
> > > >
> > > >
> > > >
> > > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
> > > > <ge...@gmail.com> wrote:
> > > > > @ mark:
> > > > > i just tested it and it works with [1] in combination
> > > > > with ClientSideWindowHandler [2].
> > > > >
> > > > > regards,
> > > > > gerhard
> > > > >
> > > > > [1] http://s.apache.org/rr
> > > > > [2] http://s.apache.org/23p
> > > > >
> > > > > http://www.irian.at
> > > > >
> > > > > Your JSF/JavaEE powerhouse -
> > > > > JavaEE Consulting, Development and
> > > > > Courses in English and German
> > > > >
> > > > > Professional Support for Apache MyFaces
> > > > >
> > > > >
> > > > >
> > > > > 2012/3/9 Mark Struberg <st...@yahoo.de>
> > > > >
> > > > >> Hi Stephen!
> > > > >>
> > > > >> Well, the current approach in CODI is currently under discussion
> in
> > > the
> > > > >> JSF EG. The whole windowId stuff of CODI might end up in the
> JSF-2.2
> > > or
> > > > 2.3
> > > > >> spec.
> > > > >>
> > > > >> >T hat seems to work fine when pasting into a new empty window,
> but
> > it
> > > > >> > still allows you to copy-paste the url from one codi window to
> an
> > > > >> > existing codi window.
> > > > >>
> > > > >> Nope, because the windowhandler.js script will first check the
> > > > window.name.
> > > > >> And if this is empty/doesn't fit the windowId in the URL, then it
> > will
> > > > >> reload the page with a freshly requested windowId.
> > > > >>
> > > > >> LieGrue,
> > > > >> strub
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >> ----- Original Message -----
> > > > >> > From: Stephen More <st...@gmail.com>
> > > > >> > To: MyFaces Discussion <us...@myfaces.apache.org>
> > > > >> > Cc:
> > > > >> > Sent: Friday, March 9, 2012 1:27 PM
> > > > >> > Subject: Re: MyFaces and CODI
> > > > >> >
> > > > >> > Included in the JSF jar is META-INF/resources/javax.faces/jsf.js
> > > which
> > > > >> > enables its use by <h:outputScript name="jsf.js"
> > > > >> > library="javax.faces"
> > > > >> > target="head"/>
> > > > >> >
> > > > >> > Should windowhandler.js be moved from the examples into a core
> > > library
> > > > >> > so that it can be utilized the same way ?
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> > > > >> > <ge...@gmail.com> wrote:
> > > > >> >>  hi stephen,
> > > > >> >>
> > > > >> >>  yes - you can add a small js (see e.g. [1]) to support this
> > > > use-case.
> > > > >> >>
> > > > >> >>  regards,
> > > > >> >>  gerhard
> > > > >> >>
> > > > >> >>  [1] http://s.apache.org/YTq
> > > > >> >>
> > > > >> >>  http://www.irian.at
> > > > >> >>
> > > > >> >>  Your JSF/JavaEE powerhouse -
> > > > >> >>  JavaEE Consulting, Development and
> > > > >> >>  Courses in English and German
> > > > >> >>
> > > > >> >>  Professional Support for Apache MyFaces
> > > > >> >>
> > > > >> >>
> > > > >> >>
> > > > >> >>  2012/3/9 Stephen More <st...@gmail.com>
> > > > >> >>
> > > > >> >>>  Great. I am mainly interested in WindowScoped i.e. every
> > browser
> > > > tab
> > > > >> >>>  has its own mini-session.
> > > > >> >>>
> > > > >> >>>  I see that CODI is adding a ?windowId=595 to keep these
> > > > conversations
> > > > >> >>>  separate. If a user simply copies the url and pastes in a new
> > tab
> > > > now
> > > > >> >>>  two browser tabs are sharing the same conversation. How can I
> > > > prevent
> > > > >> >>>  this ? I want to enforce that EVERY browser tab has its own
> > > > >> >>>  conversation. Perhaps a simple error to the user saying
> > > > >> > "Sorry" or
> > > > >> >>>  start a new conversation.
> > > > >> >>>
> > > > >> >>>  -Thanks
> > > > >> >>>
> > > > >> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> > > > >> >>>  <ge...@gmail.com> wrote:
> > > > >> >>>  > hi stephen,
> > > > >> >>>  >
> > > > >> >>>  > (that's an issue with the setup of weld and not related to
> > > > >> > myfaces codi.)
> > > > >> >>>  > however, myfaces codi doesn't need this support -> if you
> > > > >> > also don't need
> > > > >> >>>  > cdi support for servlets, filters or listeners, you can run
> > the
> > > > >> >>>  application
> > > > >> >>>  > without those features.
> > > > >> >>>  >
> > > > >> >>>  > regards,
> > > > >> >>>  > gerhard
> > > > >> >>>  >
> > > > >> >>>  > http://www.irian.at
> > > > >> >>>  >
> > > > >> >>>  > Your JSF/JavaEE powerhouse -
> > > > >> >>>  > JavaEE Consulting, Development and
> > > > >> >>>  > Courses in English and German
> > > > >> >>>  >
> > > > >> >>>  > Professional Support for Apache MyFaces
> > > > >> >>>  >
> > > > >> >>>  >
> > > > >> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
> > > > >> >>>  >
> > > > >> >>>  >> I too am trying to get a simple example working. I have
> put
> > > > >> > together
> > > > >> >>>  >> this project:
> > > > >> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> > > > >> >>>  >>
> > > > >> >>>  >> mvn jetty:run-war   results in
> > > > >> >>>  >>
> > > > >> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI injection
> > will
> > > > >> > not be
> > > > >> >>>  >> available in Servlets, Filters or Listeners
> > > > >> >>>  >>
> > > > >> >>>  >> What else do I need to get this simple example working ?
> > > > >> >>>  >>
> > > > >> >>>  >> -Thanks
> > > > >> >>>  >>
> > > > >> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> > > > >> >>>  >> <ge...@gmail.com> wrote:
> > > > >> >>>  >> > hi jose,
> > > > >> >>>  >> >
> > > > >> >>>  >> > first of all: welcome @ myfaces!
> > > > >> >>>  >> >
> > > > >> >>>  >> > concrete questions are very welcome and we will improve
> > > > >> > the wiki
> > > > >> >>>  based on
> > > > >> >>>  >> > them.
> > > > >> >>>  >> >
> > > > >> >>>  >> > regards,
> > > > >> >>>  >> > gerhard
> > > > >> >>>  >> >
> > > > >> >>>  >> > http://www.irian.at
> > > > >> >>>  >> >
> > > > >> >>>  >> > Your JSF/JavaEE powerhouse -
> > > > >> >>>  >> > JavaEE Consulting, Development and
> > > > >> >>>  >> > Courses in English and German
> > > > >> >>>  >> >
> > > > >> >>>  >> > Professional Support for Apache MyFaces
> > > > >> >>>  >> >
> > > > >> >>>  >> >
> > > > >> >>>  >> >
> > > > >> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> > > > >> >>>  >> >
> > > > >> >>>  >> >> Hi im so excited to start and use MyFaces and CODI
> > > > >> > but i cant get any
> > > > >> >>>  >> >> "good" documentation in fact i only can get
> > > > >> > like 2 or 3 mini tutorial
> > > > >> >>>  >> but
> > > > >> >>>  >> >> they are really incomplete, can somebody recommend me
> > > > >> > to some
> > > > >> >>>  tutorial
> > > > >> >>>  >> or
> > > > >> >>>  >> >> book to start with *CODI *y see this is an excellent
> > > > >> > extension, im
> > > > >> >>>  >> moving
> > > > >> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
> > > > >> > extensions, please where
> > > > >> >>>  i
> > > > >> >>>  >> can
> > > > >> >>>  >> >> find value information
> > > > >> >>>  >> >>
> > > > >> >>>  >> >> The only URL where i found a little info is this:
> > > > >> >>>  >> >>
> > > > >> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
> > > > >> >>>  >> >>
> > > > >> >>>  >> >> --
> > > > >> >>>  >> >>
> > > > >> >
> > -------------------------------------------------------------------
> > > > >> >>>  >> >> *SCJA. José Luis Cetina*
> > > > >> >>>  >> >>
> > > > >> >
> > -------------------------------------------------------------------
> > > > >> >>>  >> >>
> > > > >> >>>  >>
> > > > >> >>>
> > > > >> >
> > > > >>
> > > >
> > >
> >
> >
>

Re: MyFaces and CODI

Posted by Rafael Pestano <rm...@yahoo.com.br>.
Hi Gehard,

its a stopper to us cause we are still dependent on JSF 1.2
Can i implement an alternative to org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler based on JSF 1.2? 

i see you use flash scope to span the windowId through requests in the server side solution:

if (windowId != null)
79         {
80             externalContext.getRequestMap().put(WINDOW_CONTEXT_ID_PARAMETER_KEY, windowId);
81             externalContext.getFlash().keep(WINDOW_CONTEXT_ID_PARAMETER_KEY);
82         }

if i put the windownId in the sessionMap it would still work? i think ill find hard time trying to remove the windowId from the map when user leave the page.



thanks for your help i really appreciated it.
 
Att, 
Rafael M. Pestano
Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
Graduando em Ciência da Computação UFRGS
@realpestano
http://code.google.com/p/jsf-conventions-framework/



----- Mensagem original -----
De: Gerhard Petracek <ge...@gmail.com>
Para: MyFaces Discussion <us...@myfaces.apache.org>
Cc: 
Enviadas: Quarta-feira, 14 de Março de 2012 20:55
Assunto: Re: MyFaces and CODI

hi rafael,

internally the ServerSideWindowHandler is based on the flash scope (that's
one of the mentioned disadvantages)
-> it's bound to jsf 2+ -> it is:
org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
(and you can't use the additional js.)

with some constellations you just hit the restrictions of browsers -> you
have to choose what you really need.

regards,
gerhard

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/15 Rafael Pestano <rm...@yahoo.com.br>

> i see, i have used the client side one
>
> <alternatives>
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
> </alternatives>
>
> i imagine the server side should be
>
> <alternatives>
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
> </alternatives>alright?
>
> i will test it tomorrow and give the feedback, thanks.
>
> Att,
> Rafael M. Pestano
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ----- Mensagem original -----
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Cc:
> Enviadas: Quarta-feira, 14 de Março de 2012 20:11
> Assunto: Re: MyFaces and CODI
>
> hi rafael,
>
> the easiest approach to test an alternative for this constellation is the
> activation of the ServerSideWindowHandler (it's a std. cdi @Alternative
> implementation -> you can activate it in the beans.xml file of your
> application).
> (however, please be aware that this alternative implementation has some
> disadvantages.)
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/14 Rafael Pestano <rm...@yahoo.com.br>
>
> > Hi Gerhard, i successfuly added codi and openwebbeans to an application
> > running on weblogic 11g
> >
> > however its a  legacy application which uses frames, basicaly we have a
> > menu on the left frame that targets the center frame, something like:
> >
> > <h:commandLink value="menuLink" action="#{myBean.init}" target="frmDados"
> > />
> >
> >
> > the problem is, when a add CODI to the application and mark myBean as
> > ViewAccessScoped (and thus the windowId starts to be append to the url)
> > the above menuLink always open the center frame in a new browser tab.
> >
> > If i remove CODI and set myBean as RequestScoped(or any other CDI Scope)
> > the application behaves  as expected.
> >
> > So i think the windowId generated by CODI  is causing this issue, i tried
> > your solution without success, the windowId isnt removed from the url
> and a
> > new tab opens when i click in the menuLink.
> >
> > Any thoughs?
> >
> >
> > thanks for all your help.
> >
> >
> >
> > Att,
> >
> > Rafael M. Pestano
> >
> > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > Graduando em Ciência da Computação UFRGS
> > @realpestano
> > http://code.google.com/p/jsf-conventions-framework/
> >
> >
> >
> > ________________________________
> > De: Gerhard Petracek <ge...@gmail.com>
> > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > Enviadas: Sexta-feira, 9 de Março de 2012 12:38
> > Assunto: Re: MyFaces and CODI
> >
> > hi stephen,
> >
> > that's right [1] doesn't support it.
> > werner committed his improvement and you can try [2] and [3] as you see
> > them right now.
> >
> > regards,
> > gerhard
> >
> > [1]
> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > [2] http://s.apache.org/rr
> > [3] http://s.apache.org/23p
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/3/9 Stephen More <st...@gmail.com>
> >
> > > I was referring to [1]
> > > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > >
> > > I guess I just need to wait until the correct way is tested and
> > > documented in the wiki using:
> > >   [1] http://s.apache.org/rr
> > >  [2] http://s.apache.org/23p
> > >
> > >
> > >
> > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
> > > <ge...@gmail.com> wrote:
> > > > @ mark:
> > > > i just tested it and it works with [1] in combination
> > > > with ClientSideWindowHandler [2].
> > > >
> > > > regards,
> > > > gerhard
> > > >
> > > > [1] http://s.apache.org/rr
> > > > [2] http://s.apache.org/23p
> > > >
> > > > http://www.irian.at
> > > >
> > > > Your JSF/JavaEE powerhouse -
> > > > JavaEE Consulting, Development and
> > > > Courses in English and German
> > > >
> > > > Professional Support for Apache MyFaces
> > > >
> > > >
> > > >
> > > > 2012/3/9 Mark Struberg <st...@yahoo.de>
> > > >
> > > >> Hi Stephen!
> > > >>
> > > >> Well, the current approach in CODI is currently under discussion in
> > the
> > > >> JSF EG. The whole windowId stuff of CODI might end up in the JSF-2.2
> > or
> > > 2.3
> > > >> spec.
> > > >>
> > > >> >T hat seems to work fine when pasting into a new empty window, but
> it
> > > >> > still allows you to copy-paste the url from one codi window to an
> > > >> > existing codi window.
> > > >>
> > > >> Nope, because the windowhandler.js script will first check the
> > > window.name.
> > > >> And if this is empty/doesn't fit the windowId in the URL, then it
> will
> > > >> reload the page with a freshly requested windowId.
> > > >>
> > > >> LieGrue,
> > > >> strub
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> ----- Original Message -----
> > > >> > From: Stephen More <st...@gmail.com>
> > > >> > To: MyFaces Discussion <us...@myfaces.apache.org>
> > > >> > Cc:
> > > >> > Sent: Friday, March 9, 2012 1:27 PM
> > > >> > Subject: Re: MyFaces and CODI
> > > >> >
> > > >> > Included in the JSF jar is META-INF/resources/javax.faces/jsf.js
> > which
> > > >> > enables its use by <h:outputScript name="jsf.js"
> > > >> > library="javax.faces"
> > > >> > target="head"/>
> > > >> >
> > > >> > Should windowhandler.js be moved from the examples into a core
> > library
> > > >> > so that it can be utilized the same way ?
> > > >> >
> > > >> >
> > > >> >
> > > >> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> > > >> > <ge...@gmail.com> wrote:
> > > >> >>  hi stephen,
> > > >> >>
> > > >> >>  yes - you can add a small js (see e.g. [1]) to support this
> > > use-case.
> > > >> >>
> > > >> >>  regards,
> > > >> >>  gerhard
> > > >> >>
> > > >> >>  [1] http://s.apache.org/YTq
> > > >> >>
> > > >> >>  http://www.irian.at
> > > >> >>
> > > >> >>  Your JSF/JavaEE powerhouse -
> > > >> >>  JavaEE Consulting, Development and
> > > >> >>  Courses in English and German
> > > >> >>
> > > >> >>  Professional Support for Apache MyFaces
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >>  2012/3/9 Stephen More <st...@gmail.com>
> > > >> >>
> > > >> >>>  Great. I am mainly interested in WindowScoped i.e. every
> browser
> > > tab
> > > >> >>>  has its own mini-session.
> > > >> >>>
> > > >> >>>  I see that CODI is adding a ?windowId=595 to keep these
> > > conversations
> > > >> >>>  separate. If a user simply copies the url and pastes in a new
> tab
> > > now
> > > >> >>>  two browser tabs are sharing the same conversation. How can I
> > > prevent
> > > >> >>>  this ? I want to enforce that EVERY browser tab has its own
> > > >> >>>  conversation. Perhaps a simple error to the user saying
> > > >> > "Sorry" or
> > > >> >>>  start a new conversation.
> > > >> >>>
> > > >> >>>  -Thanks
> > > >> >>>
> > > >> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> > > >> >>>  <ge...@gmail.com> wrote:
> > > >> >>>  > hi stephen,
> > > >> >>>  >
> > > >> >>>  > (that's an issue with the setup of weld and not related to
> > > >> > myfaces codi.)
> > > >> >>>  > however, myfaces codi doesn't need this support -> if you
> > > >> > also don't need
> > > >> >>>  > cdi support for servlets, filters or listeners, you can run
> the
> > > >> >>>  application
> > > >> >>>  > without those features.
> > > >> >>>  >
> > > >> >>>  > regards,
> > > >> >>>  > gerhard
> > > >> >>>  >
> > > >> >>>  > http://www.irian.at
> > > >> >>>  >
> > > >> >>>  > Your JSF/JavaEE powerhouse -
> > > >> >>>  > JavaEE Consulting, Development and
> > > >> >>>  > Courses in English and German
> > > >> >>>  >
> > > >> >>>  > Professional Support for Apache MyFaces
> > > >> >>>  >
> > > >> >>>  >
> > > >> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
> > > >> >>>  >
> > > >> >>>  >> I too am trying to get a simple example working. I have put
> > > >> > together
> > > >> >>>  >> this project:
> > > >> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> > > >> >>>  >>
> > > >> >>>  >> mvn jetty:run-war   results in
> > > >> >>>  >>
> > > >> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI injection
> will
> > > >> > not be
> > > >> >>>  >> available in Servlets, Filters or Listeners
> > > >> >>>  >>
> > > >> >>>  >> What else do I need to get this simple example working ?
> > > >> >>>  >>
> > > >> >>>  >> -Thanks
> > > >> >>>  >>
> > > >> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> > > >> >>>  >> <ge...@gmail.com> wrote:
> > > >> >>>  >> > hi jose,
> > > >> >>>  >> >
> > > >> >>>  >> > first of all: welcome @ myfaces!
> > > >> >>>  >> >
> > > >> >>>  >> > concrete questions are very welcome and we will improve
> > > >> > the wiki
> > > >> >>>  based on
> > > >> >>>  >> > them.
> > > >> >>>  >> >
> > > >> >>>  >> > regards,
> > > >> >>>  >> > gerhard
> > > >> >>>  >> >
> > > >> >>>  >> > http://www.irian.at
> > > >> >>>  >> >
> > > >> >>>  >> > Your JSF/JavaEE powerhouse -
> > > >> >>>  >> > JavaEE Consulting, Development and
> > > >> >>>  >> > Courses in English and German
> > > >> >>>  >> >
> > > >> >>>  >> > Professional Support for Apache MyFaces
> > > >> >>>  >> >
> > > >> >>>  >> >
> > > >> >>>  >> >
> > > >> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> > > >> >>>  >> >
> > > >> >>>  >> >> Hi im so excited to start and use MyFaces and CODI
> > > >> > but i cant get any
> > > >> >>>  >> >> "good" documentation in fact i only can get
> > > >> > like 2 or 3 mini tutorial
> > > >> >>>  >> but
> > > >> >>>  >> >> they are really incomplete, can somebody recommend me
> > > >> > to some
> > > >> >>>  tutorial
> > > >> >>>  >> or
> > > >> >>>  >> >> book to start with *CODI *y see this is an excellent
> > > >> > extension, im
> > > >> >>>  >> moving
> > > >> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
> > > >> > extensions, please where
> > > >> >>>  i
> > > >> >>>  >> can
> > > >> >>>  >> >> find value information
> > > >> >>>  >> >>
> > > >> >>>  >> >> The only URL where i found a little info is this:
> > > >> >>>  >> >>
> > > >> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
> > > >> >>>  >> >>
> > > >> >>>  >> >> --
> > > >> >>>  >> >>
> > > >> >
> -------------------------------------------------------------------
> > > >> >>>  >> >> *SCJA. José Luis Cetina*
> > > >> >>>  >> >>
> > > >> >
> -------------------------------------------------------------------
> > > >> >>>  >> >>
> > > >> >>>  >>
> > > >> >>>
> > > >> >
> > > >>
> > >
> >
>
>

Re: MyFaces and CODI

Posted by Gerhard Petracek <ge...@gmail.com>.
hi rafael,

internally the ServerSideWindowHandler is based on the flash scope (that's
one of the mentioned disadvantages)
-> it's bound to jsf 2+ -> it is:
org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
(and you can't use the additional js.)

with some constellations you just hit the restrictions of browsers -> you
have to choose what you really need.

regards,
gerhard

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/15 Rafael Pestano <rm...@yahoo.com.br>

> i see, i have used the client side one
>
> <alternatives>
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class>
> </alternatives>
>
> i imagine the server side should be
>
> <alternatives>
> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class>
> </alternatives>alright?
>
> i will test it tomorrow and give the feedback, thanks.
>
> Att,
> Rafael M. Pestano
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ----- Mensagem original -----
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Cc:
> Enviadas: Quarta-feira, 14 de Março de 2012 20:11
> Assunto: Re: MyFaces and CODI
>
> hi rafael,
>
> the easiest approach to test an alternative for this constellation is the
> activation of the ServerSideWindowHandler (it's a std. cdi @Alternative
> implementation -> you can activate it in the beans.xml file of your
> application).
> (however, please be aware that this alternative implementation has some
> disadvantages.)
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/14 Rafael Pestano <rm...@yahoo.com.br>
>
> > Hi Gerhard, i successfuly added codi and openwebbeans to an application
> > running on weblogic 11g
> >
> > however its a  legacy application which uses frames, basicaly we have a
> > menu on the left frame that targets the center frame, something like:
> >
> > <h:commandLink value="menuLink" action="#{myBean.init}" target="frmDados"
> > />
> >
> >
> > the problem is, when a add CODI to the application and mark myBean as
> > ViewAccessScoped (and thus the windowId starts to be append to the url)
> > the above menuLink always open the center frame in a new browser tab.
> >
> > If i remove CODI and set myBean as RequestScoped(or any other CDI Scope)
> > the application behaves  as expected.
> >
> > So i think the windowId generated by CODI  is causing this issue, i tried
> > your solution without success, the windowId isnt removed from the url
> and a
> > new tab opens when i click in the menuLink.
> >
> > Any thoughs?
> >
> >
> > thanks for all your help.
> >
> >
> >
> > Att,
> >
> > Rafael M. Pestano
> >
> > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > Graduando em Ciência da Computação UFRGS
> > @realpestano
> > http://code.google.com/p/jsf-conventions-framework/
> >
> >
> >
> > ________________________________
> > De: Gerhard Petracek <ge...@gmail.com>
> > Para: MyFaces Discussion <us...@myfaces.apache.org>
> > Enviadas: Sexta-feira, 9 de Março de 2012 12:38
> > Assunto: Re: MyFaces and CODI
> >
> > hi stephen,
> >
> > that's right [1] doesn't support it.
> > werner committed his improvement and you can try [2] and [3] as you see
> > them right now.
> >
> > regards,
> > gerhard
> >
> > [1]
> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > [2] http://s.apache.org/rr
> > [3] http://s.apache.org/23p
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/3/9 Stephen More <st...@gmail.com>
> >
> > > I was referring to [1]
> > > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> > >
> > > I guess I just need to wait until the correct way is tested and
> > > documented in the wiki using:
> > >   [1] http://s.apache.org/rr
> > >  [2] http://s.apache.org/23p
> > >
> > >
> > >
> > > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
> > > <ge...@gmail.com> wrote:
> > > > @ mark:
> > > > i just tested it and it works with [1] in combination
> > > > with ClientSideWindowHandler [2].
> > > >
> > > > regards,
> > > > gerhard
> > > >
> > > > [1] http://s.apache.org/rr
> > > > [2] http://s.apache.org/23p
> > > >
> > > > http://www.irian.at
> > > >
> > > > Your JSF/JavaEE powerhouse -
> > > > JavaEE Consulting, Development and
> > > > Courses in English and German
> > > >
> > > > Professional Support for Apache MyFaces
> > > >
> > > >
> > > >
> > > > 2012/3/9 Mark Struberg <st...@yahoo.de>
> > > >
> > > >> Hi Stephen!
> > > >>
> > > >> Well, the current approach in CODI is currently under discussion in
> > the
> > > >> JSF EG. The whole windowId stuff of CODI might end up in the JSF-2.2
> > or
> > > 2.3
> > > >> spec.
> > > >>
> > > >> >T hat seems to work fine when pasting into a new empty window, but
> it
> > > >> > still allows you to copy-paste the url from one codi window to an
> > > >> > existing codi window.
> > > >>
> > > >> Nope, because the windowhandler.js script will first check the
> > > window.name.
> > > >> And if this is empty/doesn't fit the windowId in the URL, then it
> will
> > > >> reload the page with a freshly requested windowId.
> > > >>
> > > >> LieGrue,
> > > >> strub
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> ----- Original Message -----
> > > >> > From: Stephen More <st...@gmail.com>
> > > >> > To: MyFaces Discussion <us...@myfaces.apache.org>
> > > >> > Cc:
> > > >> > Sent: Friday, March 9, 2012 1:27 PM
> > > >> > Subject: Re: MyFaces and CODI
> > > >> >
> > > >> > Included in the JSF jar is META-INF/resources/javax.faces/jsf.js
> > which
> > > >> > enables its use by <h:outputScript name="jsf.js"
> > > >> > library="javax.faces"
> > > >> > target="head"/>
> > > >> >
> > > >> > Should windowhandler.js be moved from the examples into a core
> > library
> > > >> > so that it can be utilized the same way ?
> > > >> >
> > > >> >
> > > >> >
> > > >> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> > > >> > <ge...@gmail.com> wrote:
> > > >> >>  hi stephen,
> > > >> >>
> > > >> >>  yes - you can add a small js (see e.g. [1]) to support this
> > > use-case.
> > > >> >>
> > > >> >>  regards,
> > > >> >>  gerhard
> > > >> >>
> > > >> >>  [1] http://s.apache.org/YTq
> > > >> >>
> > > >> >>  http://www.irian.at
> > > >> >>
> > > >> >>  Your JSF/JavaEE powerhouse -
> > > >> >>  JavaEE Consulting, Development and
> > > >> >>  Courses in English and German
> > > >> >>
> > > >> >>  Professional Support for Apache MyFaces
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >>  2012/3/9 Stephen More <st...@gmail.com>
> > > >> >>
> > > >> >>>  Great. I am mainly interested in WindowScoped i.e. every
> browser
> > > tab
> > > >> >>>  has its own mini-session.
> > > >> >>>
> > > >> >>>  I see that CODI is adding a ?windowId=595 to keep these
> > > conversations
> > > >> >>>  separate. If a user simply copies the url and pastes in a new
> tab
> > > now
> > > >> >>>  two browser tabs are sharing the same conversation. How can I
> > > prevent
> > > >> >>>  this ? I want to enforce that EVERY browser tab has its own
> > > >> >>>  conversation. Perhaps a simple error to the user saying
> > > >> > "Sorry" or
> > > >> >>>  start a new conversation.
> > > >> >>>
> > > >> >>>  -Thanks
> > > >> >>>
> > > >> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> > > >> >>>  <ge...@gmail.com> wrote:
> > > >> >>>  > hi stephen,
> > > >> >>>  >
> > > >> >>>  > (that's an issue with the setup of weld and not related to
> > > >> > myfaces codi.)
> > > >> >>>  > however, myfaces codi doesn't need this support -> if you
> > > >> > also don't need
> > > >> >>>  > cdi support for servlets, filters or listeners, you can run
> the
> > > >> >>>  application
> > > >> >>>  > without those features.
> > > >> >>>  >
> > > >> >>>  > regards,
> > > >> >>>  > gerhard
> > > >> >>>  >
> > > >> >>>  > http://www.irian.at
> > > >> >>>  >
> > > >> >>>  > Your JSF/JavaEE powerhouse -
> > > >> >>>  > JavaEE Consulting, Development and
> > > >> >>>  > Courses in English and German
> > > >> >>>  >
> > > >> >>>  > Professional Support for Apache MyFaces
> > > >> >>>  >
> > > >> >>>  >
> > > >> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
> > > >> >>>  >
> > > >> >>>  >> I too am trying to get a simple example working. I have put
> > > >> > together
> > > >> >>>  >> this project:
> > > >> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> > > >> >>>  >>
> > > >> >>>  >> mvn jetty:run-war   results in
> > > >> >>>  >>
> > > >> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI injection
> will
> > > >> > not be
> > > >> >>>  >> available in Servlets, Filters or Listeners
> > > >> >>>  >>
> > > >> >>>  >> What else do I need to get this simple example working ?
> > > >> >>>  >>
> > > >> >>>  >> -Thanks
> > > >> >>>  >>
> > > >> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> > > >> >>>  >> <ge...@gmail.com> wrote:
> > > >> >>>  >> > hi jose,
> > > >> >>>  >> >
> > > >> >>>  >> > first of all: welcome @ myfaces!
> > > >> >>>  >> >
> > > >> >>>  >> > concrete questions are very welcome and we will improve
> > > >> > the wiki
> > > >> >>>  based on
> > > >> >>>  >> > them.
> > > >> >>>  >> >
> > > >> >>>  >> > regards,
> > > >> >>>  >> > gerhard
> > > >> >>>  >> >
> > > >> >>>  >> > http://www.irian.at
> > > >> >>>  >> >
> > > >> >>>  >> > Your JSF/JavaEE powerhouse -
> > > >> >>>  >> > JavaEE Consulting, Development and
> > > >> >>>  >> > Courses in English and German
> > > >> >>>  >> >
> > > >> >>>  >> > Professional Support for Apache MyFaces
> > > >> >>>  >> >
> > > >> >>>  >> >
> > > >> >>>  >> >
> > > >> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> > > >> >>>  >> >
> > > >> >>>  >> >> Hi im so excited to start and use MyFaces and CODI
> > > >> > but i cant get any
> > > >> >>>  >> >> "good" documentation in fact i only can get
> > > >> > like 2 or 3 mini tutorial
> > > >> >>>  >> but
> > > >> >>>  >> >> they are really incomplete, can somebody recommend me
> > > >> > to some
> > > >> >>>  tutorial
> > > >> >>>  >> or
> > > >> >>>  >> >> book to start with *CODI *y see this is an excellent
> > > >> > extension, im
> > > >> >>>  >> moving
> > > >> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
> > > >> > extensions, please where
> > > >> >>>  i
> > > >> >>>  >> can
> > > >> >>>  >> >> find value information
> > > >> >>>  >> >>
> > > >> >>>  >> >> The only URL where i found a little info is this:
> > > >> >>>  >> >>
> > > >> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
> > > >> >>>  >> >>
> > > >> >>>  >> >> --
> > > >> >>>  >> >>
> > > >> >
> -------------------------------------------------------------------
> > > >> >>>  >> >> *SCJA. José Luis Cetina*
> > > >> >>>  >> >>
> > > >> >
> -------------------------------------------------------------------
> > > >> >>>  >> >>
> > > >> >>>  >>
> > > >> >>>
> > > >> >
> > > >>
> > >
> >
>
>

Re: MyFaces and CODI

Posted by Rafael Pestano <rm...@yahoo.com.br>.
i see, i have used the client side one 

<alternatives> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler</class> </alternatives>

i imagine the server side should be 

<alternatives> <class>org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler</class> </alternatives>alright?

i will test it tomorrow and give the feedback, thanks.
 
Att, 
Rafael M. Pestano
Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
Graduando em Ciência da Computação UFRGS
@realpestano
http://code.google.com/p/jsf-conventions-framework/



----- Mensagem original -----
De: Gerhard Petracek <ge...@gmail.com>
Para: MyFaces Discussion <us...@myfaces.apache.org>
Cc: 
Enviadas: Quarta-feira, 14 de Março de 2012 20:11
Assunto: Re: MyFaces and CODI

hi rafael,

the easiest approach to test an alternative for this constellation is the
activation of the ServerSideWindowHandler (it's a std. cdi @Alternative
implementation -> you can activate it in the beans.xml file of your
application).
(however, please be aware that this alternative implementation has some
disadvantages.)

regards,
gerhard

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/14 Rafael Pestano <rm...@yahoo.com.br>

> Hi Gerhard, i successfuly added codi and openwebbeans to an application
> running on weblogic 11g
>
> however its a  legacy application which uses frames, basicaly we have a
> menu on the left frame that targets the center frame, something like:
>
> <h:commandLink value="menuLink" action="#{myBean.init}" target="frmDados"
> />
>
>
> the problem is, when a add CODI to the application and mark myBean as
> ViewAccessScoped (and thus the windowId starts to be append to the url)
> the above menuLink always open the center frame in a new browser tab.
>
> If i remove CODI and set myBean as RequestScoped(or any other CDI Scope)
> the application behaves  as expected.
>
> So i think the windowId generated by CODI  is causing this issue, i tried
> your solution without success, the windowId isnt removed from the url and a
> new tab opens when i click in the menuLink.
>
> Any thoughs?
>
>
> thanks for all your help.
>
>
>
> Att,
>
> Rafael M. Pestano
>
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ________________________________
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Enviadas: Sexta-feira, 9 de Março de 2012 12:38
> Assunto: Re: MyFaces and CODI
>
> hi stephen,
>
> that's right [1] doesn't support it.
> werner committed his improvement and you can try [2] and [3] as you see
> them right now.
>
> regards,
> gerhard
>
> [1] http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> [2] http://s.apache.org/rr
> [3] http://s.apache.org/23p
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/9 Stephen More <st...@gmail.com>
>
> > I was referring to [1]
> > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> >
> > I guess I just need to wait until the correct way is tested and
> > documented in the wiki using:
> >   [1] http://s.apache.org/rr
> >  [2] http://s.apache.org/23p
> >
> >
> >
> > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
> > <ge...@gmail.com> wrote:
> > > @ mark:
> > > i just tested it and it works with [1] in combination
> > > with ClientSideWindowHandler [2].
> > >
> > > regards,
> > > gerhard
> > >
> > > [1] http://s.apache.org/rr
> > > [2] http://s.apache.org/23p
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2012/3/9 Mark Struberg <st...@yahoo.de>
> > >
> > >> Hi Stephen!
> > >>
> > >> Well, the current approach in CODI is currently under discussion in
> the
> > >> JSF EG. The whole windowId stuff of CODI might end up in the JSF-2.2
> or
> > 2.3
> > >> spec.
> > >>
> > >> >T hat seems to work fine when pasting into a new empty window, but it
> > >> > still allows you to copy-paste the url from one codi window to an
> > >> > existing codi window.
> > >>
> > >> Nope, because the windowhandler.js script will first check the
> > window.name.
> > >> And if this is empty/doesn't fit the windowId in the URL, then it will
> > >> reload the page with a freshly requested windowId.
> > >>
> > >> LieGrue,
> > >> strub
> > >>
> > >>
> > >>
> > >>
> > >> ----- Original Message -----
> > >> > From: Stephen More <st...@gmail.com>
> > >> > To: MyFaces Discussion <us...@myfaces.apache.org>
> > >> > Cc:
> > >> > Sent: Friday, March 9, 2012 1:27 PM
> > >> > Subject: Re: MyFaces and CODI
> > >> >
> > >> > Included in the JSF jar is META-INF/resources/javax.faces/jsf.js
> which
> > >> > enables its use by <h:outputScript name="jsf.js"
> > >> > library="javax.faces"
> > >> > target="head"/>
> > >> >
> > >> > Should windowhandler.js be moved from the examples into a core
> library
> > >> > so that it can be utilized the same way ?
> > >> >
> > >> >
> > >> >
> > >> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> > >> > <ge...@gmail.com> wrote:
> > >> >>  hi stephen,
> > >> >>
> > >> >>  yes - you can add a small js (see e.g. [1]) to support this
> > use-case.
> > >> >>
> > >> >>  regards,
> > >> >>  gerhard
> > >> >>
> > >> >>  [1] http://s.apache.org/YTq
> > >> >>
> > >> >>  http://www.irian.at
> > >> >>
> > >> >>  Your JSF/JavaEE powerhouse -
> > >> >>  JavaEE Consulting, Development and
> > >> >>  Courses in English and German
> > >> >>
> > >> >>  Professional Support for Apache MyFaces
> > >> >>
> > >> >>
> > >> >>
> > >> >>  2012/3/9 Stephen More <st...@gmail.com>
> > >> >>
> > >> >>>  Great. I am mainly interested in WindowScoped i.e. every browser
> > tab
> > >> >>>  has its own mini-session.
> > >> >>>
> > >> >>>  I see that CODI is adding a ?windowId=595 to keep these
> > conversations
> > >> >>>  separate. If a user simply copies the url and pastes in a new tab
> > now
> > >> >>>  two browser tabs are sharing the same conversation. How can I
> > prevent
> > >> >>>  this ? I want to enforce that EVERY browser tab has its own
> > >> >>>  conversation. Perhaps a simple error to the user saying
> > >> > "Sorry" or
> > >> >>>  start a new conversation.
> > >> >>>
> > >> >>>  -Thanks
> > >> >>>
> > >> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> > >> >>>  <ge...@gmail.com> wrote:
> > >> >>>  > hi stephen,
> > >> >>>  >
> > >> >>>  > (that's an issue with the setup of weld and not related to
> > >> > myfaces codi.)
> > >> >>>  > however, myfaces codi doesn't need this support -> if you
> > >> > also don't need
> > >> >>>  > cdi support for servlets, filters or listeners, you can run the
> > >> >>>  application
> > >> >>>  > without those features.
> > >> >>>  >
> > >> >>>  > regards,
> > >> >>>  > gerhard
> > >> >>>  >
> > >> >>>  > http://www.irian.at
> > >> >>>  >
> > >> >>>  > Your JSF/JavaEE powerhouse -
> > >> >>>  > JavaEE Consulting, Development and
> > >> >>>  > Courses in English and German
> > >> >>>  >
> > >> >>>  > Professional Support for Apache MyFaces
> > >> >>>  >
> > >> >>>  >
> > >> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
> > >> >>>  >
> > >> >>>  >> I too am trying to get a simple example working. I have put
> > >> > together
> > >> >>>  >> this project:
> > >> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> > >> >>>  >>
> > >> >>>  >> mvn jetty:run-war   results in
> > >> >>>  >>
> > >> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI injection will
> > >> > not be
> > >> >>>  >> available in Servlets, Filters or Listeners
> > >> >>>  >>
> > >> >>>  >> What else do I need to get this simple example working ?
> > >> >>>  >>
> > >> >>>  >> -Thanks
> > >> >>>  >>
> > >> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> > >> >>>  >> <ge...@gmail.com> wrote:
> > >> >>>  >> > hi jose,
> > >> >>>  >> >
> > >> >>>  >> > first of all: welcome @ myfaces!
> > >> >>>  >> >
> > >> >>>  >> > concrete questions are very welcome and we will improve
> > >> > the wiki
> > >> >>>  based on
> > >> >>>  >> > them.
> > >> >>>  >> >
> > >> >>>  >> > regards,
> > >> >>>  >> > gerhard
> > >> >>>  >> >
> > >> >>>  >> > http://www.irian.at
> > >> >>>  >> >
> > >> >>>  >> > Your JSF/JavaEE powerhouse -
> > >> >>>  >> > JavaEE Consulting, Development and
> > >> >>>  >> > Courses in English and German
> > >> >>>  >> >
> > >> >>>  >> > Professional Support for Apache MyFaces
> > >> >>>  >> >
> > >> >>>  >> >
> > >> >>>  >> >
> > >> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> > >> >>>  >> >
> > >> >>>  >> >> Hi im so excited to start and use MyFaces and CODI
> > >> > but i cant get any
> > >> >>>  >> >> "good" documentation in fact i only can get
> > >> > like 2 or 3 mini tutorial
> > >> >>>  >> but
> > >> >>>  >> >> they are really incomplete, can somebody recommend me
> > >> > to some
> > >> >>>  tutorial
> > >> >>>  >> or
> > >> >>>  >> >> book to start with *CODI *y see this is an excellent
> > >> > extension, im
> > >> >>>  >> moving
> > >> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
> > >> > extensions, please where
> > >> >>>  i
> > >> >>>  >> can
> > >> >>>  >> >> find value information
> > >> >>>  >> >>
> > >> >>>  >> >> The only URL where i found a little info is this:
> > >> >>>  >> >>
> > >> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
> > >> >>>  >> >>
> > >> >>>  >> >> --
> > >> >>>  >> >>
> > >> > -------------------------------------------------------------------
> > >> >>>  >> >> *SCJA. José Luis Cetina*
> > >> >>>  >> >>
> > >> > -------------------------------------------------------------------
> > >> >>>  >> >>
> > >> >>>  >>
> > >> >>>
> > >> >
> > >>
> >
>


Re: MyFaces and CODI

Posted by Gerhard Petracek <ge...@gmail.com>.
hi rafael,

the easiest approach to test an alternative for this constellation is the
activation of the ServerSideWindowHandler (it's a std. cdi @Alternative
implementation -> you can activate it in the beans.xml file of your
application).
(however, please be aware that this alternative implementation has some
disadvantages.)

regards,
gerhard

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/14 Rafael Pestano <rm...@yahoo.com.br>

> Hi Gerhard, i successfuly added codi and openwebbeans to an application
> running on weblogic 11g
>
> however its a  legacy application which uses frames, basicaly we have a
> menu on the left frame that targets the center frame, something like:
>
> <h:commandLink value="menuLink" action="#{myBean.init}" target="frmDados"
> />
>
>
> the problem is, when a add CODI to the application and mark myBean as
> ViewAccessScoped (and thus the windowId starts to be append to the url)
> the above menuLink always open the center frame in a new browser tab.
>
> If i remove CODI and set myBean as RequestScoped(or any other CDI Scope)
> the application behaves  as expected.
>
> So i think the windowId generated by CODI  is causing this issue, i tried
> your solution without success, the windowId isnt removed from the url and a
> new tab opens when i click in the menuLink.
>
> Any thoughs?
>
>
> thanks for all your help.
>
>
>
> Att,
>
> Rafael M. Pestano
>
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> ________________________________
> De: Gerhard Petracek <ge...@gmail.com>
> Para: MyFaces Discussion <us...@myfaces.apache.org>
> Enviadas: Sexta-feira, 9 de Março de 2012 12:38
> Assunto: Re: MyFaces and CODI
>
> hi stephen,
>
> that's right [1] doesn't support it.
> werner committed his improvement and you can try [2] and [3] as you see
> them right now.
>
> regards,
> gerhard
>
> [1] http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> [2] http://s.apache.org/rr
> [3] http://s.apache.org/23p
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/9 Stephen More <st...@gmail.com>
>
> > I was referring to [1]
> > http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
> >
> > I guess I just need to wait until the correct way is tested and
> > documented in the wiki using:
> >   [1] http://s.apache.org/rr
> >  [2] http://s.apache.org/23p
> >
> >
> >
> > On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
> > <ge...@gmail.com> wrote:
> > > @ mark:
> > > i just tested it and it works with [1] in combination
> > > with ClientSideWindowHandler [2].
> > >
> > > regards,
> > > gerhard
> > >
> > > [1] http://s.apache.org/rr
> > > [2] http://s.apache.org/23p
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2012/3/9 Mark Struberg <st...@yahoo.de>
> > >
> > >> Hi Stephen!
> > >>
> > >> Well, the current approach in CODI is currently under discussion in
> the
> > >> JSF EG. The whole windowId stuff of CODI might end up in the JSF-2.2
> or
> > 2.3
> > >> spec.
> > >>
> > >> >T hat seems to work fine when pasting into a new empty window, but it
> > >> > still allows you to copy-paste the url from one codi window to an
> > >> > existing codi window.
> > >>
> > >> Nope, because the windowhandler.js script will first check the
> > window.name.
> > >> And if this is empty/doesn't fit the windowId in the URL, then it will
> > >> reload the page with a freshly requested windowId.
> > >>
> > >> LieGrue,
> > >> strub
> > >>
> > >>
> > >>
> > >>
> > >> ----- Original Message -----
> > >> > From: Stephen More <st...@gmail.com>
> > >> > To: MyFaces Discussion <us...@myfaces.apache.org>
> > >> > Cc:
> > >> > Sent: Friday, March 9, 2012 1:27 PM
> > >> > Subject: Re: MyFaces and CODI
> > >> >
> > >> > Included in the JSF jar is META-INF/resources/javax.faces/jsf.js
> which
> > >> > enables its use by <h:outputScript name="jsf.js"
> > >> > library="javax.faces"
> > >> > target="head"/>
> > >> >
> > >> > Should windowhandler.js be moved from the examples into a core
> library
> > >> > so that it can be utilized the same way ?
> > >> >
> > >> >
> > >> >
> > >> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> > >> > <ge...@gmail.com> wrote:
> > >> >>  hi stephen,
> > >> >>
> > >> >>  yes - you can add a small js (see e.g. [1]) to support this
> > use-case.
> > >> >>
> > >> >>  regards,
> > >> >>  gerhard
> > >> >>
> > >> >>  [1] http://s.apache.org/YTq
> > >> >>
> > >> >>  http://www.irian.at
> > >> >>
> > >> >>  Your JSF/JavaEE powerhouse -
> > >> >>  JavaEE Consulting, Development and
> > >> >>  Courses in English and German
> > >> >>
> > >> >>  Professional Support for Apache MyFaces
> > >> >>
> > >> >>
> > >> >>
> > >> >>  2012/3/9 Stephen More <st...@gmail.com>
> > >> >>
> > >> >>>  Great. I am mainly interested in WindowScoped i.e. every browser
> > tab
> > >> >>>  has its own mini-session.
> > >> >>>
> > >> >>>  I see that CODI is adding a ?windowId=595 to keep these
> > conversations
> > >> >>>  separate. If a user simply copies the url and pastes in a new tab
> > now
> > >> >>>  two browser tabs are sharing the same conversation. How can I
> > prevent
> > >> >>>  this ? I want to enforce that EVERY browser tab has its own
> > >> >>>  conversation. Perhaps a simple error to the user saying
> > >> > "Sorry" or
> > >> >>>  start a new conversation.
> > >> >>>
> > >> >>>  -Thanks
> > >> >>>
> > >> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> > >> >>>  <ge...@gmail.com> wrote:
> > >> >>>  > hi stephen,
> > >> >>>  >
> > >> >>>  > (that's an issue with the setup of weld and not related to
> > >> > myfaces codi.)
> > >> >>>  > however, myfaces codi doesn't need this support -> if you
> > >> > also don't need
> > >> >>>  > cdi support for servlets, filters or listeners, you can run the
> > >> >>>  application
> > >> >>>  > without those features.
> > >> >>>  >
> > >> >>>  > regards,
> > >> >>>  > gerhard
> > >> >>>  >
> > >> >>>  > http://www.irian.at
> > >> >>>  >
> > >> >>>  > Your JSF/JavaEE powerhouse -
> > >> >>>  > JavaEE Consulting, Development and
> > >> >>>  > Courses in English and German
> > >> >>>  >
> > >> >>>  > Professional Support for Apache MyFaces
> > >> >>>  >
> > >> >>>  >
> > >> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
> > >> >>>  >
> > >> >>>  >> I too am trying to get a simple example working. I have put
> > >> > together
> > >> >>>  >> this project:
> > >> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> > >> >>>  >>
> > >> >>>  >> mvn jetty:run-war   results in
> > >> >>>  >>
> > >> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI injection will
> > >> > not be
> > >> >>>  >> available in Servlets, Filters or Listeners
> > >> >>>  >>
> > >> >>>  >> What else do I need to get this simple example working ?
> > >> >>>  >>
> > >> >>>  >> -Thanks
> > >> >>>  >>
> > >> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> > >> >>>  >> <ge...@gmail.com> wrote:
> > >> >>>  >> > hi jose,
> > >> >>>  >> >
> > >> >>>  >> > first of all: welcome @ myfaces!
> > >> >>>  >> >
> > >> >>>  >> > concrete questions are very welcome and we will improve
> > >> > the wiki
> > >> >>>  based on
> > >> >>>  >> > them.
> > >> >>>  >> >
> > >> >>>  >> > regards,
> > >> >>>  >> > gerhard
> > >> >>>  >> >
> > >> >>>  >> > http://www.irian.at
> > >> >>>  >> >
> > >> >>>  >> > Your JSF/JavaEE powerhouse -
> > >> >>>  >> > JavaEE Consulting, Development and
> > >> >>>  >> > Courses in English and German
> > >> >>>  >> >
> > >> >>>  >> > Professional Support for Apache MyFaces
> > >> >>>  >> >
> > >> >>>  >> >
> > >> >>>  >> >
> > >> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> > >> >>>  >> >
> > >> >>>  >> >> Hi im so excited to start and use MyFaces and CODI
> > >> > but i cant get any
> > >> >>>  >> >> "good" documentation in fact i only can get
> > >> > like 2 or 3 mini tutorial
> > >> >>>  >> but
> > >> >>>  >> >> they are really incomplete, can somebody recommend me
> > >> > to some
> > >> >>>  tutorial
> > >> >>>  >> or
> > >> >>>  >> >> book to start with *CODI *y see this is an excellent
> > >> > extension, im
> > >> >>>  >> moving
> > >> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
> > >> > extensions, please where
> > >> >>>  i
> > >> >>>  >> can
> > >> >>>  >> >> find value information
> > >> >>>  >> >>
> > >> >>>  >> >> The only URL where i found a little info is this:
> > >> >>>  >> >>
> > >> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
> > >> >>>  >> >>
> > >> >>>  >> >> --
> > >> >>>  >> >>
> > >> > -------------------------------------------------------------------
> > >> >>>  >> >> *SCJA. José Luis Cetina*
> > >> >>>  >> >>
> > >> > -------------------------------------------------------------------
> > >> >>>  >> >>
> > >> >>>  >>
> > >> >>>
> > >> >
> > >>
> >
>

Re: MyFaces and CODI

Posted by Rafael Pestano <rm...@yahoo.com.br>.
Hi Gerhard, i successfuly added codi and openwebbeans to an application running on weblogic 11g

however its a  legacy application which uses frames, basicaly we have a menu on the left frame that targets the center frame, something like:

<h:commandLink value="menuLink" action="#{myBean.init}" target="frmDados" />


the problem is, when a add CODI to the application and mark myBean as ViewAccessScoped (and thus the windowId starts to be append to the url) 
the above menuLink always open the center frame in a new browser tab.

If i remove CODI and set myBean as RequestScoped(or any other CDI Scope) the application behaves  as expected.

So i think the windowId generated by CODI  is causing this issue, i tried your solution without success, the windowId isnt removed from the url and a new tab opens when i click in the menuLink.

Any thoughs?


thanks for all your help.



Att, 

Rafael M. Pestano

Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
Graduando em Ciência da Computação UFRGS
@realpestano
http://code.google.com/p/jsf-conventions-framework/



________________________________
De: Gerhard Petracek <ge...@gmail.com>
Para: MyFaces Discussion <us...@myfaces.apache.org> 
Enviadas: Sexta-feira, 9 de Março de 2012 12:38
Assunto: Re: MyFaces and CODI

hi stephen,

that's right [1] doesn't support it.
werner committed his improvement and you can try [2] and [3] as you see
them right now.

regards,
gerhard

[1] http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
[2] http://s.apache.org/rr
[3] http://s.apache.org/23p

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/9 Stephen More <st...@gmail.com>

> I was referring to [1]
> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
>
> I guess I just need to wait until the correct way is tested and
> documented in the wiki using:
>   [1] http://s.apache.org/rr
>  [2] http://s.apache.org/23p
>
>
>
> On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
> <ge...@gmail.com> wrote:
> > @ mark:
> > i just tested it and it works with [1] in combination
> > with ClientSideWindowHandler [2].
> >
> > regards,
> > gerhard
> >
> > [1] http://s.apache.org/rr
> > [2] http://s.apache.org/23p
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/3/9 Mark Struberg <st...@yahoo.de>
> >
> >> Hi Stephen!
> >>
> >> Well, the current approach in CODI is currently under discussion in the
> >> JSF EG. The whole windowId stuff of CODI might end up in the JSF-2.2 or
> 2.3
> >> spec.
> >>
> >> >T hat seems to work fine when pasting into a new empty window, but it
> >> > still allows you to copy-paste the url from one codi window to an
> >> > existing codi window.
> >>
> >> Nope, because the windowhandler.js script will first check the
> window.name.
> >> And if this is empty/doesn't fit the windowId in the URL, then it will
> >> reload the page with a freshly requested windowId.
> >>
> >> LieGrue,
> >> strub
> >>
> >>
> >>
> >>
> >> ----- Original Message -----
> >> > From: Stephen More <st...@gmail.com>
> >> > To: MyFaces Discussion <us...@myfaces.apache.org>
> >> > Cc:
> >> > Sent: Friday, March 9, 2012 1:27 PM
> >> > Subject: Re: MyFaces and CODI
> >> >
> >> > Included in the JSF jar is META-INF/resources/javax.faces/jsf.js which
> >> > enables its use by <h:outputScript name="jsf.js"
> >> > library="javax.faces"
> >> > target="head"/>
> >> >
> >> > Should windowhandler.js be moved from the examples into a core library
> >> > so that it can be utilized the same way ?
> >> >
> >> >
> >> >
> >> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> >> > <ge...@gmail.com> wrote:
> >> >>  hi stephen,
> >> >>
> >> >>  yes - you can add a small js (see e.g. [1]) to support this
> use-case.
> >> >>
> >> >>  regards,
> >> >>  gerhard
> >> >>
> >> >>  [1] http://s.apache.org/YTq
> >> >>
> >> >>  http://www.irian.at
> >> >>
> >> >>  Your JSF/JavaEE powerhouse -
> >> >>  JavaEE Consulting, Development and
> >> >>  Courses in English and German
> >> >>
> >> >>  Professional Support for Apache MyFaces
> >> >>
> >> >>
> >> >>
> >> >>  2012/3/9 Stephen More <st...@gmail.com>
> >> >>
> >> >>>  Great. I am mainly interested in WindowScoped i.e. every browser
> tab
> >> >>>  has its own mini-session.
> >> >>>
> >> >>>  I see that CODI is adding a ?windowId=595 to keep these
> conversations
> >> >>>  separate. If a user simply copies the url and pastes in a new tab
> now
> >> >>>  two browser tabs are sharing the same conversation. How can I
> prevent
> >> >>>  this ? I want to enforce that EVERY browser tab has its own
> >> >>>  conversation. Perhaps a simple error to the user saying
> >> > "Sorry" or
> >> >>>  start a new conversation.
> >> >>>
> >> >>>  -Thanks
> >> >>>
> >> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> >> >>>  <ge...@gmail.com> wrote:
> >> >>>  > hi stephen,
> >> >>>  >
> >> >>>  > (that's an issue with the setup of weld and not related to
> >> > myfaces codi.)
> >> >>>  > however, myfaces codi doesn't need this support -> if you
> >> > also don't need
> >> >>>  > cdi support for servlets, filters or listeners, you can run the
> >> >>>  application
> >> >>>  > without those features.
> >> >>>  >
> >> >>>  > regards,
> >> >>>  > gerhard
> >> >>>  >
> >> >>>  > http://www.irian.at
> >> >>>  >
> >> >>>  > Your JSF/JavaEE powerhouse -
> >> >>>  > JavaEE Consulting, Development and
> >> >>>  > Courses in English and German
> >> >>>  >
> >> >>>  > Professional Support for Apache MyFaces
> >> >>>  >
> >> >>>  >
> >> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
> >> >>>  >
> >> >>>  >> I too am trying to get a simple example working. I have put
> >> > together
> >> >>>  >> this project:
> >> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> >> >>>  >>
> >> >>>  >> mvn jetty:run-war   results in
> >> >>>  >>
> >> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI injection will
> >> > not be
> >> >>>  >> available in Servlets, Filters or Listeners
> >> >>>  >>
> >> >>>  >> What else do I need to get this simple example working ?
> >> >>>  >>
> >> >>>  >> -Thanks
> >> >>>  >>
> >> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> >> >>>  >> <ge...@gmail.com> wrote:
> >> >>>  >> > hi jose,
> >> >>>  >> >
> >> >>>  >> > first of all: welcome @ myfaces!
> >> >>>  >> >
> >> >>>  >> > concrete questions are very welcome and we will improve
> >> > the wiki
> >> >>>  based on
> >> >>>  >> > them.
> >> >>>  >> >
> >> >>>  >> > regards,
> >> >>>  >> > gerhard
> >> >>>  >> >
> >> >>>  >> > http://www.irian.at
> >> >>>  >> >
> >> >>>  >> > Your JSF/JavaEE powerhouse -
> >> >>>  >> > JavaEE Consulting, Development and
> >> >>>  >> > Courses in English and German
> >> >>>  >> >
> >> >>>  >> > Professional Support for Apache MyFaces
> >> >>>  >> >
> >> >>>  >> >
> >> >>>  >> >
> >> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> >> >>>  >> >
> >> >>>  >> >> Hi im so excited to start and use MyFaces and CODI
> >> > but i cant get any
> >> >>>  >> >> "good" documentation in fact i only can get
> >> > like 2 or 3 mini tutorial
> >> >>>  >> but
> >> >>>  >> >> they are really incomplete, can somebody recommend me
> >> > to some
> >> >>>  tutorial
> >> >>>  >> or
> >> >>>  >> >> book to start with *CODI *y see this is an excellent
> >> > extension, im
> >> >>>  >> moving
> >> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
> >> > extensions, please where
> >> >>>  i
> >> >>>  >> can
> >> >>>  >> >> find value information
> >> >>>  >> >>
> >> >>>  >> >> The only URL where i found a little info is this:
> >> >>>  >> >>
> >> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
> >> >>>  >> >>
> >> >>>  >> >> --
> >> >>>  >> >>
> >> > -------------------------------------------------------------------
> >> >>>  >> >> *SCJA. José Luis Cetina*
> >> >>>  >> >>
> >> > -------------------------------------------------------------------
> >> >>>  >> >>
> >> >>>  >>
> >> >>>
> >> >
> >>
> 

Re: MyFaces and CODI

Posted by Gerhard Petracek <ge...@gmail.com>.
hi stephen,

that's right [1] doesn't support it.
werner committed his improvement and you can try [2] and [3] as you see
them right now.

regards,
gerhard

[1] http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
[2] http://s.apache.org/rr
[3] http://s.apache.org/23p

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/9 Stephen More <st...@gmail.com>

> I was referring to [1]
> http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html
>
> I guess I just need to wait until the correct way is tested and
> documented in the wiki using:
>   [1] http://s.apache.org/rr
>  [2] http://s.apache.org/23p
>
>
>
> On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
> <ge...@gmail.com> wrote:
> > @ mark:
> > i just tested it and it works with [1] in combination
> > with ClientSideWindowHandler [2].
> >
> > regards,
> > gerhard
> >
> > [1] http://s.apache.org/rr
> > [2] http://s.apache.org/23p
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/3/9 Mark Struberg <st...@yahoo.de>
> >
> >> Hi Stephen!
> >>
> >> Well, the current approach in CODI is currently under discussion in the
> >> JSF EG. The whole windowId stuff of CODI might end up in the JSF-2.2 or
> 2.3
> >> spec.
> >>
> >> >T hat seems to work fine when pasting into a new empty window, but it
> >> > still allows you to copy-paste the url from one codi window to an
> >> > existing codi window.
> >>
> >> Nope, because the windowhandler.js script will first check the
> window.name.
> >> And if this is empty/doesn't fit the windowId in the URL, then it will
> >> reload the page with a freshly requested windowId.
> >>
> >> LieGrue,
> >> strub
> >>
> >>
> >>
> >>
> >> ----- Original Message -----
> >> > From: Stephen More <st...@gmail.com>
> >> > To: MyFaces Discussion <us...@myfaces.apache.org>
> >> > Cc:
> >> > Sent: Friday, March 9, 2012 1:27 PM
> >> > Subject: Re: MyFaces and CODI
> >> >
> >> > Included in the JSF jar is META-INF/resources/javax.faces/jsf.js which
> >> > enables its use by <h:outputScript name="jsf.js"
> >> > library="javax.faces"
> >> > target="head"/>
> >> >
> >> > Should windowhandler.js be moved from the examples into a core library
> >> > so that it can be utilized the same way ?
> >> >
> >> >
> >> >
> >> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> >> > <ge...@gmail.com> wrote:
> >> >>  hi stephen,
> >> >>
> >> >>  yes - you can add a small js (see e.g. [1]) to support this
> use-case.
> >> >>
> >> >>  regards,
> >> >>  gerhard
> >> >>
> >> >>  [1] http://s.apache.org/YTq
> >> >>
> >> >>  http://www.irian.at
> >> >>
> >> >>  Your JSF/JavaEE powerhouse -
> >> >>  JavaEE Consulting, Development and
> >> >>  Courses in English and German
> >> >>
> >> >>  Professional Support for Apache MyFaces
> >> >>
> >> >>
> >> >>
> >> >>  2012/3/9 Stephen More <st...@gmail.com>
> >> >>
> >> >>>  Great. I am mainly interested in WindowScoped i.e. every browser
> tab
> >> >>>  has its own mini-session.
> >> >>>
> >> >>>  I see that CODI is adding a ?windowId=595 to keep these
> conversations
> >> >>>  separate. If a user simply copies the url and pastes in a new tab
> now
> >> >>>  two browser tabs are sharing the same conversation. How can I
> prevent
> >> >>>  this ? I want to enforce that EVERY browser tab has its own
> >> >>>  conversation. Perhaps a simple error to the user saying
> >> > "Sorry" or
> >> >>>  start a new conversation.
> >> >>>
> >> >>>  -Thanks
> >> >>>
> >> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> >> >>>  <ge...@gmail.com> wrote:
> >> >>>  > hi stephen,
> >> >>>  >
> >> >>>  > (that's an issue with the setup of weld and not related to
> >> > myfaces codi.)
> >> >>>  > however, myfaces codi doesn't need this support -> if you
> >> > also don't need
> >> >>>  > cdi support for servlets, filters or listeners, you can run the
> >> >>>  application
> >> >>>  > without those features.
> >> >>>  >
> >> >>>  > regards,
> >> >>>  > gerhard
> >> >>>  >
> >> >>>  > http://www.irian.at
> >> >>>  >
> >> >>>  > Your JSF/JavaEE powerhouse -
> >> >>>  > JavaEE Consulting, Development and
> >> >>>  > Courses in English and German
> >> >>>  >
> >> >>>  > Professional Support for Apache MyFaces
> >> >>>  >
> >> >>>  >
> >> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
> >> >>>  >
> >> >>>  >> I too am trying to get a simple example working. I have put
> >> > together
> >> >>>  >> this project:
> >> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> >> >>>  >>
> >> >>>  >> mvn jetty:run-war   results in
> >> >>>  >>
> >> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI injection will
> >> > not be
> >> >>>  >> available in Servlets, Filters or Listeners
> >> >>>  >>
> >> >>>  >> What else do I need to get this simple example working ?
> >> >>>  >>
> >> >>>  >> -Thanks
> >> >>>  >>
> >> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> >> >>>  >> <ge...@gmail.com> wrote:
> >> >>>  >> > hi jose,
> >> >>>  >> >
> >> >>>  >> > first of all: welcome @ myfaces!
> >> >>>  >> >
> >> >>>  >> > concrete questions are very welcome and we will improve
> >> > the wiki
> >> >>>  based on
> >> >>>  >> > them.
> >> >>>  >> >
> >> >>>  >> > regards,
> >> >>>  >> > gerhard
> >> >>>  >> >
> >> >>>  >> > http://www.irian.at
> >> >>>  >> >
> >> >>>  >> > Your JSF/JavaEE powerhouse -
> >> >>>  >> > JavaEE Consulting, Development and
> >> >>>  >> > Courses in English and German
> >> >>>  >> >
> >> >>>  >> > Professional Support for Apache MyFaces
> >> >>>  >> >
> >> >>>  >> >
> >> >>>  >> >
> >> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> >> >>>  >> >
> >> >>>  >> >> Hi im so excited to start and use MyFaces and CODI
> >> > but i cant get any
> >> >>>  >> >> "good" documentation in fact i only can get
> >> > like 2 or 3 mini tutorial
> >> >>>  >> but
> >> >>>  >> >> they are really incomplete, can somebody recommend me
> >> > to some
> >> >>>  tutorial
> >> >>>  >> or
> >> >>>  >> >> book to start with *CODI *y see this is an excellent
> >> > extension, im
> >> >>>  >> moving
> >> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
> >> > extensions, please where
> >> >>>  i
> >> >>>  >> can
> >> >>>  >> >> find value information
> >> >>>  >> >>
> >> >>>  >> >> The only URL where i found a little info is this:
> >> >>>  >> >>
> >> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
> >> >>>  >> >>
> >> >>>  >> >> --
> >> >>>  >> >>
> >> > -------------------------------------------------------------------
> >> >>>  >> >> *SCJA. José Luis Cetina*
> >> >>>  >> >>
> >> > -------------------------------------------------------------------
> >> >>>  >> >>
> >> >>>  >>
> >> >>>
> >> >
> >>
>

Re: MyFaces and CODI

Posted by Stephen More <st...@gmail.com>.
I was referring to [1]
http://old.nabble.com/-CODI--lazy-windowId-drop-script-p31654496.html

I guess I just need to wait until the correct way is tested and
documented in the wiki using:
  [1] http://s.apache.org/rr
  [2] http://s.apache.org/23p



On Fri, Mar 9, 2012 at 9:20 AM, Gerhard Petracek
<ge...@gmail.com> wrote:
> @ mark:
> i just tested it and it works with [1] in combination
> with ClientSideWindowHandler [2].
>
> regards,
> gerhard
>
> [1] http://s.apache.org/rr
> [2] http://s.apache.org/23p
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/9 Mark Struberg <st...@yahoo.de>
>
>> Hi Stephen!
>>
>> Well, the current approach in CODI is currently under discussion in the
>> JSF EG. The whole windowId stuff of CODI might end up in the JSF-2.2 or 2.3
>> spec.
>>
>> >T hat seems to work fine when pasting into a new empty window, but it
>> > still allows you to copy-paste the url from one codi window to an
>> > existing codi window.
>>
>> Nope, because the windowhandler.js script will first check the window.name.
>> And if this is empty/doesn't fit the windowId in the URL, then it will
>> reload the page with a freshly requested windowId.
>>
>> LieGrue,
>> strub
>>
>>
>>
>>
>> ----- Original Message -----
>> > From: Stephen More <st...@gmail.com>
>> > To: MyFaces Discussion <us...@myfaces.apache.org>
>> > Cc:
>> > Sent: Friday, March 9, 2012 1:27 PM
>> > Subject: Re: MyFaces and CODI
>> >
>> > Included in the JSF jar is META-INF/resources/javax.faces/jsf.js which
>> > enables its use by <h:outputScript name="jsf.js"
>> > library="javax.faces"
>> > target="head"/>
>> >
>> > Should windowhandler.js be moved from the examples into a core library
>> > so that it can be utilized the same way ?
>> >
>> >
>> >
>> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
>> > <ge...@gmail.com> wrote:
>> >>  hi stephen,
>> >>
>> >>  yes - you can add a small js (see e.g. [1]) to support this use-case.
>> >>
>> >>  regards,
>> >>  gerhard
>> >>
>> >>  [1] http://s.apache.org/YTq
>> >>
>> >>  http://www.irian.at
>> >>
>> >>  Your JSF/JavaEE powerhouse -
>> >>  JavaEE Consulting, Development and
>> >>  Courses in English and German
>> >>
>> >>  Professional Support for Apache MyFaces
>> >>
>> >>
>> >>
>> >>  2012/3/9 Stephen More <st...@gmail.com>
>> >>
>> >>>  Great. I am mainly interested in WindowScoped i.e. every browser tab
>> >>>  has its own mini-session.
>> >>>
>> >>>  I see that CODI is adding a ?windowId=595 to keep these conversations
>> >>>  separate. If a user simply copies the url and pastes in a new tab now
>> >>>  two browser tabs are sharing the same conversation. How can I prevent
>> >>>  this ? I want to enforce that EVERY browser tab has its own
>> >>>  conversation. Perhaps a simple error to the user saying
>> > "Sorry" or
>> >>>  start a new conversation.
>> >>>
>> >>>  -Thanks
>> >>>
>> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
>> >>>  <ge...@gmail.com> wrote:
>> >>>  > hi stephen,
>> >>>  >
>> >>>  > (that's an issue with the setup of weld and not related to
>> > myfaces codi.)
>> >>>  > however, myfaces codi doesn't need this support -> if you
>> > also don't need
>> >>>  > cdi support for servlets, filters or listeners, you can run the
>> >>>  application
>> >>>  > without those features.
>> >>>  >
>> >>>  > regards,
>> >>>  > gerhard
>> >>>  >
>> >>>  > http://www.irian.at
>> >>>  >
>> >>>  > Your JSF/JavaEE powerhouse -
>> >>>  > JavaEE Consulting, Development and
>> >>>  > Courses in English and German
>> >>>  >
>> >>>  > Professional Support for Apache MyFaces
>> >>>  >
>> >>>  >
>> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
>> >>>  >
>> >>>  >> I too am trying to get a simple example working. I have put
>> > together
>> >>>  >> this project:
>> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
>> >>>  >>
>> >>>  >> mvn jetty:run-war   results in
>> >>>  >>
>> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI injection will
>> > not be
>> >>>  >> available in Servlets, Filters or Listeners
>> >>>  >>
>> >>>  >> What else do I need to get this simple example working ?
>> >>>  >>
>> >>>  >> -Thanks
>> >>>  >>
>> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
>> >>>  >> <ge...@gmail.com> wrote:
>> >>>  >> > hi jose,
>> >>>  >> >
>> >>>  >> > first of all: welcome @ myfaces!
>> >>>  >> >
>> >>>  >> > concrete questions are very welcome and we will improve
>> > the wiki
>> >>>  based on
>> >>>  >> > them.
>> >>>  >> >
>> >>>  >> > regards,
>> >>>  >> > gerhard
>> >>>  >> >
>> >>>  >> > http://www.irian.at
>> >>>  >> >
>> >>>  >> > Your JSF/JavaEE powerhouse -
>> >>>  >> > JavaEE Consulting, Development and
>> >>>  >> > Courses in English and German
>> >>>  >> >
>> >>>  >> > Professional Support for Apache MyFaces
>> >>>  >> >
>> >>>  >> >
>> >>>  >> >
>> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
>> >>>  >> >
>> >>>  >> >> Hi im so excited to start and use MyFaces and CODI
>> > but i cant get any
>> >>>  >> >> "good" documentation in fact i only can get
>> > like 2 or 3 mini tutorial
>> >>>  >> but
>> >>>  >> >> they are really incomplete, can somebody recommend me
>> > to some
>> >>>  tutorial
>> >>>  >> or
>> >>>  >> >> book to start with *CODI *y see this is an excellent
>> > extension, im
>> >>>  >> moving
>> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
>> > extensions, please where
>> >>>  i
>> >>>  >> can
>> >>>  >> >> find value information
>> >>>  >> >>
>> >>>  >> >> The only URL where i found a little info is this:
>> >>>  >> >>
>> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
>> >>>  >> >>
>> >>>  >> >> --
>> >>>  >> >>
>> > -------------------------------------------------------------------
>> >>>  >> >> *SCJA. José Luis Cetina*
>> >>>  >> >>
>> > -------------------------------------------------------------------
>> >>>  >> >>
>> >>>  >>
>> >>>
>> >
>>

Re: MyFaces and CODI

Posted by Gerhard Petracek <ge...@gmail.com>.
@ mark:
i just tested it and it works with [1] in combination
with ClientSideWindowHandler [2].

regards,
gerhard

[1] http://s.apache.org/rr
[2] http://s.apache.org/23p

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/9 Mark Struberg <st...@yahoo.de>

> Hi Stephen!
>
> Well, the current approach in CODI is currently under discussion in the
> JSF EG. The whole windowId stuff of CODI might end up in the JSF-2.2 or 2.3
> spec.
>
> >T hat seems to work fine when pasting into a new empty window, but it
> > still allows you to copy-paste the url from one codi window to an
> > existing codi window.
>
> Nope, because the windowhandler.js script will first check the window.name.
> And if this is empty/doesn't fit the windowId in the URL, then it will
> reload the page with a freshly requested windowId.
>
> LieGrue,
> strub
>
>
>
>
> ----- Original Message -----
> > From: Stephen More <st...@gmail.com>
> > To: MyFaces Discussion <us...@myfaces.apache.org>
> > Cc:
> > Sent: Friday, March 9, 2012 1:27 PM
> > Subject: Re: MyFaces and CODI
> >
> > Included in the JSF jar is META-INF/resources/javax.faces/jsf.js which
> > enables its use by <h:outputScript name="jsf.js"
> > library="javax.faces"
> > target="head"/>
> >
> > Should windowhandler.js be moved from the examples into a core library
> > so that it can be utilized the same way ?
> >
> >
> >
> > On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> > <ge...@gmail.com> wrote:
> >>  hi stephen,
> >>
> >>  yes - you can add a small js (see e.g. [1]) to support this use-case.
> >>
> >>  regards,
> >>  gerhard
> >>
> >>  [1] http://s.apache.org/YTq
> >>
> >>  http://www.irian.at
> >>
> >>  Your JSF/JavaEE powerhouse -
> >>  JavaEE Consulting, Development and
> >>  Courses in English and German
> >>
> >>  Professional Support for Apache MyFaces
> >>
> >>
> >>
> >>  2012/3/9 Stephen More <st...@gmail.com>
> >>
> >>>  Great. I am mainly interested in WindowScoped i.e. every browser tab
> >>>  has its own mini-session.
> >>>
> >>>  I see that CODI is adding a ?windowId=595 to keep these conversations
> >>>  separate. If a user simply copies the url and pastes in a new tab now
> >>>  two browser tabs are sharing the same conversation. How can I prevent
> >>>  this ? I want to enforce that EVERY browser tab has its own
> >>>  conversation. Perhaps a simple error to the user saying
> > "Sorry" or
> >>>  start a new conversation.
> >>>
> >>>  -Thanks
> >>>
> >>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> >>>  <ge...@gmail.com> wrote:
> >>>  > hi stephen,
> >>>  >
> >>>  > (that's an issue with the setup of weld and not related to
> > myfaces codi.)
> >>>  > however, myfaces codi doesn't need this support -> if you
> > also don't need
> >>>  > cdi support for servlets, filters or listeners, you can run the
> >>>  application
> >>>  > without those features.
> >>>  >
> >>>  > regards,
> >>>  > gerhard
> >>>  >
> >>>  > http://www.irian.at
> >>>  >
> >>>  > Your JSF/JavaEE powerhouse -
> >>>  > JavaEE Consulting, Development and
> >>>  > Courses in English and German
> >>>  >
> >>>  > Professional Support for Apache MyFaces
> >>>  >
> >>>  >
> >>>  > 2012/3/9 Stephen More <st...@gmail.com>
> >>>  >
> >>>  >> I too am trying to get a simple example working. I have put
> > together
> >>>  >> this project:
> > http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> >>>  >>
> >>>  >> mvn jetty:run-war   results in
> >>>  >>
> >>>  >> SEVERE: Unable to create JettyWeldInjector. CDI injection will
> > not be
> >>>  >> available in Servlets, Filters or Listeners
> >>>  >>
> >>>  >> What else do I need to get this simple example working ?
> >>>  >>
> >>>  >> -Thanks
> >>>  >>
> >>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> >>>  >> <ge...@gmail.com> wrote:
> >>>  >> > hi jose,
> >>>  >> >
> >>>  >> > first of all: welcome @ myfaces!
> >>>  >> >
> >>>  >> > concrete questions are very welcome and we will improve
> > the wiki
> >>>  based on
> >>>  >> > them.
> >>>  >> >
> >>>  >> > regards,
> >>>  >> > gerhard
> >>>  >> >
> >>>  >> > http://www.irian.at
> >>>  >> >
> >>>  >> > Your JSF/JavaEE powerhouse -
> >>>  >> > JavaEE Consulting, Development and
> >>>  >> > Courses in English and German
> >>>  >> >
> >>>  >> > Professional Support for Apache MyFaces
> >>>  >> >
> >>>  >> >
> >>>  >> >
> >>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> >>>  >> >
> >>>  >> >> Hi im so excited to start and use MyFaces and CODI
> > but i cant get any
> >>>  >> >> "good" documentation in fact i only can get
> > like 2 or 3 mini tutorial
> >>>  >> but
> >>>  >> >> they are really incomplete, can somebody recommend me
> > to some
> >>>  tutorial
> >>>  >> or
> >>>  >> >> book to start with *CODI *y see this is an excellent
> > extension, im
> >>>  >> moving
> >>>  >> >> from mojarra and CDI to MyFaces and MyFaces
> > extensions, please where
> >>>  i
> >>>  >> can
> >>>  >> >> find value information
> >>>  >> >>
> >>>  >> >> The only URL where i found a little info is this:
> >>>  >> >>
> > https://cwiki.apache.org/confluence/display/EXTCDI/Index
> >>>  >> >>
> >>>  >> >> --
> >>>  >> >>
> > -------------------------------------------------------------------
> >>>  >> >> *SCJA. José Luis Cetina*
> >>>  >> >>
> > -------------------------------------------------------------------
> >>>  >> >>
> >>>  >>
> >>>
> >
>

Re: MyFaces and CODI

Posted by Mark Struberg <st...@yahoo.de>.
Hi Stephen!

Well, the current approach in CODI is currently under discussion in the JSF EG. The whole windowId stuff of CODI might end up in the JSF-2.2 or 2.3 spec. 

>T hat seems to work fine when pasting into a new empty window, but it
> still allows you to copy-paste the url from one codi window to an
> existing codi window.

Nope, because the windowhandler.js script will first check the window.name. And if this is empty/doesn't fit the windowId in the URL, then it will reload the page with a freshly requested windowId.

LieGrue,
strub




----- Original Message -----
> From: Stephen More <st...@gmail.com>
> To: MyFaces Discussion <us...@myfaces.apache.org>
> Cc: 
> Sent: Friday, March 9, 2012 1:27 PM
> Subject: Re: MyFaces and CODI
> 
> Included in the JSF jar is META-INF/resources/javax.faces/jsf.js which
> enables its use by <h:outputScript name="jsf.js" 
> library="javax.faces"
> target="head"/>
> 
> Should windowhandler.js be moved from the examples into a core library
> so that it can be utilized the same way ?
> 
> 
> 
> On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
> <ge...@gmail.com> wrote:
>>  hi stephen,
>> 
>>  yes - you can add a small js (see e.g. [1]) to support this use-case.
>> 
>>  regards,
>>  gerhard
>> 
>>  [1] http://s.apache.org/YTq
>> 
>>  http://www.irian.at
>> 
>>  Your JSF/JavaEE powerhouse -
>>  JavaEE Consulting, Development and
>>  Courses in English and German
>> 
>>  Professional Support for Apache MyFaces
>> 
>> 
>> 
>>  2012/3/9 Stephen More <st...@gmail.com>
>> 
>>>  Great. I am mainly interested in WindowScoped i.e. every browser tab
>>>  has its own mini-session.
>>> 
>>>  I see that CODI is adding a ?windowId=595 to keep these conversations
>>>  separate. If a user simply copies the url and pastes in a new tab now
>>>  two browser tabs are sharing the same conversation. How can I prevent
>>>  this ? I want to enforce that EVERY browser tab has its own
>>>  conversation. Perhaps a simple error to the user saying 
> "Sorry" or
>>>  start a new conversation.
>>> 
>>>  -Thanks
>>> 
>>>  On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
>>>  <ge...@gmail.com> wrote:
>>>  > hi stephen,
>>>  >
>>>  > (that's an issue with the setup of weld and not related to 
> myfaces codi.)
>>>  > however, myfaces codi doesn't need this support -> if you 
> also don't need
>>>  > cdi support for servlets, filters or listeners, you can run the
>>>  application
>>>  > without those features.
>>>  >
>>>  > regards,
>>>  > gerhard
>>>  >
>>>  > http://www.irian.at
>>>  >
>>>  > Your JSF/JavaEE powerhouse -
>>>  > JavaEE Consulting, Development and
>>>  > Courses in English and German
>>>  >
>>>  > Professional Support for Apache MyFaces
>>>  >
>>>  >
>>>  > 2012/3/9 Stephen More <st...@gmail.com>
>>>  >
>>>  >> I too am trying to get a simple example working. I have put 
> together
>>>  >> this project: 
> http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
>>>  >>
>>>  >> mvn jetty:run-war   results in
>>>  >>
>>>  >> SEVERE: Unable to create JettyWeldInjector. CDI injection will 
> not be
>>>  >> available in Servlets, Filters or Listeners
>>>  >>
>>>  >> What else do I need to get this simple example working ?
>>>  >>
>>>  >> -Thanks
>>>  >>
>>>  >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
>>>  >> <ge...@gmail.com> wrote:
>>>  >> > hi jose,
>>>  >> >
>>>  >> > first of all: welcome @ myfaces!
>>>  >> >
>>>  >> > concrete questions are very welcome and we will improve 
> the wiki
>>>  based on
>>>  >> > them.
>>>  >> >
>>>  >> > regards,
>>>  >> > gerhard
>>>  >> >
>>>  >> > http://www.irian.at
>>>  >> >
>>>  >> > Your JSF/JavaEE powerhouse -
>>>  >> > JavaEE Consulting, Development and
>>>  >> > Courses in English and German
>>>  >> >
>>>  >> > Professional Support for Apache MyFaces
>>>  >> >
>>>  >> >
>>>  >> >
>>>  >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
>>>  >> >
>>>  >> >> Hi im so excited to start and use MyFaces and CODI 
> but i cant get any
>>>  >> >> "good" documentation in fact i only can get 
> like 2 or 3 mini tutorial
>>>  >> but
>>>  >> >> they are really incomplete, can somebody recommend me 
> to some
>>>  tutorial
>>>  >> or
>>>  >> >> book to start with *CODI *y see this is an excellent 
> extension, im
>>>  >> moving
>>>  >> >> from mojarra and CDI to MyFaces and MyFaces 
> extensions, please where
>>>  i
>>>  >> can
>>>  >> >> find value information
>>>  >> >>
>>>  >> >> The only URL where i found a little info is this:
>>>  >> >> 
> https://cwiki.apache.org/confluence/display/EXTCDI/Index
>>>  >> >>
>>>  >> >> --
>>>  >> >> 
> -------------------------------------------------------------------
>>>  >> >> *SCJA. José Luis Cetina*
>>>  >> >> 
> -------------------------------------------------------------------
>>>  >> >>
>>>  >>
>>> 
> 

Re: MyFaces and CODI

Posted by Stephen More <st...@gmail.com>.
Included in the JSF jar is META-INF/resources/javax.faces/jsf.js which
enables its use by <h:outputScript name="jsf.js" library="javax.faces"
target="head"/>

Should windowhandler.js be moved from the examples into a core library
so that it can be utilized the same way ?



On Fri, Mar 9, 2012 at 7:10 AM, Gerhard Petracek
<ge...@gmail.com> wrote:
> hi stephen,
>
> yes - you can add a small js (see e.g. [1]) to support this use-case.
>
> regards,
> gerhard
>
> [1] http://s.apache.org/YTq
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/9 Stephen More <st...@gmail.com>
>
>> Great. I am mainly interested in WindowScoped i.e. every browser tab
>> has its own mini-session.
>>
>> I see that CODI is adding a ?windowId=595 to keep these conversations
>> separate. If a user simply copies the url and pastes in a new tab now
>> two browser tabs are sharing the same conversation. How can I prevent
>> this ? I want to enforce that EVERY browser tab has its own
>> conversation. Perhaps a simple error to the user saying "Sorry" or
>> start a new conversation.
>>
>> -Thanks
>>
>> On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
>> <ge...@gmail.com> wrote:
>> > hi stephen,
>> >
>> > (that's an issue with the setup of weld and not related to myfaces codi.)
>> > however, myfaces codi doesn't need this support -> if you also don't need
>> > cdi support for servlets, filters or listeners, you can run the
>> application
>> > without those features.
>> >
>> > regards,
>> > gerhard
>> >
>> > http://www.irian.at
>> >
>> > Your JSF/JavaEE powerhouse -
>> > JavaEE Consulting, Development and
>> > Courses in English and German
>> >
>> > Professional Support for Apache MyFaces
>> >
>> >
>> > 2012/3/9 Stephen More <st...@gmail.com>
>> >
>> >> I too am trying to get a simple example working. I have put together
>> >> this project: http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
>> >>
>> >> mvn jetty:run-war   results in
>> >>
>> >> SEVERE: Unable to create JettyWeldInjector. CDI injection will not be
>> >> available in Servlets, Filters or Listeners
>> >>
>> >> What else do I need to get this simple example working ?
>> >>
>> >> -Thanks
>> >>
>> >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
>> >> <ge...@gmail.com> wrote:
>> >> > hi jose,
>> >> >
>> >> > first of all: welcome @ myfaces!
>> >> >
>> >> > concrete questions are very welcome and we will improve the wiki
>> based on
>> >> > them.
>> >> >
>> >> > regards,
>> >> > gerhard
>> >> >
>> >> > http://www.irian.at
>> >> >
>> >> > Your JSF/JavaEE powerhouse -
>> >> > JavaEE Consulting, Development and
>> >> > Courses in English and German
>> >> >
>> >> > Professional Support for Apache MyFaces
>> >> >
>> >> >
>> >> >
>> >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
>> >> >
>> >> >> Hi im so excited to start and use MyFaces and CODI but i cant get any
>> >> >> "good" documentation in fact i only can get like 2 or 3 mini tutorial
>> >> but
>> >> >> they are really incomplete, can somebody recommend me to some
>> tutorial
>> >> or
>> >> >> book to start with *CODI *y see this is an excellent extension, im
>> >> moving
>> >> >> from mojarra and CDI to MyFaces and MyFaces extensions, please where
>> i
>> >> can
>> >> >> find value information
>> >> >>
>> >> >> The only URL where i found a little info is this:
>> >> >> https://cwiki.apache.org/confluence/display/EXTCDI/Index
>> >> >>
>> >> >> --
>> >> >> -------------------------------------------------------------------
>> >> >> *SCJA. José Luis Cetina*
>> >> >> -------------------------------------------------------------------
>> >> >>
>> >>
>>

Re: MyFaces and CODI

Posted by Gerhard Petracek <ge...@gmail.com>.
hi stephen,

yes - you can add a small js (see e.g. [1]) to support this use-case.

regards,
gerhard

[1] http://s.apache.org/YTq

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/9 Stephen More <st...@gmail.com>

> Great. I am mainly interested in WindowScoped i.e. every browser tab
> has its own mini-session.
>
> I see that CODI is adding a ?windowId=595 to keep these conversations
> separate. If a user simply copies the url and pastes in a new tab now
> two browser tabs are sharing the same conversation. How can I prevent
> this ? I want to enforce that EVERY browser tab has its own
> conversation. Perhaps a simple error to the user saying "Sorry" or
> start a new conversation.
>
> -Thanks
>
> On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
> <ge...@gmail.com> wrote:
> > hi stephen,
> >
> > (that's an issue with the setup of weld and not related to myfaces codi.)
> > however, myfaces codi doesn't need this support -> if you also don't need
> > cdi support for servlets, filters or listeners, you can run the
> application
> > without those features.
> >
> > regards,
> > gerhard
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> > 2012/3/9 Stephen More <st...@gmail.com>
> >
> >> I too am trying to get a simple example working. I have put together
> >> this project: http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
> >>
> >> mvn jetty:run-war   results in
> >>
> >> SEVERE: Unable to create JettyWeldInjector. CDI injection will not be
> >> available in Servlets, Filters or Listeners
> >>
> >> What else do I need to get this simple example working ?
> >>
> >> -Thanks
> >>
> >> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> >> <ge...@gmail.com> wrote:
> >> > hi jose,
> >> >
> >> > first of all: welcome @ myfaces!
> >> >
> >> > concrete questions are very welcome and we will improve the wiki
> based on
> >> > them.
> >> >
> >> > regards,
> >> > gerhard
> >> >
> >> > http://www.irian.at
> >> >
> >> > Your JSF/JavaEE powerhouse -
> >> > JavaEE Consulting, Development and
> >> > Courses in English and German
> >> >
> >> > Professional Support for Apache MyFaces
> >> >
> >> >
> >> >
> >> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> >> >
> >> >> Hi im so excited to start and use MyFaces and CODI but i cant get any
> >> >> "good" documentation in fact i only can get like 2 or 3 mini tutorial
> >> but
> >> >> they are really incomplete, can somebody recommend me to some
> tutorial
> >> or
> >> >> book to start with *CODI *y see this is an excellent extension, im
> >> moving
> >> >> from mojarra and CDI to MyFaces and MyFaces extensions, please where
> i
> >> can
> >> >> find value information
> >> >>
> >> >> The only URL where i found a little info is this:
> >> >> https://cwiki.apache.org/confluence/display/EXTCDI/Index
> >> >>
> >> >> --
> >> >> -------------------------------------------------------------------
> >> >> *SCJA. José Luis Cetina*
> >> >> -------------------------------------------------------------------
> >> >>
> >>
>

Re: MyFaces and CODI

Posted by Stephen More <st...@gmail.com>.
Great. I am mainly interested in WindowScoped i.e. every browser tab
has its own mini-session.

I see that CODI is adding a ?windowId=595 to keep these conversations
separate. If a user simply copies the url and pastes in a new tab now
two browser tabs are sharing the same conversation. How can I prevent
this ? I want to enforce that EVERY browser tab has its own
conversation. Perhaps a simple error to the user saying "Sorry" or
start a new conversation.

-Thanks

On Fri, Mar 9, 2012 at 3:18 AM, Gerhard Petracek
<ge...@gmail.com> wrote:
> hi stephen,
>
> (that's an issue with the setup of weld and not related to myfaces codi.)
> however, myfaces codi doesn't need this support -> if you also don't need
> cdi support for servlets, filters or listeners, you can run the application
> without those features.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> 2012/3/9 Stephen More <st...@gmail.com>
>
>> I too am trying to get a simple example working. I have put together
>> this project: http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
>>
>> mvn jetty:run-war   results in
>>
>> SEVERE: Unable to create JettyWeldInjector. CDI injection will not be
>> available in Servlets, Filters or Listeners
>>
>> What else do I need to get this simple example working ?
>>
>> -Thanks
>>
>> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
>> <ge...@gmail.com> wrote:
>> > hi jose,
>> >
>> > first of all: welcome @ myfaces!
>> >
>> > concrete questions are very welcome and we will improve the wiki based on
>> > them.
>> >
>> > regards,
>> > gerhard
>> >
>> > http://www.irian.at
>> >
>> > Your JSF/JavaEE powerhouse -
>> > JavaEE Consulting, Development and
>> > Courses in English and German
>> >
>> > Professional Support for Apache MyFaces
>> >
>> >
>> >
>> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
>> >
>> >> Hi im so excited to start and use MyFaces and CODI but i cant get any
>> >> "good" documentation in fact i only can get like 2 or 3 mini tutorial
>> but
>> >> they are really incomplete, can somebody recommend me to some tutorial
>> or
>> >> book to start with *CODI *y see this is an excellent extension, im
>> moving
>> >> from mojarra and CDI to MyFaces and MyFaces extensions, please where i
>> can
>> >> find value information
>> >>
>> >> The only URL where i found a little info is this:
>> >> https://cwiki.apache.org/confluence/display/EXTCDI/Index
>> >>
>> >> --
>> >> -------------------------------------------------------------------
>> >> *SCJA. José Luis Cetina*
>> >> -------------------------------------------------------------------
>> >>
>>

Re: MyFaces and CODI

Posted by Gerhard Petracek <ge...@gmail.com>.
hi stephen,

(that's an issue with the setup of weld and not related to myfaces codi.)
however, myfaces codi doesn't need this support -> if you also don't need
cdi support for servlets, filters or listeners, you can run the application
without those features.

regards,
gerhard

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


2012/3/9 Stephen More <st...@gmail.com>

> I too am trying to get a simple example working. I have put together
> this project: http://maven-examples.googlecode.com/svn/trunk/jsf-codi/
>
> mvn jetty:run-war   results in
>
> SEVERE: Unable to create JettyWeldInjector. CDI injection will not be
> available in Servlets, Filters or Listeners
>
> What else do I need to get this simple example working ?
>
> -Thanks
>
> On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
> <ge...@gmail.com> wrote:
> > hi jose,
> >
> > first of all: welcome @ myfaces!
> >
> > concrete questions are very welcome and we will improve the wiki based on
> > them.
> >
> > regards,
> > gerhard
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/3/8 José Luis Cetina <ma...@gmail.com>
> >
> >> Hi im so excited to start and use MyFaces and CODI but i cant get any
> >> "good" documentation in fact i only can get like 2 or 3 mini tutorial
> but
> >> they are really incomplete, can somebody recommend me to some tutorial
> or
> >> book to start with *CODI *y see this is an excellent extension, im
> moving
> >> from mojarra and CDI to MyFaces and MyFaces extensions, please where i
> can
> >> find value information
> >>
> >> The only URL where i found a little info is this:
> >> https://cwiki.apache.org/confluence/display/EXTCDI/Index
> >>
> >> --
> >> -------------------------------------------------------------------
> >> *SCJA. José Luis Cetina*
> >> -------------------------------------------------------------------
> >>
>

Re: MyFaces and CODI

Posted by Stephen More <st...@gmail.com>.
I too am trying to get a simple example working. I have put together
this project: http://maven-examples.googlecode.com/svn/trunk/jsf-codi/

mvn jetty:run-war   results in

SEVERE: Unable to create JettyWeldInjector. CDI injection will not be
available in Servlets, Filters or Listeners

What else do I need to get this simple example working ?

-Thanks

On Thu, Mar 8, 2012 at 11:07 AM, Gerhard Petracek
<ge...@gmail.com> wrote:
> hi jose,
>
> first of all: welcome @ myfaces!
>
> concrete questions are very welcome and we will improve the wiki based on
> them.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/8 José Luis Cetina <ma...@gmail.com>
>
>> Hi im so excited to start and use MyFaces and CODI but i cant get any
>> "good" documentation in fact i only can get like 2 or 3 mini tutorial but
>> they are really incomplete, can somebody recommend me to some tutorial or
>> book to start with *CODI *y see this is an excellent extension, im moving
>> from mojarra and CDI to MyFaces and MyFaces extensions, please where i can
>> find value information
>>
>> The only URL where i found a little info is this:
>> https://cwiki.apache.org/confluence/display/EXTCDI/Index
>>
>> --
>> -------------------------------------------------------------------
>> *SCJA. José Luis Cetina*
>> -------------------------------------------------------------------
>>

Re: MyFaces and CODI

Posted by Gerhard Petracek <ge...@gmail.com>.
hi jose,

first of all: welcome @ myfaces!

concrete questions are very welcome and we will improve the wiki based on
them.

regards,
gerhard

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/3/8 José Luis Cetina <ma...@gmail.com>

> Hi im so excited to start and use MyFaces and CODI but i cant get any
> "good" documentation in fact i only can get like 2 or 3 mini tutorial but
> they are really incomplete, can somebody recommend me to some tutorial or
> book to start with *CODI *y see this is an excellent extension, im moving
> from mojarra and CDI to MyFaces and MyFaces extensions, please where i can
> find value information
>
> The only URL where i found a little info is this:
> https://cwiki.apache.org/confluence/display/EXTCDI/Index
>
> --
> -------------------------------------------------------------------
> *SCJA. José Luis Cetina*
> -------------------------------------------------------------------
>