Re: How to decrease the timeout in Jakarta EE 9.1 CDI Convesation Scope (MyFaces 3.0)

2022-09-01 Thread Thomas Andraschko
Hi,

Conversations are controlled by CDI/openwebbeans, so better ask there

fernando cesar de lima  schrieb am Do., 1.
Sept. 2022, 16:59:

> Hi, this is Fernando,
>
>
> I am using JSF 3.0 and Conversation Scope in some Managed Beans. The
> problem I am facing is to configure the timeout to expire abandoned
> conversations. The default 30 minutes is too long for my context and I need
> to set this around 10 minutes. I have tried to set the timeout using the
> conversation.setTimeout(1) method, but, even having the TomEE showing
> that the correct timeout has been settled, through the
> conversation.getTimeout(), it keeps expiring the conversation, and
> consequently destroying the managed beans, only after 30 minutes.
>
> The second approach that I have tried is to create openwebbeans.properties
> file inside the META-INF/openwebbeans directory and putting these keys:
>
>
> configuration.ordinal=101
>
> org.apache.webbeans.conversation.Conversation.timeoutInterval=1
>
>
> Again the results are the same. TomEE shows the correct timeout through the
> conversation.getTimeout() method, but keeps expiring the conversation only
> after 30 minutes.
>
>
> Following is the code that I have used to test the situation:
>
>
> package estudosjsf;
>
> import java.io.Serializable;
> import java.text.SimpleDateFormat;
> import java.util.Date;
>
> import jakarta.annotation.PostConstruct;
> import jakarta.annotation.PreDestroy;
> import jakarta.enterprise.context.Conversation;
> import jakarta.enterprise.context.ConversationScoped;
> import jakarta.inject.Inject;
> import jakarta.inject.Named;
>
> @Named
> @ConversationScoped
> public class Controller implements Serializable {
>
> private static final long serialVersionUID = 1L;
>
> private String text = "This is a simple text";
>
> @Inject
> private Conversation conversation;
>
> @PostConstruct
> public void create() {
> System.out.println("Created at " + new
> SimpleDateFormat("HH:mm:ss").format(new Date()));
> }
>
> @PreDestroy
> public void destroy() {
> System.out.println("Destroyed at " + new
> SimpleDateFormat("HH:mm:ss").format(new Date()));
> }
>
> public void begin() {
> conversation.begin();
> conversation.setTimeout(1);
> System.out.println(conversation.getTimeout());
> }
>
> public void end() {
> conversation.end();
> }
>
> public String getText() {
> return text;
> }
>
> public void setText(String text) {
> this.text = text;
> }
>
> }
>
>
> I really appreciate any help
>
> Thanks you very much
>


Re: MyFaces Release Soon?

2022-05-27 Thread Thomas Andraschko
Only 2.3-next runs in quarkus
When they migrate to Jakarta namespace, we can also port 4.0

Tony, feel free to promote it! That woumd be great! I did the plugin for
fun, i even dont use quarkus


Tony Herstell  schrieb am Do., 26. Mai 2022, 21:47:

> This sounds awesome.
>
> As a user, creating small JSF projects all the time for various
> companies, I am just saying
>I use the quarkus myfaces plugin all the time (literally every day) and
> thank you
>
> It will be interesting to see if the deployment will still be based on 2.3,
> 3 or even 4 branch?
>
> It frustrates me, in Quarkus, that I search for JSF and that's not
> mentioned (the jsf (MyFaces) plugin is found under MyFaces)
>
> Also; the plugin is stall "experimental".
>
>
>
> *MyFaces[myfaces-quarkus]EXPERIMENTALApache MyFaces Core runtime extension
> for Quarkus.*
>
> Will this be promoted at some stage afaik; its working ok and hardly
> experimental (I have it live in projects out in the wild).
>
>
> On Fri, 27 May 2022 at 03:24, Melloware  wrote:
>
> > Hello Team,
> >
> > it has been about a year since the last MyFaces releases.  Is it about
> > time to do a release?
> >
> > I know releasing is an arduous task so I understand if everyone is busy.
> >
> > Mello
> >
> >
>


Re: Huge amount of "SessionScope not active" since upgrade to 2.3.8

2021-03-08 Thread Thomas Andraschko
Yep exactly.
If that works, please create a issue and some PRs (2.2, 2.3, 3.0 and
2.3-next)

Am Mo., 8. März 2021 um 12:37 Uhr schrieb Juri Berlanda <
juri.berla...@tuwien.ac.at>:

> Hello again,
>
> thanks for the quick answer.
>
> Unfortunately, I cannot downgrade to find out if 2.3.7 caused the issue
> because - as mentioned - we only see the behavior in production, and I
> can't risk having known unpatched vulnerabilities in production.
>
> For the "test on your side if it works" part, I need to check with
> operations, but assuming it is a one-liner I can put on top a clean
> 2.3.8 I should get the waiver to have it in production.
>
> Did you think something like:
>
> diff --git
> a/impl/src/main/java/org/apache/myfaces/cdi/impl/CDIManagedBeanHandlerImpl.java
>
>
> b/impl/src/main/java/org/apache/myfaces/cdi/impl/CDIManagedBeanHandlerImpl.java
> index 66d7cf639..17ee05b4e 100644
> ---
>
> a/impl/src/main/java/org/apache/myfaces/cdi/impl/CDIManagedBeanHandlerImpl.java
> +++
>
> b/impl/src/main/java/org/apache/myfaces/cdi/impl/CDIManagedBeanHandlerImpl.java
> @@ -106,7 +106,7 @@ public class CDIManagedBeanHandlerImpl extends
> ViewScopeProvider
>   FacesContext facesContext = FacesContext.getCurrentInstance();
>   if (facesContext != null)
>   {
> -if (facesContext.getExternalContext().getSession(false) !=
> null)
> +if (facesContext.getExternalContext().getSession(false) !=
> null && CDIUtils.isSessionScopeActive(beanManager))
>   {
>   if (isViewScopeBeanHolderCreated(facesContext))
>
> Cheers,
>
> Juri
>
> On 3/5/21 2:54 PM, Thomas Andraschko wrote:
> > this is also explained here:
> >
> https://github.com/apache/myfaces/blob/2.3.x/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeBeanHolder.java#L187
> >
> > in think the CDIManagedBeanHandlerImpl.java#
> > <
> https://github.com/apache/myfaces/blob/2.3.x/impl/src/main/java/org/apache/myfaces/cdi/impl/CDIManagedBeanHandlerImpl.java#L113
> >onSessionDestroyed
> > should check if SessionScoped exists before getting the bean holders.
> > A PR would be great and a test on your side if it works.
> >
> > Am Fr., 5. März 2021 um 14:45 Uhr schrieb Thomas Andraschko <
> > andraschko.tho...@gmail.com>:
> >
> >> the problem and described is actually here:
> >>
> https://github.com/apache/myfaces/blob/2.3.x/impl/src/main/java/org/apache/myfaces/cdi/impl/CDIManagedBeanHandlerImpl.java#L113
> >>
> >> on the one hand, we rely on @PreDestroy on ViewScopeBeanHolder, on the
> >> other hand we manually invoke the
> getViewScopeBeanHolder().destroyBeans();
> >> but the ViewScopeBeanHolder is SessionScoped, which doesnt exist in
> MyFaces
> >> HttpSessionListener#onSessionDestroyed.
> >> i think thats just a bug.
> >>
> >> Am Fr., 5. März 2021 um 14:21 Uhr schrieb Thomas Andraschko <
> >> andraschko.tho...@gmail.com>:
> >>
> >>> This could be the reason:
> >>> https://issues.apache.org/jira/browse/MYFACES-4353
> >>>
> >>> Am Fr., 5. März 2021 um 14:19 Uhr schrieb Thomas Andraschko <
> >>> andraschko.tho...@gmail.com>:
> >>>
> >>>> Can you try to find the version which introduced it?
> >>>>
> >>>> Am Fr., 5. März 2021 um 13:57 Uhr schrieb Juri Berlanda <
> >>>> juri.berla...@tuwien.ac.at>:
> >>>>
> >>>>> Hello,
> >>>>>
> >>>>> we recently upgraded to MyFaces 2.3.8 due to the CSRF vulnerability
> >>>>> reported here late February. We were on 2.3.4 before. Since then we
> see
> >>>>> an insane amount (i.e. 10+ per day) of "SessionScope does not
> exist
> >>>>> within current thread" in our logs, like:
> >>>>>
> >>>>> 15:46:41.421 ERROR
> >>>>>
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/events]
> >>>>> - Session event listener threw exception
> >>>>> javax.enterprise.context.ContextNotActiveException: WebBeans context
> >>>>> with scope type annotation @SessionScoped does not exist within
> current
> >>>>> thread
> >>>>>   at
> >>>>>
> org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:329)
> >>>>>
> >>>>> ~[openwebbeans-impl.jar:2.0.12]
> >>>>>   at
> >>&g

Re: Huge amount of "SessionScope not active" since upgrade to 2.3.8

2021-03-05 Thread Thomas Andraschko
this is also explained here:
https://github.com/apache/myfaces/blob/2.3.x/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeBeanHolder.java#L187

in think the CDIManagedBeanHandlerImpl.java#
<https://github.com/apache/myfaces/blob/2.3.x/impl/src/main/java/org/apache/myfaces/cdi/impl/CDIManagedBeanHandlerImpl.java#L113>onSessionDestroyed
should check if SessionScoped exists before getting the bean holders.
A PR would be great and a test on your side if it works.

Am Fr., 5. März 2021 um 14:45 Uhr schrieb Thomas Andraschko <
andraschko.tho...@gmail.com>:

> the problem and described is actually here:
> https://github.com/apache/myfaces/blob/2.3.x/impl/src/main/java/org/apache/myfaces/cdi/impl/CDIManagedBeanHandlerImpl.java#L113
>
> on the one hand, we rely on @PreDestroy on ViewScopeBeanHolder, on the
> other hand we manually invoke the getViewScopeBeanHolder().destroyBeans();
> but the ViewScopeBeanHolder is SessionScoped, which doesnt exist in MyFaces
> HttpSessionListener#onSessionDestroyed.
> i think thats just a bug.
>
> Am Fr., 5. März 2021 um 14:21 Uhr schrieb Thomas Andraschko <
> andraschko.tho...@gmail.com>:
>
>> This could be the reason:
>> https://issues.apache.org/jira/browse/MYFACES-4353
>>
>> Am Fr., 5. März 2021 um 14:19 Uhr schrieb Thomas Andraschko <
>> andraschko.tho...@gmail.com>:
>>
>>> Can you try to find the version which introduced it?
>>>
>>> Am Fr., 5. März 2021 um 13:57 Uhr schrieb Juri Berlanda <
>>> juri.berla...@tuwien.ac.at>:
>>>
>>>> Hello,
>>>>
>>>> we recently upgraded to MyFaces 2.3.8 due to the CSRF vulnerability
>>>> reported here late February. We were on 2.3.4 before. Since then we see
>>>> an insane amount (i.e. 10+ per day) of "SessionScope does not exist
>>>> within current thread" in our logs, like:
>>>>
>>>> 15:46:41.421 ERROR
>>>> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/events]
>>>> - Session event listener threw exception
>>>> javax.enterprise.context.ContextNotActiveException: WebBeans context
>>>> with scope type annotation @SessionScoped does not exist within current
>>>> thread
>>>>  at
>>>> org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:329)
>>>>
>>>> ~[openwebbeans-impl.jar:2.0.12]
>>>>  at
>>>> org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.getContextualInstance(NormalScopedBeanInterceptorHandler.java:89)
>>>>
>>>> ~[openwebbeans-impl.jar:2.0.12]
>>>>  at
>>>> org.apache.webbeans.intercept.SessionScopedBeanInterceptorHandler.getContextualInstance(SessionScopedBeanInterceptorHandler.java:76)
>>>>
>>>> ~[openwebbeans-impl.jar:2.0.12]
>>>>  at
>>>> org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.get(NormalScopedBeanInterceptorHandler.java:71)
>>>>
>>>> ~[openwebbeans-impl.jar:2.0.12]
>>>>  at
>>>> org.apache.myfaces.cdi.view.ViewScopeBeanHolder$$OwbNormalScopeProxy2.destroyBeans(org/apache/myfaces/cdi/view/ViewScopeBeanHolder.java)
>>>>
>>>> ~[?:2.3.8]
>>>>  at
>>>> org.apache.myfaces.cdi.impl.CDIManagedBeanHandlerImpl.onSessionDestroyed(CDIManagedBeanHandlerImpl.java:113)
>>>>
>>>> ~[myfaces-impl.jar:2.3.8]
>>>>  at
>>>> org.apache.myfaces.webapp.ManagedBeanDestroyerListener.sessionDestroyed(ManagedBeanDestroyerListener.java:201)
>>>>
>>>> ~[myfaces-impl.jar:2.3.8]
>>>>  at
>>>> org.apache.catalina.session.StandardSession.expire(StandardSession.java:801)
>>>>
>>>> [catalina.jar:9.0.22]
>>>>  at
>>>> org.apache.catalina.session.StandardSession.isValid(StandardSession.java:659)
>>>>
>>>> [catalina.jar:9.0.22]
>>>>  at
>>>> org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:573)
>>>>
>>>> [catalina.jar:9.0.22]
>>>>  at
>>>> org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:558)
>>>>
>>>> [catalina.jar:9.0.22]
>>>>  at
>>>> org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:5536)
>>>>
>>>> [catalina.jar:9.0.22]
>>>>  at
>>>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.

Re: Huge amount of "SessionScope not active" since upgrade to 2.3.8

2021-03-05 Thread Thomas Andraschko
the problem and described is actually here:
https://github.com/apache/myfaces/blob/2.3.x/impl/src/main/java/org/apache/myfaces/cdi/impl/CDIManagedBeanHandlerImpl.java#L113

on the one hand, we rely on @PreDestroy on ViewScopeBeanHolder, on the
other hand we manually invoke the getViewScopeBeanHolder().destroyBeans();
but the ViewScopeBeanHolder is SessionScoped, which doesnt exist in MyFaces
HttpSessionListener#onSessionDestroyed.
i think thats just a bug.

Am Fr., 5. März 2021 um 14:21 Uhr schrieb Thomas Andraschko <
andraschko.tho...@gmail.com>:

> This could be the reason:
> https://issues.apache.org/jira/browse/MYFACES-4353
>
> Am Fr., 5. März 2021 um 14:19 Uhr schrieb Thomas Andraschko <
> andraschko.tho...@gmail.com>:
>
>> Can you try to find the version which introduced it?
>>
>> Am Fr., 5. März 2021 um 13:57 Uhr schrieb Juri Berlanda <
>> juri.berla...@tuwien.ac.at>:
>>
>>> Hello,
>>>
>>> we recently upgraded to MyFaces 2.3.8 due to the CSRF vulnerability
>>> reported here late February. We were on 2.3.4 before. Since then we see
>>> an insane amount (i.e. 10+ per day) of "SessionScope does not exist
>>> within current thread" in our logs, like:
>>>
>>> 15:46:41.421 ERROR
>>> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/events]
>>> - Session event listener threw exception
>>> javax.enterprise.context.ContextNotActiveException: WebBeans context
>>> with scope type annotation @SessionScoped does not exist within current
>>> thread
>>>  at
>>> org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:329)
>>>
>>> ~[openwebbeans-impl.jar:2.0.12]
>>>  at
>>> org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.getContextualInstance(NormalScopedBeanInterceptorHandler.java:89)
>>>
>>> ~[openwebbeans-impl.jar:2.0.12]
>>>  at
>>> org.apache.webbeans.intercept.SessionScopedBeanInterceptorHandler.getContextualInstance(SessionScopedBeanInterceptorHandler.java:76)
>>>
>>> ~[openwebbeans-impl.jar:2.0.12]
>>>  at
>>> org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.get(NormalScopedBeanInterceptorHandler.java:71)
>>>
>>> ~[openwebbeans-impl.jar:2.0.12]
>>>  at
>>> org.apache.myfaces.cdi.view.ViewScopeBeanHolder$$OwbNormalScopeProxy2.destroyBeans(org/apache/myfaces/cdi/view/ViewScopeBeanHolder.java)
>>>
>>> ~[?:2.3.8]
>>>  at
>>> org.apache.myfaces.cdi.impl.CDIManagedBeanHandlerImpl.onSessionDestroyed(CDIManagedBeanHandlerImpl.java:113)
>>>
>>> ~[myfaces-impl.jar:2.3.8]
>>>  at
>>> org.apache.myfaces.webapp.ManagedBeanDestroyerListener.sessionDestroyed(ManagedBeanDestroyerListener.java:201)
>>>
>>> ~[myfaces-impl.jar:2.3.8]
>>>  at
>>> org.apache.catalina.session.StandardSession.expire(StandardSession.java:801)
>>>
>>> [catalina.jar:9.0.22]
>>>  at
>>> org.apache.catalina.session.StandardSession.isValid(StandardSession.java:659)
>>>
>>> [catalina.jar:9.0.22]
>>>  at
>>> org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:573)
>>>
>>> [catalina.jar:9.0.22]
>>>  at
>>> org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:558)
>>>
>>> [catalina.jar:9.0.22]
>>>  at
>>> org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:5536)
>>>
>>> [catalina.jar:9.0.22]
>>>  at
>>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1353)
>>>
>>> [catalina.jar:9.0.22]
>>>  at
>>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1357)
>>>
>>> [catalina.jar:9.0.22]
>>>  at
>>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1357)
>>>
>>> [catalina.jar:9.0.22]
>>>  at
>>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1335)
>>>
>>> [catalina.jar:9.0.22]
>>>  at
>>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
>>> [?:?]
>>>  at
>>> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
>>>  at
>&g

Re: Huge amount of "SessionScope not active" since upgrade to 2.3.8

2021-03-05 Thread Thomas Andraschko
This could be the reason: https://issues.apache.org/jira/browse/MYFACES-4353

Am Fr., 5. März 2021 um 14:19 Uhr schrieb Thomas Andraschko <
andraschko.tho...@gmail.com>:

> Can you try to find the version which introduced it?
>
> Am Fr., 5. März 2021 um 13:57 Uhr schrieb Juri Berlanda <
> juri.berla...@tuwien.ac.at>:
>
>> Hello,
>>
>> we recently upgraded to MyFaces 2.3.8 due to the CSRF vulnerability
>> reported here late February. We were on 2.3.4 before. Since then we see
>> an insane amount (i.e. 10+ per day) of "SessionScope does not exist
>> within current thread" in our logs, like:
>>
>> 15:46:41.421 ERROR
>> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/events]
>> - Session event listener threw exception
>> javax.enterprise.context.ContextNotActiveException: WebBeans context
>> with scope type annotation @SessionScoped does not exist within current
>> thread
>>  at
>> org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:329)
>>
>> ~[openwebbeans-impl.jar:2.0.12]
>>  at
>> org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.getContextualInstance(NormalScopedBeanInterceptorHandler.java:89)
>>
>> ~[openwebbeans-impl.jar:2.0.12]
>>  at
>> org.apache.webbeans.intercept.SessionScopedBeanInterceptorHandler.getContextualInstance(SessionScopedBeanInterceptorHandler.java:76)
>>
>> ~[openwebbeans-impl.jar:2.0.12]
>>  at
>> org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.get(NormalScopedBeanInterceptorHandler.java:71)
>>
>> ~[openwebbeans-impl.jar:2.0.12]
>>  at
>> org.apache.myfaces.cdi.view.ViewScopeBeanHolder$$OwbNormalScopeProxy2.destroyBeans(org/apache/myfaces/cdi/view/ViewScopeBeanHolder.java)
>>
>> ~[?:2.3.8]
>>  at
>> org.apache.myfaces.cdi.impl.CDIManagedBeanHandlerImpl.onSessionDestroyed(CDIManagedBeanHandlerImpl.java:113)
>>
>> ~[myfaces-impl.jar:2.3.8]
>>  at
>> org.apache.myfaces.webapp.ManagedBeanDestroyerListener.sessionDestroyed(ManagedBeanDestroyerListener.java:201)
>>
>> ~[myfaces-impl.jar:2.3.8]
>>  at
>> org.apache.catalina.session.StandardSession.expire(StandardSession.java:801)
>>
>> [catalina.jar:9.0.22]
>>  at
>> org.apache.catalina.session.StandardSession.isValid(StandardSession.java:659)
>>
>> [catalina.jar:9.0.22]
>>  at
>> org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:573)
>>
>> [catalina.jar:9.0.22]
>>  at
>> org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:558)
>>
>> [catalina.jar:9.0.22]
>>  at
>> org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:5536)
>>
>> [catalina.jar:9.0.22]
>>  at
>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1353)
>>
>> [catalina.jar:9.0.22]
>>  at
>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1357)
>>
>> [catalina.jar:9.0.22]
>>  at
>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1357)
>>
>> [catalina.jar:9.0.22]
>>  at
>> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1335)
>>
>> [catalina.jar:9.0.22]
>>  at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
>> [?:?]
>>  at
>> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
>>  at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
>>
>> [?:?]
>>  at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>>
>> [?:?]
>>  at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>>
>> [?:?]
>>  at
>> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>>
>> [tomcat-util.jar:9.0.22]
>>  at java.lang.Thread.run(Thread.java:834) [?:?]
>>
>> We also upgraded Tomcat to 9.0.46 and OpenWebBeans to 2.0.21 trying to
>> fix the problem - without success. We are not  sure what causes the
>> issue. We assume it has something to do with expired cookies being sent
>> to the server, but we are not sure that would sum up to the amount we
>> see. Also, we can't seem to be able to reproduce it on anything but
>> production system.
>>
>> JSF stack:
>>
>>   * Tomcat 9.0.46
>>   * OpenWebBeans 2.0.21
>>   * MyFaces 2.3.8
>>   * DeltaSpike 1.9.3 (not sure if relevant)
>>
>> Any hint, help, or suggestion on debugging and narrowing down the issue
>> is very much appreciated. If more information is needed, feel free to
>> ask. I'm not sure what's relevant, so I don't really know what to add
>> here.
>>
>> Cheers,
>>
>> Juri
>>
>>


Re: Huge amount of "SessionScope not active" since upgrade to 2.3.8

2021-03-05 Thread Thomas Andraschko
Can you try to find the version which introduced it?

Am Fr., 5. März 2021 um 13:57 Uhr schrieb Juri Berlanda <
juri.berla...@tuwien.ac.at>:

> Hello,
>
> we recently upgraded to MyFaces 2.3.8 due to the CSRF vulnerability
> reported here late February. We were on 2.3.4 before. Since then we see
> an insane amount (i.e. 10+ per day) of "SessionScope does not exist
> within current thread" in our logs, like:
>
> 15:46:41.421 ERROR
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/events]
> - Session event listener threw exception
> javax.enterprise.context.ContextNotActiveException: WebBeans context
> with scope type annotation @SessionScoped does not exist within current
> thread
>  at
> org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:329)
>
> ~[openwebbeans-impl.jar:2.0.12]
>  at
> org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.getContextualInstance(NormalScopedBeanInterceptorHandler.java:89)
>
> ~[openwebbeans-impl.jar:2.0.12]
>  at
> org.apache.webbeans.intercept.SessionScopedBeanInterceptorHandler.getContextualInstance(SessionScopedBeanInterceptorHandler.java:76)
>
> ~[openwebbeans-impl.jar:2.0.12]
>  at
> org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.get(NormalScopedBeanInterceptorHandler.java:71)
>
> ~[openwebbeans-impl.jar:2.0.12]
>  at
> org.apache.myfaces.cdi.view.ViewScopeBeanHolder$$OwbNormalScopeProxy2.destroyBeans(org/apache/myfaces/cdi/view/ViewScopeBeanHolder.java)
>
> ~[?:2.3.8]
>  at
> org.apache.myfaces.cdi.impl.CDIManagedBeanHandlerImpl.onSessionDestroyed(CDIManagedBeanHandlerImpl.java:113)
>
> ~[myfaces-impl.jar:2.3.8]
>  at
> org.apache.myfaces.webapp.ManagedBeanDestroyerListener.sessionDestroyed(ManagedBeanDestroyerListener.java:201)
>
> ~[myfaces-impl.jar:2.3.8]
>  at
> org.apache.catalina.session.StandardSession.expire(StandardSession.java:801)
>
> [catalina.jar:9.0.22]
>  at
> org.apache.catalina.session.StandardSession.isValid(StandardSession.java:659)
>
> [catalina.jar:9.0.22]
>  at
> org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:573)
>
> [catalina.jar:9.0.22]
>  at
> org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:558)
>
> [catalina.jar:9.0.22]
>  at
> org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:5536)
>
> [catalina.jar:9.0.22]
>  at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1353)
>
> [catalina.jar:9.0.22]
>  at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1357)
>
> [catalina.jar:9.0.22]
>  at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1357)
>
> [catalina.jar:9.0.22]
>  at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1335)
>
> [catalina.jar:9.0.22]
>  at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> [?:?]
>  at
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
>  at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
>
> [?:?]
>  at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>
> [?:?]
>  at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>
> [?:?]
>  at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>
> [tomcat-util.jar:9.0.22]
>  at java.lang.Thread.run(Thread.java:834) [?:?]
>
> We also upgraded Tomcat to 9.0.46 and OpenWebBeans to 2.0.21 trying to
> fix the problem - without success. We are not  sure what causes the
> issue. We assume it has something to do with expired cookies being sent
> to the server, but we are not sure that would sum up to the amount we
> see. Also, we can't seem to be able to reproduce it on anything but
> production system.
>
> JSF stack:
>
>   * Tomcat 9.0.46
>   * OpenWebBeans 2.0.21
>   * MyFaces 2.3.8
>   * DeltaSpike 1.9.3 (not sure if relevant)
>
> Any hint, help, or suggestion on debugging and narrowing down the issue
> is very much appreciated. If more information is needed, feel free to
> ask. I'm not sure what's relevant, so I don't really know what to add here.
>
> Cheers,
>
> Juri
>
>


Re: using DeltaSpike and JSF2.2 ExternalContext.redirect results in two requests

2021-02-05 Thread Thomas Andraschko
In general DeltaSpike needs to verify, depending on the ClientWindowMode,
if the windowId is valid and sends a redirect.

Please come back if you know exactly where the redirect will be triggered -
AND - check the DS docs.

Am Fr., 5. Feb. 2021 um 15:07 Uhr schrieb DevNews :

> Hallo,
>
> in our web-application (JSF2.2 with DaltaSpike) we listen in a
> PhaseListener during RESTORE_VIEW on a special url. According to the
> HTTP-Post data we initialize a ViewAccessScoped bean and then redirect to a
> target url using ExternalContext.redirect(targeturl).
>
> This redirect results in two requests to the target url. Both requests
> have different instances of the ViewAccessScoped bean. For this reason the
> initialization data gets lost.
>
>
> How can a redirect be done without having two following requests?
>
>
> Before migrating from JSF1.2 to JSF2.2 and without using DeltaSpike there
> was only one request after redirecting. Threrefore we suppose that this
> effect results from deltaspike and the dswid parameter.
> For this reason we tried to extend the target url like:
> targeturl + „?dswid=“ + viewaccesscopedbean.getDswid()
> reading the dswid from deltaspike – WindowContext
>
> With this extension of the targeturl the behaviour is no more predictable.
> The redirect sometimes results in two sometimes it results in one request.
>
>
> Here our java-code:
>
>
> public class MyTestPhaseListener implements PhaseListener
> {
> /**
> * ViewAccessScoped Bean
> */
> @Inject
> MyVAccBean myVAccBean;
>
> @Override
> public void afterPhase(PhaseEvent event)
> {
> }
>
> @Override
> public void beforePhase(PhaseEvent event)
> {
> if (event.getPhaseId() == PhaseId.RESTORE_VIEW)
> {
> ExternalContext extCtx = event.getFacesContext().getExternalContext();
> HttpServletRequest request = (HttpServletRequest) extCtx.getRequest();
> String currReqUri = request.getRequestURI();
> if (currReqUri.indexOf("/initialPage.jsf") > 0)
> {
> myVAccBean.setValue("some value");
> redirectToTargetUrl(event, "targetPage.jsf");
> }
> }
> }
>
> private void redirectToTargetUrl(PhaseEvent event, String tagretUrl)
> {
> try
> {
> String encodedUrl = tagretUrl + "?dswid=" + myVAccBean.geDsWindowId();
> event.getFacesContext().getExternalContext().redirect(encodedUrl);
> }
> catch (Throwable e)
> {
> e.printStackTrace();
> }
> }
>
> @Override
> public PhaseId getPhaseId()
> {
> return PhaseId.ANY_PHASE;
> }
> }
>
>
>
> Tel:
> E-Mail: devn...@safir-wid.de
> Internet: https://www.safir-wid.de
>
> safir Wirtschaftsinformationsdienst GmbH
> Sitz der Gesellschaft: Möllendorffstr.49, 10367 Berlin
> Geschäftsführer: Thilo Kind
> Registergericht: Amtsgericht Berlin Charlottenburg, HRB 66681
> USt-ID: DE 193584747
>
>
>
>
> --
> This email was Malware checked by UTM 9. http://www.sophos.com
>


