Re: MyFaces and CODI

2012-03-15 Thread Rafael Pestano
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 
Para: MyFaces Discussion 
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 

> 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  ?
>
> 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 
> Para: MyFaces Discussion 
> 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 
>
> > 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 
> >                         
> >                     
> >
> > 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 
> > Para: MyFaces Discussion 
> > 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 
> > Para: MyFaces Discussion 
> > 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 i

Re: [CODI] ThreadScoped / EntityManager in a new Thread

2012-03-15 Thread Thomas Andraschko
Hi,

thanks for your both answers!

DeltaSpike sounds great but i would like to wait for an CODI release which
is based on DeltaSpike.

TransactionScoped sounds good. So if i add the @Transactional annotation on
a method, the Transactional context will be shared to all sub methods?
Then i must also add @Trasnaction to my controller action or
actionListener, so that only one EntityManager is created per request?

Isn't it possible to introduce an @ThreadScoped? It would work like an
RequestScoped for requests and can be used via threads, too. Or will a
thread shared between multiple requests (like with ASP.Net)?

Regards,
Thomas

2012/3/15 Gerhard Petracek 

> hi mark,
>
> i agree with you, however, it depends on the implementation (in the
> application) - in some cases @TransactionScoped is enough.
>
> 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 Mark Struberg 
>
> > Hi Thomas!
> >
> > Well, we had this problem as well in a Quartz scheduler Extension. And
> > this did lead to the CdiControl approach implemented in OpenWebBeans Test
> > and now moved to DeltaSpike cdise [1]. Please note that this is not yet
> > finished, but will be soon!
> >
> > The functionality is currently in one API but will be split into two
> > interfaces.
> >
> > The first one provides the control to container-independently start and
> > stop the whole container (OWB or Weld) which can be used to boot CDI in a
> > JavaSE environment without having any implementation specific code in
> your
> > project.
> >
> > The second part (I still need to factor this out) will give you the
> > ability to start and stop contexts in respect to the current thread.
> > This will again be container independent and hides all the complexity
> from
> > the user.
> >
> > I hope to be able to finish this work on the weekend (I'm currently
> pretty
> > busy at $$dayjob in a C project)
> >
> > LieGrue,
> > strub
> >
> > [1]
> >
> https://git-wip-us.apache.org/repos/asf?p=incubator-deltaspike.git;a=blob;f=deltaspike/cdise/api/src/main/java/org/apache/deltaspike/cdise/api/CdiContainer.java;h=dc8be0b87f4d350ce0539eec2a43590eeb13e88b;hb=HEAD
> >
> >
> > - Original Message -
> > > From: Thomas Andraschko 
> > > To: MyFaces Discussion 
> > > Cc:
> > > Sent: Thursday, March 15, 2012 3:08 PM
> > > Subject: [CODI] ThreadScoped / EntityManager in a new Thread
> > >
> > > Hi,
> > >
> > > In our webapp, we have an asynchronous XML sender and receiver and we
> > also
> > > need db access with transactions in this thread.
> > > Currently, our EntityManager is procuded in RequestScoped and will not
> > work
> > > in a new thread.
> > >
> > > How can i solve this?
> > > Does any ThreadScoped implementation exists?
> > >
> > > Thanks and best regards,
> > > Thomas
> > >
> >
>


Re: [CODI] ThreadScoped / EntityManager in a new Thread

2012-03-15 Thread Gerhard Petracek
agreed - that is one reason covered by:
> it depends on the implementation (in the application)

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 Mark Struberg 

> using a @TransactionScoped EM is possible, but if you already have all
> your Services using a @RequestScoped EM, then you will not come far...
>
> LieGrue,
> strub
>
>
>
> - Original Message -
> > From: Gerhard Petracek 
> > To: MyFaces Discussion 
> > Cc:
> > Sent: Thursday, March 15, 2012 3:32 PM
> > Subject: Re: [CODI] ThreadScoped / EntityManager in a new Thread
> >
> > hi thomas,
> >
> > see [1] -> you just have to switch to v1.0.4
> >
> > regards,
> > gerhard
> >
> > [1] https://issues.apache.org/jira/browse/EXTCDI-258
> >
> > 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 Thomas Andraschko 
> >
> >>  Hi,
> >>
> >>  In our webapp, we have an asynchronous XML sender and receiver and we
> also
> >>  need db access with transactions in this thread.
> >>  Currently, our EntityManager is procuded in RequestScoped and will not
> work
> >>  in a new thread.
> >>
> >>  How can i solve this?
> >>  Does any ThreadScoped implementation exists?
> >>
> >>  Thanks and best regards,
> >>  Thomas
> >>
> >
>


