You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2012/11/22 21:38:53 UTC

[Bug 54191] New: TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

            Bug ID: 54191
           Summary: TomEE 1.5+ SNAPSHOT struggling with PrimeFaces
                    p:calendar readonlyInput="#{someEL ? 'true' :
                    'false'}"
           Product: Tomcat 7
           Version: 7.0.32
          Hardware: PC
                OS: Windows Vista
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: smithh032772@gmail.com
    Classification: Unclassified

Overview: 

After discussing this with user community, it is believed that TomEE is
struggling with the following xhtml post/after AJAX submit (and during AJAX
render/update):

p:calendar readonlyInput="#{pf_usersController.loggedInViaIpad == 'Y' ? 'true'
: 'false'}"

1. readonlyInput="..." is a property of PrimeFaces' p:calendar component.

2. To meet a business requirement, I decided to populate this attribute via EL

3. After AJAX submit (and render), p:calendar loses its p:calendar client-side
attributes/behavior; an inputText is rendered only

4. This EL works as designed (and without issues) on Glassfish 3.1.2.2 and
MyFaces Core 2.1.9.


Steps to Reproduce: 

1. Add EL (above) to the readonlyInput="..." attribute of PrimeFaces p:calendar
component
2. Select a date via the p:calendar component after xhtml page is rendered in
the browser; AJAX submit is triggered
3. Repeat step # 2 above until p:calendar is rendered WITHOUT (jQuery
datepicker) 'button' and calendar popup/dropdown


Actual Results:

Sporadically, p:calendar is rendered WITHOUT (jQuery datepicker) 'button' and
calendar popup/dropdown


Expected Results:

p:calendar ALWAYS rendered WITH (jQuery datepicker) 'button' and calendar
popup/dropdown


Build Date & Platform: Date and platform of the build in which you first
encountered the bug.

INFO: Starting Servlet Engine: Apache Tomcat (TomEE)/7.0.32
apache-tomee-1.5.1-20121117.041542-74-plus.zip


Additional Builds and Platforms:

PrimeFaces 3.5 SNAPSHOT, JUEL 2.2.5, OmniFaces 1.3 SNAPSHOT


Additional Information: 

Screen captures:

1. BEFORE AJAX submit:
http://imageshack.us/photo/my-images/163/20121121ajaxcalendariss.jpg/

2. AFTER AJAX submit:
http://imageshack.us/photo/my-images/600/20121121ajaxcalendariss.jpg/


ORIGINAL xhtml below:


    <p:calendar id="filterTripDateFrom"
                value="#{pf_ordersController.filterTripDateFrom}"
                mode="popup" showOn="button"
readonlyInput="#{pf_usersController.loggedInViaIpad == 'Y' ? 'true' : 'false'}"
                navigator="true" effect="fadeIn"
                pattern="MM/dd/yyyy" size="10">
        <p:ajax partialSubmit="false"
                event="dateSelect"
listener="#{pf_ordersController.filterTripDateFromSelected}"
                update=":ordersBrowseForm:ordersDataTable
:ordersBrowseForm:formMessages :ordersBrowseForm:_ajax_status" />
    </p:calendar>
    <h:outputText value="To:" />
    <p:calendar id="filterTripDateTo"
value="#{pf_ordersController.filterTripDateTo}"
                mode="popup" showOn="button"
readonlyInput="#{pf_usersController.loggedInViaIpad == 'Y' ? 'true' : 'false'}"
                navigator="true" effect="fadeIn" pattern="MM/dd/yyyy"
size="10">
        <p:ajax partialSubmit="false"
                event="dateSelect"
listener="#{pf_ordersController.filterTripDateToSelected}"
                update=":ordersBrowseForm:ordersDataTable
:ordersBrowseForm:formMessages :ordersBrowseForm:_ajax_status" />
    </p:calendar>



WORKAROUND: use rendered="#{...}" to render appropriate xhtml content (see
xhtml below)

<h:outputText value="From:" />
<p:calendar id="filterTripDateFrom"
        value="#{pf_ordersController.filterTripDateFrom}"
        mode="popup" showOn="button"
        navigator="true" effect="fadeIn"
        pattern="MM/dd/yyyy" size="10"
        rendered="#{pf_usersController.loggedInViaIpad == 'N'}">
    <p:ajax partialSubmit="false"
        event="dateSelect"