Re: Licensing info for XSD files

2020-12-03 Thread Thomas Andraschko
Hi,

maybe someone of the "older" committers can help you.
IMO its just a comment and everything should be licensed under Apache2.0.

Best regards,
Thomas


Am Mi., 2. Dez. 2020 um 15:16 Uhr schrieb Gaertner, Stefan <
sgaert...@cgs-online.de>:

> Hello,
>
> I've been tasked with looking into licensing for all FOSS components we
> use in our project and can't really figure out the licensing information
> regarding some of the XSD files in MyFaces.
>
> We are currently using MyFaces 2.2.12, but this still applies to the
> current version.
>
> Both MyFaces API and impl contain "code from Facelets (
> https://facelets.dev.java.net/) for the purpose of implementing Facelets
> PDL for JSF 2.0 support.".
>
> See:
> -
> https://github.com/apache/myfaces/blob/master/api/src/main/resources/META-INF/NOTICE.txt
> -
> https://github.com/apache/myfaces/blob/master/api/src/main/resources/META-INF/licenses/facelets-LICENSE.txt
>
> What files does this apply to?
>
> My guess is that this refers to web-facelettaglibrary_2_0.xsd, which
> appears to be licensed under Apache 2.0 and only contains a reference to
> the XSD file from Sun.
>
> The impl also contains several XSD files that refer to XSD files from Sun.
>
> See:
> -
> https://github.com/apache/myfaces/tree/master/impl/src/main/resources/org/apache/myfaces/resource
>
> Pre-2.2.10 there was a paragraph regarding the java_ee_x.xsd files in the
> NOTICE.txt.
> "This product includes schema files developed for the Glassfish Java EE
> reference implementation (http://java.sun.com/xml/ns/j2ee/). [...]".
> This has been removed in MYFACES-4024, but the files themselves still
> refer to the files from Sun.
> Some of the files seem to also have been typed in by hand to remove
> copyright restrictions (see MYFACES-1582).
>
> Are any of the XSD files still licensed under a different license than
> Apache 2.0?
>
> Regards,
>
> Stefan
>
> CGS mbH
> Consulting Gesellschaft für Systementwicklung mbH
> Lange Str. 1
> 38100 Braunschweig
> Mail i...@cgs-online.de
> www.cgs-online.de
>
> Geschäftsführer: Felix Huchzermeyer
> Amtsgericht Braunschweig, HRB-Nr. 7788
> USt-Id-Nr. De116883155
>


Re: Override the JSF Standard Converter for java.util.Date.class

2020-11-16 Thread Thomas Andraschko
Hi,

i think @FacesConverter should work the same as #addConverter.
Could you do us a favor, and check if Mojarra does the same as MyFaces?

Am Mo., 16. Nov. 2020 um 10:48 Uhr schrieb DevNews :

> Hallo,
>
> in order to convert inputs in h:inputtext from the WebPage to the class
> java.util.Date
> JSF uses the standard converter javax.faces.convert.DateTimeConverter.
> We would like to change this standard converter to my own imlementation.
> So we would not be forced to add a converter-id to every h:inputtext binded
> to a date-member.
>
> Reason for the custom converter:
> We use a database that cannot persist dates before the year 1753 and after
> the year . We would like to prevent the user writing such dates already
> from  the webpage.
>
> Because we have to deliver the app to different customers we deploy to
> WildFly13/mojarra 2.2 and WebSphhere 9.0/myfaces 2.2.
>
>
> According to my investigation I created a own converter class and
> annotated it like this:
>
> @FacesConverter(forClass = java.util.Date.class)
> public class MyDateConverter extends DateTimeConverter
> {
>
> But in this way the standard converter used by jsf was not changed.
>
>
> Then I added manually my own converter to the Application in an post
> construct method of an application scoped bean, that is created directly
> with the first request to my application:
>
> @PostConstruct
> void initAppBean()
> {
> FacesContext.getCurrentInstance().getApplication().addConverter(java.util.Date.class,
> "de.safir.web.jsf.converter.MyDateConverter");
>
> Now the standard converter used by jsf is set to my own class.
>
>
> My question:
>
> Is this the approriate way to change the standard converter class?
>
>
> Thanks,
>
> Georg
>
>
>
> Tel:
> E-Mail: devn...@safir-wid.de
> Internet: https://www.safir-wid.de
>
> safir Wirtschaftsinformationsdienst GmbH
> Sitz der Gesellschaft: Möllendorffstr.49, 10367 Berlin
> Geschäftsführer: Thilo Kind
> Registergericht: Amtsgericht Berlin Charlottenburg, HRB 66681
> USt-ID: DE 193584747
>
>
>
>
> --
> This email was Malware checked by UTM 9. http://www.sophos.com
>


[ANNOUNCE] MyFaces Core v2.3-next-M4 Release

2020-09-04 Thread Thomas Andraschko
The Apache MyFaces team is pleased to announce the release of MyFaces
Core 2.3-next-M4.

MyFaces Core is a JavaServer(tm) Faces 2.3 implementation as specified
by JSR-372.

JavaServer Faces (JSF) is a Java specification for building
component-based user interfaces for web applications.

MyFaces Core 2.3-next-M4 is available in both binary and source distributions.

* http://myfaces.apache.org/download.html

MyFaces Core is also available in the central Maven repository under
Group ID "org.apache.myfaces.core".

Release Notes - MyFaces Core - Version 2.3-next-M4 can be found in the
following link:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=10600&version=12348458

Regards,
Thomas Andraschko


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virenfrei.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


[ANNOUNCE] MyFaces Core v2.3-next-M3 Release

2020-07-05 Thread Thomas Andraschko
The Apache MyFaces team is pleased to announce the release of MyFaces
Core v2.3-next-M3.

MyFaces Core 2.3-next is a (almost) JavaServer(tm) Faces 2.3
implementation as specified by JSR-372.
We removed the long-time deprecated ManagedBean and FacesEL
implementation. ManagedBeans will be registred as CDI beans.

It also comes with Quarkus 1.5.2 support - and also supports
generation of native images!

JavaServer Faces (JSF) is a Java specification for building
component-based user interfaces for web applications.

MyFaces Core v2.3-next-M3 is available in both binary and source distributions.

* 
https://repository.apache.org/content/groups/public/org/apache/myfaces/core/myfaces-core-assembly/2.3-next-M3/
<https://repository.apache.org/content/groups/public/org/apache/myfaces/core/myfaces-core-assembly/2.3-next-M2/>

MyFaces Core is also available in the central Maven repository under
Group ID "org.apache.myfaces.core".

Release Notes - MyFaces Core - Version 2.3-next-M3 can be found in the
following link:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=10600&version=12347873

Regards,
Thomas Andraschko


Re: Session creation due to session-map access

2020-06-15 Thread Thomas Andraschko
Cant remember the case but we introduced the config to not break existing
apps. in 2.2 and 2.3 its activated by default.
We deactivated it in trunk however.

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virenfrei.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Am Mo., 15. Juni 2020 um 21:10 Uhr schrieb Christian Beikov <
christian.bei...@gmail.com>:

> Thanks, just found that myself as well. What is the reason for forcing
> the session creation by default even if the view is transient? Since
> most views are probably non-transient, I'd guess that in these cases
> session will be created anyway.
>
> Am 15.06.2020 um 20:57 schrieb Thomas Andraschko:
> > Hi,
> >
> > Please see
> > https://issues.apache.org/jira/plugins/servlet/mobile#issue/MYFACES-4297
> >
> >
> > Christian Beikov  schrieb am Mo., 15. Juni
> > 2020, 20:19:
> >
> >> Hello,
> >>
> >> during debugging, I found out that in
> >>
> org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage#getResponseEncoding
> >>
> >> the statement sm.put(CHARACTER_ENCODING_KEY, encoding); creates a
> >> session if none exists. I doubt that this is desired, at least in my
> >> case it isn't. Also, I don't see why this has to be done at all.
> >>
> >> Any hints? Or is this just a bug?
> >>
> >> Regards,
> >>
> >> Christian
> >>
> >>
>


Re: Session creation due to session-map access

2020-06-15 Thread Thomas Andraschko
Hi,

Please see
https://issues.apache.org/jira/plugins/servlet/mobile#issue/MYFACES-4297


Christian Beikov  schrieb am Mo., 15. Juni
2020, 20:19:

> Hello,
>
> during debugging, I found out that in
> org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage#getResponseEncoding
>
> the statement sm.put(CHARACTER_ENCODING_KEY, encoding); creates a
> session if none exists. I doubt that this is desired, at least in my
> case it isn't. Also, I don't see why this has to be done at all.
>
> Any hints? Or is this just a bug?
>
> Regards,
>
> Christian
>
>


[ANNOUNCE] MyFaces Core v2.3-next-M2 Release

2020-04-06 Thread Thomas Andraschko
The Apache MyFaces team is pleased to announce the release of MyFaces
Core v2.3-next-M2.

MyFaces Core 2.3-next is a (almost) JavaServer(tm) Faces 2.3
implementation as specified by JSR-372.
We removed the long-time deprecated ManagedBean and FacesEL
implementation. ManagedBeans will be registred as CDI beans.

It also comes with Quarkus 1.3.1 support - and also supports
generation of native images!

JavaServer Faces (JSF) is a Java specification for building
component-based user interfaces for web applications.

MyFaces Core v2.3-next-M2 is available in both binary and source distributions.

* 
https://repository.apache.org/content/groups/public/org/apache/myfaces/core/myfaces-core-assembly/2.3-next-M2/

MyFaces Core is also available in the central Maven repository under
Group ID "org.apache.myfaces.core".

Release Notes - MyFaces Core - Version 2.3-next-M2 can be found in the
following link:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=10600&version=12346645

Regards,
Thomas Andraschko


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virenfrei.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


Re: How to make submit button only work if connection is available?

2020-01-19 Thread Thomas Andraschko
Hi,

I never needed something similar but i would do it the same.
Maybe there are nicer ways, i would try to Google about it first.


Mark Struberg  schrieb am So., 19. Jan. 2020,
16:34:

> Hi folks!
>
> I'm right now designing a small only survey form with JSF-2.3. The problem
> is that the survey should gather information from a cellar. And often there
> is no WiFi nor mobile connection in those rooms. Thus it should not loose
> data if the user presses the 'Save' button and the connection is not
> available.
>
> How to do this best?
>
> I thought about an onclick which checks the connection via a ping to a
> servlet (just returning true) and only then do a jsf.js submit(). If the
> connection is not present it will present an alert() stating the user
> should try later when he again has a connection.
>
> Are there some better ways to do this?
>
> txs and LieGrue,
> strub
>
>


Re: Is Tomahawk21

2019-09-04 Thread Thomas Andraschko
Hi,

JFYI: there are probably no active tomahawk devs here anymore.
Also saveState was developed long time before CDI was available.

If you would still like to use it, i think you have to check the
implementation details. I would also need to check everything in detail.

Sorry.

Best regards,
Thomas

Am Mi., 4. Sept. 2019 um 15:52 Uhr schrieb DevNews :

> Hallo
>
> We are working on a migration of a large application from JSF1.2 to JSF
> 2.x.
> The application very often uses  over a couple of views.
>
> So we planned
> - first to migrate to JSF2.x including tomahawk21 and then
> - second to add deltaSpike and replace  @ViewAccessScoped.
>
> After a basic migration to JSF2.1 the application is running with some
> small errors.
> Then we changed the beans to CDI-management (in order to be able to use
> deltaSpike).
>
> With the CDI beans the first view based on  anymore. The data of the bean in the 
> Do we miss some configuration to make t:saveState and CDI work together or
> doesn‘t work 
>
> Thanks in advance,
> Georg
>
>
>
> Tel:
> E-Mail: devn...@safir-wid.de
> Internet: https://www.safir-wid.de
>
> safir Wirtschaftsinformationsdienst GmbH
> Sitz der Gesellschaft: Möllendorffstr.49, 10367 Berlin
> Geschäftsführer: Thilo Kind
> Registergericht: Amtsgericht Berlin Charlottenburg, HRB 66681
> USt-ID: DE 193584747
>
>
>
>
> --
> This email was Malware checked by UTM 9. http://www.sophos.com
>


Re: CDI-Bean in myfaces2.2 is not resolved

2019-08-29 Thread Thomas Andraschko
I think this are different problems.
The problem before was that there was no CDI-ELResolver registred in JSF,
so JSF could not resolve ANY CDI bean.

| Does it mean that we should not use deltaSpike with WildFly?

DeltaSpike should work on any server. Maybe you miss something like
ds:windowId. Just check the DS docu a bit and maybe use the DS mailinglist.

| And is there another  possibility to get a Bean behave like
ViewAccessSoped?

Not really. Conversation or SessionScoped can be used as "alternative".

Am Do., 29. Aug. 2019 um 13:01 Uhr schrieb DevNews :

> HI Thomas,
>
> thank you for the fast answer.
>
> We want to prepare a migration of a large JSF1.2 application with several
> hundred jsf-sites to JSf2.x.
> In this application  we use tomahawk  request scoped beans over a couple of jsf-sites.
>
> In the migrated applicaton we want to get rid of tomahawk and replace the
> 
> Back to our small test project:
>
> According to your answer we  switched from myfaces to mojarra.
> In this case the CDI-lookup to a CDI-ConversationScoped bean worked.
>
> Then we added deltaSpike jars to the (mojarra) application.
> The application still worked.
>
> Then we changed our bean from @ConversationScoped to
> @org.apache.deltaspike.core.api.scope.ViewAccessScoped.
> In this case the application behaves as if we used myfaces before. The
> CDI-Bean is not found by the WebServer.
>
> Is this the same problem as before?
>
> If yes:
>
> - Does it mean that we should not use deltaSpike with WildFly?
> - And is there another  possibility to get a Bean behave like
> ViewAccessSoped?
>
> Thanks Georg
>
>
>
>
>
>
>
> Tel:
> E-Mail: devn...@safir-wid.de
> Internet: https://www.safir-wid.de
>
> safir Wirtschaftsinformationsdienst GmbH
> Sitz der Gesellschaft: Möllendorffstr.49, 10367 Berlin
> Geschäftsführer: Thilo Kind
> Registergericht: Amtsgericht Berlin Charlottenburg, HRB 66681
> USt-ID: DE 193584747
>
>
>
> -Ursprüngliche Nachricht-
> Von: Thomas Andraschko 
> Gesendet: Mittwoch, 28. August 2019 16:03
> An: MyFaces Discussion 
> Betreff: Re: CDI-Bean in myfaces2.2 is not resolved
>
> Hi,
>
> in generell it's up to the container or the CDI impl, to add CDI support
> to JSF =< 2.2 via a ELResolver.
> In JSF 2.3 the direct support of the BeanManager#getELResolver was added
> (see MyFaces' 2.3 ResolverBuilderForFaces).
>
> In OpenWebBeans we did it within a wrapped JSF Application-Object:
>
> https://github.com/apache/openwebbeans/blob/owb_1.2.x/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplication.java
>
> Maybe you should ask the Wildfly guys.
> Not sure if it should just work on WildFly OOTB with Mojarra.
>
> Best regards,
> Thomas
>
>
>
>
> Am Mi., 28. Aug. 2019 um 15:46 Uhr schrieb DevNews :
>
> > Hallo,
> >
> > In a small example Project we want to test the CDI-definition of
> > managed Beans.
> > We want to use myfaces2.2.8 and deploy to WildFly13.
> >
> > If we use the jsf version that is shipped with WildFly (mojarra2.2)
> > the project works.
> > If we use myfaces the request-scoped bean is not resolved an the
> > project fails without further Exceptions.
> >
> > With myfaces we use the following web.xml:
> >   > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > xmlns="http://java.sun.com/xml/ns/javaee";
> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
> > id="WebApp_ID" version="2.5">
> >
> > 
> > org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL
> > true
> > 
> >
> > 
> > Faces Servlet
> > javax.faces.webapp.FacesServlet
> > 0
> > 
> > 
> > Faces Servlet
> > *.jsf 
> >
> > 
> > 60
> > 
> > 
> > /index.html
> > 
> >
> > 
> >
> > org.apache.myfaces.webapp.StartupServletContextListene
> > r
> > 
> > 
> >
> > To get the project started with JSF-managed Beans
> > (@javax.faces.bean.RequestScoped)we have to add the following
> > configuration-parameter:
> >
> > 
> >
> > org.apache.myfaces.config.annotation.LifecycleProvider > ram-name>
> >
> > org.apache.myfaces.config.annotation.NoInjectionAnnotatio
> > nLifecycleProvider
> > 
> >
> > summary:
> >
> > mojarra with CDI-beans works
> > myfaces with JSF-managed beans works
> > myfaces with CDI-beans fails
> >
> > Any idea?
> >
> > Thanks Georg
> >
> >
> >
> > Tel:
> > E-Mail: devn...@safir-wid.de
> > Internet: https://www.safir-wid.de
> >
> > safir Wirtschaftsinformationsdienst GmbH Sitz der Gesellschaft:
> > Möllendorffstr.49, 10367 Berlin
> > Geschäftsführer: Thilo Kind
> > Registergericht: Amtsgericht Berlin Charlottenburg, HRB 66681
> > USt-ID: DE 193584747
> >
> >
> >
> >
> > --
> > This email was Malware checked by UTM 9. http://www.sophos.com
> >
>
> --
> This email was Malware checked by UTM 9. http://www.sophos.com
>


Re: CDI-Bean in myfaces2.2 is not resolved

2019-08-28 Thread Thomas Andraschko
Hi,

in generell it's up to the container or the CDI impl, to add CDI support to
JSF =< 2.2 via a ELResolver.
In JSF 2.3 the direct support of the BeanManager#getELResolver was added
(see MyFaces' 2.3 ResolverBuilderForFaces).

In OpenWebBeans we did it within a wrapped JSF Application-Object:
https://github.com/apache/openwebbeans/blob/owb_1.2.x/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplication.java

Maybe you should ask the Wildfly guys.
Not sure if it should just work on WildFly OOTB with Mojarra.

Best regards,
Thomas




Am Mi., 28. Aug. 2019 um 15:46 Uhr schrieb DevNews :

> Hallo,
>
> In a small example Project we want to test the CDI-definition of managed
> Beans.
> We want to use myfaces2.2.8 and deploy to WildFly13.
>
> If we use the jsf version that is shipped with WildFly (mojarra2.2) the
> project works.
> If we use myfaces the request-scoped bean is not resolved an the project
> fails without further Exceptions.
>
> With myfaces we use the following web.xml:
> 
> http://www.w3.org/2001/XMLSchema-instance";
> xmlns="http://java.sun.com/xml/ns/javaee";
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
> id="WebApp_ID" version="2.5">
>
> 
> org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL
> true
> 
>
> 
> Faces Servlet
> javax.faces.webapp.FacesServlet
> 0
> 
> 
> Faces Servlet
> *.jsf
> 
>
> 
> 60
> 
> 
> /index.html
> 
>
> 
>
> org.apache.myfaces.webapp.StartupServletContextListener
> 
> 
>
> To get the project started with JSF-managed Beans
> (@javax.faces.bean.RequestScoped)we have to add the following
> configuration-parameter:
>
> 
>
> org.apache.myfaces.config.annotation.LifecycleProvider
>
> org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider
> 
>
> summary:
>
> mojarra with CDI-beans works
> myfaces with JSF-managed beans works
> myfaces with CDI-beans fails
>
> Any idea?
>
> Thanks Georg
>
>
>
> Tel:
> E-Mail: devn...@safir-wid.de
> Internet: https://www.safir-wid.de
>
> safir Wirtschaftsinformationsdienst GmbH
> Sitz der Gesellschaft: Möllendorffstr.49, 10367 Berlin
> Geschäftsführer: Thilo Kind
> Registergericht: Amtsgericht Berlin Charlottenburg, HRB 66681
> USt-ID: DE 193584747
>
>
>
>
> --
> This email was Malware checked by UTM 9. http://www.sophos.com
>


Re: NoClassDefFoundError: org/apache/tomcat/InstanceManager when using myfaces with wildfly

2019-08-16 Thread Thomas Andraschko
I think you can set something like:



org.apache.myfaces.config.annotation.LifecycleProvider

org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider



Virenfrei.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Am Fr., 16. Aug. 2019 um 13:13 Uhr schrieb DevNews :

> Hallo,
>
> I deploy my application (myfaces2.2.8, richfaces4.5.17, tomahawk21.1.1.14)
> to an wildfly 11
>
> I see this Exception on starttup of my application:
>
> Caused by: java.lang.NoClassDefFoundError:
> org/apache/tomcat/InstanceManager
> at
> org.apache.myfaces.config.annotation.Tomcat7AnnotationLifecycleProvider.initManager(Tomcat7AnnotationLifecycleProvider.java:132)
> at
> org.apache.myfaces.config.annotation.Tomcat7AnnotationLifecycleProvider.postConstruct(Tomcat7AnnotationLifecycleProvider.java:81)
> at
> org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:213)
> at
> org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.createManagedBean(ManagedBeanResolver.java:333)
> at
> org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.getValue(ManagedBeanResolver.java:296)
> at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:188)
> at
> org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:169)
> at
> org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:65)
>
>
> What to do?
>
> Thanks Georg
>
>
>
> Tel:
> E-Mail: devn...@safir-wid.de
> Internet: https://www.safir-wid.de
>
> safir Wirtschaftsinformationsdienst GmbH
> Sitz der Gesellschaft: Möllendorffstr.49, 10367 Berlin
> Geschäftsführer: Thilo Kind
> Registergericht: Amtsgericht Berlin Charlottenburg, HRB 66681
> USt-ID: DE 193584747
>
>
>
>
> --
> This email was Malware checked by UTM 9. http://www.sophos.com
>


Re: Websockets with Tomcat 9

2019-04-25 Thread Thomas Andraschko
Hi,

Can you create a issue and provide a reproducer maven sample project +
steps to reproduce? So i can have a Look at it and fix it.

kel...@jsonar.com  schrieb am Fr., 26. Apr. 2019, 01:06:

> Hi folks,
>
> I have a small project which uses JSF 2.3, CDI and Tomcat 9.0.17.
>
> I am trying to use  for the first time. I am using @Inject
> @Push in an application scoped bean.
>
> I put an Observer to monitor the WebSocket events and I could realize that
> the socket is never being opened.
>
> That is what I could realize when I access the page which contains the
> WebSocket tag:
>
> EndpointImpl class - onOpen method:
>
> config.getUserProperties().get(WebsocketConfigurator.WEBSOCKET_VALID) is
> always false.
>
> WebsocketConfigurator class - modifyHandshake method:
>
> websocketSessionBean is always being null, therefore WEBSOCKET_VALID is
> always being false.
>
> I think it is important to mention that when I use javax.faces (from
> Glassfish) it works perfectly. However, I am working in a huge project
> which uses MyFaces, so I have to continue using it.
>
> My dependencies in pom.xml are:
>
> myfaces-api: 2.3.3
> myfaces-impl: 2.3.3
> tomcat-catalina: 9.0.17
> weld-servlet-shaded: 3.1.0.Final
> cdi-api: 2.0
> primefaces: 7.0
> javax.websocket-api: 1.1
>
> Any suggestions?
>
> Regards,
>
> Kelcio.
>


Re: Resource not loaded after upgrade from 2.3.2 to 2.3.3

2019-03-24 Thread Thomas Andraschko
any update?

Am Mi., 27. Feb. 2019 um 11:53 Uhr schrieb Thomas Andraschko <
andraschko.tho...@gmail.com>:

> Hi
>
> Can you provide a small reproducer as maven Project, which i can simply
> run via mvn jetty:run?
> Also please create a issue.
>
> milovd...@gmail.com  schrieb am Mi., 27. Feb. 2019,
> 11:32:
>
>> Hello,
>>
>> I upgraded from 2.3.2 to 2.3.3 and now my resource is not loaded anymore.
>>
>> I'm using RichFaces that has a ResourceServlet. I assume that the
>> FacesServlet or Servlet changed in a way that this stopped working.
>> The url for the resource is for example:
>>
>> http://localhost/org.richfaces.resources/javax.faces.resource/org.richfaces/richfaces-queue.js
>>
>> I see that the resourceServlet is found and mapped. And I see that the
>> resource request actually hits the ResourceServlet. But the reply is just
>> the jsf page requesting the resource.
>>
>> Any suggestions?
>>
>> MAG,
>> Milo
>>
>


Re: Resource not loaded after upgrade from 2.3.2 to 2.3.3

2019-02-27 Thread Thomas Andraschko
Hi

Can you provide a small reproducer as maven Project, which i can simply run
via mvn jetty:run?
Also please create a issue.

milovd...@gmail.com  schrieb am Mi., 27. Feb. 2019,
11:32:

> Hello,
>
> I upgraded from 2.3.2 to 2.3.3 and now my resource is not loaded anymore.
>
> I'm using RichFaces that has a ResourceServlet. I assume that the
> FacesServlet or Servlet changed in a way that this stopped working.
> The url for the resource is for example:
>
> http://localhost/org.richfaces.resources/javax.faces.resource/org.richfaces/richfaces-queue.js
>
> I see that the resourceServlet is found and mapped. And I see that the
> resource request actually hits the ResourceServlet. But the reply is just
> the jsf page requesting the resource.
>
> Any suggestions?
>
> MAG,
> Milo
>


Re: Download Apache Tomahawk 1.1.6

2018-12-21 Thread Thomas Andraschko
You could also use the apache repo: https://repo.maven.apache.org/maven2/

Am Fr., 21. Dez. 2018 um 11:14 Uhr schrieb Awadhoot Aphale
:

> Thanks for the help!
>
> I was referring to the following link you shared in the earlier email,
>
>
> https://search.maven.org/search?q=g:org.apache.myfaces.tomahawk%20AND%20a:tomahawk12&core=gav
>
> It is just that when I download from Apache website, I am assured because I
> know that I can trust Apache. But I am not sure about the above link. So
> want to check with you.
>
> Thanks.
>
> On Fri, Dec 21, 2018 at 3:15 PM Thomas Andraschko <
> andraschko.tho...@gmail.com> wrote:
>
> > You could try to build from SVN if you need exact this very old version:
> > http://svn.apache.org/viewvc/myfaces/tomahawk/
> >
> > From which site? Our MyFaces site is ok and the maven central, too.
> >
> > NOTE:
> > There is probably no active Tomahawk developer left here, so please don't
> > expect too much support for Tomahawk questions.
> >
> >
> > Am Fr., 21. Dez. 2018 um 10:41 Uhr schrieb Awadhoot Aphale
> > :
> >
> > > I don't understand what you mean by "Could you try to get the tag from
> > > SVN"?
> > > Also, is this web site genuine? I mean, is it ok to download from this
> > web
> > > site?
> > >
> > > Thanks.
> > >
> > > On Fri, Dec 21, 2018 at 3:07 PM Thomas Andraschko <
> > > andraschko.tho...@gmail.com> wrote:
> > >
> > > > No idea, sorry.
> > > > It seems that the latest version in maven repo is also 1.1.7:
> > > >
> > > >
> > >
> >
> https://search.maven.org/search?q=g:org.apache.myfaces.tomahawk%20AND%20a:tomahawk12&core=gav
> > > > Could you try to get the tag from SVN.
> > > >
> > > >
> > > > Am Fr., 21. Dez. 2018 um 10:35 Uhr schrieb Awadhoot Aphale
> > > > :
> > > >
> > > > > From where can I download Apache Tomahawk 1.1.6? I checked Apache
> > > website
> > > > > but the only available version there is 1.1.14.
> > > > >
> > > > > --
> > > > > Thanks,
> > > > > Awadhoot
> > > > >
> > > >
> > >
> > >
> > > --
> > > Thanks,
> > > Awadhoot
> > >
> >
>
>
> --
> Thanks,
> Awadhoot
>


Re: Download Apache Tomahawk 1.1.6

2018-12-21 Thread Thomas Andraschko
You could try to build from SVN if you need exact this very old version:
http://svn.apache.org/viewvc/myfaces/tomahawk/

>From which site? Our MyFaces site is ok and the maven central, too.

NOTE:
There is probably no active Tomahawk developer left here, so please don't
expect too much support for Tomahawk questions.


Am Fr., 21. Dez. 2018 um 10:41 Uhr schrieb Awadhoot Aphale
:

> I don't understand what you mean by "Could you try to get the tag from
> SVN"?
> Also, is this web site genuine? I mean, is it ok to download from this web
> site?
>
> Thanks.
>
> On Fri, Dec 21, 2018 at 3:07 PM Thomas Andraschko <
> andraschko.tho...@gmail.com> wrote:
>
> > No idea, sorry.
> > It seems that the latest version in maven repo is also 1.1.7:
> >
> >
> https://search.maven.org/search?q=g:org.apache.myfaces.tomahawk%20AND%20a:tomahawk12&core=gav
> > Could you try to get the tag from SVN.
> >
> >
> > Am Fr., 21. Dez. 2018 um 10:35 Uhr schrieb Awadhoot Aphale
> > :
> >
> > > From where can I download Apache Tomahawk 1.1.6? I checked Apache
> website
> > > but the only available version there is 1.1.14.
> > >
> > > --
> > > Thanks,
> > > Awadhoot
> > >
> >
>
>
> --
> Thanks,
> Awadhoot
>


Re: Download Apache Tomahawk 1.1.6

2018-12-21 Thread Thomas Andraschko
No idea, sorry.
It seems that the latest version in maven repo is also 1.1.7:
https://search.maven.org/search?q=g:org.apache.myfaces.tomahawk%20AND%20a:tomahawk12&core=gav
Could you try to get the tag from SVN.


Am Fr., 21. Dez. 2018 um 10:35 Uhr schrieb Awadhoot Aphale
:

> From where can I download Apache Tomahawk 1.1.6? I checked Apache website
> but the only available version there is 1.1.14.
>
> --
> Thanks,
> Awadhoot
>


Re: error messages lack debug information

2018-12-15 Thread Thomas Andraschko
Feel free to implement something and provide a PR!

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virenfrei.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Am Sa., 15. Dez. 2018 um 16:47 Uhr schrieb Matthew Broadhead
:

> perfect!  thanks.  would be really helpful if it could output that info
> when the error occurs
>
> On 15/12/2018 12:45, Thomas Andraschko wrote:
> > thats probably in LocationValueExpression#location
> >
> > Am Sa., 15. Dez. 2018 um 12:43 Uhr schrieb Matthew Broadhead
> > :
> >
> >> i suppose the line number that is failing in the xhtml...
> >> i don't really understand what EL is trying to compare and why
> >>
> >> On 15/12/2018 12:39, Thomas Andraschko wrote:
> >>> which line number?
> >>>
> >>> Am Sa., 15. Dez. 2018 um 11:52 Uhr schrieb Matthew Broadhead
> >>> :
> >>>
> >>>> if i look at ValueExpression.getExpressionString it says
> >>>> #{cc.attrs.billTemplateSection.breakdown} which is a Boolean attribute
> >>>> of BillTemplateSection.  but it is saying it is not equivalent to
> >>>> BillTemplateSection.  is it possible to get a line number?
> >>>>
> >>>> On 15/12/2018 11:48, Thomas Andraschko wrote:
> >>>>> Try to debug the getExpressionString in the ValueExpression classes
> >>>>> So you should be able to find the causing el
> >>>>>
> >>>>> Am Sa., 15. Dez. 2018, 11:07 hat Matthew Broadhead
> >>>>>  geschrieben:
> >>>>>
> >>>>>> occasionally i get error messages that are very hard to debug
> because
> >>>>>> they don't give enough detail about where the problem occurred.  for
> >>>>>> instance i have pasted below one which i am currently struggling
> with.
> >>>>>> i have stepped through the myfaces code but it doesn't seem to help
> me
> >>>>>> understand where the error is occurring.
> >>>>>>
> >>>>>> javax.el.ELException: Cannot convert [false] of type [class
> >>>>>> java.lang.Boolean] to [class
> >>>>>> uk.me.kissy.database.entities.jpa.accounts.BillTemplateSection]
> >>>>>> at
> >> org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:576)
> >>>>>> at org.apache.el.parser.AstValue.setValue(AstValue.java:202)
> >>>>>> at
> >>>>>>
> >> org.apache.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:263)
> >>>>>> at
> >>>>>>
> >>>>>>
> >>
> org.apache.webbeans.el22.WrappedValueExpression.setValue(WrappedValueExpression.java:95)
> >>>>>> at
> >>>>>>
> >>>>>>
> >>
> org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.setValue(ContextAwareTagValueExpression.java:153)
> >>>>>> at
> >>>>>>
> >>>>>>
> >>
> org.apache.myfaces.view.facelets.el.LocationValueExpression.setValue(LocationValueExpression.java:157)
> >>>>>> at
> javax.faces.component.UIInput.updateModel(UIInput.java:418)
> >>>>>> at
> >> javax.faces.component.UIInput.processUpdates(UIInput.java:336)
> >>>>>> at
> >>>>>>
> >>>>>>
> >>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1506)
> >>>>>> at
> >>>>>>
> >>>>>>
> >>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1506)
> >>>>>> at
> >>>>>>
> >>>>>>
> >>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1499)
> >>>>>> at
> >>>>>>
> >>>>>>
> >>
> org.apache.myfaces.view.facelets.component.UIRepeat.process(UIRepeat.java:939)
> >>>>>> at
> >>>>>>
> >>>>>>
> >>
> org.apache.myfaces.view.facelets.component.UIRepeat.processUpdates(UIRepeat.java:1245)
> >>>

