myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerhard Petracek <gerhard.petra...@gmail.com>
Subject Re: MyFaces and CODI
Date Wed, 14 Mar 2012 23:11:20 GMT
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 <rmpestano@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 <gerhard.petracek@gmail.com>
> Para: MyFaces Discussion <users@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 <stephen.more@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
> > <gerhard.petracek@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 <struberg@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 <stephen.more@gmail.com>
> > >> > To: MyFaces Discussion <users@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
> > >> > <gerhard.petracek@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 <stephen.more@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
> > >> >>>  <gerhard.petracek@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 <stephen.more@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
> > >> >>>  >> <gerhard.petracek@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 <maxtorzito@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*
> > >> >>>  >> >>
> > >> > -------------------------------------------------------------------
> > >> >>>  >> >>
> > >> >>>  >>
> > >> >>>
> > >> >
> > >>
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message