listener="#{pf_ordersController.filterTripDateFromSelected}"
        update=":ordersBrowseForm:ordersDataTable
:ordersBrowseForm:formMessages :ordersBrowseForm:_ajax_status" />
</p:calendar>
<p:calendar id="filterTripDateFromOnIpad"
        value="#{pf_ordersController.filterTripDateFrom}"
        mode="popup" showOn="button" readonlyInput="true"
        navigator="true" effect="fadeIn"
        pattern="MM/dd/yyyy" size="10"
        rendered="#{pf_usersController.loggedInViaIpad == 'Y'}">
    <p:ajax partialSubmit="false"
        event="dateSelect"
listener="#{pf_ordersController.filterTripDateFromSelected}"
        update=":ordersBrowseForm:ordersDataTable
:ordersBrowseForm:formMessages :ordersBrowseForm:_ajax_status" />
</p:calendar>
<h:outputText value="To:" />
<p:calendar id="filterTripDateTo"
value="#{pf_ordersController.filterTripDateTo}"
        mode="popup" showOn="button"
        navigator="true" effect="fadeIn" pattern="MM/dd/yyyy" size="10"
        rendered="#{pf_usersController.loggedInViaIpad == 'N'}">
    <p:ajax partialSubmit="false"
        event="dateSelect"
listener="#{pf_ordersController.filterTripDateToSelected}"
        update=":ordersBrowseForm:ordersDataTable
:ordersBrowseForm:formMessages :ordersBrowseForm:_ajax_status" />
</p:calendar>
<p:calendar id="filterTripDateToOnIpad"
value="#{pf_ordersController.filterTripDateTo}"
        mode="popup" showOn="button" readonlyInput="true"
        navigator="true" effect="fadeIn" pattern="MM/dd/yyyy" size="10"
        rendered="#{pf_usersController.loggedInViaIpad == 'Y'}">

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29692|application/octet-stream    |text/plain
          mime type|                            |

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

--- Comment #8 from smithh032772 <sm...@gmail.com> ---
Created attachment 29691
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29691&action=edit
LoginFilter.java parses user agent and populates user bean, etc...

Attached LoginFilter.java

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #4 from Mark Thomas <ma...@apache.org> ---
There are way too many moving parts here. The problem needs to be isolated to a
reproducible test case that fails on the latest Tomcat 7.0.x release (not
TomEE). Without such a test case (which should be the simplest possible web
application that exhibits the issue) this will get resolved as WORKSFORME.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

--- Comment #5 from Mark Thomas <ma...@apache.org> ---
It has been over a week with no response to my request for further information.
I'll leave this open a little longer but without the requested information this
is going to get resolved as WORKSFORME.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29691|application/octet-stream    |text/plain
          mime type|                            |

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

--- Comment #14 from Konstantin Kolinko <kn...@gmail.com> ---
(In reply to comment #12)
> Your UserAgentInfo class does not support multithreading.
> 
> The problem is that you store a reference to this class in a field of your
> LoginFilter class.
> 

s/UserAgentInfo/pf_UsersController/ above. It is pf_UsersController instance
that is stored in LoginFilter.userBEan field and is shared across requests.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

--- Comment #10 from smithh032772 <sm...@gmail.com> ---
Even though I developed a workaround for this issue, I tried to half-way revert
my code back to the code that initially could duplicate this issue. I only
added the EL to the readonlyInput="..." property of p:calendar. See below.

    <p:calendar id="filterTripDateFrom"
                value="#{pf_ordersController.filterTripDateFrom}"
                mode="popup" showOn="button"
                readonlyInput="#{pf_usersController.loggedInViaIpad == 'Y' ?
'true' : 'false'}"
                navigator="true" effect="fadeIn"
                pattern="MM/dd/yyyy" size="10"
                rendered="#{pf_usersController.loggedInViaIpad == 'N'}">
        <p:ajax partialSubmit="false"
                event="dateSelect"
