<p:selectOneMenu> not working in PF 4.0 Snapshot

UI Components for JSF
Post Reply
Timmorn
Posts: 36
Joined: 29 Jul 2013, 11:31

06 Aug 2013, 08:32

My <p:selectOneMenu> worked in 3.5 but does not in 4.0. In Showcase I found nothing that it has to be coded other than in 3.5. Here a simple example:
xhtml:

Code: Select all

           
           <p:panelGrid columns="2">                
                People 
                <p:selectOneMenu value="#{peoplePM.currentPerson.comment}">
                    <f:selectItems value="#{peoplePM.commentList}" />
                </p:selectOneMenu>                
            </p:panelGrid>
PeoplePM.java:

Code: Select all

   private String[] commentList;
   public String[] getCommentList(){
        String[] strArr = {"Eins", "Zwei", "Drei"};
        commentList= strArr;
        return commentList;
    }
The <p:selectOneMenu> is rendered and shows "Eins", but on click on the drop down button nothing drops down. If I change to <h:selectOneMenu>, it works as expected. Bug in 4.0?
JSF 2.2 + PF 4 20130806 / JSF 2.1 + PF 3.5, GlassFish Server 4.0

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

06 Aug 2013, 11:08

No issues with showcase selectone menu example.Any js errors or server side errors?
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

06 Aug 2013, 11:12

Behavior indicates a javascript problem but latest 4.0 build works fine.

Timmorn
Posts: 36
Joined: 29 Jul 2013, 11:31

06 Aug 2013, 11:20

:roll: I could have thought of this... sorry. Strange, when I try to open the list I get:

Code: Select all

Uncaught TypeError: Cannot read property 'msie' of undefined primefaces.js.xhtml?ln=primefaces:3905
PrimeFaces.widget.SelectOneMenu.PrimeFaces.widget.BaseWidget.extend.show primefaces.js.xhtml?ln=primefaces:3905
(anonymous function) primefaces.js.xhtml?ln=primefaces:3651
bI.event.dispatch jquery.js.xhtml?ln=primefaces:25
cc.handle jquery.js.xhtml?ln=primefaces:25
It corresponds to this line:

Code: Select all

if ($.browser.msie && /^[6,7]\.[0-9]+/.test($.browser.version)) {
JSF 2.2 + PF 4 20130806 / JSF 2.1 + PF 3.5, GlassFish Server 4.0

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

06 Aug 2013, 11:29

It sounds specific to IE browser .But I didn't find this issue with IE8.Is it working good with Chrome and FF?Are you using the same showcase 4.0 build?
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

Timmorn
Posts: 36
Joined: 29 Jul 2013, 11:31

06 Aug 2013, 11:34

I have this error in Chrome 28. I use primefaces-4.0-20130711.071416-4.jar Snapshot like written in my signature. Is this the same version as you use?

In Firefox I get:

Code: Select all

[11:33:48.681] TypeError: $.browser is undefined @ http://localhost:8080/feimasDB/javax.faces.resource/primefaces.js.xhtml;jsessionid=2f99fa4eac90ded4a798774dcd9e?ln=primefaces:16
JSF 2.2 + PF 4 20130806 / JSF 2.1 + PF 3.5, GlassFish Server 4.0

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

06 Aug 2013, 11:46

Well, 4.0 builds are use at your own risk. Elite releases are the suggested ones.

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

06 Aug 2013, 11:54

Timmorn wrote: Is this the same version as you use?
I'am not using 4.0 snapshots.I'am just checking with showcase on different browsers and it works good for me.I will prefer major versions or Elite versions.I'am not sure whether showcase using july11th build.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

Timmorn
Posts: 36
Joined: 29 Jul 2013, 11:31

06 Aug 2013, 13:31

optimus.prime wrote:Well, 4.0 builds are use at your own risk. Elite releases are the suggested ones.
I code for scientific purpose, so I have no money for Elite releases :| Can I find out somehow which snapshot is used by the showcase so that I get this to work?

Thanks
JSF 2.2 + PF 4 20130806 / JSF 2.1 + PF 3.5, GlassFish Server 4.0

vinicius.lana
Posts: 1
Joined: 04 Feb 2016, 13:05

04 Feb 2016, 13:17

I had the same error working with Primefaces 5.2, only in Chrome. In Chrome log console says that the error is in primefaces.js, but is not.

Code: Select all

Uncaught TypeError: Cannot read property 'msie' of undefinedPrimeFaces.widget.SelectOneMenu.PrimeFaces.widget.DeferredWidget.extend.show @ primefaces.js?ln=primefaces:22(anonymous function) @ primefaces.js?ln=primefaces:22bI.event.dispatch @ jquery.js?ln=primefaces:25ce.handle @ jquery.js?ln=primefaces:25
This issue was related with a plugin that i used in my browser. If anyone have this problem, check your chrome plugins ;)
The plugin that caused this issue with me is called "Responsive Web Design Tester".

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Baidu [Spider] and 29 guests