Re: [CODI] ThreadScoped / EntityManager in a new Thread

2012-03-15 Thread Mark Struberg
using a @TransactionScoped EM is possible, but if you already have all your 
Services using a @RequestScoped EM, then you will not come far...

LieGrue,
strub



- Original Message -
> From: Gerhard Petracek 
> To: MyFaces Discussion 
> Cc: 
> Sent: Thursday, March 15, 2012 3:32 PM
> Subject: Re: [CODI] ThreadScoped / EntityManager in a new Thread
> 
> hi thomas,
> 
> see [1] -> you just have to switch to v1.0.4
> 
> regards,
> gerhard
> 
> [1] https://issues.apache.org/jira/browse/EXTCDI-258
> 
> 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 Thomas Andraschko 
> 
>>  Hi,
>> 
>>  In our webapp, we have an asynchronous XML sender and receiver and we also
>>  need db access with transactions in this thread.
>>  Currently, our EntityManager is procuded in RequestScoped and will not work
>>  in a new thread.
>> 
>>  How can i solve this?
>>  Does any ThreadScoped implementation exists?
>> 
>>  Thanks and best regards,
>>  Thomas
>> 
> 


Re: [CODI] ThreadScoped / EntityManager in a new Thread

2012-03-15 Thread Gerhard Petracek
hi mark,

i agree with you, however, it depends on the implementation (in the
application) - in some cases @TransactionScoped is enough.

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 Mark Struberg 

> Hi Thomas!
>
> Well, we had this problem as well in a Quartz scheduler Extension. And
> this did lead to the CdiControl approach implemented in OpenWebBeans Test
> and now moved to DeltaSpike cdise [1]. Please note that this is not yet
> finished, but will be soon!
>
> The functionality is currently in one API but will be split into two
> interfaces.
>
> The first one provides the control to container-independently start and
> stop the whole container (OWB or Weld) which can be used to boot CDI in a
> JavaSE environment without having any implementation specific code in your
> project.
>
> The second part (I still need to factor this out) will give you the
> ability to start and stop contexts in respect to the current thread.
> This will again be container independent and hides all the complexity from
> the user.
>
> I hope to be able to finish this work on the weekend (I'm currently pretty
> busy at $$dayjob in a C project)
>
> LieGrue,
> strub
>
> [1]
> https://git-wip-us.apache.org/repos/asf?p=incubator-deltaspike.git;a=blob;f=deltaspike/cdise/api/src/main/java/org/apache/deltaspike/cdise/api/CdiContainer.java;h=dc8be0b87f4d350ce0539eec2a43590eeb13e88b;hb=HEAD
>
>
> - Original Message -
> > From: Thomas Andraschko 
> > To: MyFaces Discussion 
> > Cc:
> > Sent: Thursday, March 15, 2012 3:08 PM
> > Subject: [CODI] ThreadScoped / EntityManager in a new Thread
> >
> > Hi,
> >
> > In our webapp, we have an asynchronous XML sender and receiver and we
> also
> > need db access with transactions in this thread.
> > Currently, our EntityManager is procuded in RequestScoped and will not
> work
> > in a new thread.
> >
> > How can i solve this?
> > Does any ThreadScoped implementation exists?
> >
> > Thanks and best regards,
> > Thomas
> >
>


Re: [CODI] ThreadScoped / EntityManager in a new Thread

2012-03-15 Thread Gerhard Petracek
hi thomas,

see [1] -> you just have to switch to v1.0.4

regards,
gerhard

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

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 Thomas Andraschko 

> Hi,
>
> In our webapp, we have an asynchronous XML sender and receiver and we also
> need db access with transactions in this thread.
> Currently, our EntityManager is procuded in RequestScoped and will not work
> in a new thread.
>
> How can i solve this?
> Does any ThreadScoped implementation exists?
>
> Thanks and best regards,
> Thomas
>


Re: [CODI] ThreadScoped / EntityManager in a new Thread

2012-03-15 Thread Mark Struberg
Hi Thomas!