listener="#{pf_ordersController.filterTripDateFromSelected}"
                update=":ordersBrowseForm:ordersDataTable
:ordersBrowseForm:formMessages :ordersBrowseForm:_ajax_status" />
    </p:calendar>
    <p:calendar id="filterTripDateFromOnIpad"
                value="#{pf_ordersController.filterTripDateFrom}"
                mode="popup" showOn="button" readonlyInput="true"
                navigator="true" effect="fadeIn"
                pattern="MM/dd/yyyy" size="10"
                rendered="#{pf_usersController.loggedInViaIpad == 'Y'}">
        <p:ajax partialSubmit="false"
                event="dateSelect"
listener="#{pf_ordersController.filterTripDateFromSelected}"
                update=":ordersBrowseForm:ordersDataTable
:ordersBrowseForm:formMessages :ordersBrowseForm:_ajax_status" />
    </p:calendar>

I attempted to duplicate this issue, but I was 'not' able to duplicate this
issue with yesterday's version of TomEE 1.5.1 SNAPSHOT,
apache-tomee-1.5.1-20121203.041800-97-plus.zip.

I set debug = true in LoginFilter, and the following was in server log:


Dec 04, 2012 5:45:47 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 26926 ms
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/login.jsf
LoginFilter.doFilter(): ajaxRequest = false; ajaxHeader = null
LoginFilter.doFilter(): agent.getUserAgent() = mozilla/5.0 (windows nt 6.0;
wow64) applewebkit/537.11 (khtml, like gecko) chrome/23.0.1271.95 safari/537.11
Dec 04, 2012 5:45:55 PM org.apache.myfaces.el.unified.ResolverBuilderBase
sortELResolvers
INFO: Chain of EL resolvers for Faces sorted with:
org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator@3707cedb and the
result order is
[org.apache.myfaces.el.unified.resolver.implicitobject.ImplicitObjectResolver@619da816,
org.apache.myfaces.el.unified.resolver.CompositeComponentELResolver@35866e6b,
org.apache.myfaces.el.FlashELResolver@cbb4e41,
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver@5d0e93ee,
org.apache.myfaces.el.unified.resolver.ResourceResolver@68121dfc,
javax.el.ResourceBundleELResolver@7d6ec0c4,
org.apache.myfaces.el.unified.resolver.ResourceBundleResolver@7231c431,
javax.el.MapELResolver@2147a789, javax.el.ListELResolver@67482470,
javax.el.ArrayELResolver@31506a09, javax.el.BeanELResolver@16618e2a,
org.apache.webbeans.el.WebBeansELResolver@5ebc72e0]
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/login.jsf
LoginFilter.doFilter(): ajaxRequest = false; ajaxHeader = null
[EL Info]: 2012-12-04 17:45:57.189--ServerSession(534087359)--EclipseLink,
version: Eclipse Persistence Services - 2.3.2.v20111125-r10461
[EL Info]: 2012-12-04
17:45:57.776--ServerSession(534087359)--file:/C:/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/mcmsweb/WEB-INF/classes/_mcmsPU
login successful
GoogleCalendarUtil: calendarList.getEntries().size() = 2
GoogleCalendarUtil: calendar ID/summary = oletaweb@gmail.com/mcmsweb
GoogleCalendarUtil: calendar ID/summary =
998449989713@developer.gserviceaccount.com/998449989713@developer.gserviceaccount.com
GoogleCalendarUtil: events.getItems().size() = 250
pf_UsersController.loginUser(): administrator logged in at Tue Dec 04 17:45:58
EST 2012
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/index.jsf
LoginFilter.doFilter(): ajaxRequest = false; ajaxHeader = null
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/index.jsf
LoginFilter.doFilter(): ajaxRequest = true; ajaxHeader = XMLHttpRequest
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/index.jsf
LoginFilter.doFilter(): ajaxRequest = true; ajaxHeader = XMLHttpRequest
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/index.jsf
LoginFilter.doFilter(): ajaxRequest = true; ajaxHeader = XMLHttpRequest
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/index.jsf
LoginFilter.doFilter(): ajaxRequest = true; ajaxHeader = XMLHttpRequest
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/index.jsf
LoginFilter.doFilter(): ajaxRequest = true; ajaxHeader = XMLHttpRequest
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/index.jsf
LoginFilter.doFilter(): ajaxRequest = true; ajaxHeader = XMLHttpRequest
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/index.jsf
LoginFilter.doFilter(): ajaxRequest = false; ajaxHeader = null
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/index.jsf
LoginFilter.doFilter(): ajaxRequest = false; ajaxHeader = null
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/index.jsf
LoginFilter.doFilter(): ajaxRequest = true; ajaxHeader = XMLHttpRequest
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/index.jsf
LoginFilter.doFilter(): ajaxRequest = true; ajaxHeader = XMLHttpRequest

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