Re: error messages lack debug information

2018-12-15 Thread Thomas Andraschko
thats probably in LocationValueExpression#location

Am Sa., 15. Dez. 2018 um 12:43 Uhr schrieb Matthew Broadhead
:

> i suppose the line number that is failing in the xhtml...
> i don't really understand what EL is trying to compare and why
>
> On 15/12/2018 12:39, Thomas Andraschko wrote:
> > which line number?
> >
> > Am Sa., 15. Dez. 2018 um 11:52 Uhr schrieb Matthew Broadhead
> > :
> >
> >> if i look at ValueExpression.getExpressionString it says
> >> #{cc.attrs.billTemplateSection.breakdown} which is a Boolean attribute
> >> of BillTemplateSection.  but it is saying it is not equivalent to
> >> BillTemplateSection.  is it possible to get a line number?
> >>
> >> On 15/12/2018 11:48, Thomas Andraschko wrote:
> >>> Try to debug the getExpressionString in the ValueExpression classes
> >>> So you should be able to find the causing el
> >>>
> >>> Am Sa., 15. Dez. 2018, 11:07 hat Matthew Broadhead
> >>>  geschrieben:
> >>>
> >>>> occasionally i get error messages that are very hard to debug because
> >>>> they don't give enough detail about where the problem occurred.  for
> >>>> instance i have pasted below one which i am currently struggling with.
> >>>> i have stepped through the myfaces code but it doesn't seem to help me
> >>>> understand where the error is occurring.
> >>>>
> >>>> javax.el.ELException: Cannot convert [false] of type [class
> >>>> java.lang.Boolean] to [class
> >>>> uk.me.kissy.database.entities.jpa.accounts.BillTemplateSection]
> >>>>at
> org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:576)
> >>>>at org.apache.el.parser.AstValue.setValue(AstValue.java:202)
> >>>>at
> >>>>
> org.apache.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:263)
> >>>>at
> >>>>
> >>>>
> >>
> org.apache.webbeans.el22.WrappedValueExpression.setValue(WrappedValueExpression.java:95)
> >>>>at
> >>>>
> >>>>
> >>
> org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.setValue(ContextAwareTagValueExpression.java:153)
> >>>>at
> >>>>
> >>>>
> >>
> org.apache.myfaces.view.facelets.el.LocationValueExpression.setValue(LocationValueExpression.java:157)
> >>>>at javax.faces.component.UIInput.updateModel(UIInput.java:418)
> >>>>at
> javax.faces.component.UIInput.processUpdates(UIInput.java:336)
> >>>>at
> >>>>
> >>>>
> >>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1506)
> >>>>at
> >>>>
> >>>>
> >>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1506)
> >>>>at
> >>>>
> >>>>
> >>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1499)
> >>>>at
> >>>>
> >>>>
> >>
> org.apache.myfaces.view.facelets.component.UIRepeat.process(UIRepeat.java:939)
> >>>>at
> >>>>
> >>>>
> >>
> org.apache.myfaces.view.facelets.component.UIRepeat.processUpdates(UIRepeat.java:1245)
> >>>>at
> >>>>
> >>>>
> >>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1506)
> >>>>at
> >>>>
> >>>>
> >>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1499)
> >>>>at
> >>>>
> >>>>
> >>
> org.apache.myfaces.view.facelets.component.UIRepeat.process(UIRepeat.java:939)
> >>>>at
> >>>>
> >>>>
> >>
> org.apache.myfaces.view.facelets.component.UIRepeat.processUpdates(UIRepeat.java:1245)
> >>>>at javax.faces.component.UIForm.processUpdates(UIForm.java:264)
> >>>>at
> >>>>
> >>>>
> >>
> org.apache.myfaces.context.servlet.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:792)
> >>>>at
> >>>>
> >>>>
> >>
> org.apache.myfaces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitCon

Re: error messages lack debug information

2018-12-15 Thread Thomas Andraschko
which line number?

Am Sa., 15. Dez. 2018 um 11:52 Uhr schrieb Matthew Broadhead
:

> if i look at ValueExpression.getExpressionString it says
> #{cc.attrs.billTemplateSection.breakdown} which is a Boolean attribute
> of BillTemplateSection.  but it is saying it is not equivalent to
> BillTemplateSection.  is it possible to get a line number?
>
> On 15/12/2018 11:48, Thomas Andraschko wrote:
> > Try to debug the getExpressionString in the ValueExpression classes
> > So you should be able to find the causing el
> >
> > Am Sa., 15. Dez. 2018, 11:07 hat Matthew Broadhead
> >  geschrieben:
> >
> >> occasionally i get error messages that are very hard to debug because
> >> they don't give enough detail about where the problem occurred.  for
> >> instance i have pasted below one which i am currently struggling with.
> >> i have stepped through the myfaces code but it doesn't seem to help me
> >> understand where the error is occurring.
> >>
> >> javax.el.ELException: Cannot convert [false] of type [class
> >> java.lang.Boolean] to [class
> >> uk.me.kissy.database.entities.jpa.accounts.BillTemplateSection]
> >>   at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:576)
> >>   at org.apache.el.parser.AstValue.setValue(AstValue.java:202)
> >>   at
> >> org.apache.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:263)
> >>   at
> >>
> >>
> org.apache.webbeans.el22.WrappedValueExpression.setValue(WrappedValueExpression.java:95)
> >>   at
> >>
> >>
> org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.setValue(ContextAwareTagValueExpression.java:153)
> >>   at
> >>
> >>
> org.apache.myfaces.view.facelets.el.LocationValueExpression.setValue(LocationValueExpression.java:157)
> >>   at javax.faces.component.UIInput.updateModel(UIInput.java:418)
> >>   at javax.faces.component.UIInput.processUpdates(UIInput.java:336)
> >>   at
> >>
> >>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1506)
> >>   at
> >>
> >>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1506)
> >>   at
> >>
> >>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1499)
> >>   at
> >>
> >>
> org.apache.myfaces.view.facelets.component.UIRepeat.process(UIRepeat.java:939)
> >>   at
> >>
> >>
> org.apache.myfaces.view.facelets.component.UIRepeat.processUpdates(UIRepeat.java:1245)
> >>   at
> >>
> >>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1506)
> >>   at
> >>
> >>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1499)
> >>   at
> >>
> >>
> org.apache.myfaces.view.facelets.component.UIRepeat.process(UIRepeat.java:939)
> >>   at
> >>
> >>
> org.apache.myfaces.view.facelets.component.UIRepeat.processUpdates(UIRepeat.java:1245)
> >>   at javax.faces.component.UIForm.processUpdates(UIForm.java:264)
> >>   at
> >>
> >>
> org.apache.myfaces.context.servlet.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:792)
> >>   at
> >>
> >>
> org.apache.myfaces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:213)
> >>   at javax.faces.component.UIForm.visitTree(UIForm.java:314)
> >>   at
> javax.faces.component.UIComponent.visitTree(UIComponent.java:1047)
> >>   at
> >>
> javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1192)
> >>   at
> javax.faces.component.UIComponent.visitTree(UIComponent.java:1047)
> >>   at
> >>
> javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1192)
> >>   at
> javax.faces.component.UIComponent.visitTree(UIComponent.java:1047)
> >>   at
> >>
> javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1192)
> >>   at
> javax.faces.component.UIComponent.visitTree(UIComponent.java:1047)
> >>   at
> >>
> javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1192)
> >>   at
> javax.faces.component.UIComponent.visitTree(UIComponent.java:1047)
> >>   at
> >>
> javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1192)
> >>

Re: error messages lack debug information

2018-12-15 Thread Thomas Andraschko
Try to debug the getExpressionString in the ValueExpression classes
So you should be able to find the causing el

Am Sa., 15. Dez. 2018, 11:07 hat Matthew Broadhead
 geschrieben:

> occasionally i get error messages that are very hard to debug because
> they don't give enough detail about where the problem occurred.  for
> instance i have pasted below one which i am currently struggling with.
> i have stepped through the myfaces code but it doesn't seem to help me
> understand where the error is occurring.
>
> javax.el.ELException: Cannot convert [false] of type [class
> java.lang.Boolean] to [class
> uk.me.kissy.database.entities.jpa.accounts.BillTemplateSection]
>  at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:576)
>  at org.apache.el.parser.AstValue.setValue(AstValue.java:202)
>  at
> org.apache.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:263)
>  at
>
> org.apache.webbeans.el22.WrappedValueExpression.setValue(WrappedValueExpression.java:95)
>  at
>
> org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.setValue(ContextAwareTagValueExpression.java:153)
>  at
>
> org.apache.myfaces.view.facelets.el.LocationValueExpression.setValue(LocationValueExpression.java:157)
>  at javax.faces.component.UIInput.updateModel(UIInput.java:418)
>  at javax.faces.component.UIInput.processUpdates(UIInput.java:336)
>  at
>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1506)
>  at
>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1506)
>  at
>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1499)
>  at
>
> org.apache.myfaces.view.facelets.component.UIRepeat.process(UIRepeat.java:939)
>  at
>
> org.apache.myfaces.view.facelets.component.UIRepeat.processUpdates(UIRepeat.java:1245)
>  at
>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1506)
>  at
>
> javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1499)
>  at
>
> org.apache.myfaces.view.facelets.component.UIRepeat.process(UIRepeat.java:939)
>  at
>
> org.apache.myfaces.view.facelets.component.UIRepeat.processUpdates(UIRepeat.java:1245)
>  at javax.faces.component.UIForm.processUpdates(UIForm.java:264)
>  at
>
> org.apache.myfaces.context.servlet.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:792)
>  at
>
> org.apache.myfaces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:213)
>  at javax.faces.component.UIForm.visitTree(UIForm.java:314)
>  at javax.faces.component.UIComponent.visitTree(UIComponent.java:1047)
>  at
> javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1192)
>  at javax.faces.component.UIComponent.visitTree(UIComponent.java:1047)
>  at
> javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1192)
>  at javax.faces.component.UIComponent.visitTree(UIComponent.java:1047)
>  at
> javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1192)
>  at javax.faces.component.UIComponent.visitTree(UIComponent.java:1047)
>  at
> javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1192)
>  at javax.faces.component.UIComponent.visitTree(UIComponent.java:1047)
>  at
> javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1192)
>  at
>
> org.apache.myfaces.context.servlet.PartialViewContextImpl.processPartialExecute(PartialViewContextImpl.java:430)
>  at
>
> org.apache.myfaces.context.servlet.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:411)
>  at
>
> org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:57)
>  at
>
> javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:85)
>  at
>
> org.omnifaces.context.OmniPartialViewContext.processPartial(OmniPartialViewContext.java:144)
>  at
>
> javax.faces.component.UIViewRoot$UpdateModelPhaseProcessor.process(UIViewRoot.java:1825)
>  at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1657)
>  at
> javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:918)
>  at
>
> org.apache.myfaces.lifecycle.UpdateModelValuesExecutor.execute(UpdateModelValuesExecutor.java:38)
>  at
>
> org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:196)
>  at
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:143)
>  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
>  at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
>  at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>  at
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>  at
>
> org.apache.catalina.core.App

Re: [ANNOUNCE] MyFaces Core v2.3.2 Release

2018-09-12 Thread Thomas Andraschko
Thanks paul!

Matthew:  Please open a new topic in the Dev mailing list with more
details, whats not working for you ;)


Matthew Broadhead  schrieb am Do.,
13. Sep. 2018, 00:38:

> thank you for the new release. however i am still waiting for TomEE 8 to
> get the new features of 2.3 (TomEE 7.0.5 still has 2.2.3)
>
> i wanted to ask a question.  i thought i read somewhere that composite
> components would be able to handle recursive calls.  this is a feature
> that would be nice because in some places i am still using namespace
> xmlns:c="http://xmlns.jcp.org/jsp/jstl/core";.  if i try to add a
> recursive call without protection from a c:if i get an out of memory
>
> but i cannot find where i read that so i thought i would ask directly...
>
> On 12/09/18 16:07, Paul Nicolucci wrote:
> > The Apache MyFaces team is pleased to announce the release of MyFaces
> Core
> > 2.3.2.
> >
> > MyFaces Core is a JavaServer(tm) Faces 2.3 implementation as specified by
> > JSR-372.
> >
> > JavaServer Faces (JSF) is a Java specification for building
> component-based
> > user interfaces for web applications.
> >
> > MyFaces Core 2.3.2 is available in both binary and source distributions.
> >
> >  * http://myfaces.apache.org/download.html
> >
> > MyFaces Core is also available in the central Maven repository under
> Group
> > ID "org.apache.myfaces.core".
> >
> > Release Notes - MyFaces Core - Version 2.3.2 can be found in the
> following
> > link:
> >
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=10600&version=12343156
> >
> > Regards,
> >
> > Paul Nicolucci
> >
>
>
>


Re: [MyFaces 2.3.X] Weird error on InternetExplorer 11

2018-05-09 Thread Thomas Andraschko
Hey,

There already is a ticket about it, it will be fixed in the next release.

Am Mittwoch, 9. Mai 2018 schrieb Juri Berlanda :

> Hello,
>
> I noticed a very weird error affecting MyFaces 2.3.0 and 2.3.1 in
> combination with IE 11 (and maybe other IEs, we only test against IE 11).
> Chrome, Firefox and Edge seem to NOT be affected.
>
> On IE when _applyJSFArtifactValueToForm() is run as part of
> processResponse() it might occur that indexOf() is called on undefined,
> since e.name can be undefined in IE 11 if something like e.g. a
>  is inside the Form and it has no name set. For the other
> Browsers this resolves to e.name (in line 242 in _AjaxResponse.js, HEAD @
> Tag myfaces-core-module-2.3.1) being "" (i.e. empty String), which seems to
> be a great idea for a sensible default. But not so for IE 11: it has
> e.name undefined, hence calling indexOf() on it causes a TypeError, which
> in turn leads for any hidden input (e.g. ViewState) to not be updated.
>
> In our stack (MyFaces with Primefaces and DeltaSpike) this leads to
> WindowScope not being active after the Response of the first Ajax is
> processed.
>
> The issue can be fixed with the patch appended to this EMail.
>
> MyFaces 2.2.12 is NOT affected.
>
> If further work is needed I am happy to help.
>
> Kind regards,
>
> Juri Berlanda
>
>


Re: NullPointer on managed FacesConverters if both forClass and value is set

2018-04-23 Thread Thomas Andraschko
Hi,

seems like a bug, yes.
It would be great if you could create a jira + attach a unit test.
Even better would be if you can provide a patch to solve the issue.

Regards,
Thomas

2018-04-23 16:23 GMT+02:00 Juri Berlanda :

> Hello,
>
> we recently upgraded to MyFaces 2.3.0 from 2.2.12 and after adding the
> managed=true to our FacesConverters we noticed a weird NullPointer if they
> are used from EL.
>
> In detail:
> The following converter (just as an example. This doesn't need CDI
> support, but our Converters do)
>
> @ApplicationScoped @FacesConverter(value="dtoConverter", forClass =
> DtoToConvert.class, managed =true)
> public class DtoConverterimplements Converter  {
> public DtoToConvertgetAsObject(FacesContext context, UIComponent
> component, String value)throws ConverterException {
> return new DtoToConvert(value); }
>
> public StringgetAsString(FacesContext context, UIComponent component,
> DtoToConvert value)throws ConverterException {
> return value.getName(); }
> }
>
>
> being used in JSF like
>
>   converterId="dtoConverter"/>
>
>
> throws a NullPointerException at
>
> org.apache.myfaces.cdi.converter.FacesConverterCDIWrapper.ge
> tAsString(FacesConverterCDIWrapper.java:62)
>
>
> Removing the
>
> forClass = DtoToConvert.class
>
>
> fixes the problem. Under Mojarra 2.3.4 everything works, even with the
> forClass. So I'm not sure whether this is a misuse of FacesConverters on
> our side, or if this is actually a bug in MyFaces. The only clue I found is:
>
> What happens behind the scenes now is that when JSF needs a converter it
> simply asks the CDI bean manager for a bean
> that implements Converter with a qualifier @FacesValidator that has the
> "managed" attribute set to true and the value
> (coverterId) or forClass attribute set to the right value (which is why
> it's important that these attributes are all binding).
>
>
> But that does not explicitly state, that value and forClass may not be
> used together. Can someone help me out? If needed I can provide a test
> project targeting Tomcat 8.5 showing the problem in MyFaces 2.3.0 and the
> thingy working in Mojarra 2.3.4.
>
> Cheers,
> Juri
>


Re: [ANNOUNCE] MyFaces Core v2.3.0 Release

2018-03-15 Thread Thomas Andraschko
Just try it ;) As tomahawk isn't active in development anymore, i don't
think that someone tried it. Even not sure if it works fine on JSF 2.2.

2018-03-15 15:34 GMT+01:00 DevNews :

> Hallo Eduardo,
>
> do You have information about compatibility of this new Version with
> Tomahawk?
> Can I use MyFaces 2.3 in a project that uses Tomahawk (tomahawk21)
> components?
>
> Thanks,
> Georg
>
>
>
> safir Wirtschaftsinformationsdienst GmbH
> Möllendorffstr. 49
> 10367 Berlin
> Tel.:++49 30 577981 - 0
> Fax: ++49 30 577981 - 18
> E-Mail: i...@safir-wid.de
> Internet: www.safir-wid.de
> Handelsregister: Amtsgericht Charlottenburg HRB 66681
> USt-ID: DE 193584747
> Geschäftsführer: Thilo Kind
> -Ursprüngliche Nachricht-
> Von: Eduardo B 
> Gesendet: Montag, 12. März 2018 14:28
> An: annou...@apache.org; annou...@myfaces.apache.org
> Cc: MyFaces Development ; users@myfaces.apache.org
> Betreff: [ANNOUNCE] MyFaces Core v2.3.0 Release
>
> The Apache MyFaces team is pleased to announce the release of MyFaces Core
> 2.3.0.
>
> MyFaces Core is a JavaServer(tm) Faces 2.3 implementation as specified by
> JSR-372.
>
> MyFaces Core 2.3.0 is available in both binary and source distributions.
>
> * http://myfaces.apache.org/download.html
>
> MyFaces Core is also available in the central Maven repository under Group
> ID "org.apache.myfaces.core".
>
> Release Notes - MyFaces Core - Version 2.3.0 can be found in the following
> link:
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?
> projectId=10600&version=12339569
>
> Regards,
> Eduardo M. Breijo
>
> --
> This email was Malware checked by UTM 9. http://www.sophos.com
>
> --
> This email was Malware checked by UTM 9. http://www.sophos.com
>


Re: [ANNOUNCE] MyFaces Core v2.3.0 Release

2018-03-12 Thread Thomas Andraschko
Thanks Eduardo! Will also twitter it!

2018-03-12 14:28 GMT+01:00 Eduardo B :

> The Apache MyFaces team is pleased to announce the release of MyFaces Core
> 2.3.0.
>
> MyFaces Core is a JavaServer(tm) Faces 2.3 implementation as specified by
> JSR-372.
>
> MyFaces Core 2.3.0 is available in both binary and source distributions.
>
> * http://myfaces.apache.org/download.html
>
> MyFaces Core is also available in the central Maven repository under Group
> ID "org.apache.myfaces.core".
>
> Release Notes - MyFaces Core - Version 2.3.0 can be found in the following
> link: https://issues.apache.org/jira/secure/ReleaseNote.jspa?
> projectId=10600&version=12339569
>
> Regards,
> Eduardo M. Breijo
>


Re: Reverse proxy and jsf, virtual host mapping to subdirectory

2018-02-24 Thread Thomas Andraschko
Hi,

i don't think we have a way to overwrite this behavior. I would try virtual
hosts.



2018-02-24 15:35 GMT+01:00 Jan Michael Greiner <
jan0mich...@yahoo.com.invalid>:

> Dear all,
>
> I have a reverse proxy, that maps https://www.somedomain.com/ to my
> internal Tomcat, to https://192.168.0.5:8080/somedomain/ (and
> https://www.someotherdomain.org/ to https://192.168.0.5:8080/
> someotherdomain/).
>
> Consider the two attaced simple jsf pages.
>
> If you call https://www.somedomain.com/test.jsf, the generated HTML looks
> like this:
>
> 
> http://www.w3.org/1999/xhtml";>
> 
> link
> 
> 
> 
> 
>
> And the link does not work, because it should be just /test2.jsf.
>
> The most straight forward solution that comes to my mind, is to configure
> virtual hosts in Tomcat.
>
> But I would like to ask:
>
> Is there a way, to solve this easily, without configuring virtual hosts in
> the internal tomcat?
>
> Is it possible, to have h:link generate relative paths, or to statically
> configure the subdirectory name for JSF?
>
>
> Best regards and thank you
>
> Jan Michael Greiner
>


Re: ui repeat fails to reflect collection after render

2018-01-29 Thread Thomas Andraschko
Not sure.

You did this withing your JPA example:

@Transactional
public String delete() {
  itemDao.delete(getItem());
   update();


Could you check the the list size after and before the update method was
called?
Maybe there is something wrong with transaction handling.

I assume that you also switched to EclipseLink when you switched to Mojarra
(TomEE Plume)?


2018-01-29 14:28 GMT+01:00 Matthew Broadhead :

> i have updated the project https://github.com/chongma/myFacesJpa and
> removed the JPA stuff.  it seems to work correctly without the JPA stuff.
> does this mean i should report this over there?
>
>
> On 26/01/2018 10:38, Thomas Andraschko wrote:
>
>> Yep, a small as possible example (without JPA and other not-related stuff)
>> would be great!
>>
>> 2018-01-26 9:45 GMT+01:00 Matthew Broadhead <
>> matthew.broadh...@nbmlaw.co.uk>
>> :
>>
>> by the way you can run the project like:
>>> mvn package
>>> mvn tomee:start
>>> you need a schema called myfaces accessible by a user myfaces with
>>> password mypassword.
>>>
>>> as you say it may have nothing to do with jpa but only to do with setting
>>> the facesmessage to error.  i can try to make a test later
>>>
>>>
>>> On 25/01/2018 21:23, Matthew Broadhead wrote:
>>>
>>> i have created a test project here
>>>> https://github.com/chongma/myFacesJpa
>>>>
>>>> but in the process of creating the project i figured out the problem.
>>>> if
>>>> i have
>>>> FacesContext.getCurrentInstance().addMessage(null,
>>>>  new FacesMessage(FacesMessage.SEVERITY_ERROR, "Deleted
>>>> item", null));
>>>> in my method then MyFaces doesn't update any of the "ui:repeat" type
>>>> components
>>>>
>>>> This works fine:
>>>> FacesContext.getCurrentInstance().addMessage(null,
>>>>  new FacesMessage(FacesMessage.SEVERITY_INFO, "Deleted
>>>> item", null));
>>>>
>>>> i don't know if this is supposed to be like that but it lost me some
>>>> time
>>>> trying to figure it out
>>>>
>>>> On 25/01/2018 17:07, Thomas Andraschko wrote:
>>>>
>>>> Yep you are right. Not sure if there is one available.
>>>>> But it would be great if you could try it without jpa first.
>>>>>
>>>>> Am Donnerstag, 25. Januar 2018 schrieb Matthew Broadhead :
>>>>>
>>>>> when i create these mvce projects i always wonder why there isn't a
>>>>> maven
>>>>>
>>>>>> archetype.  in the case of MyFaces maybe a bare bones project with
>>>>>> jetty-maven-plugin, jpa and jsf all preconfigured ready to create a
>>>>>> sample...
>>>>>>
>>>>>> On 25/01/2018 16:28, Thomas Andraschko wrote:
>>>>>>
>>>>>> In our JIRA: https://issues.apache.org/jira/projects/MYFACES/issues/
>>>>>>
>>>>>>> A small maven application with jetty-maven-plugin would be a great
>>>>>>> example!
>>>>>>>
>>>>>>> 2018-01-25 16:24 GMT+01:00 Matthew Broadhead <
>>>>>>> matthew.broadh...@nbmlaw.co.uk
>>>>>>>
>>>>>>> :
>>>>>>>
>>>>>>>> ok i will do that.  where do i create an issue?
>>>>>>>>
>>>>>>>>
>>>>>>>> On 25/01/2018 16:20, Thomas Andraschko wrote:
>>>>>>>>
>>>>>>>> Could you please provide a mvce and create a issue?
>>>>>>>>
>>>>>>>> Otherwise it's almost impossible to help you.
>>>>>>>>>
>>>>>>>>> 2018-01-25 16:14 GMT+01:00 Matthew Broadhead <
>>>>>>>>> matthew.broadh...@nbmlaw.co.uk
>>>>>>>>>
>>>>>>>>> :
>>>>>>>>>
>>>>>>>>> hi,
>>>>>>>>>> i just posted this question on stack overflow.  but then i tested
>>>>>>>>>> switching to mojarra and that solved my problem so i guessed i
>>>>>>>>>> would
>>>>>>>>>> report
>>>>>>>>>> it to this list
>>>>>>>>>>

Re: ui repeat fails to reflect collection after render

2018-01-26 Thread Thomas Andraschko
Yep, a small as possible example (without JPA and other not-related stuff)
would be great!

2018-01-26 9:45 GMT+01:00 Matthew Broadhead 
:

> by the way you can run the project like:
> mvn package
> mvn tomee:start
> you need a schema called myfaces accessible by a user myfaces with
> password mypassword.
>
> as you say it may have nothing to do with jpa but only to do with setting
> the facesmessage to error.  i can try to make a test later
>
>
> On 25/01/2018 21:23, Matthew Broadhead wrote:
>
>> i have created a test project here
>> https://github.com/chongma/myFacesJpa
>>
>> but in the process of creating the project i figured out the problem.  if
>> i have
>> FacesContext.getCurrentInstance().addMessage(null,
>> new FacesMessage(FacesMessage.SEVERITY_ERROR, "Deleted
>> item", null));
>> in my method then MyFaces doesn't update any of the "ui:repeat" type
>> components
>>
>> This works fine:
>> FacesContext.getCurrentInstance().addMessage(null,
>> new FacesMessage(FacesMessage.SEVERITY_INFO, "Deleted
>> item", null));
>>
>> i don't know if this is supposed to be like that but it lost me some time
>> trying to figure it out
>>
>> On 25/01/2018 17:07, Thomas Andraschko wrote:
>>
>>> Yep you are right. Not sure if there is one available.
>>> But it would be great if you could try it without jpa first.
>>>
>>> Am Donnerstag, 25. Januar 2018 schrieb Matthew Broadhead :
>>>
>>> when i create these mvce projects i always wonder why there isn't a maven
>>>> archetype.  in the case of MyFaces maybe a bare bones project with
>>>> jetty-maven-plugin, jpa and jsf all preconfigured ready to create a
>>>> sample...
>>>>
>>>> On 25/01/2018 16:28, Thomas Andraschko wrote:
>>>>
>>>> In our JIRA: https://issues.apache.org/jira/projects/MYFACES/issues/
>>>>>
>>>>> A small maven application with jetty-maven-plugin would be a great
>>>>> example!
>>>>>
>>>>> 2018-01-25 16:24 GMT+01:00 Matthew Broadhead <
>>>>> matthew.broadh...@nbmlaw.co.uk
>>>>>
>>>>> :
>>>>>> ok i will do that.  where do i create an issue?
>>>>>>
>>>>>>
>>>>>> On 25/01/2018 16:20, Thomas Andraschko wrote:
>>>>>>
>>>>>> Could you please provide a mvce and create a issue?
>>>>>>
>>>>>>> Otherwise it's almost impossible to help you.
>>>>>>>
>>>>>>> 2018-01-25 16:14 GMT+01:00 Matthew Broadhead <
>>>>>>> matthew.broadh...@nbmlaw.co.uk
>>>>>>>
>>>>>>> :
>>>>>>>
>>>>>>>> hi,
>>>>>>>> i just posted this question on stack overflow.  but then i tested
>>>>>>>> switching to mojarra and that solved my problem so i guessed i would
>>>>>>>> report
>>>>>>>> it to this list
>>>>>>>>
>>>>>>>> Consider the following xhtml fragment:
>>>>>>>>
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>
>>>>>>>>
>>>>>>>>>>>>>>> action="#{myBean.delete}">
>>>>>>>>>>>>>>> value="#{item}" />
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 
>>>>>>>> 
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 
>>>>>>>> 
>>>>>>>> With the backing bean delete method:
>>>>>>>>
>>>>>>>> @Transactional
>>>>>>>> public String delete() {
>>>>>>>>itemDao.delete(getItem());
>>>>>>>>setItems(itemDao.select());
>>>>>>>>return null;
>>>>>>>> }
>>>>>>>> And the itemDao methods like:
>>>>>>>>
>>>>>>>> public List select() {
>>>>>>>>CriteriaBuilder cb = em.getCriteriaBuilder();
>>>>>>>>CriteriaQuery cq = cb.createQuery(Item.class);
>>>>>>>>Root item = cq.from(Item.class);
>>>>>>>>cq.distinct(true);
>>>>>>>>TypedQuery query = em.createQuery(cq);
>>>>>>>>List itemList = query.getResultList();
>>>>>>>>return itemList;
>>>>>>>> }
>>>>>>>> public void delete(Project project) {
>>>>>>>>project = find(project.getProjectId());
>>>>>>>>em.remove(project);
>>>>>>>> }
>>>>>>>> The problem is that after the delete button is clicked the count is
>>>>>>>> correct, the c:forEach is correct, but the ui:repeat is not updated
>>>>>>>> and
>>>>>>>> still shows the deleted element. Can someone suggest how to force
>>>>>>>> the
>>>>>>>> ui:repeat to also refresh?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>
>


Re: ui repeat fails to reflect collection after render

2018-01-25 Thread Thomas Andraschko
Yep you are right. Not sure if there is one available.
But it would be great if you could try it without jpa first.

Am Donnerstag, 25. Januar 2018 schrieb Matthew Broadhead :

> when i create these mvce projects i always wonder why there isn't a maven
> archetype.  in the case of MyFaces maybe a bare bones project with
> jetty-maven-plugin, jpa and jsf all preconfigured ready to create a
> sample...
>
> On 25/01/2018 16:28, Thomas Andraschko wrote:
>
>> In our JIRA: https://issues.apache.org/jira/projects/MYFACES/issues/
>>
>> A small maven application with jetty-maven-plugin would be a great
>> example!
>>
>> 2018-01-25 16:24 GMT+01:00 Matthew Broadhead <
>> matthew.broadh...@nbmlaw.co.uk
>>
>>> :
>>> ok i will do that.  where do i create an issue?
>>>
>>>
>>> On 25/01/2018 16:20, Thomas Andraschko wrote:
>>>
>>> Could you please provide a mvce and create a issue?
>>>> Otherwise it's almost impossible to help you.
>>>>
>>>> 2018-01-25 16:14 GMT+01:00 Matthew Broadhead <
>>>> matthew.broadh...@nbmlaw.co.uk
>>>>
>>>> :
>>>>> hi,
>>>>> i just posted this question on stack overflow.  but then i tested
>>>>> switching to mojarra and that solved my problem so i guessed i would
>>>>> report
>>>>> it to this list
>>>>>
>>>>> Consider the following xhtml fragment:
>>>>>
>>>>> 
>>>>> 
>>>>> 
>>>>>   
>>>>>   
>>>>>   
>>>>>   >>>> value="#{item}" />
>>>>>   
>>>>>   
>>>>>   
>>>>> 
>>>>> 
>>>>>   
>>>>>   
>>>>>   
>>>>> 
>>>>> 
>>>>> With the backing bean delete method:
>>>>>
>>>>> @Transactional
>>>>> public String delete() {
>>>>>   itemDao.delete(getItem());
>>>>>   setItems(itemDao.select());
>>>>>   return null;
>>>>> }
>>>>> And the itemDao methods like:
>>>>>
>>>>> public List select() {
>>>>>   CriteriaBuilder cb = em.getCriteriaBuilder();
>>>>>   CriteriaQuery cq = cb.createQuery(Item.class);
>>>>>   Root item = cq.from(Item.class);
>>>>>   cq.distinct(true);
>>>>>   TypedQuery query = em.createQuery(cq);
>>>>>   List itemList = query.getResultList();
>>>>>   return itemList;
>>>>> }
>>>>> public void delete(Project project) {
>>>>>   project = find(project.getProjectId());
>>>>>   em.remove(project);
>>>>> }
>>>>> The problem is that after the delete button is clicked the count is
>>>>> correct, the c:forEach is correct, but the ui:repeat is not updated and
>>>>> still shows the deleted element. Can someone suggest how to force the
>>>>> ui:repeat to also refresh?
>>>>>
>>>>>
>>>>>
>


Re: ui repeat fails to reflect collection after render

2018-01-25 Thread Thomas Andraschko
In our JIRA: https://issues.apache.org/jira/projects/MYFACES/issues/

A small maven application with jetty-maven-plugin would be a great example!

2018-01-25 16:24 GMT+01:00 Matthew Broadhead :

> ok i will do that.  where do i create an issue?
>
>
> On 25/01/2018 16:20, Thomas Andraschko wrote:
>
>> Could you please provide a mvce and create a issue?
>> Otherwise it's almost impossible to help you.
>>
>> 2018-01-25 16:14 GMT+01:00 Matthew Broadhead <
>> matthew.broadh...@nbmlaw.co.uk
>>
>>> :
>>> hi,
>>> i just posted this question on stack overflow.  but then i tested
>>> switching to mojarra and that solved my problem so i guessed i would
>>> report
>>> it to this list
>>>
>>> Consider the following xhtml fragment:
>>>
>>> 
>>> 
>>> 
>>>  
>>>  
>>>  
>>>  >> value="#{item}" />
>>>  
>>>  
>>>  
>>> 
>>> 
>>>  
>>>  
>>>  
>>> 
>>> 
>>> With the backing bean delete method:
>>>
>>> @Transactional
>>> public String delete() {
>>>  itemDao.delete(getItem());
>>>  setItems(itemDao.select());
>>>  return null;
>>> }
>>> And the itemDao methods like:
>>>
>>> public List select() {
>>>  CriteriaBuilder cb = em.getCriteriaBuilder();
>>>  CriteriaQuery cq = cb.createQuery(Item.class);
>>>  Root item = cq.from(Item.class);
>>>  cq.distinct(true);
>>>  TypedQuery query = em.createQuery(cq);
>>>  List itemList = query.getResultList();
>>>  return itemList;
>>> }
>>> public void delete(Project project) {
>>>  project = find(project.getProjectId());
>>>  em.remove(project);
>>> }
>>> The problem is that after the delete button is clicked the count is
>>> correct, the c:forEach is correct, but the ui:repeat is not updated and
>>> still shows the deleted element. Can someone suggest how to force the
>>> ui:repeat to also refresh?
>>>
>>>
>


Re: ui repeat fails to reflect collection after render

2018-01-25 Thread Thomas Andraschko
Could you please provide a mvce and create a issue?
Otherwise it's almost impossible to help you.

2018-01-25 16:14 GMT+01:00 Matthew Broadhead :

> hi,
> i just posted this question on stack overflow.  but then i tested
> switching to mojarra and that solved my problem so i guessed i would report
> it to this list
>
> Consider the following xhtml fragment:
>
> 
> 
> 
> 
> 
> 
>  value="#{item}" />
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> With the backing bean delete method:
>
> @Transactional
> public String delete() {
> itemDao.delete(getItem());
> setItems(itemDao.select());
> return null;
> }
> And the itemDao methods like:
>
> public List select() {
> CriteriaBuilder cb = em.getCriteriaBuilder();
> CriteriaQuery cq = cb.createQuery(Item.class);
> Root item = cq.from(Item.class);
> cq.distinct(true);
> TypedQuery query = em.createQuery(cq);
> List itemList = query.getResultList();
> return itemList;
> }
> public void delete(Project project) {
> project = find(project.getProjectId());
> em.remove(project);
> }
> The problem is that after the delete button is clicked the count is
> correct, the c:forEach is correct, but the ui:repeat is not updated and
> still shows the deleted element. Can someone suggest how to force the
> ui:repeat to also refresh?
>


Re: JSF 2.3

2017-11-18 Thread Thomas Andraschko
1) I think we can ship 2.3.0 this year, there are only some issues left.
2) I would ask that the TomEE guys ;) I also think that TomEE is not ready
for a 8.0 release yet ;)

2017-11-18 12:43 GMT+01:00 Matthew Broadhead :

> Hi,
> When is 2.3 moving out of beta? https://github.com/apache/tome
> e/blob/fb_tomee8/pom.xml TomEE 8 is using MyFaces 2.2.12 but I thought it
> would be shipping with 2.3?
>


Re: OmniFaces CombinedResourceHandler

2017-11-09 Thread Thomas Andraschko
No it isn't. JSF2.3 defines how resources can be "manipulated" - Thats what
i meant :)

2017-11-09 18:24 GMT+01:00 Matthew Broadhead :

> so this feature is available in 2.3?  how will we configure it?  i think
> TomEE 8 will ship with 2.3 although it is in the early stages
>
>
> On 09/11/2017 17:38, Thomas Andraschko wrote:
>
>> You can also create a issue on their github project.
>>
>> Yes, "more or less" :D
>> Not every small bit is defined in the specs, so in some parts their might
>> be some small differences.
>> Also the CombinedResourceHandler is not just a small component like a
>> inputText, it heavily changes the resources and many of these used
>> features
>> are now specified now in the JSF 2.3 specs.
>> So OmniFaces already used some JSF impl hacks here in pre JSF 2.3
>> environments.
>>
>> 2017-11-09 17:28 GMT+01:00 Matthew Broadhead <
>> matthew.broadh...@nbmlaw.co.uk
>>
>>> :
>>> i have already posted the same on stack overflow with omnifaces tag.
>>> there must be something fundamentally different between Mojarra and
>>> MyFaces
>>> for this to be happening?  shouldn't they behave more or less the same?
>>>
>>>
>>> On 09/11/2017 16:58, Thomas Andraschko wrote:
>>>
>>> Hi,
>>>>
>>>> i would ask the omnifaces guys about that - they know their
>>>> CombinedResourceHandler better then we do ;)
>>>>
>>>> Regards,
>>>> Thomas
>>>>
>>>> 2017-11-09 16:51 GMT+01:00 Matthew Broadhead <
>>>> matthew.broadh...@nbmlaw.co.uk
>>>>
>>>> :
>>>>> Hi,
>>>>>
>>>>> I am using TomEE 7.0.3 Plus (MyFaces 2.2.11).  I have tried different
>>>>> OmniFaces versions particularly 1.14 and 2.4.
>>>>>
>>>>> There seems to be a problem with using OmniFaces
>>>>> CombinedResourceHandler
>>>>> with MyFaeces.  CombinedResourceHandler bundles all js and css
>>>>> resources
>>>>> to
>>>>> reduce browser load times by reducing hits on the server.
>>>>>
>>>>> There is a test project at https://github.com/chongma/test. I use the
>>>>> Eclipse IDE and deploy the project onto a TomEE 7.0.3 Plus server.  It
>>>>> currently works as expected with extra dependencies:
>>>>> 
>>>>>   com.sun.faces
>>>>>   jsf-api
>>>>>   2.2.13
>>>>>   compile
>>>>>   
>>>>>   
>>>>>   com.sun.faces
>>>>>   jsf-impl
>>>>>   2.2.13
>>>>>   runtime
>>>>>   
>>>>> which switch it to Mojarra.  If you remove these dependencies then the
>>>>> CombinedResourceHandler does not work anymore.
>>>>>
>>>>> Regards,
>>>>> Matthew
>>>>>
>>>>>
>>>>>
>


Re: OmniFaces CombinedResourceHandler

2017-11-09 Thread Thomas Andraschko
You can also create a issue on their github project.

Yes, "more or less" :D
Not every small bit is defined in the specs, so in some parts their might
be some small differences.
Also the CombinedResourceHandler is not just a small component like a
inputText, it heavily changes the resources and many of these used features
are now specified now in the JSF 2.3 specs.
So OmniFaces already used some JSF impl hacks here in pre JSF 2.3
environments.

2017-11-09 17:28 GMT+01:00 Matthew Broadhead :

> i have already posted the same on stack overflow with omnifaces tag.
> there must be something fundamentally different between Mojarra and MyFaces
> for this to be happening?  shouldn't they behave more or less the same?
>
>
> On 09/11/2017 16:58, Thomas Andraschko wrote:
>
>> Hi,
>>
>> i would ask the omnifaces guys about that - they know their
>> CombinedResourceHandler better then we do ;)
>>
>> Regards,
>> Thomas
>>
>> 2017-11-09 16:51 GMT+01:00 Matthew Broadhead <
>> matthew.broadh...@nbmlaw.co.uk
>>
>>> :
>>> Hi,
>>>
>>> I am using TomEE 7.0.3 Plus (MyFaces 2.2.11).  I have tried different
>>> OmniFaces versions particularly 1.14 and 2.4.
>>>
>>> There seems to be a problem with using OmniFaces CombinedResourceHandler
>>> with MyFaeces.  CombinedResourceHandler bundles all js and css resources
>>> to
>>> reduce browser load times by reducing hits on the server.
>>>
>>> There is a test project at https://github.com/chongma/test. I use the
>>> Eclipse IDE and deploy the project onto a TomEE 7.0.3 Plus server.  It
>>> currently works as expected with extra dependencies:
>>> 
>>>  com.sun.faces
>>>  jsf-api
>>>  2.2.13
>>>  compile
>>>  
>>>  
>>>  com.sun.faces
>>>  jsf-impl
>>>  2.2.13
>>>  runtime
>>>  
>>> which switch it to Mojarra.  If you remove these dependencies then the
>>> CombinedResourceHandler does not work anymore.
>>>
>>> Regards,
>>> Matthew
>>>
>>>
>


Re: OmniFaces CombinedResourceHandler

2017-11-09 Thread Thomas Andraschko
Hi,

i would ask the omnifaces guys about that - they know their
CombinedResourceHandler better then we do ;)

Regards,
Thomas

2017-11-09 16:51 GMT+01:00 Matthew Broadhead :

> Hi,
>
> I am using TomEE 7.0.3 Plus (MyFaces 2.2.11).  I have tried different
> OmniFaces versions particularly 1.14 and 2.4.
>
> There seems to be a problem with using OmniFaces CombinedResourceHandler
> with MyFaeces.  CombinedResourceHandler bundles all js and css resources to
> reduce browser load times by reducing hits on the server.
>
> There is a test project at https://github.com/chongma/test. I use the
> Eclipse IDE and deploy the project onto a TomEE 7.0.3 Plus server.  It
> currently works as expected with extra dependencies:
> 
> com.sun.faces
> jsf-api
> 2.2.13
> compile
> 
> 
> com.sun.faces
> jsf-impl
> 2.2.13
> runtime
> 
> which switch it to Mojarra.  If you remove these dependencies then the
> CombinedResourceHandler does not work anymore.
>
> Regards,
> Matthew
>


Re: Orchestra future

2017-05-02 Thread Thomas Andraschko
Hi,

i would choose CDI and DeltaSpike.
Orchestra is currently in maintenance mode and DeltaSpike offers even a
better multi window handling.

Regards,
Thomas

2017-05-02 8:51 GMT+02:00 Adam Jenkins :

> Hi All,
>
> I read somewhere that much of CDI conversation scope was modelled upon
> Orchestra.  With that in mind, can anyone comment on the future of
> Orchestra?  We have a JSF 2.2 project which requires conversation support
> and we're currently tossing up between CDI conversation scope and
> orchestra.  The amount of work to support is about the same for each, we
> have another project using orchestra so that is our preference however
> we've been bitten by EOL in frameworks before so if it's likely that
> Orchestra will be deprecated in favour of CDI conversations in the future
> that would tip our preference towards CDI.
>
> Any thoughts on the subject by those in the know would be greatly
> appreciated.
>
> Cheers
> Adam
>
>
> __
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit http://www.symanteccloud.com
> __


Re: [COMMUNITY] Henning Nöth - Committer

2017-03-31 Thread Thomas Andraschko
welcome!:)

2017-03-31 21:03 GMT+02:00 Mike Kienenberger :

> The MyFaces PMC is proud to announce a new addition to our community.
>
> Please welcome Henning Nöth as the newest MyFaces committer!
> Henning is an active member of the MyFaces community, especially in
> MyFaces Tobago.
>
> Welcome & regards,
> Mike
>


Re: [COMMUNITY] Dennis Kieselhorst - PMC member

2017-02-06 Thread Thomas Andraschko
Welcome! :)

Am Montag, 6. Februar 2017 schrieb Mike Kienenberger :

> The MyFaces PMC is proud to announce an addition to our project
> management committee.
>
> Please welcome Dennis Kieselhorst as the newest MyFaces PMC Member!
> Dennis has been an active committer and community member in the
> MyFaces community for the last two years and his inclusion into the
> PMC is long overdue!
>
> Welcome & regards,
> Mike
>


Re: Reg vulnerability for Server State saving

2016-12-23 Thread Thomas Andraschko
Hi,

i don't think there is any other way to configure it but you can still
check the sources: http://svn.apache.org/viewvc/myfaces/core/branches/1.1.x/

Regards,
Thomas

2016-12-23 11:21 GMT+01:00 karthik kn :

> Hi All,
> Any thoughts on the below ?
>
> On Wed, Dec 21, 2016 at 10:22 AM, karthik kn  wrote:
>
> > Hi,
> > If i use a new key in web.xml as SECRET, it could be still  exposed to
> the
> > Administrator on accessing the system.
> >
> > Wont this cause a vulnerability ? Is there any other mechanism of storing
> > the secret ?
> >
> > On Tue, Dec 20, 2016 at 6:52 PM, Moritz Bechler 
> wrote:
> >
> >> Hi,
> >>
> >> > Thank you for clarification. Using the secret mentioned in the below
> >> page
> >> > would suffice or there is some mechanism to generate the SECRET ?
> >> >
> >>
> >> You must not use the keys specified on this page but generate your own
> >> secret ones. An attacker using the same key can then produce a valid
> >> ViewState token containing an exploit. Also, as noted on the security
> >> page and by Leonardo, version up to and including 1.1.7, 1.2.8, 2.0.0
> >> are vulnerable to padding oracle attacks (I haven't had a close look but
> >> I would be pretty sure that also applies to server side state saving).
> >> That means that an attacker may be able to create such tokens without
> >> the knowledge of the key - again allowing for the same exploits.
> >>
> >> So I guess there is no way to be really safe without upgrading.
> >>
> >>
> >> Moritz
> >>
> >> PS: you also might want to consider using something stronger than DES.
> >>
> >>
> >> --
> >> AgNO3 GmbH & Co. KG, Sitz Tübingen, Amtsgericht Stuttgart HRA 728731
> >> Persönlich haftend:
> >> Metagesellschaft mbH, Sitz Tübingen, Amtsgericht Stuttgart HRB 744820,
> >> Vertreten durch Joachim Keltsch
> >>
> >
> >
> >
> > --
> > -
> > Thanks & Regards
> >
> > Karthik.K.N
> >
>
>
>
> --
> -
> Thanks & Regards
>
> Karthik.K.N
>


Re: No saved view state could be found in tomcat cluster

2016-01-27 Thread Thomas Andraschko
You probably need to set some myfaces params to serialize the state in the
session.
If you enabled encryption, you also need to set the encryption keys cause
otherwhise they are generated randomly on startup on each node.

Am Mittwoch, 27. Januar 2016 schrieb Romain Manni-Bucau :

> Hi
>
> TomEE has a built in cluster support, why didnt you use that?
>
>
> Romain Manni-Bucau
> @rmannibucau  |  Blog
>  | Github <
> https://github.com/rmannibucau> |
> LinkedIn  | Tomitriber
> 
>
> 2016-01-27 15:04 GMT+01:00 Jalal Almutawa  >:
>
> > Hello,
> >
> > I have a TomEE 1.7.1 cluster setup using DeltaManager with a
> > ForceReplicationValve that forces all JSF bean attributes to be
> replicated
> > between nodes. I also have a session-test JSF application with a Session
> > Scoped Managed Bean with a simple Integer "counter" to serve as a
> > replication test. A facelet with an  is used to
> > increment the counter just to see if the replication works.
> >
> > Now replication works fine, I can see the incremented value of the
> counter
> > each type a hit the commandButton. The issue is that when we failover
> > between nodes, MyFaces throws a No saved view state could be found error.
> > It then works when we refresh the page, but it will not maintain the POST
> > request to increment the counter (e.g. counter=4, we click the increment
> > button, we get the error, we refresh the page, counter still = 4)
> >
> > Code for the session-test webapp:
> https://github.com/jmutawa/session-test
> > Code for the ForceReplicationValve:
> > https://github.com/jmutawa/ForceReplicationValve
> >
> > We tried various configuration options in the web.xml (setting state
> saving
> > in the client, setting serialize state in session to false, ..) but still
> > same error.
> >
> > Appreciate if someone could tell us what are doing wrong.
> >
> > Thanks,
> > Jalal
> >
>


Re: c:forEach issue in JSF 2

2015-07-01 Thread Thomas Andraschko
Which version are u using? MyFaces 2.2 fixed many c:forEach issues.

Maybe you should try to use ui:repeat instead c:forEach, too. You can
google about the differences.

2015-07-01 9:42 GMT+02:00 khush N :