Well, we had this problem as well in a Quartz scheduler Extension. And this did 
lead to the CdiControl approach implemented in OpenWebBeans Test and now moved 
to DeltaSpike cdise [1]. Please note that this is not yet finished, but will be 
soon!

The functionality is currently in one API but will be split into two interfaces.

The first one provides the control to container-independently start and stop 
the whole container (OWB or Weld) which can be used to boot CDI in a JavaSE 
environment without having any implementation specific code in your project.

The second part (I still need to factor this out) will give you the ability to 
start and stop contexts in respect to the current thread.
This will again be container independent and hides all the complexity from the 
user.

I hope to be able to finish this work on the weekend (I'm currently pretty busy 
at $$dayjob in a C project)

LieGrue,
strub

[1] 
https://git-wip-us.apache.org/repos/asf?p=incubator-deltaspike.git;a=blob;f=deltaspike/cdise/api/src/main/java/org/apache/deltaspike/cdise/api/CdiContainer.java;h=dc8be0b87f4d350ce0539eec2a43590eeb13e88b;hb=HEAD


- Original Message -
> From: Thomas Andraschko 
> To: MyFaces Discussion 
> Cc: 
> Sent: Thursday, March 15, 2012 3:08 PM
> Subject: [CODI] ThreadScoped / EntityManager in a new Thread
> 
> Hi,
> 
> In our webapp, we have an asynchronous XML sender and receiver and we also
> need db access with transactions in this thread.
> Currently, our EntityManager is procuded in RequestScoped and will not work
> in a new thread.
> 
> How can i solve this?
> Does any ThreadScoped implementation exists?
> 
> Thanks and best regards,
> Thomas
> 


Re: MyFaces and CODI

2012-03-15 Thread Gerhard Petracek
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 

> 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  ?
>
> 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 
> Para: MyFaces Discussion 
> 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 
>
> > 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 
> > 
> > 
> >
> > 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 
> > Para: MyFaces Discussion 
> > 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 
> > Para: MyFaces Discussion 
> > 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 
> >
> > > 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

[CODI] ThreadScoped / EntityManager in a new Thread

2012-03-15 Thread Thomas Andraschko
Hi,

In our webapp, we have an asynchronous XML sender and receiver and we also
need db access with transactions in this thread.
Currently, our EntityManager is procuded in RequestScoped and will not work
in a new thread.

How can i solve this?
Does any ThreadScoped implementation exists?

Thanks and best regards,
Thomas


Re: MyFaces and CODI

2012-03-15 Thread Rafael Pestano
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  ?

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 
Para: MyFaces Discussion  
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 

> 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 
>                         
>                     
>
> 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 
> Para: MyFaces Discussion 
> 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 
> Para: MyFaces Discussion 
> 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 
>
> > 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 
> > Para: MyFaces Discussion 
> > 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 addit

Re: [Trinidad] tr:inputDate alternative

2012-03-15 Thread Walter Mourão
Hi Roland,
in fact ENABLE_LIGHTWEIGHT_DIALOGS will open a iframe... it does not use a
new window, but it opens a iframe and it has some delay to open caused by
communication with the server.

Cheers,

Walter Mourão
http://waltermourao.com.br
http://arcadian.com.br
http://oriens.com.br



On Thu, Mar 15, 2012 at 10:22 AM, Krebs Roland / BWO Systems AG <
roland.kr...@bwo.ch> wrote:

> Hi Mourao
>
> No frame will be opened anymore after setting (in web.xml):
> 
>
>  
> org.apache.myfaces.trinidad.ENABLE_LIGHTWEIGHT_DIALOGS
>true
> 
>
> That's how I'm using it.
> Roland
>
> -Ursprüngliche Nachricht-
> Von: Walter Mourão [mailto:walter.mou...@gmail.com]
> Gesendet: Donnerstag, 15. März 2012 12:56
> An: MyFaces Discussion
> Betreff: [Trinidad] tr:inputDate alternative
>
> Hi folks,
> tr:inputDate date selection works opening a new window/frame and I would
> like to use only javascript/divs. Tomahawk is an option but have some
> quirks and I would like to know if some of you have used another options...
> Please let me know you use some javascript (detached from big packages like
> jquery) to allow date selection. If I find a good option I will create a
> composite component and bring it back to the community.
>
> Thanks in advance,
>
> Walter Mourão
> http://waltermourao.com.br
> http://arcadian.com.br
> http://oriens.com.br
>