--- Comment #7 from smithh032772 <sm...@gmail.com> ---
Thanks for reviewing the issue and the responses. Honestly, right now, I am too
busy to build a simple project that duplicates the issue. I really just wanted
to report the issue.

I am quite sure that I'm not losing the session, but I could or would need to
confirm or test for that. Yes, I am using some reusable code (that was posted
in a forum) that parses the user agent on every request. Coincidentally, I did
modify this code when migrating from JSF managed beans to CDI managed beans
(running on TomEE 1.5.1 SNAPSHOT). I am willing to attach LoginFilter.java and
the code that parses the user agent.

I resolved the issue already with a workaround, and I am fine with the issue
being marked with the WORKSFORME status.

Thanks,
Howard

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

--- Comment #16 from Christopher Schultz <ch...@christopherschultz.net> ---
Sorry, your filter simply is not threadsafe, even if you have a CDI
@SessionScoped annotation (in fact, that's exactly what makes it unsafe). Your
code will fail at some point in other environments even if you don't seem to
have time to debug it, now.

There is almost certainly no Tomcat/TomEE/EL bug here.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

--- Comment #11 from smithh032772 <sm...@gmail.com> ---
As I mentioned earlier, please mark this issue as WORKSFORME.

Thanks,
Howard

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

--- Comment #6 from Konstantin Kolinko <kn...@gmail.com> ---
It looks as if your pf_usersController.loggedInViaIpad returns 'Y'
occasionally.

How that property is evaluated? Do you parse the user-agent header of each
request?

Maybe your ajax calls are loosing the session, or the session expires.
(-> ask on the users list).


As Mark already wrote, you have to provide a simple web application that
reproduces the issue.
(It does not need to be a plain JSP application. Using myfaces in it is OK. If
you use any custom code in it, the source code for it will be needed).

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

--- Comment #9 from smithh032772 <sm...@gmail.com> ---
Created attachment 29692
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29692&action=edit
Parses user agent

Attached UserAgentInfo.java

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

--- Comment #15 from smithh032772 <sm...@gmail.com> ---
> It is pf_UsersController instance that is stored in LoginFilter.userBEan field and is shared across requests.

You are correct. pf_UsersController is CDI @SessionScoped bean that is
available and referenced by LoginFilter during each request.

> It looks as if your pf_usersController.loggedInViaIpad returns 'Y' occasionally.

loggedInViaIpad will only be true when iPad device/user is logged in. This is
why I was 'not' able to duplicate this issue...today. I didn't login via iPad.
I logged in via laptop and Android device/phone. :)

> How that property is evaluated? Do you parse the user-agent header of each request?

We've already discussed this. :)

> Maybe your ajax calls are loosing the session, or the session expires.
(-> ask on the users list).

I did not see this behavior at all. My opinion is that the earlier version of
TomEE 1.5.1 SNAPSHOT (tomcat 7.0.32 at the time, I think) had some issue with
the EL, but I might be wrong. I just wanted to log the defect, just in case, it
really was an issue.

My workaround resolves this issue for me, and anyone else that does an internet
search might possibly discover this issue and my workaround. Hope it helps
someone.

Thanks again.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

--- Comment #2 from smithh032772 <sm...@gmail.com> ---
Created attachment 29624
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29624&action=edit
p:calendar WITHOUT button AFTER AJAX submit

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

--- Comment #1 from smithh032772 <sm...@gmail.com> ---
Created attachment 29623
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29623&action=edit
p:calendar WITH button BEFORE AJAX submit

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