> Hi,
>
> I am upgrading my application from JSF 1.2 to JSF 2.
>
> I am trying a below simple forEach tag but it not showing anything inside
> the loop.
>
>  id="tab${sectionId}"
>   border="0"
>   cellpadding="0"
>   cellspacing="0"
>   width="100%"
>   class="listingTable"
> >
>  var="row"
> rowStatus="index"
> items="#{bean.department.userActivities}"
> >
> 
> 
> test
>  
>  
> 
> 
>
> The value test is not showing up. Has the c:forEach implementaion changed?
>
> I tried replacing  with  but  has some
> other issue. It is rendering the content inside it. But if I have a
> component inside , I am not able to assign a backing bean value
> as ID of the component. Example is as below
>
>  id="tab${sectionId}"
> border="0"
> cellpadding="0"
> cellspacing="0"
> width="100%"
> class="listingTable"
> >
>  var="row"
> rowIndexVar="index"
> value="#{bean.department.userActivities}"
> >
> 
> test1
> 
> 
> 
>
> So, with . I am not able to assign backing bean property as ID
> of the component. I am receiving the error
> "java.lang.IllegalArgumentException: component identifier must not be a
> zero-length String "
>
> Can anyone please help me in understanding as to why the c:forEach tag is
> not working. I have huge code which is using forEach tag. With upgrade, I
> will have to remove every forEach if it is no more supported in JSF2 :(
>
> Thanks in advance!
>


Re: sendRedirect is not working in JSF 2.2

2015-06-22 Thread Thomas Andraschko
Do you try to redirect in the RENDER_RESPONSE phase? If yes, you propably
need to increase the buffer size via web.xml.

2015-06-22 11:09 GMT+02:00 RICARD MORE FARRES :

> Hi,
>
> Try using
> FacesContext.getCurrentInstance().getExternalContext().redirect("any_url");
>
> Regards,
> Ricard
>
> -Mensaje original-
> De: khush N [mailto:kbnavl...@gmail.com]
> Enviado el: lunes, 22 de junio de 2015 9:52
> Para: MyFaces Discussion
> Asunto: sendRedirect is not working in JSF 2.2
>
> Hi,
>
> I am upgrading my application from JSF 1.2 to 2.2.
>
> I have a simple response.sendRedirect() in my backing bean. This used to
> work in JSF 1.2. After upgrading JSF 2.2, it has stopped working giving the
> error "java.lang.IllegalStateException: Cannot change buffer size after
> data has been written   at org.apache.catalina.connecto"
>
> Actually, none of the redirects are working. I read about JSF Lifecyle and
> found that after adding below line after sendRedirect(), it is working.
> FacesContext.getCurrentInstance().responseComplete();
>
> However, can anyone help me in understanding how the implementation of JSF
> has upgraded in 2.2 that redirect has stopped working without completing
> the response?
>
> Thanks!
>


Re: hidden input not refreshed

2015-01-02 Thread Thomas Andraschko
I see Romain. It should work for the first button...
You could try to add execute="@this" but it should work without, too.

2015-01-02 11:01 GMT+01:00 Mert ÇALIŞKAN :

> Yes, default value of f:ajax is @none.
> But also by default the element that triggers the request, which is
>  in your case, will get re-rendered (refreshed with your
> statement).
> so your inputHidden will not be updated unless specified.
>
> Cheers,
>
> M.
> 
> Oracle Java Champion
> Developer (http://www.t2.com.tr), Lecturer (
> http://www.cs.hacettepe.edu.tr/kisiler.html), JUG Leader (
> http://www.ankarajug.org), Author (http://www.amazon.com/author/mert)
>
>
>
> On Friday 2 January 2015 at 11:51, Thomas Andraschko wrote:
>
> > Hey Romain,
> >
> > AFAIR the default for the render attribute of f:ajax is @none, so
> therefore
> > it's expected. You would need to set it to e.g. render="@form"
> >
> > 2015-01-02 10:33 GMT+01:00 Romain Manni-Bucau  (mailto:rmannibu...@gmail.com)>:
> >
> > > Hi guys,
> > >
> > >
> > > in cdi tcks there is:
> > >
> > > 
> > >  > > id="conversationId" />
> > > 
> > >  > > value="Begin conversation" id="beginConversationButton">
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > seems when ajax rendering is triggered h:inputHidden is not refresh,
> > > is it expected?
> > >
> > >
> > > Romain Manni-Bucau
> > > @rmannibucau
> > > http://www.tomitribe.com
> > > http://rmannibucau.wordpress.com
> > > https://github.com/rmannibucau
> > >
> >
> >
> >
>
>
>


Re: hidden input not refreshed

2015-01-02 Thread Thomas Andraschko
Hey Romain,

AFAIR the default for the render attribute of f:ajax is @none, so therefore
it's expected. You would need to set it to e.g. render="@form"

2015-01-02 10:33 GMT+01:00 Romain Manni-Bucau :

> Hi guys,
>
>
> in cdi tcks there is:
>
> 
>   id="conversationId" />
>  
> value="Begin conversation" id="beginConversationButton">
>   
>  
>  
>   
>   
>   
>  
> 
>
> seems when ajax rendering is triggered h:inputHidden is not refresh,
> is it expected?
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>


Re: ViewScoped bean created multiple times?

2014-11-07 Thread Thomas Andraschko
Constructor is called multiple times by design - thats how object
serialization works.
Serislization is enabled by default in myfaces to support
clustering/failover.

No clue about viewaction - i cant use jsf 2.2.

Am Freitag, 7. November 2014 schrieb Bjørn T Johansen :

> 2.2, like this.:
>
> http://xmlns.jcp.org/xml/ns/javaee";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
> http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd";
> version="2.2">
>
>
> No, javax.faces.PARTIAL_STATE_SAVING is set to true...
>
>
> BTJ
>
> On Fri, 7 Nov 2014 16:21:29 -0500
> Kito Mann > wrote:
>
> > OK. What version do you have in your faces-config.xml file? Also, do you
> > have javax.faces.PARTIAL_STATE_SAVING set to false in web.xml?
> >
> > ___
> >
> > Kito D. Mann | @kito99 | Author, JSF in Action
> > Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
> consulting
> > http://www.JSFCentral.com | @jsfcentral
> > +1 203-998-0403
> >
> > * Listen to the Enterprise Java Newscast: *http://
> > enterprisejavanews.com
> > *
> > * JSFCentral Interviews Podcast:
> > http://www.jsfcentral.com/resources/jsfcentralpodcasts/
> > * Sign up for the JSFCentral Newsletter:
> http://oi.vresp.com/?fid=ac048d0e17
> >
> > On Fri, Nov 7, 2014 at 4:09 PM, Bjørn T Johansen  > wrote:
> >
> > > No bindings...  And using Myfaces 2.2.5
> > >
> > > BTJ
> > >
> > > On Fri, 7 Nov 2014 15:57:00 -0500
> > > Kito Mann > wrote:
> > >
> > > > Hello Bjorn,
> > > >
> > > > Do you have component bindings in your page (i.e  > > > binding="#{myBean.comp}"/>)? That causes the exact behavior you're
> > > > describing in versions of JSF prior to 2.2. What version of MyFaces
> are
> > > you
> > > > using?
> > > >
> > > > ___
> > > >
> > > > Kito D. Mann | @kito99 | Author, JSF in Action
> > > > Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
> > > consulting
> > > > http://www.JSFCentral.com | @jsfcentral
> > > > +1 203-998-0403
> > > >
> > > > * Listen to the Enterprise Java Newscast: *http://
> > > > enterprisejavanews.com
> > > > *
> > > > * JSFCentral Interviews Podcast:
> > > > http://www.jsfcentral.com/resources/jsfcentralpodcasts/
> > > > * Sign up for the JSFCentral Newsletter:
> > > http://oi.vresp.com/?fid=ac048d0e17
> > > >
> > > > On Fri, Nov 7, 2014 at 3:42 PM, Bjørn T Johansen  > wrote:
> > > >
> > > > > I trying to create a webapplication using request and/or viewscope
> > > instead
> > > > > of sessionscope, which I have always used... (Neved needed to
> concern
> > > > > myself with memory usage in the apps I have implemented.. :) )
> > > > > But I now have a problem using @ViewScoped..
> > > > > When I access index.xhtml which uses a managed bean in viewscope,
> the
> > > > > constructor is called multiple times. And the same with an init
> > > method, that
> > > > > should be called only once. I am using..:
> > > > >
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > > > > ..
> > > > >
> > > > > to call the init method, but I have also tried using f:event
> > > prerenderView
> > > > > and also @PostConstruct but I am not able to make the bean call the
> > > init
> > > > > method only once...
> > > > >
> > > > > What am I missing?
> > > > >
> > > > >
> > > > > Regards,
> > > > >
> > > > > BTJ
> > > > > --
> > > > >
> > > > >
> > >
> ---
> > > > > Bjørn T Johansen
> > > > >
> > > > > b...@havleik.no 
> > > > >
> > > > >
> > >
> ---
> > > > > Someone wrote:
> > > > > "I understand that if you play a Windows CD backwards you hear
> strange
> > > > > Satanic messages"
> > > > > To which someone replied:
> > > > > "It's even worse than that; play it forwards and it installs
> Windows"
> > > > >
> > > > >
> > >
> ---
> > > > >
> > >
>
>


Re: catch faces message with js?

2014-10-21 Thread Thomas Andraschko
Hi Karl,

just have a look at p:growl - we use an own renderer there.
You can also overwrite the h:message/h:messages renderer of course.

Regards,
Thomas

2014-10-21 13:26 GMT+02:00 Karl Kildén :

> Hello,
>
> I want to implement my faces messages with
> http://codeseven.github.io/toastr/ How can I best do this? can I listen to
> some js event or server side event?
>
> cheers
>


Re: Decide what to rerender on server side?

2014-09-05 Thread Thomas Andraschko
FacesContext.getCurrentInstance
().getPartialViewContext
().getRenderIds
().add
("myPanel");



2014-09-05 8:34 GMT+02:00 Karl Kildén :

> Hi Howard,
>
> Well they use custom ajax so not sure it would be very easy to understand
> but eventually I will look at it yes :-) Still interested in hearing some
> pro input from myfaces guys first
>
> Can you link me the feature in omnifaces? I cannot find it. Regarding
> primefaces I don't want to be to dependent on frameworks as hinted in my
> first email.
>
>
> On 5 September 2014 00:33, Howard W. Smith, Jr. 
> wrote:
>
> > Karl, you could look at PrimeFaces requestContext implementation (source
> > code).
> >
> > also, you can maybe ask for something like this to be added as a feature
> > request in MYFACES JIRA.
> >
> > Is there any reason why you prefer not to use PrimeFaces requestContext
> or
> > the similar feature that is available in OmniFaces library?
> >
> >
> >
> > On Thu, Sep 4, 2014 at 4:30 PM, Karl Kildén 
> wrote:
> >
> > > Primefaces offers several ways to do client side stuff from the server.
> > For
> > > examples see here:
> > > http://www.primefaces.org/showcase/ui/misc/requestContext.xhtml
> > >
> > > While I use primefaces I prefer to keep my hands out of the cookie jar
> > with
> > > stuff like this. I mean a datepicker can be replaced with a js widget
> in
> > 20
> > > minutes if you use a composite component that wraps primefaces date
> > picker.
> > > However this stuff would be painful to replace.
> > >
> > > So my question is, could this be done in some way with JSF or
> > myfaces-impl?
> > >
> > > cheers
> > >
> >
>


Re: PrimeFaces 4.0.14 + MyFaces 2.2.3: ClassCastException in ConfigContainer

2014-06-05 Thread Thomas Andraschko
Sorry, wrong URL.
https://code.google.com/p/primefaces/issues/detail?id=6889


2014-06-05 15:47 GMT+02:00 Thomas Andraschko :

> Hey,
>
> i fixed this in PF 5.0 ->
> https://code.google.com/p/primefaces/issues/detail?id=688
>
> Regards,
> Thomas
>
>
> 2014-06-05 15:42 GMT+02:00 Felipe Jaekel :
>
> Hi,
>>
>> I'm eventually getting a ClassCastException in my production server. All
>> pages stop rendering and I need to reload the application to make it work
>> again.
>>
>> Problem happens in a PrimeFaces class, but as the value is retrieved from
>> JSF I'd like to check here too.
>>
>> Jun 05, 2014 8:06:47 AM javax.faces.component._ExternalSpecifications
>> isBeanValidationAvailable
>> Informações: MyFaces Bean Validation support enabled
>> Jun 05, 2014 8:06:47 AM
>> br.com.spdata.jsf.util.AbstractRedirectExceptionHandler log
>> Grave: java.lang.Boolean cannot be cast to java.lang.String
>> java.lang.ClassCastException: java.lang.Boolean cannot be cast to
>> java.lang.String
>> at
>> org.primefaces.config.ConfigContainer.initConfigFromContextParams(ConfigContainer.java:104)
>> at
>> org.primefaces.config.ConfigContainer.(ConfigContainer.java:60)
>> at
>> org.primefaces.context.DefaultApplicationContext.(DefaultApplicationContext.java:30)
>> at
>> org.primefaces.context.DefaultRequestContext.getApplicationContext(DefaultRequestContext.java:223)
>> at
>> org.primefaces.util.ComponentUtils.getConverter(ComponentUtils.java:130)
>> at
>> org.primefaces.renderkit.InputRenderer.getConvertedValue(InputRenderer.java:183)
>> at
>> javax.faces.component.UIInput.getConvertedValue(UIInput.java:662)
>> at javax.faces.component.UIInput.validate(UIInput.java:598)
>> at
>> javax.faces.component.UIInput.processValidators(UIInput.java:274)
>> at
>> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1457)
>> at
>> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1457)
>> at
>> org.primefaces.component.panel.Panel.processValidators(Panel.java:281)
>> at javax.faces.component.UIForm.processValidators(UIForm.java:210)
>> at
>> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1457)
>> at
>> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1457)
>> at
>> javax.faces.component.UIViewRoot._processValidatorsDefault(UIViewRoot.java:1697)
>> at javax.faces.component.UIViewRoot.access$600(UIViewRoot.java:77)
>> at
>> javax.faces.component.UIViewRoot$ProcessValidatorPhaseProcessor.process(UIViewRoot.java:1804)
>> at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1653)
>> at
>> javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:909)
>> at
>> org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:38)
>> at
>> org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:196)
>> at
>> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:143)
>> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>> at
>> br.com.spdata.filter.FileUploadFilter.doFilter(FileUploadFilter.java:118)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>> at
>> br.com.spdata.tecnico.filter.LoginFilter.doFilter(LoginFilter.java:45)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>> at
>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
>> at
>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
>> at
>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
>> at
>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OnceP

Re: PrimeFaces 4.0.14 + MyFaces 2.2.3: ClassCastException in ConfigContainer

2014-06-05 Thread Thomas Andraschko
Hey,

i fixed this in PF 5.0 ->
https://code.google.com/p/primefaces/issues/detail?id=688

Regards,
Thomas


2014-06-05 15:42 GMT+02:00 Felipe Jaekel :

> Hi,
>
> I'm eventually getting a ClassCastException in my production server. All
> pages stop rendering and I need to reload the application to make it work
> again.
>
> Problem happens in a PrimeFaces class, but as the value is retrieved from
> JSF I'd like to check here too.
>
> Jun 05, 2014 8:06:47 AM javax.faces.component._ExternalSpecifications
> isBeanValidationAvailable
> Informações: MyFaces Bean Validation support enabled
> Jun 05, 2014 8:06:47 AM
> br.com.spdata.jsf.util.AbstractRedirectExceptionHandler log
> Grave: java.lang.Boolean cannot be cast to java.lang.String
> java.lang.ClassCastException: java.lang.Boolean cannot be cast to
> java.lang.String
> at
> org.primefaces.config.ConfigContainer.initConfigFromContextParams(ConfigContainer.java:104)
> at
> org.primefaces.config.ConfigContainer.(ConfigContainer.java:60)
> at
> org.primefaces.context.DefaultApplicationContext.(DefaultApplicationContext.java:30)
> at
> org.primefaces.context.DefaultRequestContext.getApplicationContext(DefaultRequestContext.java:223)
> at
> org.primefaces.util.ComponentUtils.getConverter(ComponentUtils.java:130)
> at
> org.primefaces.renderkit.InputRenderer.getConvertedValue(InputRenderer.java:183)
> at
> javax.faces.component.UIInput.getConvertedValue(UIInput.java:662)
> at javax.faces.component.UIInput.validate(UIInput.java:598)
> at
> javax.faces.component.UIInput.processValidators(UIInput.java:274)
> at
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1457)
> at
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1457)
> at
> org.primefaces.component.panel.Panel.processValidators(Panel.java:281)
> at javax.faces.component.UIForm.processValidators(UIForm.java:210)
> at
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1457)
> at
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1457)
> at
> javax.faces.component.UIViewRoot._processValidatorsDefault(UIViewRoot.java:1697)
> at javax.faces.component.UIViewRoot.access$600(UIViewRoot.java:77)
> at
> javax.faces.component.UIViewRoot$ProcessValidatorPhaseProcessor.process(UIViewRoot.java:1804)
> at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1653)
> at
> javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:909)
> at
> org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:38)
> at
> org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:196)
> at
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:143)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
> br.com.spdata.filter.FileUploadFilter.doFilter(FileUploadFilter.java:118)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
> br.com.spdata.tecnico.filter.LoginFilter.doFilter(LoginFilter.java:45)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
> at
> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
> at
> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
> at
> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
> at
> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
> at
> org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
> at
> org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
> at
> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
> at
> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
> at
> org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
> at
> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
> at
> org.apache.shiro.web.servlet.

Re: Problem with clientWindow id and Deltaspike 0.7

2014-05-21 Thread Thomas Andraschko
Hi,

could you try to use DeltaSpikes window handling?
I never faced any issues with JSF 2.0/2.1 and DeltaSpike.
Maybe it's some incompatibly between JSF 2.2 and DS in some cases. Maybe we
should ask Gerhard, he developed the bridge for JSF 2.2.

Regards,
Thomas


2014-05-21 20:21 GMT+02:00 Karl Kildén :