Re: MyFaces and CODI

2012-03-15 Thread Gerhard Petracek
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 

> 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 
> 
> 
>
> 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 
> Para: MyFaces Discussion 
> 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 
> Para: MyFaces Discussion 
> 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 
>
> > 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 
> > Para: MyFaces Discussion 
> > 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 
> >
> > > i see, i have used the client side one
> > >
> > > 
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler
> > > 
> > >
> > > i imagine the server side should be
> > >
> > > 
> > >
> >
> org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler
> > > 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 -

AW: [Trinidad] tr:inputDate alternative

2012-03-15 Thread Krebs Roland / BWO Systems AG
Hi Mourao

No frame will be opened anymore after setting (in web.xml):


org.apache.myfaces.trinidad.ENABLE_LIGHTWEIGHT_DIALOGS
true


That's how I'm using it.
Roland

-Ursprüngliche Nachricht-
Von: Walter Mourão [mailto:walter.mou...@gmail.com] 
Gesendet: Donnerstag, 15. März 2012 12:56
An: MyFaces Discussion
Betreff: [Trinidad] tr:inputDate alternative

Hi folks,
tr:inputDate date selection works opening a new window/frame and I would like 
to use only javascript/divs. Tomahawk is an option but have some quirks and I 
would like to know if some of you have used another options...
Please let me know you use some javascript (detached from big packages like
jquery) to allow date selection. If I find a good option I will create a 
composite component and bring it back to the community.

Thanks in advance,

Walter Mourão
http://waltermourao.com.br
http://arcadian.com.br
http://oriens.com.br


Re: MyFaces and CODI

2012-03-15 Thread Rafael Pestano
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 
                        
                    

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 
Para: MyFaces Discussion  
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 
Para: MyFaces Discussion  
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 

> 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 
> Para: MyFaces Discussion 
> 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 
>
> > i see, i have used the client side one
> >
> > 
> >
> org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler
> > 
> >
> > i imagine the server side should be
> >
> > 
> >
> org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler
> > 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 
> > Para: MyFaces Discussion 
> > 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 

[Trinidad] tr:inputDate alternative

2012-03-15 Thread Walter Mourão
Hi folks,
tr:inputDate date selection works opening a new window/frame and I would
like to use only javascript/divs. Tomahawk is an option but have some
quirks and I would like to know if some of you have used another options...
Please let me know you use some javascript (detached from big packages like
jquery) to allow date selection. If I find a good option I will create a
composite component and bring it back to the community.

Thanks in advance,

Walter Mourão
http://waltermourao.com.br
http://arcadian.com.br
http://oriens.com.br


Re: MyFaces and CODI

2012-03-15 Thread Rafael Pestano
"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 
Para: MyFaces Discussion  
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 

> 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 
> Para: MyFaces Discussion 
> 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 
>
> > i see, i have used the client side one
> >
> > 
> >
> org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ClientSideWindowHandler
> > 
> >
> > i imagine the server side should be
> >
> > 
> >
> org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ServerSideWindowHandler
> > 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 
> > Para: MyFaces Discussion 
> > 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 
> >
> > > 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:
> > >
> > >  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(

Re: how to build a JSF 2.0 (MyFaces/Facelets) Project

2012-03-15 Thread Werner Punz

Am 15.03.12 01:33, schrieb Guy Rouillier:

On 3/14/2012 12:47 PM, ayouB __ wrote:


Hello every one,

I have sent a mail before that one where i explained problems i faced
while configuring the developpement environnement, unfortunately that
let me no where i spent a lot of time trying to find a solution but i
didn't anyway thank you all for your replies and your collaboration :)
The problem now is how to create and configure a jsf project under
eclipse helios IDE, what JARs i need, how to dowload them and where
can i find them, what version, and where should i put them (in my
class path, in my web app ...).
I'm really confused and i don't know what to do ! Please Help ^_^


http://www.eclipse.org/webtools/jsf/main.php


My personal opinion is if you want to get started with JSF dont bother 
with Eclipse just use Netbeans and whatever comes bundled with it 
(Mojarra in that case). It simply is a way superior plug and play 
solution than whatever comes with Eclipse. The IDE generally is easier 
to handle for beginners and less flakey.


But thats just my 2c.
Maven etc... is a little bit to hard and given how flakey Eclipses Maven 
plugin was the last time I had a look at it I cannot recommend it.