--- Comment #3 from smithh032772 <sm...@gmail.com> ---
Below, is xhtml that has EL in the readonlyInput property, but I am not able to
duplicate this issue on the EL. I thought I may share this, so this xhtml can
be compared to the xhtml in the OP.

<p:dataTable id="dt_tripsToConfirm" var="order"
         value="#{pf_ordersController.tripsToConfirm}">

    <p:column headerText="Trip Date">
    <h:outputText escape="false"
             
value="#{pf_ordersController.getTripDateDisplay(order.tripDateTime,
order.returnDateTime, true, true, true)}"/>
    </p:column>

    <p:column headerText="Customer">
    <h:outputText value="#{order.customerId.customerName}" /><br/>
    <h:outputText escape="false"
             
value="#{pf_ordersController.getOrderCustomerPointOfContactListDisplay(order)}"
/>
    </p:column>

    <p:column headerText="Confirmed?" style="text-align: center !important;">
    <h:selectOneMenu value="#{order.confirmed}" label="Confirmed">
        <f:selectItem itemValue="#{bundle.DropdownOptionValueYes}"
itemLabel="#{bundle.DropdownOptionLabelYes}"/>
        <f:selectItem itemValue="#{bundle.DropdownOptionValueNo}"
itemLabel="#{bundle.DropdownOptionLabelNo}"/>
        <p:ajax partialSubmit="false"
           
listener="#{pf_ordersController.confirmedChangedOnConfirmTrips(order)}"
            update=":pageContentPanel"/>
    </h:selectOneMenu>
    </p:column>

    <p:column headerText="Confirmed Date" style="text-align: center
!important;">
    <p:calendar value="#{order.confirmedDate}"
            rendered="#{order.confirmed == 'Y'}"
            label="Confirmed Date"
            mode="popup" showOn="button"
readonlyInput="#{pf_usersController.loggedInViaIpad == 'Y' ? 'true' : 'false'}"
            navigator="true" effect="fadeIn"
            pattern="MM/dd/yyyy" size="8">
        <f:convertDateTime pattern="MM/dd/yyyy" />
    </p:calendar>
    </p:column>

</p:dataTable>

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

--- Comment #13 from smithh032772 <sm...@gmail.com> ---
Per my experience and per test results, my LoginFilter supports multithreading
and any/all requests. Per design (and working as expected), userAgentInfo is
only referenced when user is not logged in. Once user is logged in and user
agent info is stored in user bean, then there is no longer a need for user
agent. This is all working as designed.

I just ran another test to confirm what I stated above.

Below, you will see that I 1st logged in via my laptop (Google chrome browser),
and then afterwards, I logged in via my galaxy nexus (google chrome browser as
well), and the last request was from my laptop to look at my users page, which
shows how many sessions each user have open (a homegrown session monitor).