> Hi,
>
> In my sandbox app Deltaspike fails with a TomEE that has been upgraded to
> 2.2.3. Error:
>
> WebBeans context with scope type annotation @WindowScoped does not exist
> within current thread
>
>
>
> When I debug it is because Deltaspike asks ServletExternalContextImpl for
> the ClientWindow. It get's null and everything fails. I have put
> breakpoints everywhere that ClientWindow can be set and it is simply not
> set before deltaspike asks.
>
> Mark was able to reproduce it once and only once :(  Romain got
> stackoverflow error with that error when he tried against tomee trunk and
> with my sample project. I asks on myfaces list because I want to know this:
>
>
> When I boot TomEE and make a request to faces servlet, what should set
> ClientWindow in ServletExternalContextImpl? Any ideas why this is to late
> (or why deltaspike is to early?) Cheers
>


Re: Generic value for org.apache.myfaces.EXPRESSION_FACTORY?

2014-03-27 Thread Thomas Andraschko
AFAIK you can't.
I just deliver JUEL in all my apps and setting the EXPRESSION_FACTORY to
JUEL.


2014-03-27 13:17 GMT+01:00 Felipe Jaekel :

> I was trying o set org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL to false.
> The goal is to improve performance and solve the problem I mentioned
> here<
> http://stackoverflow.com/questions/22641696/jsf-how-to-redirect-to-404-error-page-without-jstl
> >,
> but I was getting this error: HTTP Status 500 - No Factories configured for
> this Application.
>
> After a lot of search I found this
> post,
> where it's mentioned that I would need to
> set org.apache.myfaces.EXPRESSION_FACTORY. I think MyFaces documentation is
> great, much better than Mojarra's, but shouldn't be a note about this
> here<
> http://myfaces.apache.org/core22/myfaces-impl/webconfig.html#org_apache_myfaces_SUPPORT_JSP_AND_FACES_EL
> >
> ?
>
> Anyway, as I'm using Tomcat, I configured
> org.apache.myfaces.EXPRESSION_FACTORY
> with org.apache.el.ExpressionFactoryImpl. Its working fine, but I didn't
> wan't to make my webapp Tomcat dependent, so is there a MyFaces class that
> can delegate to the appropriated container class?
>
> Thanks
>


Re: CODI issue with CDI Observer

2014-03-24 Thread Thomas Andraschko
Ok. Rafael, could you create an issue?


2014-03-23 23:49 GMT+01:00 Gerhard Petracek :

> it isn't nice that we need such a workaround, however, we can add it easily
> (in codi as well as in deltaspike).
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2014-03-23 23:07 GMT+01:00 Thomas Andraschko  >:
>
> > Gerhard, i would add the null check but we should do it in
> AbstractContext.
> > Could it break anything?
> >
> >
> > 2014-03-23 22:57 GMT+01:00 Rafael Pestano :
> >
> > > Hi again,
> > >
> > > i just solved it in my custom scope by checking the null contextual:
> > >
> > > @Override
> > > public  T get(final Contextual contextual, final
> > > CreationalContext creationalContext) {
> > > if(creationalContext == null){
> > > return null;
> > > }
> > >
> > > i dont know what the spec says about trying to get a bean which doesnt
> > > have to participate in an event but in my opinion the easiest way to
> get
> > DS
> > > compatible with GF4 is to
> > > do that nullcheck in deltaspike instead of waiting for GF guys...
> > >
> > >
> >
> https://github.com/apache/deltaspike/blob/master/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/scope/viewaccess/ViewAccessContext.java#L79
> > >
> > >
> > >
> > > Att,
> > >
> > > Rafael M. Pestano
> > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > > Graduando em Ciência da Computação UFRGS
> > > http://conventions.github.io/home/
> > >
> > > http://rpestano.wordpress.com/
> > > @realpestano
> > >
> > >
> > >
> > > Em Domingo, 23 de Março de 2014 18:48, Rafael Pestano <
> > > rmpest...@yahoo.com.br> escreveu:
> > > Hi Gerhard,
> > >
> > > i can confirm its a GF4 issue, justed added a simple custom scope and
> > > received the same NPE in the scope GET method:
> > >
> > > @Override
> > > public  T get(final Contextual contextual, final
> > > CreationalContext creationalContext) {
> > > Bean bean = (Bean) contextual;
> > > if
> > > (customScopeContextHolder.getBeans().containsKey(bean.getBeanClass()))
> {
> > > return (T)
> > > customScopeContextHolder.getBean(bean.getBeanClass()).instance;
> > > } else {
> > > T t = (T) bean.create(creationalContext);//NPE here,
> > > contextual is null
> > >
> > >
> > > I'll open an issue at glassfish tracker.
> > >
> > > thanks for 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
> > > http://conventions.github.io/home/
> > >
> > > http://rpestano.wordpress.com/
> > > @realpestano
> > >
> > >
> > >
> > >
> > > Em Domingo, 23 de Março de 2014 18:25, Gerhard Petracek <
> > > gerhard.petra...@gmail.com> escreveu:
> > > since the implementation in ds is different and it works with other
> > > servers, it sounds like a general glassfish-issue with custom scopes.
> > >
> > > regards,
> > > gerhard
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > >
> > > 2014-03-23 22:15 GMT+01:00 Rafael Pestano :
> > >
> > > > Hi gerhard,
> > > >
> > > > same thing with ds 0.6:
> > > >
> > > > [2014-03-23T18:14:20.514-0300] [glassfish 4.0] [WARNING] []
> > > > [javax.enterprise.web.core] [tid: _ThreadID=20
> > > > _ThreadName=http-listener-1(1)] [timeMillis: 1395609260514]
> > [levelValue:
> > > > 900] [[
> > > >   Servlet.service() for servlet FacesServlet threw exception
> > > > java.lang.NullPointerException
> > > > at
> > > >
> > >
> >
> org

Re: CODI issue with CDI Observer

2014-03-23 Thread Thomas Andraschko
Gerhard, i would add the null check but we should do it in AbstractContext.
Could it break anything?


2014-03-23 22:57 GMT+01:00 Rafael Pestano :

> Hi again,
>
> i just solved it in my custom scope by checking the null contextual:
>
> @Override
> public  T get(final Contextual contextual, final
> CreationalContext creationalContext) {
> if(creationalContext == null){
> return null;
> }
>
> i dont know what the spec says about trying to get a bean which doesnt
> have to participate in an event but in my opinion the easiest way to get DS
> compatible with GF4 is to
> do that nullcheck in deltaspike instead of waiting for GF guys...
>
> https://github.com/apache/deltaspike/blob/master/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/scope/viewaccess/ViewAccessContext.java#L79
>
>
>
> Att,
>
> Rafael M. Pestano
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> http://conventions.github.io/home/
>
> http://rpestano.wordpress.com/
> @realpestano
>
>
>
> Em Domingo, 23 de Março de 2014 18:48, Rafael Pestano <
> rmpest...@yahoo.com.br> escreveu:
> Hi Gerhard,
>
> i can confirm its a GF4 issue, justed added a simple custom scope and
> received the same NPE in the scope GET method:
>
> @Override
> public  T get(final Contextual contextual, final
> CreationalContext creationalContext) {
> Bean bean = (Bean) contextual;
> if
> (customScopeContextHolder.getBeans().containsKey(bean.getBeanClass())) {
> return (T)
> customScopeContextHolder.getBean(bean.getBeanClass()).instance;
> } else {
> T t = (T) bean.create(creationalContext);//NPE here,
> contextual is null
>
>
> I'll open an issue at glassfish tracker.
>
> thanks for 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
> http://conventions.github.io/home/
>
> http://rpestano.wordpress.com/
> @realpestano
>
>
>
>
> Em Domingo, 23 de Março de 2014 18:25, Gerhard Petracek <
> gerhard.petra...@gmail.com> escreveu:
> since the implementation in ds is different and it works with other
> servers, it sounds like a general glassfish-issue with custom scopes.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
>
> 2014-03-23 22:15 GMT+01:00 Rafael Pestano :
>
> > Hi gerhard,
> >
> > same thing with ds 0.6:
> >
> > [2014-03-23T18:14:20.514-0300] [glassfish 4.0] [WARNING] []
> > [javax.enterprise.web.core] [tid: _ThreadID=20
> > _ThreadName=http-listener-1(1)] [timeMillis: 1395609260514] [levelValue:
> > 900] [[
> >   Servlet.service() for servlet FacesServlet threw exception
> > java.lang.NullPointerException
> > at
> >
> org.jboss.weld.injection.producer.BeanInjectionTarget.produce(BeanInjectionTarget.java:178)
> > at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:157)
> > at
> >
> org.jboss.weld.context.ForwardingContextual.create(ForwardingContextual.java:27)
> > at
> >
> org.apache.deltaspike.core.util.context.ContextualStorage.createContextualInstance(ContextualStorage.java:117)
> > at
> >
> org.apache.deltaspike.core.util.context.AbstractContext.get(AbstractContext.java:124)
> > at
> >
> org.apache.deltaspike.core.impl.scope.viewaccess.ViewAccessContext.get(ViewAccessContext.java:83)
> > at
> >
> org.jboss.weld.context.PassivatingContextWrapper$AbstractPassivatingContextWrapper.get(PassivatingContextWrapper.java:67)
> >
> >
> >
> >
> >
> > Att,
> > Rafael M. Pestano
> > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > Graduando em Ciência da Computação UFRGS
> > http://conventions.github.io/home/
> >
> > http://rpestano.wordpress.com/
> > @realpestano
> >
> >
> >
> > Em Domingo, 23 de Março de 2014 17:44, Gerhard Petracek <
> > gerhard.petra...@gmail.com> escreveu:
> > hi rafael,
> >
> > please test the same with deltaspike 0.6
> >
> > regards,
> > gerhard
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> >
> > 2014-03-23 18:23 GMT+01:00 Rafael Pestano :
> >
> > > Hi guys,
> > >
> > > i'm facing an issue with CODI on Glassfish 4 which i can't observe CDI
> > > events with notifyObserver = Reception.IF_EXISTS if my bean uses a CODI
> > > scope, here is some code:
> > >
> > > @ViewAccessScoped
> > > @Named
> > > public class MyBean implements Serializable{
> > >
> > > @Inject
> > > Event myEvent;
> > >
> > >
> > > public void fire(){
> > > myEvent.fire(new MyEvent());
> > > }
> > > }
> > >
> > > @ViewAccessScoped
> > > //@SessionScoped
> > > @Named
> > > public  class AnotherBean implements Serializable{
> > >
> > >   

Re: How to survive viewscoped beans/viewmap after session destroy (using client side saving)?

2014-02-21 Thread Thomas Andraschko
It's just a map to add data - like ViewState.
In JSF 2.0 and JSF 2.1, it was used to directly store the ViewScoped beans.

Don't know about more internals.


2014-02-21 21:42 GMT+01:00 user 01 :

> Sorry to bug you all again.. I am still seeking a clarification on above
>  points.. if anyone can please enlighten me.
>
> Thanks.
>
>
> On Sat, Feb 15, 2014 at 1:29 AM, user 01  wrote:
>
> > Can some one please clarify "What is this attributes map otherwise really
> > meant for? Is it to maintain JSF internal viewstate ?"
> >
> >
> > On Fri, Feb 14, 2014 at 1:31 AM, user 01  wrote:
> >
> >> Thanks a lot Leonardo for the solution. Played somewhat with it, looks
> >> like it'll works for me. The data survives session destroys.
> >>
> >> What is this attributes map otherwise really meant for, to maintain JSF
> >> internal viewstate ? Is it safe for me to use it like that ? Looks like
> a
> >> hack infact:)
> >>
> >> I could use the attributes map to store values/ objects, can't I just
> use
> >> this map to store the viewscoped beans simply?
> >>
> >>
> >> On Thu, Feb 13, 2014 at 11:05 AM, Leonardo Uribe  >wrote:
> >>
> >>> Hi
> >>>
> >>> In JSF 2.2 it was decided to store view scope beans always in session
> >>> (take a look at the description of @ViewScoped annotation in the
> >>> javadoc). But you can just call facesContext.getViewRoot() and use the
> >>> attribute map. Just remember the values there must be Serializable or
> >>> implement StateHolder.
> >>>
> >>> In my understanding, this was done in this way to support @PreDestroy
> >>> annotation when the session is expired.
> >>>
> >>> regards,
> >>>
> >>> Leonardo Uribe
> >>>
> >>>
> >>>
> >>> 2014-02-12 23:28 GMT-05:00 user 01 :
> >>> > I'm using Myfaces 2.2 with Client-side state saving. I see that the
> >>> > ViewScoped beans & data stored in viewmap is lost after the user
> >>> session is
> >>> > destroyed.
> >>> > I came to know, not sure if it is correct, that this is the expected
> >>> > behavior but then what's the way to avoid view expired exceptions
> after
> >>> > session destroy?
> >>> >
> >>> > My problem is that I destroy the user session pretty quickly after
> some
> >>> > inactivity period(like after 20 minutes) but I want the viewscope
> data
> >>> to
> >>> > survive even after that(when using client saving) so that when the
> user
> >>> > comes back after session destroy, he doesn't need to do a page
> >>> refresh. I
> >>> > dont know why & how this is so implemented but It is very normal that
> >>> the
> >>> > user may be busy reading some section of website or be away for 20
> >>> minutes,
> >>> > & as he comes back & interacts with opened pages, how would I make
> that
> >>> > work without the state ?
> >>> > I think this is a common requirement for any public websites.
> >>> >
> >>> > I think the internally used jsf viewstate is not lost, if I use
> client
> >>> side
> >>> > state saving(as my pages still work), but then why are those
> viewscoped
> >>> > beans scoped that were also serialized to page along with the
> >>> viewstate.
> >>> >
> >>> > If this the designed behavior, Is there any way I could make the view
> >>> > scoped data survive session expiration ?
> >>>
> >>
> >>
> >
>


Re: Does JSF 2.2 support window scope ?

2014-02-19 Thread Thomas Andraschko
JSF only provies the ClientWindow because it's used by the faces flow.
I would migrate to DeltaSpike.


2014-02-19 16:48 GMT+01:00 Stephen More :

> When using JSF 2.1 in order to utilze window scope ( like a session per
> window ) I was required to utilize CODI. I now see that JSF 2.2 has some
> support for ClientWindow. Can I stop using CODI and utilize the built in
> features in 2.2 for session per window or I should I migrate to DeltaSpike
> for my window scoping needs ?
>


Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE

2014-02-13 Thread Thomas Andraschko
I don't think that anyone will port your complete code and give you a
complete solution ;)

The biggest problem is AFAIR that the renderer implementations are not in
the API packages. So you have to rebuild all this functionality without
dependencies to the Impl.

e.g.
Attribute,AttributeManager -> String[] with attribute namens
Move all the utils functions to your own code (Util.componentIsDisabled,
RenderKitUtils.getSelectItems. etc.)

The most code doesn't really depent on the IMPL code.


2014-02-13 12:44 GMT+01:00 Rene Perschon :

> Hi everyone!
>
> I'm currently migrating an application from Glassfish 3.1.1 to TomEE. Now
> the problem is that this application contains a custom component which was
> unfortunately coded with hard dependencies on com.sun.faces classes (maven
> dependency jsf-impl).
>
> Now my question is how can i port this component in such a way that it is
> independent from any concrete JSF implementation (or at least in such a way
> that it works with MyFaces).
>
> Here's the component:
>
> import java.io.IOException;
> import java.util.Iterator;
> import java.util.Map;
>
> import javax.faces.component.UIComponent;
> import javax.faces.component.UINamingContainer;
> import javax.faces.component.ValueHolder;
> import javax.faces.context.FacesContext;
> import javax.faces.context.ResponseWriter;
> import javax.faces.convert.Converter;
> import javax.faces.model.SelectItem;
> import javax.faces.model.SelectItemGroup;
>
> import com.sun.faces.renderkit.Attribute;
> import com.sun.faces.renderkit.AttributeManager;
> import com.sun.faces.renderkit.RenderKitUtils;
> import com.sun.faces.renderkit.html_basic.MenuRenderer;
> import com.sun.faces.util.RequestStateManager;
> import com.sun.faces.util.Util;
>
> /**
>  * {@inheritDoc}.
>  */
> public class CustomSelectManyCheckboxListRenderer extends MenuRenderer
> {
> /** {@inheritDoc}. */
> private static final Attribute[] ATTRIBUTES =
> AttributeManager.getAttributes(AttributeManager.Key.SELECTMANYCHECKBOX);
> /** Representing the border string. */
> private static final String BORDER = "border";
> /** Representing the tr string. */
> private static final String TR = "tr";
> /** Representing the td string. */
> private static final String TD = "td";
> /** Representing the label string. */
> private static final String LABEL = "label";
> /** Representing the newline string. */
> private static final String NEWLINE = "\n";
> /** Representing the tab string. */
> private static final String TAB = "\t";
> /** Representing the class string. */
> private static final String CLASS = "class";
> /** Representing the style string. */
> private static final String STYLE = "style";
> /** Representing the valign string. */
> private static final String VALIGN = "valign";
>
>
> // -- Public
> Methods
>
>
> @Override
> public void encodeEnd(FacesContext context, UIComponent component)
> throws IOException
> {
>
> rendererParamsNotNull(context, component);
>
> if (!shouldEncode(component))
> {
> return;
> }
>
> ResponseWriter writer = context.getResponseWriter();
> assert (writer != null);
>
> String alignStr;
> Object borderObj;
> boolean alignVertical = false;
> int border = 0;
>
>
>
> if (null != component.getAttributes().get("layout"))
> {
> alignStr = (String) component.getAttributes().get("layout");
> alignVertical = alignStr.equalsIgnoreCase("pageDirection");
> }
>
> if (null != component.getAttributes().get(BORDER))
> {
> borderObj = component.getAttributes().get(BORDER);
> border = (Integer) borderObj;
> }
>
> Converter converter = null;
> if (component instanceof ValueHolder)
> {
> converter = ((ValueHolder)component).getConverter();
> }
>
> renderBeginText(component, border, alignVertical, context, true);
>
> Iterator items =
>   RenderKitUtils.getSelectItems(context, component);
>
> Object currentSelections = getCurrentSelectedValues(component);
> Object[] submittedValues = getSubmittedSelectedValues(component);
> Map attributes = component.getAttributes();
> OptionComponentInfo optionInfo =
>   new OptionComponentInfo((String)
> attributes.get("disabledClass"),
>   (String)
> attributes.get("enabledClass"),
>   (String)
> attributes.get("unselectedClass"),
>   (String)
> attributes.get("selectedClass"),
>   Util.componentIsDisabled(component),
>   isHideNoSelection(component));
> int idx = -1;
> while (ite

Re: How to survive viewscoped beans/viewmap after session destroy (using client side saving)?

2014-02-13 Thread Thomas Andraschko
>> I dont know why & how this is so implemented but It is very normal that
the
>> user may be busy reading some section of website or be away for 20
minutes,
>> & as he comes back & interacts with opened pages, how would I make that
>> work without the state ?
>> I think this is a common requirement for any public websites.

You could just add an ajax poll components and ping the server all 5
minutes - so the session will only be destroyed if all tabs from your
application are closed.


Re: @FlowScoped, @Named and @ManagedBean

2014-02-11 Thread Thomas Andraschko
Can't you just switch to DS?


2014-02-11 18:46 GMT+01:00 Leonardo Uribe :

> Hi
>
> CDI implementations does not require to provide anything to JSF in
> order to make @FlowScoped to work. The code has been tested against
> OWB and Weld and it works in both cases.
>
> But the flow stuff relies on the new ClientWindow API, and that could
> cause a conflict with CODI, because CODI provides a solution for this
> part too. In fact, the solution introduced in the standard comes from
> CODI.
>
> In your particular case, the best option is provide a custom
> ClientWindowFactory / ClientWindow that implements
> ClientWindow.getId() method and grab the value generated by CODI.
> Theorically there is no need of the custom PhaseListener, because the
> "attachWindow" step is done in CODI. I haven't tried it but I suppose
> a custom ClientWindow will work.
>
> regards,
>
> Leonardo Uribe
>
> 2014-02-11 11:56 GMT-05:00 l.pe...@senat.fr :
> > On 11/02/2014 14:51, l.pe...@senat.fr wrote:
> >>
> >> On 11/02/2014 10:28, l.pe...@senat.fr wrote:
> >>>
> >>> On 11/02/2014 03:30, Leonardo Uribe wrote:
> >>
> >>
> >> [...]
> 
>  @FlowScoped annotation is for CDI only, so it will not work for JSF
>  managed beans. In your case, I believe the bean is instantiated but it
>  is not stored in any context, so once is created is discarded, giving
>  the impression that the bean is working but it is not.
> 
>  In MyFaces it is possible to create a custom flow scope annotation for
>  other containers that works just like @FlowScoped, implementing
>  org.apache.myfaces.spi.FacesFlowProvider SPI interface. You are
>  already in CDI, so you don't need to bother about that.
> 
>  I have seen @Named annotation working with Spring, so it is not
>  something specific for CDI, but @FlowScoped depends of CDI API.
> >>>
> >>> I am using CODI 1.0.5 (I heavily use its @ViewAccessScoped annotation)
> >>> with OpenWebBeans 1.2.1.
> >>>
> >>> So, I thought  was ok on the CDI side...
> >>>
> >>> ...but after reading your mail, it seems to me that this CDI
> >>> implementation was provided before JSF 2.2 release, and so that it
> must not
> >>> include proper @FacesFlow support.
> >>>
> >>> Should I switch to another implementation, like DeltaSpike ?
> >>>
> >>> I must have misunderstood your mail from Sep 26 2013 (
> >>>
> http://myfaces.10567.n7.nabble.com/JSF-2-2-status-amp-snapshot-usage-td115852.html
> >>> ) inviting us to try Faces Flows in MyFaces 2.2.
> >>
> >> After some debugging, I found that :
> >> * beans are discovered and processed ok by
> >> org.apache.myfaces.flow.cdi.FlowScopeCDIExtension
> >> * -flow.xml is detected and processed with no errors ;
> >> * if I use an empty -flow.xml file, an exception is raised line 716 of
> >> org.apache.myfaces.config.DefaultFacesConfigurationProvider (on
> >> facesConfig.getFacesFlowDefinitions().add(flow); )
> >> * if I add a breakpoint in
> >> org.apache.myfaces.flow.FlowHandlerImpl#clientWindowTransition, I can
> see :
> >> ** my flow registered in _flowMapById (with "flow1" key)
> >> ** my flow registered in _flowMapByDocumentId (with an empty key)
> >> ** that _facesFlowProvider is null
> >
> >
> > ok, I think I got it. And, as I feared, it seems to be CODI related.
> >
> > In JSF2.2, a call to
> >
> > //JSF 2.2: attach window
> > _lifecycle.attachWindow(facesContext);
> >
> > has been added line 193 of javax.faces.webapp.FacesServlet
> >
> > When you use CODI, _lifecycle is an instance of
> >
> >
> org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifecycleWrapper
> >
> > This wrapper has been designed for JSF 2.0 and 2.1. So, it does not wrap
> the
> > call to attachWindow. And Lifecycle#attachWindow, which does nothing, is
> > called.
> >
> > Later, when JSf tries to find my @FlowScoped bean, it fails in
> >
> > org.apache.myfaces.flow.FlowHandlerImpl#getCurrentFlow , because client
> > windos is null
> >
> > (line 165 and following) :
> > ClientWindow clientWindow =
> > context.getExternalContext().getClientWindow();
> > if (clientWindow == null)
> > {
> > return null;
> > }
> >
> > So, I guess that I have to write a custom PhaseListener to solve this
> little
> > glitch.
> >
> > If you have a better solution, I will gladly take it.
> >
> >
> > Best regards,
> >
> > Ludovic
> > |
> > | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
> > |
> >
>


Re: MyFaces 2.2.0 ViewScoped

2014-01-15 Thread Thomas Andraschko
http://jsflive.wordpress.com/2013/07/17/jsf22-cdi-view-scope/


2014/1/15 José Luis Cetina 

> Hi im currently using org.omnifaces.cdi.ViewScoped for my @Named beans, now
> with MyFaces 2.2.0 which package do i have to use for @ViewScoped and
> @Named for work togheter.
>
> Thanks
>


Re: JSF 2.3

2014-01-14 Thread Thomas Andraschko
Not really but it's just matter of taste ;)


2014/1/14 Karl Kildén 

> Action based vs component based is a frequently discussed topic and you can
> probably find many resources arguing for one or the other.
>
> I really like JSF but I am still curious about stuff like this. For example
> if I want to use a third part javascript library for special corner cases
> it might be a good thing?
>
> I don't know but I'm very interested in others opinions.
>
> Thomas, useful for you?
>
>
> On 14 January 2014 12:24, Christian Beikov  >wrote:
>
> > Could you explain what the actual benefits of the action based
> programming
> > style are? I am missing the purpose/use cases for the actual need of
> such a
> > feature.
> >
> > Thanks in advance!
> >
> > Mit freundlichen Grüßen,
> > --------
> > *Christian Beikov*
> > Am 14.01.2014 12:02, schrieb Thomas Andraschko:
> >
> >  If they add support for such actions with @RequestMapping, then it
> should
> >> also be possible to declare request params as method params.
> >> e.g.
> >>
> >> @RequestMapping(...)
> >> public void doSomething(@RequestParameter(name="..") private String
> test)
> >>
> >>
> >> And of course conversion/validation of the request parameters.
> >>
> >>
> >> 2014/1/14 Karl Kildén 
> >>
> >>  Hello,
> >>>
> >>> Any opinions on this
> >>>
> >>> https://weblogs.java.net/blog/mriem/archive/2014/01/13/jsf-
> >>> tip-56-using-action-based-prototype-mojarra
> >>>
> >>> Basically it's regarding the common opinon that JavaEE should have a
> >>> action
> >>> based framework or support a action based style in JSF.
> >>>
> >>> cheers
> >>>
> >>>
> >
>


Re: JSF 2.3

2014-01-14 Thread Thomas Andraschko
If they add support for such actions with @RequestMapping, then it should
also be possible to declare request params as method params.
e.g.

@RequestMapping(...)
public void doSomething(@RequestParameter(name="..") private String test)


And of course conversion/validation of the request parameters.


2014/1/14 Karl Kildén 

> Hello,
>
> Any opinions on this
>
> https://weblogs.java.net/blog/mriem/archive/2014/01/13/jsf-tip-56-using-action-based-prototype-mojarra
>
> Basically it's regarding the common opinon that JavaEE should have a action
> based framework or support a action based style in JSF.
>
> cheers
>


Re: Performance params

2013-11-01 Thread Thomas Andraschko
http://lmgtfy.com/?q=tomcat+ExpressionFactoryImpl


2013/11/1 José Luis Cetina 

> I use tomee with the "default" EL
>
>
> 2013/11/1 Thomas Andraschko 
>
> > It depends on your AS or EL Implementation.
> > If you use JUEL, its: de.odysseus.el.ExpressionFactoryImpl
> >
> >
> > 2013/11/1 José Luis Cetina 
> >
> > > And what is the value of org.apache.myfaces.EXPRESSION_FACTORY ?
> > >
> > >
> > > 2013/11/1 Thomas Andraschko 
> > >
> > > > AFAIR you must set "org.apache.myfaces.EXPRESSION_FACTORY" because
> the
> > EL
> > > > Factory can't be extraced from JSP anymore.
> > > >
> > > >
> > > > 2013/11/1 José Luis Cetina 
> > > >
> > > > > I didnt have any of this performance parameters in my webapps, now
> im
> > > > > trying to use them (i have any other params), im trying one by one
> > and
> > > > when
> > > > > i set
> > > > >
> > > > > 
> > > > >
> > > > >
> org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL
> > > > > false
> > > > > 
> > > > >
> > > > > and try to access to my app i get an
> > > > >
> > > > > SEVERE - StandardWrapper.Throwable
> > > > > java.lang.IllegalStateException: No Factories configured for this
> > > > > Application. This happens if the faces-initialization does not work
> > at
> > > > all
> > > > > - make sure that you properly include all configuration settings
> > > > necessary
> > > > > for a basic faces application and that all the necessary libs are
> > > > included.
> > > > > Also check the logging output of your web application and your
> > > container
> > > > > for any exceptions!
> > > > > If you did that and find nothing, the mistake might be due to the
> > fact
> > > > that
> > > > > you use some special web-containers which do not support
> registering
> > > > > context-listeners via TLD files and a context listener is not setup
> > in
> > > > your
> > > > > web.xml.
> > > > > A typical config looks like this;
> > > > > 
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> org.apache.myfaces.webapp.StartupServletContextListener
> > > > > 
> > > > >
> > > > > I dont have the
> > org.apache.myfaces.webapp.StartupServletContextListener
> > > > > listener in my web.xml, im using an ear, what im doing wrong?
> > > > >
> > > > >
> > > > > 2013/11/1 Kito Mann 
> > > > >
> > > > > > Thanks for the link, Howard. Mark is definitely an "outstanding
> > > Apache
> > > > > > Committer" ;-).
> > > > > >
> > > > > > At any rate, this client isn't using CDI, so that isn't an
> option.
> > I
> > > > > would
> > > > > > definitely consider it for clients that are using CDI, though. I
> > > always
> > > > > > felt like OpenWebBeans was more stable than Weld.
> > > > > >
> > > > > > ___
> > > > > >
> > > > > > Kito D. Mann | @kito99 | Author, JSF in Action
> > > > > > Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
> > > > > consulting
> > > > > > http://www.JSFCentral.com | @jsfcentral
> > > > > > +1 203-998-0403
> > > > > >
> > > > > > * Listen to the Enterprise Java Newscast:
> > > > > > *http://w<http://blogs.jsfcentral.com/JSFNewscast/>
> > > > > > ww.enterprisejavanews.com*
> > > > > > * JSFCentral Interviews Podcast:
> > > > > > http://www.jsfcentral.com/resources/jsfcentralpodcasts/
> > > > > > * Sign up for the JSFCentral Newsletter:
> > > > > > http://oi.vresp.com/?fid=ac048d0e17
> > > > > >
> > > > > >
> > > > > > On Fri, Nov 1, 2013 at 9:48 AM, Howard W. Smith, Jr. <
> > > > > > smithh032...@gmail.com
> > > > > > > wrote:
&

Re: Performance params

2013-11-01 Thread Thomas Andraschko
It depends on your AS or EL Implementation.
If you use JUEL, its: de.odysseus.el.ExpressionFactoryImpl


2013/11/1 José Luis Cetina 

> And what is the value of org.apache.myfaces.EXPRESSION_FACTORY ?
>
>
> 2013/11/1 Thomas Andraschko 
>
> > AFAIR you must set "org.apache.myfaces.EXPRESSION_FACTORY" because the EL
> > Factory can't be extraced from JSP anymore.
> >
> >
> > 2013/11/1 José Luis Cetina 
> >
> > > I didnt have any of this performance parameters in my webapps, now im
> > > trying to use them (i have any other params), im trying one by one and
> > when
> > > i set
> > >
> > > 
> > >
> > > org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL
> > > false
> > > 
> > >
> > > and try to access to my app i get an
> > >
> > > SEVERE - StandardWrapper.Throwable
> > > java.lang.IllegalStateException: No Factories configured for this
> > > Application. This happens if the faces-initialization does not work at
> > all
> > > - make sure that you properly include all configuration settings
> > necessary
> > > for a basic faces application and that all the necessary libs are
> > included.
> > > Also check the logging output of your web application and your
> container
> > > for any exceptions!
> > > If you did that and find nothing, the mistake might be due to the fact
> > that
> > > you use some special web-containers which do not support registering
> > > context-listeners via TLD files and a context listener is not setup in
> > your
> > > web.xml.
> > > A typical config looks like this;
> > > 
> > >
> > >
> > >
> >
> org.apache.myfaces.webapp.StartupServletContextListener
> > > 
> > >
> > > I dont have the org.apache.myfaces.webapp.StartupServletContextListener
> > > listener in my web.xml, im using an ear, what im doing wrong?
> > >
> > >
> > > 2013/11/1 Kito Mann 
> > >
> > > > Thanks for the link, Howard. Mark is definitely an "outstanding
> Apache
> > > > Committer" ;-).
> > > >
> > > > At any rate, this client isn't using CDI, so that isn't an option. I
> > > would
> > > > definitely consider it for clients that are using CDI, though. I
> always
> > > > felt like OpenWebBeans was more stable than Weld.
> > > >
> > > > ___
> > > >
> > > > Kito D. Mann | @kito99 | Author, JSF in Action
> > > > Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
> > > consulting
> > > > http://www.JSFCentral.com | @jsfcentral
> > > > +1 203-998-0403
> > > >
> > > > * Listen to the Enterprise Java Newscast:
> > > > *http://w<http://blogs.jsfcentral.com/JSFNewscast/>
> > > > ww.enterprisejavanews.com*
> > > > * JSFCentral Interviews Podcast:
> > > > http://www.jsfcentral.com/resources/jsfcentralpodcasts/
> > > > * Sign up for the JSFCentral Newsletter:
> > > > http://oi.vresp.com/?fid=ac048d0e17
> > > >
> > > >
> > > > On Fri, Nov 1, 2013 at 9:48 AM, Howard W. Smith, Jr. <
> > > > smithh032...@gmail.com
> > > > > wrote:
> > > >
> > > > > Kito,
> > > > >
> > > > > On Thu, Oct 31, 2013 at 7:46 PM, Howard W. Smith, Jr. <
> > > > > smithh032...@gmail.com> wrote:
> > > > >
> > > > > > See comments, and the URLs provided below as well. One of the
> > > > outstanding
> > > > > > Apache/PrimeFaces committers wrote the blog, and I am always
> happy
> > to
> > > > > share
> > > > > > and/or pass along. Hope it helps.
> > > > >
> > > > >
> > > > > Also, I couldn't help myself in saying this, another outstanding
> > Apache
> > > > > committer wrote this blog with the following question,
> > > > >
> > > > > Why is OpenWebBeans so fast?[1]
> > > > >
> > > > > I hope your client is willing to use OpenWebBeans + JUEL + MyFaces.
> > > that
> > > > is
> > > > > a happy stack which will make for happy campers/endusers/etc...
> > > > >
> > > > >
> > > > > [1]
> > > >
> http://struberg.wordpress.com/2012/03/20/why-is-openwebbeans-so-fast/
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > ---
> > > *SCJA. José Luis Cetina*
> > > ---
> > >
> >
>
>
>
> --
> ---
> *SCJA. José Luis Cetina*
> ---
>


Re: Performance params

2013-11-01 Thread Thomas Andraschko
AFAIR you must set "org.apache.myfaces.EXPRESSION_FACTORY" because the EL
Factory can't be extraced from JSP anymore.


2013/11/1 José Luis Cetina 

> I didnt have any of this performance parameters in my webapps, now im
> trying to use them (i have any other params), im trying one by one and when
> i set
>
> 
>
> org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL
> false
> 
>
> and try to access to my app i get an
>
> SEVERE - StandardWrapper.Throwable
> java.lang.IllegalStateException: No Factories configured for this
> Application. This happens if the faces-initialization does not work at all
> - make sure that you properly include all configuration settings necessary
> for a basic faces application and that all the necessary libs are included.
> Also check the logging output of your web application and your container
> for any exceptions!
> If you did that and find nothing, the mistake might be due to the fact that
> you use some special web-containers which do not support registering
> context-listeners via TLD files and a context listener is not setup in your
> web.xml.
> A typical config looks like this;
> 
>
>
> org.apache.myfaces.webapp.StartupServletContextListener
> 
>
> I dont have the org.apache.myfaces.webapp.StartupServletContextListener
> listener in my web.xml, im using an ear, what im doing wrong?
>
>
> 2013/11/1 Kito Mann 
>
> > Thanks for the link, Howard. Mark is definitely an "outstanding Apache
> > Committer" ;-).
> >
> > At any rate, this client isn't using CDI, so that isn't an option. I
> would
> > definitely consider it for clients that are using CDI, though. I always
> > felt like OpenWebBeans was more stable than Weld.
> >
> > ___
> >
> > Kito D. Mann | @kito99 | Author, JSF in Action
> > Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
> consulting
> > http://www.JSFCentral.com | @jsfcentral
> > +1 203-998-0403
> >
> > * Listen to the Enterprise Java Newscast:
> > *http://w
> > ww.enterprisejavanews.com*
> > * JSFCentral Interviews Podcast:
> > http://www.jsfcentral.com/resources/jsfcentralpodcasts/
> > * Sign up for the JSFCentral Newsletter:
> > http://oi.vresp.com/?fid=ac048d0e17
> >
> >
> > On Fri, Nov 1, 2013 at 9:48 AM, Howard W. Smith, Jr. <
> > smithh032...@gmail.com
> > > wrote:
> >
> > > Kito,
> > >
> > > On Thu, Oct 31, 2013 at 7:46 PM, Howard W. Smith, Jr. <
> > > smithh032...@gmail.com> wrote:
> > >
> > > > See comments, and the URLs provided below as well. One of the
> > outstanding
> > > > Apache/PrimeFaces committers wrote the blog, and I am always happy to
> > > share
> > > > and/or pass along. Hope it helps.
> > >
> > >
> > > Also, I couldn't help myself in saying this, another outstanding Apache
> > > committer wrote this blog with the following question,
> > >
> > > Why is OpenWebBeans so fast?[1]
> > >
> > > I hope your client is willing to use OpenWebBeans + JUEL + MyFaces.
> that
> > is
> > > a happy stack which will make for happy campers/endusers/etc...
> > >
> > >
> > > [1]
> > http://struberg.wordpress.com/2012/03/20/why-is-openwebbeans-so-fast/
> > >
> >
>
>
>
> --
> ---
> *SCJA. José Luis Cetina*
> ---
>


Re: [OT but still JSF]: Clustering, session replication, and database, too

2013-10-20 Thread Thomas Andraschko
@romain
do you have any article about it? Just for my interesst.
What especially is optimized for tomcat?

I may use TomEE in the future - if our customers allow this.



2013/10/20 Romain Manni-Bucau 

> @thomas: same on tomee + tomee has another integration for it, optimized
> for tomcat
> Le 20 oct. 2013 11:35, "Thomas Andraschko"  a
> écrit :
>
> > Hey,
> >
> > JFYI:
> > MyFaces+OWB on Tomcat with MSM is working fine.
> >
> > Don't know about TomEE.
> >
> > Regards,
> > Thomas
> >
> >
> > 2013/10/20 Karl Kildén 
> >
> > > Hello! I am also very interested in having more i.e. docs, examples and
> > > stuff for clustering across the tomee stack. The discussion came up on
> a
> > > jira some time ago and after that I asked Thomas to write a new post
> > about
> > > it (First part was great!).
> > >
> > > For example this is something that sounds really interesting and I want
> > to
> > > know more:
> > >
> > > * do not replicate the session over to other nodes!
> > >
> > > My scenarios are usually tomee with one war or tomcat with one war and
> > JSF,
> > > CDI, JPA only.
> > >
> > >
> > > On 20 October 2013 05:48, Howard W. Smith, Jr.  > > >wrote:
> > >
> > > > I had a question or two, since I have been reading "Java Summit -
> > > Pitfalls
> > > > in EE"[1] provided by Mark Struberg while having a discussion on
> tomee
> > > user
> > > > list.
> > > >
> > > > The following page stated the following:
> > > >
> > > > Page 134
> > > > Clustering
> > > >
> > > > * We use 'asymmetric clustering'
> > > > * use sticky sessions
> > > > * backup away the session to a memcached after each
> > > > request
> > > > * do not replicate the session over to other nodes!
> > > > * Session-Replication always in node pairs.
> > > > * only restore the session from the memcached if a failover
> > > > happened
> > > > * msm can be integrated into OWB:
> > > > http://code.google.com/p/memcached-session-manager/
> > > >
> > > > Since it says, 'We use asymmetric clustering' and other suggestions
> > were
> > > > made, I found it appropriate to direct my question(s) to MyFaces
> 'JSF'
> > > user
> > > > list and committers.
> > > >
> > > > is there some type of blog (or two or three) available that discuss
> how
> > > to
> > > > properly cluster a tomcat/tomee/openwebbeans/myfaces JSF web app?
> also,
> > > how
> > > > is the database replicated? I don't ever see database
> > cluster/replication
> > > > discussed by JSF developers; i recently had to search for database
> > > cluster
> > > > and saw 'replication', which is something i have not had to worry
> about
> > > > since my previous work involved database teams while i was doing
> > > > front-end/GUI software.
> > > >
> > > > now that i am doing java ee and jsf, i would love to know how to do
> > > > database clustering and/or replicating database while clustering JSF
> > > > webapp. Of course, right now, i only have one  tomee which references
> > > > 'apache' derby (which is performing well, but I would love to get my
> > feet
> > > > wet and cluster my web app + database). i did search derby's mail
> list
> > > > archives and i learned about sequioa and HA-JDBC (High-Availability
> > > JDBC).
> > > >
> > > > i was hoping to get an answer from MyFaces 'JSF'
> > users/committers...based
> > > > on their experience. I think someone told me that they use mysql
> > > > (clustering); my preference is still 'apache' derby (smile). please
> > > > remember, i'm wondering if any blogs are available that discuss
> > > clustering
> > > > tomcat (preference = tomee) + JSF web app (with database) + memcached
> > > > session manager.
> > > >
> > > > Thomas has already started writing a blog[2] about this. I'm looking
> > > > forward to seeing sample config for it all (if available). :)
> > > >
> > > > [1]
> > > >
> > > >
> > >
> >
> http://people.apache.org/~struberg/eesummit2013/Java%20EE%20Summit%20-%20pitfalls%20in%20EE.pdf
> > > >
> > > > [2]
> > > >
> > > >
> > >
> >
> http://tandraschko.blogspot.com/2013/09/session-replication-clustering-failover.html
> > > >
> > >
> >
>


Re: [OT but still JSF]: Clustering, session replication, and database, too

2013-10-20 Thread Thomas Andraschko
Hey,

JFYI:
MyFaces+OWB on Tomcat with MSM is working fine.

Don't know about TomEE.

Regards,
Thomas


2013/10/20 Karl Kildén 

> Hello! I am also very interested in having more i.e. docs, examples and
> stuff for clustering across the tomee stack. The discussion came up on a
> jira some time ago and after that I asked Thomas to write a new post about
> it (First part was great!).
>
> For example this is something that sounds really interesting and I want to
> know more:
>
> * do not replicate the session over to other nodes!
>
> My scenarios are usually tomee with one war or tomcat with one war and JSF,
> CDI, JPA only.
>
>
> On 20 October 2013 05:48, Howard W. Smith, Jr.  >wrote:
>
> > I had a question or two, since I have been reading "Java Summit -
> Pitfalls
> > in EE"[1] provided by Mark Struberg while having a discussion on tomee
> user
> > list.
> >
> > The following page stated the following:
> >
> > Page 134
> > Clustering
> >
> > * We use 'asymmetric clustering'
> > * use sticky sessions
> > * backup away the session to a memcached after each
> > request
> > * do not replicate the session over to other nodes!
> > * Session-Replication always in node pairs.
> > * only restore the session from the memcached if a failover
> > happened
> > * msm can be integrated into OWB:
> > http://code.google.com/p/memcached-session-manager/
> >
> > Since it says, 'We use asymmetric clustering' and other suggestions were
> > made, I found it appropriate to direct my question(s) to MyFaces 'JSF'
> user
> > list and committers.
> >
> > is there some type of blog (or two or three) available that discuss how
> to
> > properly cluster a tomcat/tomee/openwebbeans/myfaces JSF web app? also,
> how
> > is the database replicated? I don't ever see database cluster/replication
> > discussed by JSF developers; i recently had to search for database
> cluster
> > and saw 'replication', which is something i have not had to worry about
> > since my previous work involved database teams while i was doing
> > front-end/GUI software.
> >
> > now that i am doing java ee and jsf, i would love to know how to do
> > database clustering and/or replicating database while clustering JSF
> > webapp. Of course, right now, i only have one  tomee which references
> > 'apache' derby (which is performing well, but I would love to get my feet
> > wet and cluster my web app + database). i did search derby's mail list
> > archives and i learned about sequioa and HA-JDBC (High-Availability
> JDBC).
> >
> > i was hoping to get an answer from MyFaces 'JSF' users/committers...based
> > on their experience. I think someone told me that they use mysql
> > (clustering); my preference is still 'apache' derby (smile). please
> > remember, i'm wondering if any blogs are available that discuss
> clustering
> > tomcat (preference = tomee) + JSF web app (with database) + memcached
> > session manager.
> >
> > Thomas has already started writing a blog[2] about this. I'm looking
> > forward to seeing sample config for it all (if available). :)
> >
> > [1]
> >
> >
> http://people.apache.org/~struberg/eesummit2013/Java%20EE%20Summit%20-%20pitfalls%20in%20EE.pdf
> >
> > [2]
> >
> >
> http://tandraschko.blogspot.com/2013/09/session-replication-clustering-failover.html
> >
>


Re: CDI event propagation to ViewAccessScoped/ConversationScoped classes

2013-10-08 Thread Thomas Andraschko
Hi,

did you already try to set the reception on the @Observers annotation?




2013/10/8 Boris Brönner 

> Hello,
>
> I have a database layer, that can be accessed by JSF and by REST. The
> backing beans for JSF are ViewAccessScoped. The services for REST are
> RequestScoped.
>
> When creating an entity, from both JSF or REST, an event should be raised
> to notify all possible clients (JSF, but also other clients listening e.g.
> JMS events). Now a problem occurs. When I create an entity using the REST
> interface the event is raised as expected.
>
> However now WELD raises an ContextNotActiveException:
>
> org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active
> contexts for scope type
>
> org.apache.myfaces.extensions.cdi.core.api.scope.conversation.ViewAccessScoped
>
> I get the same problem when using the ConversationScoped annotation. This
> problem occurs always when using the REST interface, i.e. whether or not I
> have an JSF page open.
>
>
> Below you find a more detailed stack trace starting from the point where
> the event is fired.It seems like Weld thinks there is such a bean, but in
> the end then can't get a context.
>
> What can I do here? Does the CODI implementation even work in this context?
>
> If you need more information about my setup, let me know :)
>
> Regards,
> Boris
>
> Caused by: org.jboss.weld.context.ContextNotActiveException: WELD-001303 No
> active contexts for scope type
>
> org.apache.myfaces.extensions.cdi.core.api.scope.conversation.ConversationScoped
> at
> org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:598)
> [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at
>
> org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:71)
> [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at
>
> org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)
> [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at
>
> de.dfki.asr.compass.ejb.project.OpenScenarioBean$Proxy$_$$_WeldClientProxy.handleEntityCreated(OpenScenarioBean$Proxy$_$$_WeldClientProxy.java)
> [classes:]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [rt.jar:1.7.0_11]
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> [rt.jar:1.7.0_11]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> [rt.jar:1.7.0_11]
> at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.7.0_11]
> at
>
> org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:264)
> [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at
>
> org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
> [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at
>
> org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
> [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at
>
> org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:260)
> [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at
>
> org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
> [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at
>
> org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
> [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at
>
> org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)
> [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at
>
> org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:241)
> [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at
>
> org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:229)
> [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at
> org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:207)
> [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at
>
> org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:569)
> [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at
> org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:564)
> [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at org.jboss.weld.event.EventImpl.fire(EventImpl.java:68)
> [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
>


Re: JSF 2.2 status & snapshot usage

2013-09-26 Thread Thomas Andraschko
Hi Karl,

AFAICS in JIRA, 2.2 should be feature complete.
Maybe Leo can give a small update about the status :)

Regards,
Thomas


2013/9/26 Karl Kildén 

> Hello,
>
> First off what's the recommended way to get a hold of a current myfaces
> snapshot, preferably with maven?
>
> I am eager to try parts of JSF 2.2. I've been snooping around in jira to
> get a sense of the completeness level of JSF 2.2 but I felt I might as well
> ask...
>
> - HTML Friendly Markup?
> - FlowScoped and ViewScoped?
>
> Thanks again for Myfaces! Cheers
>


Re: javax.faces.partial.execute=@none still executes decode

2013-05-27 Thread Thomas Andraschko
Hi Werner,

i'm a PrimeFaces commiter :)
We just wrap the PartialViewContext, we don't modify any logic here. The
original MyFaces PartialViewContext is used.
I think it would be no problem to fix it on our side and just remove the
request param but IMO if we send the request param with value @none,
nothing should be processed.

Regards,
Thomas


2013/5/27 Werner Punz 

> Am 22.05.13 16:05, schrieb Thomas Andraschko:
>
>  Hi,
>>
>> i found a weird issue that if i use p:ajax on inputText with
>> process="@none", the InputTextRenderer#decode method will be still
>> invoked.
>> This works fine with f:ajax in myfaces and mojarra.
>> p:ajax only works expected on mojarra.
>>
>> The only difference i found is, that p:ajax sends the
>> "javax.faces.partial.execute" param and f:ajax not.
>>
>> Here is a list with the post params (without my inputs):
>>
>> PrimeFaces:
>> javax.faces.ViewState=N%**2F6uUZMB9%**2BPXSBTJVus5p6rncWDWwUAgQ9UIOw**
>> eKuerVM0Z7
>> javax.faces.partial.ajax=true
>> javax.faces.source=xxx
>> javax.faces.partial.execute=%**40none
>> javax.faces.partial.render=%**40none
>> javax.faces.behavior.event=**change
>> javax.faces.partial.event=**change
>> form_SUBMIT=1
>>
>> MyFaces:
>> javax.faces.ViewState=**EHCQlskNw%**2BLXSBTJVus5pyzjdxWpT%**
>> 2B72t7rvnK11Nffi10%2Bl
>> javax.faces.partial.ajax=true
>> javax.faces.source=xxx
>> javax.faces.behavior.event=**change
>> javax.faces.partial.event=**change
>> javax.faces.windowId=2cc
>> form_SUBMIT=1
>> form=form
>>
>> Any idea? Or should i just raise an issue?
>>
>> Thanks,
>> Thomas
>>
>>  Hi, to my knowledge Primefaces uses its own ajax cycle and does not
> utilize jsf.ajax.request hence the difference.
> Not sure why p:ajax works on mojarra though.
> I would raise a bugreport on the Primefaces list and see what they have to
> say, I dont think it is a myfaces issues, since you said it works fine with
> f:ajax. (I fixed the @none issue a while ago in our codebase)
>
>
>
> Werner
>
>
>


Re: Text must not be null

2013-05-15 Thread Thomas Andraschko
I believe a label on a selectItem is null.


2013/5/15 Howard W. Smith, Jr. 

> On Wed, May 15, 2013 at 6:46 AM, Georg Portwich  >wrote:
>
> > Hi,
> >
> >
> >
> > we get sometimes a ‘Text must not be null’ exception from the
> > HtmlResponseWriterImpl.
> >
> > We see the exception randomly.  We now the xhtml file that triggers the
> > error including the parameter the user has entered on the page.
> >
> >
> Can you reply with the xhtml (file or files) that you 'know' triggers the
> error?
>


Re: Unwrap CC ValueExpression?

2013-05-13 Thread Thomas Andraschko
I'm sure, i checked the code base :)

We generate a report on the fly for the user. It just depends on the
session data but not on view data, therefore streamedContent is actually a
nice solution.


2013/5/13 Christian Beikov 

> I am not sure if that is independent. I think catagy fixed something like
> this in a newer release.
>
> Well I fixed the graphicImage thing by using the previously provided
> implementation. It's costly because it has to restore the view but in the
> end it works for us. We are using the graphicImage in composite components
> too as far as I remember.
> To overcome the filedownload problem I wrote my own
> UIComponent/UINamingContainer for the composite component which wraps a
> command link that uses the action listener provided by the composite
> component implementation instead of using the fileDownload of PF.
> I didn't use the media component before, but if the content is really
> stateless why don't you provide it via something like:
> #{resource['library:file']} ?
>
>
> 2013/5/13 Thomas Andraschko 
>
> > 3.5.4 but thats indepenent :)
> >
> >
> >
> > 2013/5/13 Christian Beikov 
> >
> > > What PF version are you using?
> > >
> > >
> > > 2013/5/13 Thomas Andraschko 
> > >
> > > > It's really view independent and  my Controller is RequestScoped.
> > > > The only problem is that currently graphicImage/media/filedownload
> are
> > > > unusable in a CC, if you need to pass the EL into the CC.
> > > >
> > > >
> > > > 2013/5/13 Christian Beikov 
> > > >
> > > > > The difference is that it can handle the view based scopes where
> the
> > > > > primefaces impl can't. But as I just realize this won't help you at
> > > all.
> > > > > Sorry but for now I can't think of a reliable general purpose way
> to
> > > > > retrieve the contents without rebuilding the view, I have to think
> > > about
> > > > > it.
> > > > > Do you need any context information like iteration status or so to
> > > > evaluate
> > > > > the expression to a meaningful value or is it completely
> independent
> > of
> > > > the
> > > > > view?
> > > > > What scope has the myController?
> > > > >
> > > > >
> > > > > 2013/5/13 Thomas Andraschko 
> > > > >
> > > > > > Hi Christian,
> > > > > >
> > > > > > i don't understand your solution exactly.
> > > > > > Whats the difference?
> > > > > > It would still store the #{cc.attrs.xxx} expression and #{cc}
> cant
> > be
> > > > > > evaluated without #pushComponentToEL(cc).
> > > > > > Also #createView should be avoided for such a request IMO because
> > of
> > > > > > performance.
> > > > > >
> > > > > > Regards,
> > > > > > Thomas
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > 2013/5/13 Christian Beikov 
> > > > > >
> > > > > > > I'd rather say this should be fixed by restoring the view
> before
> > > > > > accessing
> > > > > > > the expression. I have done something like that for
> > > > > > > DynamicContentResourceHandler which probably is used in this
> case
> > > > here
> > > > > > too.
> > > > > > > Basically you need to save the viewId and the expression
> together
> > > in
> > > > > the
> > > > > > > session so you are able to restore the adequate expression in
> the
> > > > > > resource
> > > > > > > handler. I did the following for GraphicImageRenderer:
> > > > > > >
> > > > > > >
> > > > > > > @Override
> > > > > > > protected String getImageSrc(FacesContext context,
> > GraphicImage
> > > > > > image)
> > > > > > > {
> > > > > > > String src = null;
> > > > > > > String name = image.getName();
> > > > > > >
> > > > > > > if(name != null) {
> > > > > > > String libName = image.getLibrary();

Re: Unwrap CC ValueExpression?

2013-05-13 Thread Thomas Andraschko
I believe it would be possible to solve it with ->

1) check if current component (media etc.) is inside a CC
2) get the CC
3) check if expressionString contains ".attrs." and extract the attribute
name
4) get the expression via the CC#getAttributes(attributeName)

But don't know if it works in all cases.
Maybe there exists a better and cleaner solution?

2013/5/13 Thomas Andraschko 

> 3.5.4 but thats indepenent :)
>
>
>
> 2013/5/13 Christian Beikov 
>
>> What PF version are you using?
>>
>>
>> 2013/5/13 Thomas Andraschko 
>>
>> > It's really view independent and  my Controller is RequestScoped.
>> > The only problem is that currently graphicImage/media/filedownload are
>> > unusable in a CC, if you need to pass the EL into the CC.
>> >
>> >
>> > 2013/5/13 Christian Beikov 
>> >
>> > > The difference is that it can handle the view based scopes where the
>> > > primefaces impl can't. But as I just realize this won't help you at
>> all.
>> > > Sorry but for now I can't think of a reliable general purpose way to
>> > > retrieve the contents without rebuilding the view, I have to think
>> about
>> > > it.
>> > > Do you need any context information like iteration status or so to
>> > evaluate
>> > > the expression to a meaningful value or is it completely independent
>> of
>> > the
>> > > view?
>> > > What scope has the myController?
>> > >
>> > >
>> > > 2013/5/13 Thomas Andraschko 
>> > >
>> > > > Hi Christian,
>> > > >
>> > > > i don't understand your solution exactly.
>> > > > Whats the difference?
>> > > > It would still store the #{cc.attrs.xxx} expression and #{cc} cant
>> be
>> > > > evaluated without #pushComponentToEL(cc).
>> > > > Also #createView should be avoided for such a request IMO because of
>> > > > performance.
>> > > >
>> > > > Regards,
>> > > > Thomas
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > 2013/5/13 Christian Beikov 
>> > > >
>> > > > > I'd rather say this should be fixed by restoring the view before
>> > > > accessing
>> > > > > the expression. I have done something like that for
>> > > > > DynamicContentResourceHandler which probably is used in this case
>> > here
>> > > > too.
>> > > > > Basically you need to save the viewId and the expression together
>> in
>> > > the
>> > > > > session so you are able to restore the adequate expression in the
>> > > > resource
>> > > > > handler. I did the following for GraphicImageRenderer:
>> > > > >
>> > > > >
>> > > > > @Override
>> > > > > protected String getImageSrc(FacesContext context,
>> GraphicImage
>> > > > image)
>> > > > > {
>> > > > > String src = null;
>> > > > > String name = image.getName();
>> > > > >
>> > > > > if(name != null) {
>> > > > > String libName = image.getLibrary();
>> > > > > ResourceHandler handler =
>> > > > > context.getApplication().getResourceHandler();
>> > > > > Resource res = handler.createResource(name, libName);
>> > > > >
>> > > > > if(res == null) {
>> > > > > return "RES_NOT_FOUND";
>> > > > > } else {
>> > > > > return
>> > > > >
>> context.getExternalContext().encodeResourceURL(res.getRequestPath());
>> > > > > }
>> > > > > } else {
>> > > > > Object value = image.getValue();
>> > > > >
>> > > > > if (value == null) {
>> > > > > return "";
>> > > > > } else  if(value instanceof String) {
>> > > > > src = getResourceURL(context, (String) value);
>> > > > > } else if (value instanceof StreamedContent) {
>> > > > > ViewHandler v

Re: Unwrap CC ValueExpression?

2013-05-13 Thread Thomas Andraschko
3.5.4 but thats indepenent :)



2013/5/13 Christian Beikov 

> What PF version are you using?
>
>
> 2013/5/13 Thomas Andraschko 
>
> > It's really view independent and  my Controller is RequestScoped.
> > The only problem is that currently graphicImage/media/filedownload are
> > unusable in a CC, if you need to pass the EL into the CC.
> >
> >
> > 2013/5/13 Christian Beikov 
> >
> > > The difference is that it can handle the view based scopes where the
> > > primefaces impl can't. But as I just realize this won't help you at
> all.
> > > Sorry but for now I can't think of a reliable general purpose way to
> > > retrieve the contents without rebuilding the view, I have to think
> about
> > > it.
> > > Do you need any context information like iteration status or so to
> > evaluate
> > > the expression to a meaningful value or is it completely independent of
> > the
> > > view?
> > > What scope has the myController?
> > >
> > >
> > > 2013/5/13 Thomas Andraschko 
> > >
> > > > Hi Christian,
> > > >
> > > > i don't understand your solution exactly.
> > > > Whats the difference?
> > > > It would still store the #{cc.attrs.xxx} expression and #{cc} cant be
> > > > evaluated without #pushComponentToEL(cc).
> > > > Also #createView should be avoided for such a request IMO because of
> > > > performance.
> > > >
> > > > Regards,
> > > > Thomas
> > > >
> > > >
> > > >
> > > >
> > > > 2013/5/13 Christian Beikov 
> > > >
> > > > > I'd rather say this should be fixed by restoring the view before
> > > > accessing
> > > > > the expression. I have done something like that for
> > > > > DynamicContentResourceHandler which probably is used in this case
> > here
> > > > too.
> > > > > Basically you need to save the viewId and the expression together
> in
> > > the
> > > > > session so you are able to restore the adequate expression in the
> > > > resource
> > > > > handler. I did the following for GraphicImageRenderer:
> > > > >
> > > > >
> > > > > @Override
> > > > > protected String getImageSrc(FacesContext context, GraphicImage
> > > > image)
> > > > > {
> > > > > String src = null;
> > > > > String name = image.getName();
> > > > >
> > > > > if(name != null) {
> > > > > String libName = image.getLibrary();
> > > > > ResourceHandler handler =
> > > > > context.getApplication().getResourceHandler();
> > > > > Resource res = handler.createResource(name, libName);
> > > > >
> > > > > if(res == null) {
> > > > > return "RES_NOT_FOUND";
> > > > > } else {
> > > > > return
> > > > >
> context.getExternalContext().encodeResourceURL(res.getRequestPath());
> > > > > }
> > > > > } else {
> > > > > Object value = image.getValue();
> > > > >
> > > > > if (value == null) {
> > > > > return "";
> > > > > } else  if(value instanceof String) {
> > > > > src = getResourceURL(context, (String) value);
> > > > > } else if (value instanceof StreamedContent) {
> > > > > ViewHandler viewHandler =
> > > > > context.getApplication().getViewHandler();
> > > > > StreamedContent streamedContent = (StreamedContent)
> > > > value;
> > > > > Resource resource =
> > > > >
> > > > >
> > > >
> > >
> >
> context.getApplication().getResourceHandler().createResource("dynamiccontent",
> > > > > "primefaces", streamedContent.getContentType());
> > > > > String resourcePath = resource.getRequestPath();
> > > > >
> > > > > // servlet path/prefix is added alre

Re: Unwrap CC ValueExpression?

2013-05-13 Thread Thomas Andraschko
It's really view independent and  my Controller is RequestScoped.
The only problem is that currently graphicImage/media/filedownload are
unusable in a CC, if you need to pass the EL into the CC.


2013/5/13 Christian Beikov 

> The difference is that it can handle the view based scopes where the
> primefaces impl can't. But as I just realize this won't help you at all.
> Sorry but for now I can't think of a reliable general purpose way to
> retrieve the contents without rebuilding the view, I have to think about
> it.
> Do you need any context information like iteration status or so to evaluate
> the expression to a meaningful value or is it completely independent of the
> view?
> What scope has the myController?
>
>
> 2013/5/13 Thomas Andraschko 
>
> > Hi Christian,
> >
> > i don't understand your solution exactly.
> > Whats the difference?
> > It would still store the #{cc.attrs.xxx} expression and #{cc} cant be
> > evaluated without #pushComponentToEL(cc).
> > Also #createView should be avoided for such a request IMO because of
> > performance.
> >
> > Regards,
> > Thomas
> >
> >
> >
> >
> > 2013/5/13 Christian Beikov 
> >
> > > I'd rather say this should be fixed by restoring the view before
> > accessing
> > > the expression. I have done something like that for
> > > DynamicContentResourceHandler which probably is used in this case here
> > too.
> > > Basically you need to save the viewId and the expression together in
> the
> > > session so you are able to restore the adequate expression in the
> > resource
> > > handler. I did the following for GraphicImageRenderer:
> > >
> > >
> > > @Override
> > > protected String getImageSrc(FacesContext context, GraphicImage
> > image)
> > > {
> > > String src = null;
> > > String name = image.getName();
> > >
> > > if(name != null) {
> > > String libName = image.getLibrary();
> > > ResourceHandler handler =
> > > context.getApplication().getResourceHandler();
> > > Resource res = handler.createResource(name, libName);
> > >
> > > if(res == null) {
> > > return "RES_NOT_FOUND";
> > > } else {
> > > return
> > > context.getExternalContext().encodeResourceURL(res.getRequestPath());
> > > }
> > > } else {
> > > Object value = image.getValue();
> > >
> > > if (value == null) {
> > > return "";
> > > } else  if(value instanceof String) {
> > > src = getResourceURL(context, (String) value);
> > > } else if (value instanceof StreamedContent) {
> > > ViewHandler viewHandler =
> > > context.getApplication().getViewHandler();
> > > StreamedContent streamedContent = (StreamedContent)
> > value;
> > > Resource resource =
> > >
> > >
> >
> context.getApplication().getResourceHandler().createResource("dynamiccontent",
> > > "primefaces", streamedContent.getContentType());
> > > String resourcePath = resource.getRequestPath();
> > >
> > > // servlet path/prefix is added already in
> > > ViewHandler.getActionURL so remove it here
> > > resourcePath =
> > > resourcePath.substring(resourcePath.indexOf("/javax.faces.resource/"));
> > > resourcePath = viewHandler.getActionURL(context,
> > > resourcePath);
> > >
> > > String rid = createUniqueContentId(context);
> > > StringBuilder builder = new
> StringBuilder(resourcePath);
> > >
> > > if(resourcePath.contains("?"))
> > > builder.append("&");
> > > else
> > > builder.append("?");
> > >
> > >
> > >
> > >
> >
> builder.append(DynamicContentResourceHandler.DYNAMIC_CONTENT_PARAM).append("=").append(rid);
> > > builder.append("&").append("ln=primefaces");
> > >
> > > for (UIComponent kid : image.getChildren()) {
> > > if (kid 

Re: Unwrap CC ValueExpression?

2013-05-13 Thread Thomas Andraschko
uot;pfdrid";
>
> public DynamicContentResourceHandler(ResourceHandler wrapped) {
> super(wrapped);
> }
>
> @Override
> public void handleResourceRequest(FacesContext context) throws
> IOException {
> Map params =
> context.getExternalContext().getRequestParameterMap();
> String library = params.get("ln");
> String dynamicContentId = params.get(DYNAMIC_CONTENT_PARAM);
>
> if(dynamicContentId != null && library != null &&
> library.equals("primefaces")) {
> Map session =
> context.getExternalContext().getSessionMap();
> StreamedContent content = null;
>
> try {
> @SuppressWarnings("unchecked")
> Map dynamicContentMap = (Map String>) session.get(dynamicContentId);
>
> if(dynamicContentMap != null){
> String viewId =
> dynamicContentMap.get(DYNAMIC_CONTENT_VIEW_ID_KEY);
> String dynamicContentEL =
> dynamicContentMap.get(DYNAMIC_CONTENT_VALUE_EXPRESSION_KEY);
>
> // Workaround for view based scopes
>
>
> context.setViewRoot(context.getApplication().getViewHandler().createView(context,
> viewId));
>
> ELContext eLContext = context.getELContext();
> ValueExpression ve =
>
> context.getApplication().getExpressionFactory().createValueExpression(context.getELContext(),
> dynamicContentEL, StreamedContent.class);
> content = (StreamedContent) ve.getValue(eLContext);
>
> ExternalContext externalContext =
> context.getExternalContext();
>
> externalContext.setResponseStatus(HttpServletResponse.SC_OK);
>
> externalContext.setResponseContentType(content.getContentType());
>
> byte[] buffer = new byte[2048];
>
> int length;
> InputStream inputStream = content.getStream();
>
> while ((length = (inputStream.read(buffer))) >= 0) {
>
> externalContext.getResponseOutputStream().write(buffer, 0, length);
> }
>
> externalContext.getResponseOutputStream().flush();
> context.responseComplete();
> } else {
>     ExternalContext externalContext =
> context.getExternalContext();
>
> externalContext.setResponseStatus(HttpServletResponse.SC_NOT_FOUND);
> externalContext.getResponseOutputStream().flush();
> context.responseComplete();
> }
> } catch(Exception e) {
> logger.log(Level.SEVERE, "Error in streaming dynamic
> resource.", e);
> } finally {
> session.remove(dynamicContentId);
>
> if(content != null) {
> content.getStream().close();
> }
> }
> }
> else {
>super.handleResourceRequest(context);
> }
> }
>
> }
>
> This at least works for me, hope it can help you too.
>
>
> 2013/5/13 Thomas Andraschko 
>
> > Hi Kito,
> >
> > CC:
> >
> >
> 
> > 
> >  > type="org.primefaces.model.StreamedContent" required="true" />
> > 
> >
> > 
> >  height="600px"
> > player="pdf"/>
> > 
> >
> >
> 
> >
> > View:
> >
> >
> 
> >  >
> >
> --------
> >
> > If it should work inside a CC, we must receive "#{cc.attrs.pdfStream}"
> > instead of "#{cc.attrs.pdfStream}".
> >
> > How can get the real expression here?
> >
> > Thanks,
> > Thomas
> >
> >
> > 2013/5/13 Kito Mann 
> >
> > > Hello Thomas,
> > >
> > > I think this is doable. Can you send us your composite component code?
> > >
> > > ___
> > >
> > > Kito D. Mann | @kito99 | Author, JSF in Action
> > > Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
> > consulting
> > > http://www.

Re: Unwrap CC ValueExpression?

2013-05-13 Thread Thomas Andraschko
Hi Kito,

CC:










View:



> Hello Thomas,
>
> I think this is doable. Can you send us your composite component code?
>
> ___
>
> Kito D. Mann | @kito99 | Author, JSF in Action
> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
> @jsfcentral
> +1 203-998-0403
>
> * JSF2 in Action Course - 6/17 - London:
> http://skillsmatter.com/course/home/jsf-and-ajax/ng-6708
> * Listen to the Enterprise Java Newscast: *
> http://blogs.jsfcentral.com/JSFNewscast/
> *
> * JSFCentral Interviews Podcast:
> http://www.jsfcentral.com/resources/jsfcentralpodcasts/
> * Sign up for the JSFCentral Newsletter:
> http://oi.vresp.com/?fid=ac048d0e17
>
>
> On Mon, May 13, 2013 at 7:17 AM, Thomas Andraschko <
> andraschko.tho...@gmail.com> wrote:
>
> > Hi,
> >
> > is it possible unwrap a CC ValueExpresion?
> > i found a bug with PrimeFaces p:media inside a composite component and i
> > would like to fix it.
> >
> > If you pass the EL via a CC attr (e.g. #{myController.content}) and
> attach
> > it to p:media (e.g. #{cc.attrs.content}),
> > p:media gets the ValueExpression and saves them in the session, to later
> > stream the content in a resource request.
> > Later the ResourceHandler evaluates it and tries to get the value of
> > #{cc.attrs.content}, which can't work ofc.
> >
> > So is it possible to extract the "real" EL before store it in the
> session?
> > Is there a solution which also works in mojarra?
> >
> >
> > Regards,
> > Thomas
> >
>


Unwrap CC ValueExpression?

2013-05-13 Thread Thomas Andraschko
Hi,

is it possible unwrap a CC ValueExpresion?
i found a bug with PrimeFaces p:media inside a composite component and i
would like to fix it.

If you pass the EL via a CC attr (e.g. #{myController.content}) and attach
it to p:media (e.g. #{cc.attrs.content}),
p:media gets the ValueExpression and saves them in the session, to later
stream the content in a resource request.
Later the ResourceHandler evaluates it and tries to get the value of
#{cc.attrs.content}, which can't work ofc.

So is it possible to extract the "real" EL before store it in the session?
Is there a solution which also works in mojarra?


Regards,
Thomas


Re: composite-library-name and subfolders?

2013-04-25 Thread Thomas Andraschko
Hi,

it works, thanks.
Is this also defined/limited in the specs for the composite-library-name?
I mean, if you use h:outputStylesheet/Script, you can just move the folder
to the resource name.
AFAICS this is not possible with composite-library-name.

Regards,
Thomas


2013/4/25 Dennis Hörsch 

> Hi Thomas,
>
> I'm not sure, does this help:
> http://myfaces.apache.org/**core20/myfaces-impl/webconfig.**
> html#org_apache_myfaces_**STRICT_JSF_2_ALLOW_SLASH_**LIBRARY_NAME<http://myfaces.apache.org/core20/myfaces-impl/webconfig.html#org_apache_myfaces_STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME>
>
> Greetings
> dennis
>
> Am 25.04.2013 09:26, schrieb Thomas Andraschko:
>
>  Hi,
>>
>> when i use composite-library-name with only one folder
>>
>> **components
>> and
>> src/main/resources/META-INF/**components,
>>
>> its working fine.
>> But when i use it with a subfolder:
>>
>> **components/common
>> and
>> src/main/resources/META-INF/**components/common,
>>
>> it does not work.
>> Isn't it possible or defined in the specs?
>>
>> Thanks.
>>
>> Regards,
>> Thomas
>>
>>
> --
> HIS Hochschul-Informations-System GmbH
> Goseriede 9 | 30159 Hannover | www.his.de
>
> Dennis Hörsch
> Abteilung Hochschul-IT
> Arbeitsbereich Personalmanagement
> Telefon +49 (0)511 1220-403
> E-Mail hoer...@his.de
>
> Registergericht: Amtsgericht Hannover, HRB 6489
> Geschäftsführer: Dipl.-Phys. Wolfgang Körner
> Vorsitzender des Aufsichtsrats: Prof. Dr. Andreas Geiger
>
>


composite-library-name and subfolders?

2013-04-25 Thread Thomas Andraschko
Hi,

when i use composite-library-name with only one folder

components
and
src/main/resources/META-INF/components,

its working fine.
But when i use it with a subfolder:

components/common
and
src/main/resources/META-INF/components/common,

it does not work.
Isn't it possible or defined in the specs?

Thanks.

Regards,
Thomas


Re: "component with duplicate id" exception since 2.1.11

2013-04-11 Thread Thomas Andraschko
Issue created -> https://issues.apache.org/jira/browse/MYFACES-3709


2013/4/10 Deryk Sinotte 

> We just moved our testing from 2.1.10 to 2.1.11 and we are seeing the same
> exception in our showcase application.  It's also using f:metadata and
> f:viewParam tags:
>
> …
> 
> 
>   value="#{navigationModel.componentGroup}"/>
>   value="#{navigationModel.componentExample}"/>
>   listener="#{navigationController.navigate}"/>
> 
> 
>
> 
> 
> …
>
> Deryk
>
> On 2013-04-10, at 8:32 AM, Leonardo Uribe  wrote:
>
> > Hi Thomas
> >
> > 2013/4/10 Thomas Andraschko 
> >
> >> Hi Leonardo,
> >>
> >> on the first GET request.
> >> I will provide the example + issue later.
> >>
> >>
> > Ok, I'll review it as soon as it is available.
> >
> > regards
> >
> > Leonardo
> >
> >
> >> Thanks.
> >>
> >> Regards,
> >> Thomas
> >>
> >>
> >> 2013/4/10 Leonardo Uribe 
> >>
> >>> Hi
> >>>
> >>> There was a change due to a bug found:
> >>>
> >>> https://issues.apache.org/jira/browse/MYFACES-3665
> >>>
> >>> f:metadata section removed when refresh view and is not included in the
> >>> template directly
> >>>
> >>> The problem was that the f:viewParam was removed and added to the tree,
> >>> destroying the state. The fix done exclude the content of f:metadata
> from
> >>> mark/delete algorithm.
> >>>
> >>> When do this happen? in a postback? ajax? or the first time the view is
> >>> rendered. Could you provide a test case to reproduce it? The strange
> part
> >>> is I used a similar test case for this one and there was no bug.
> >>>
> >>> regards,
> >>>
> >>> Leonardo Uribe
> >>>
> >>> 2013/4/10 Howard W. Smith, Jr. 
> >>>
> >>>> On Wed, Apr 10, 2013 at 8:42 AM, Thomas Andraschko <
> >>>> andraschko.tho...@gmail.com> wrote:
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> i get following exception after upgrading from 2.1.10 to 2.1.11:
> >>>>>
> >>>>> java.lang.IllegalStateException: component with duplicate id
> >>> "j_id__md_1"
> >>>>> found
> >>>>>at
> >>>>>
> >>>>
> >>>
> >>
> org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:100)
> >>>>>
> >>>>> If i remove the f:viewParam, it works fine.
> >>>>> Is anything wrong with my code or is it a bug?
> >>>>>
> >>>>>
> >>>> From MyFaces 2.1.11 release notes, I would assume that the bug was
> >>>> introduced, possibly, by one of the following bugs listed in the
> >>>> bugs-resolved list.
> >>>>
> >>>>
> >>>> Release Notes - MyFaces Core - Version 2.1.11
> >>>>
> >>>> Bug
> >>>>
> >>>>* [MYFACES-3659] - Conditional include of scripts and stylesheets
> >>>>* [MYFACES-3663] - UIViewRoot.createUniqueId() should generate
> >>>> unique ids for all the component tree.
> >>>>* [MYFACES-3665] - f:metadata section removed when refresh view
> >>>> and is not included in the template directly
> >>>>* [MYFACES-3668] - CLONE - UIForm.createUniqueId should take into
> >>>> account prependId logic
> >>>>
> >>>
> >>
>
>


Re: "component with duplicate id" exception since 2.1.11

2013-04-10 Thread Thomas Andraschko
Hi Leonardo,

on the first GET request.
I will provide the example + issue later.

Thanks.

Regards,
Thomas


2013/4/10 Leonardo Uribe 

> Hi
>
> There was a change due to a bug found:
>
> https://issues.apache.org/jira/browse/MYFACES-3665
>
> f:metadata section removed when refresh view and is not included in the
> template directly
>
> The problem was that the f:viewParam was removed and added to the tree,
> destroying the state. The fix done exclude the content of f:metadata from
> mark/delete algorithm.
>
> When do this happen? in a postback? ajax? or the first time the view is
> rendered. Could you provide a test case to reproduce it? The strange part
> is I used a similar test case for this one and there was no bug.
>
> regards,
>
> Leonardo Uribe
>
> 2013/4/10 Howard W. Smith, Jr. 
>
> > On Wed, Apr 10, 2013 at 8:42 AM, Thomas Andraschko <
> > andraschko.tho...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > i get following exception after upgrading from 2.1.10 to 2.1.11:
> > >
> > > java.lang.IllegalStateException: component with duplicate id
> "j_id__md_1"
> > > found
> > > at
> > >
> >
> org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:100)
> > >
> > > If i remove the f:viewParam, it works fine.
> > > Is anything wrong with my code or is it a bug?
> > >
> > >
> > From MyFaces 2.1.11 release notes, I would assume that the bug was
> > introduced, possibly, by one of the following bugs listed in the
> > bugs-resolved list.
> >
> >
> > Release Notes - MyFaces Core - Version 2.1.11
> >
> > Bug
> >
> > * [MYFACES-3659] - Conditional include of scripts and stylesheets
> > * [MYFACES-3663] - UIViewRoot.createUniqueId() should generate
> > unique ids for all the component tree.
> > * [MYFACES-3665] - f:metadata section removed when refresh view
> > and is not included in the template directly
> > * [MYFACES-3668] - CLONE - UIForm.createUniqueId should take into
> > account prependId logic
> >
>


"component with duplicate id" exception since 2.1.11

2013-04-10 Thread Thomas Andraschko
Hi,

i get following exception after upgrading from 2.1.10 to 2.1.11:

java.lang.IllegalStateException: component with duplicate id "j_id__md_1" found
at 
org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:100)
at 
org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:116)
at 
org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:110)
at 
org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:82)
at 
org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.saveView(DefaultFaceletsStateManagementStrategy.java:558)
at 
org.apache.myfaces.application.StateManagerImpl.saveView(StateManagerImpl.java:188)
at 
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:2052)
at 
org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
at 
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59)
at 
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:116)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)

I just have a simple template with:

-


http://www.w3.org/1999/xhtml";
  xmlns:f="http://java.sun.com/jsf/core";
  xmlns:h="http://java.sun.com/jsf/html";
  xmlns:ui="http://java.sun.com/jsf/facelets";
  xmlns:p="http://primefaces.org/ui";
  xmlns:pe="http://primefaces.org/ui/extensions";>






-

and a page where i define the metadata:

-
http://www.w3.org/1999/xhtml";
xmlns:f="http://java.sun.com/jsf/core";
xmlns:h="http://java.sun.com/jsf/html";
xmlns:ui="http://java.sun.com/jsf/facelets";
xmlns:p="http://primefaces.org/ui";
xmlns:pe="http://primefaces.org/ui/extensions";
xmlns:cc="http://java.sun.com/jsf/composite/components";>








-

If i remove the f:viewParam, it works fine.
Is anything wrong with my code or is it a bug?

Thanks.

Regards,
Thomas


Re: config web.xml myfaces for use with primefaces

2013-04-09 Thread Thomas Andraschko
1) it's necessary
2) Just use google... It's a EL Implementation


2013/4/8 maurojava 

> tank you for your response.
> When i create a new project with netbeans 7.3 and tomee server, and i add
> the JSF framework, i get automatically into web.xml the following
> configuration for myfaces:
>
> 
>
>
> org.apache.myfaces.webapp.StartupServletContextListener
> 
> 
> Faces Servlet
> javax.faces.webapp.FacesServlet
> 1
> 
> 
> Faces Servlet
> *.jsf
> 
>
> from your response not says over 
>
>
> org.apache.myfaces.webapp.StartupServletContextListener
> 
>
>
> it is necessaries?
>
> what  it is the work of the 
>
>
> org.apache.myfaces.webapp.StartupServletContextListener
> 
> at startup of my web application??
>
>
> 2)Other questions:
> from the link:
> http://tandraschko.blogspot.de/2012/08/increase-your-jsf-application.html
>
> i read :
>
> Use JUEL as EL implementation
>
> Add the newest JUEL API + implementation as depedency
> Configure MyFaces to use JUEL:
>
>
> 
> org.apache.myfaces.EXPRESSION_FACTORY
> de.odysseus.el.ExpressionFactoryImpl
> 
>
> Increase expression cache in JUEL
>
> Create src/main/resources/el.properties
> Add property javax.el.cacheSize with a custom size. The default size is
> 1000. In my application i use a size of 3000.
>
> DO i can download the JUEL ? it is from myfaces core???
> ---
> If you use CDI, consider to use OpenWebBeans as implementation and
> configure
> this in your web.xml:
>
>
> 
> org.apache.myfaces.EL_RESOLVER_COMPARATOR
>
>
> org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator
> 
>
>
>
>
> --
> View this message in context:
> http://myfaces.10567.n7.nabble.com/config-web-xml-myfaces-for-use-with-primefaces-tp114536p114539.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>


Re: Add 'Stateless JSF' to MyFaces Core? Is it really necessary?

2013-02-22 Thread Thomas Andraschko
AFAIK UIViewRoot#setTransient(true) is defined in the specs.
Maybe they implemented more features dependent on this flag, don't know.
Someone should check there code :)

2013/2/22 Howard W. Smith, Jr. 

> On Fri, Feb 22, 2013 at 7:55 AM, Thomas Andraschko <
> andraschko.tho...@gmail.com> wrote:
>
> > This isn't exactly stateless, the viewRoot needs still to be created
> every
> > request. The state just won't be saved anymore.
> >
>
> So, is this really a performance enhancement for Mojarra's important
> performance issue/JIRAs? Is it (the performance) similar to a non-AJAX
> response and update to the (xhtml) page...or similar to a Full Page Refresh
> (FPR) ?
>
>
> > This can be done via UIViewRoot#setTransient(true) with MyFaces, too.
> >
>
> Interesting. Of course, MyFaces already has this built-in and/or addressed.
> :)
>


Re: Add 'Stateless JSF' to MyFaces Core? Is it really necessary?

2013-02-22 Thread Thomas Andraschko
This isn't exactly stateless, the viewRoot needs still to be created every
request. The state just won't be saved anymore.
This can be done via UIViewRoot#setTransient(true) with MyFaces, too.

2013/2/22 Howard W. Smith, Jr. 

> Mark Struberg, and to whom this may concern,
>
> Please see my questions[1] and respond here and/or there in PrimeFaces
> community forum.
>
> I'm no longer a Mojarra user, but somewhat of a birdie sent word in my
> email inbox this morning about Mojarra 2.1.19 having stateless JSF. So, I
> wanted to see what MyFaces developers/community has to say on the topic.
>
> Thanks,
> Howard
>
> [1] http://forum.primefaces.org/viewtopic.php?f=3&t=19101&p=91071#p91071
>


Re: TomEE/OpenEJB (OpenWebBeans) with Apache MyFaces CODI

2012-11-21 Thread Thomas Andraschko
Maybe you should look at the CODi wiki and understand what CODI provides.
If you don't like it, don't use it. This isn't a required lib.

2012/11/21 Howard W. Smith, Jr. 

> Is it really necessary or encouraged to use Apache MyFaces CODI with TomEE
> 1.5 (SNAPSHOT)? Any pros/cons, advantages/disadvantages using them both
> together?
>
> TomEE bundles MyFaces Core 2.1.9 and OpenEJB, but Apache MyFaces CODI is
> 'not' bundled with TomEE, for some reason or another.
>
> I've seen blogs encourage JSF developers to 'at least' use latest MyFaces
> Core version and OpenWebBeans for performance reasons, but I don't think I
> saw encouragement to use Apache MyFaces CODI.
>
>
> Thanks,
> Howard
>


Re: Migration to TomEE/CDI complete, regression testing, ViewAccessScoped

2012-11-21 Thread Thomas Andraschko
Can i ask you how much users serves your app?
Currently our app takes only 20mb session size with 200 (or 100, can't
remember exactly) concurrent users and we don't use that much
View(Access)Scoped beans.

2012/11/21 Howard W. Smith, Jr. 

> Thomas,
>
> Well, for now, I opt to do/use CDI @RequestScoped, ASAP, since production
> box/server is running Windows 2003 Server, where 4GB RAM is max...shaking
> my head. I'm sure we will upgrade when necessary, but right now that app is
> lighting fast now with Glassfish 3.1.2.2 and MyFaces Core 2.1.9 and JUEL
> 2.2.5. :)
>
> Looking forward to the performance advantages/gains of OpenWebBeans. :)
>
> Also, this Batoo JPA that you mentioned earlier, because EclipseLink/Derby
> and Google Calendar requests/updates are the only 2 bottlenecks in the app.
>
> Thanks,
> Howard
>
> On Wed, Nov 21, 2012 at 4:47 AM, Thomas Andraschko <
> andraschko.tho...@gmail.com> wrote:
>
> > Howard, there is nothing against ViewScoped/ViewAccessScoped.
> > But many data in ViewScoped/ViewAccessScoped leads to high memory usage,
> so
> > it's better to use RequestScoped if possible.
> >
> > 2012/11/21 Howard W. Smith, Jr. 
> >
> > > I'd like to take time to thank you all that helped me migrate from
> > > Glassfish 3.1.2.2 and JSF Managed beans to TomEE and CDI managed
> beans. I
> > > think the migration is complete. I am in regression testing phase/mode
> > now.
> > > :)
> > >
> > > Special shout out to Thomas Andraschko, as his inputs in PrimeFaces
> > forums
> > > and blogs, lead/motivated me to migrate from Mojarra 2.1.7 to MyFaces
> > Core
> > > 2.1.8 for fast (AJAX) rendering performance, and then he even
> recommended
> > > MyFaces Core, OpenWebBeans, JUEL for huge performance gains, and even
> > > today, he encouraged me to consider Batoo JPA, and because of that,
> > > TomEE/OpenEJB and Batoo JPA are now discussing integration! :)
> > >
> > > Anyway, Jose, here, recommended CODI @ViewAccessScoped. I think Thomas
> > and
> > > some other expert users in PrimeFaces Core forum recommended
> > @RequestScoped
> > > as much as possible throughout app, and recommended against JSF
> > @ViewScoped
> > > as well as CODI @ViewAccessScoped (I hope I'm not misquoting
> > them...smile).
> > >
> > > Honestly, I have no CDI @RequestScoped beans in my app; I need to take
> > time
> > > to move some of my code from CDI @SessionScoped to CDI @RequestScoped.
> > > Also, due to issues I experienced injecting EJBs inside of
> > @FacesConverter
> > > (which were added to CDI @SessionScoped beans) caused me to move all my
> > > @FacesConverter classes to JSF @RequestScoped beans; that seems to be
> > > working great, but Mark and Gerhard has already recommended CODI
> > > @Advanced/etc... to inject beans in @FacesConverter classes. I need to
> > give
> > > them a try even though I spent hours moving @FacesConverter classes
> from
> > > CDI beans to JSF Managed beans...during this migration to CDI.
> > >
> > > So, please advise on whether I should use @ViewAccessScoped; pros,
> cons,
> > > promote/hinder performance, etc...
> > >
> > > OR, should I move to CDI @RequestScoped, ASAP??? :)
> > >
> > > Oh, Romain informed me that tomee.xml JDBC resources automatically have
> > > pooling. I hope that is the case, because as soon as regression testing
> > is
> > > complete, I would like to push the new CDI version of my JSF web app to
> > > production, and start using some of the other/neat features of CDI,
> like
> > > CDI events where possible. :)
> > >
> > > Thanks,
> > > Howard
> > >
> >
>


Re: Migration to TomEE/CDI complete, regression testing, ViewAccessScoped

2012-11-21 Thread Thomas Andraschko
Howard, there is nothing against ViewScoped/ViewAccessScoped.
But many data in ViewScoped/ViewAccessScoped leads to high memory usage, so
it's better to use RequestScoped if possible.

2012/11/21 Howard W. Smith, Jr. 

> I'd like to take time to thank you all that helped me migrate from
> Glassfish 3.1.2.2 and JSF Managed beans to TomEE and CDI managed beans. I
> think the migration is complete. I am in regression testing phase/mode now.
> :)
>
> Special shout out to Thomas Andraschko, as his inputs in PrimeFaces forums
> and blogs, lead/motivated me to migrate from Mojarra 2.1.7 to MyFaces Core
> 2.1.8 for fast (AJAX) rendering performance, and then he even recommended
> MyFaces Core, OpenWebBeans, JUEL for huge performance gains, and even
> today, he encouraged me to consider Batoo JPA, and because of that,
> TomEE/OpenEJB and Batoo JPA are now discussing integration! :)
>
> Anyway, Jose, here, recommended CODI @ViewAccessScoped. I think Thomas and
> some other expert users in PrimeFaces Core forum recommended @RequestScoped
> as much as possible throughout app, and recommended against JSF @ViewScoped
> as well as CODI @ViewAccessScoped (I hope I'm not misquoting them...smile).
>
> Honestly, I have no CDI @RequestScoped beans in my app; I need to take time
> to move some of my code from CDI @SessionScoped to CDI @RequestScoped.
> Also, due to issues I experienced injecting EJBs inside of @FacesConverter
> (which were added to CDI @SessionScoped beans) caused me to move all my
> @FacesConverter classes to JSF @RequestScoped beans; that seems to be
> working great, but Mark and Gerhard has already recommended CODI
> @Advanced/etc... to inject beans in @FacesConverter classes. I need to give
> them a try even though I spent hours moving @FacesConverter classes from
> CDI beans to JSF Managed beans...during this migration to CDI.
>
> So, please advise on whether I should use @ViewAccessScoped; pros, cons,
> promote/hinder performance, etc...
>
> OR, should I move to CDI @RequestScoped, ASAP??? :)
>
> Oh, Romain informed me that tomee.xml JDBC resources automatically have
> pooling. I hope that is the case, because as soon as regression testing is
> complete, I would like to push the new CDI version of my JSF web app to
> production, and start using some of the other/neat features of CDI, like
> CDI events where possible. :)
>
> Thanks,
> Howard
>


Re: Migrating to CDI: @Asynchronous

2012-11-20 Thread Thomas Andraschko
Sorry for the off topic, but if you think that your biggest bottleneck is
in your data-layer, you should give batoo jpa a try ;)

2012/11/20 Howard W. Smith, Jr. 

> Well, you and others 'sold' me onto TomEE, so here I am. If I can get this
> migration to TomEE and CDI complete, and my endusers are happy, then more
> than likely, I will remain TomEE (supporter and user) for life, and will
> not plan to return to Glassfish. :)
>
> In production, my (PrimeFaces 3.4.1) app is running so fast with Glassfish
> 3.1.2.2 and MyFaces Core 2.1.9, and JUEL (on an old Windows Server 2003
> Dell server), so I hope TomEE and CDI will beat out the performance I
> currently have in production, and I'm positive that it will...since
> OpenWebBeans is fast (like you said in one of your blogs/posts). :)
>
> Since I started using TomEE, it seems as though you all recommend HSQLDB;
> I'm currently using 'Apache' Derby and that's working great, but I saw some
> benchmark tests that OpenJPA and HSQLDB performs much better than
> OpenJPA/Derby and EclipseLink/Derby. Right now, I'm using EclipseLink. I
> may look into migrating from Derby to HSQL when I have plenty of time to do
> so, but I rather do more fun 'java' programming than SQL programming right
> now. I'm sure you can understand that. I think the biggest bottleneck in my
> app is the database and probably the machine it's running on. And trust me,
> I've read how to tune Derby for performance and I think I did all I could
> to tune my Derby database. :)
>
> Wow, interesting. Thanks for sharing that about CDI events. It's funny that
> you said that CDI events != messages. :)
>
> I need to study the CDI tutorials and blogs a bit, so I can learn how to
> use CDI events. I really would like to use it whereever
> possible/applicable. :)
>
>
>
> On Tue, Nov 20, 2012 at 10:18 AM, Mark Struberg  wrote:
>
> > Dropping OpenEJB as we are now back to core JSF and related. I don't want
> > to spam them ;)
> >
> > 1.): each container has pros and cons. And each of them needs different
> > workarounds in edge cases :)
> >
> >
> > 2.) I'm not using NetBeans, but it's basically the same scenario. In my
> > project I opted for only using META-INF/beans.xml and completely dropping
> > WEB-INF/beans.xml. This is perfectly fine as per the CDI spec [1].
> >
> >
> > >What is a good example or use case for using CDI events?
> >
> > Oh there are plenty! You just need to understand that CDI events !=
> > messages. CDI events are _always_ synchronous and only get delivered to
> > beans in currently active contexts.
> >
> >
> > E.g. if you fire a CDI event and have a public @SessionScoped class User
> > then only the contextual instance 'User' from the current session will
> > receive the event.
> >
> > You can think about CDI events as a method invocation where you do not
> > know on which (and how many) instances you invoke it.
> >
> >
> > A practical use case. In our application we have a big fat menu. The menu
> > content is depending on the language of the user and his privileges.
> Since
> > this can change on a language change or if the user logs in/out, etc most
> > apps always re-calculate the whole MenuItem tree from the database.
> >
> >
> > What we did in our application is the following: Menu is a @SessionScoped
> > cdi bean and we do NOT re-calculate the items for every request. Instead
> we
> > fire a UserSettingsChangedEvent on each language change and login/logout.
> > In the Menu bean (and a lot other places) we @Observes
> > UserSettingsChangedEvent and reload the menu in that case.
> >
> >
> > This performs vastly better and allows us to radically cache lots of
> > things.
> >
> >
> >
> > LieGrue,
> > strub
> >
> > [1] https://issues.jboss.org/browse/CDI-218
> >
> > >
> > > From: "Howard W. Smith, Jr." 
> > >To: MyFaces Discussion ; Mark Struberg <
> > strub...@yahoo.de>
> > >Cc: "us...@openejb.apache.org" 
> > >Sent: Tuesday, November 20, 2012 3:56 PM
> > >Subject: Re: Migrating to CDI: @Asynchronous
> > >
> > >
> > >Mark,
> > >
> > >
> > >Cool beans and agreed about @Asynchronous! Since I read about
> > @Asynchronous on Stackoverflow.com (a post by David Blevins), I decided
> to
> > give it a try, but I think I did read that 'asynchronous' (runnable,
> > etc...) tasks are not all that good in web application.
> > >
> > >
> > >So, while you were writing your reply, I was already commenting out the
> > call to the @Asynchronous method, and I reverted to the synchronous
> version
> > of the method to update Google Calendar. After adding @Asynchronous, I
> > added some logic that works better than @Asynchronous, it will not do a
> > google calendar update on 'every' database update; I have some strategic
> > processing in place that brought the # of google calendar requests down
> by
> > hundreds and even thousands on a daily average.
> > >
> > >
> > >You know what? I attempted to add to META-INF as well as WEB-INF (some
> > days ago), and I already 

Re: Cannot reset buffer after response has been committed && JspViewDeclarationLanguageStrategy

2012-07-25 Thread Thomas Andraschko
I created an issue after analzing the original problem:
https://issues.apache.org/jira/browse/MYFACES-3587

Should i also create an issue because disable SUPPORT_JSP_AND_FACES_EL
requires to set the EXPRESSION_FACTORY? Or is it be design?

2012/7/25 Thomas Andraschko 

> Ah, sorry! I got another exception now:
>
> javax.faces.FacesException: Cannot find a valid PDL for view id null.
>
> So the third question is, isn't there any viewId == null check?
>
>
> 2012/7/25 Thomas Andraschko 
>
>> Hi,
>>
>> i get following error if i try to open a page, which does not exist:
>> Cannot reset buffer after response has been committed
>>
>> As far as i can see, the JspViewDeclarationLanguageStrategy handles the
>> "null" viewId and if i return "false" in #isHandle, it works without
>> problems.
>> Why JspViewDeclarationLanguageStrategy handles also the "null" viewId?
>>
>> I looked at the code and org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL
>> should disable the JspViewDeclarationLanguageStrategy, right?
>> If i set this context param to false, i get follwing exception on startup:
>> An error occured while initializing MyFaces: No
>> javax.el.ExpressionFactory found. Please provide  in
>> web.xml: org.apache.myfaces.EXPRESSION_FACTORY
>>
>> Why is it required to manually set the ExpressionFactory? We use Jetty on
>> localhost and JUEL/Tomcat on our servers.
>>
>> Thanks!
>> Thomas
>>
>>
>>
>>
>


  1   2   >