Dec 04, 2012 6:01:41 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 19674 ms
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() =
/mcmsweb/javax.faces.resource/images/ui-bg_flat_0_2d5972_40x100.png.jsf
LoginFilter.doFilter(): ajaxRequest = false; ajaxHeader = null
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/index.jsf
LoginFilter.doFilter(): ajaxRequest = false; ajaxHeader = null
LoginFilter.doFilter(): agent.getUserAgent() = mozilla/5.0 (windows nt 6.0;
wow64) applewebkit/537.11 (khtml, like gecko) chrome/23.0.1271.95 safari/537.11
LoginFilter.doFilter(): agent.getUserAgent() = mozilla/5.0 (windows nt 6.0;
wow64) applewebkit/537.11 (khtml, like gecko) chrome/23.0.1271.95 safari/537.11
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/login.jsf
LoginFilter.doFilter(): ajaxRequest = false; ajaxHeader = null
LoginFilter.doFilter(): agent.getUserAgent() = mozilla/5.0 (windows nt 6.0;
wow64) applewebkit/537.11 (khtml, like gecko) chrome/23.0.1271.95 safari/537.11
Dec 04, 2012 6:02:11 PM org.apache.myfaces.el.unified.ResolverBuilderBase
sortELResolvers
INFO: Chain of EL resolvers for Faces sorted with:
org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator@7850c424 and the
result order is
[org.apache.myfaces.el.unified.resolver.implicitobject.ImplicitObjectResolver@7e7d5531,
org.apache.myfaces.el.unified.resolver.CompositeComponentELResolver@566444d7,
org.apache.myfaces.el.FlashELResolver@50e3ab90,
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver@1314a46d,
org.apache.myfaces.el.unified.resolver.ResourceResolver@3036f9e4,
javax.el.ResourceBundleELResolver@69500076,
org.apache.myfaces.el.unified.resolver.ResourceBundleResolver@34e78fe,
javax.el.MapELResolver@14e96d64, javax.el.ListELResolver@690ccaf5,
javax.el.ArrayELResolver@46e0d0b4, javax.el.BeanELResolver@51a5fdc6,
org.apache.webbeans.el.WebBeansELResolver@68b7fc0a]
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/login.jsf
LoginFilter.doFilter(): ajaxRequest = false; ajaxHeader = null
[EL Info]: 2012-12-04 18:02:28.03--ServerSession(1717835602)--EclipseLink,
version: Eclipse Persistence Services - 2.3.2.v20111125-r10461
[EL Info]: 2012-12-04
18:02:28.593--ServerSession(1717835602)--file:/C:/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/mcmsweb/WEB-INF/classes/_mcmsPU
login successful
GoogleCalendarUtil: calendarList.getEntries().size() = 2
GoogleCalendarUtil: calendar ID/summary = oletaweb@gmail.com/mcmsweb
GoogleCalendarUtil: calendar ID/summary =
998449989713@developer.gserviceaccount.com/998449989713@developer.gserviceaccount.com
GoogleCalendarUtil: events.getItems().size() = 250
pf_UsersController.loginUser(): administrator logged in at Tue Dec 04 18:02:29
EST 2012
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/index.jsf
LoginFilter.doFilter(): ajaxRequest = false; ajaxHeader = null
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/login.jsf
LoginFilter.doFilter(): ajaxRequest = false; ajaxHeader = null
LoginFilter.doFilter(): isAndroid = true
LoginFilter.doFilter(): agent.getUserAgent() = mozilla/5.0 (linux; android
4.1.1; galaxy nexus build/jro03u) applewebkit/535.19 (khtml, like gecko)
chrome/18.0.1025.166 mobile safari/535.19
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/loginViaMobile.jsf
LoginFilter.doFilter(): ajaxRequest = false; ajaxHeader = null
LoginFilter.doFilter(): isAndroid = true
LoginFilter.doFilter(): agent.getUserAgent() = mozilla/5.0 (linux; android
4.1.1; galaxy nexus build/jro03u) applewebkit/535.19 (khtml, like gecko)
chrome/18.0.1025.166 mobile safari/535.19
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/loginViaMobile.jsf
LoginFilter.doFilter(): ajaxRequest = false; ajaxHeader = null
pf_UsersController.loginUser(): administrator logged in at Tue Dec 04 18:03:20
EST 2012
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/index.jsf
LoginFilter.doFilter(): ajaxRequest = false; ajaxHeader = null
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() =
/mcmsweb/javax.faces.resource/images/ui-bg_flat_0_2d5972_40x100.png.jsf
LoginFilter.doFilter(): ajaxRequest = false; ajaxHeader = null
LoginFilter.doFilter(): session = NOT null
LoginFilter.doFilter(): pf_usersController = NOT null
LoginFilter.doFilter(): req.getRequestURI() = /mcmsweb/index.jsf
LoginFilter.doFilter(): ajaxRequest = false; ajaxHeader = null

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 54191] TomEE 1.5+ SNAPSHOT struggling with PrimeFaces p:calendar readonlyInput="#{someEL ? 'true' : 'false'}"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54191

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |INVALID

--- Comment #12 from Konstantin Kolinko <kn...@gmail.com> ---
Your UserAgentInfo class does not support multithreading.

The problem is that you store a reference to this class in a field of your
LoginFilter class.

Note that the Filter is created only once and the single instance of the filter
processes all incoming requests. So the same UserAgentInfo instance is reused
by multiple requests in parallel and thus contains wrong data.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org