p:datatable selection not working with Chrome?

UI Components for JSF
Post Reply
jonycus
Posts: 17
Joined: 17 Nov 2010, 21:02

25 Nov 2010, 10:15

Hi all,

I have an issue with the datatable in Primefaces 2.2 RC2. Here is the code:

Code: Select all

                <p:dataTable value="#{country.countries}" var="item" id="countriesTable" 
                             paginator="true" rows="10"
                             selection="#{country.selectedCountry}" selectionMode="single"
                             rowSelectListener="#{country.onRowSelection}">
                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="Id"/>
                        </f:facet>
                        <h:outputText value="#{item.id}"/>
                    </p:column>
                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="Name"/>
                        </f:facet>
                        <h:outputText value="#{item.name}"/>
                    </p:column>
                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="MkName"/>
                        </f:facet>
                        <h:outputText value="#{item.mkName}"/>
                    </p:column>
                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="Code"/>
                        </f:facet>
                        <h:outputText value="#{item.code}"/>
                    </p:column>
                </p:dataTable>
When I try to select a row nothing happens (in Chrome), however it works just fine in FF and IE8. In Chrome, I am even able to select multiple rows, even tough the selectionModel is single.

Best regards,
Vako
Primefaces 3.3
Mojara 2.1.1-b04
GlasFish 3.1.2

healeyb
Posts: 365
Joined: 07 Apr 2010, 16:05

25 Nov 2010, 15:48

I have the same problem. I think I was supposed to log an issue for this
but this doesn't seem to have happened! I've made a note and will do so.

Regards,
Brendan.

jonycus
Posts: 17
Joined: 17 Nov 2010, 21:02

26 Nov 2010, 21:19

Could you please paste a link to the issue so that I can track its progress?

Thanx...
Primefaces 3.3
Mojara 2.1.1-b04
GlasFish 3.1.2

esteevens
Posts: 10
Joined: 18 Oct 2010, 21:05

26 Nov 2010, 23:00

I had similar issues and I got an answer in this forum saying that for webkit based browsers we need to add a <f:view contentType="text/html"> in the body.

See http://primefaces.prime.com.tr/forum/vi ... 060#p25060

I found more background information on http://webkit.org/blog/68/understanding ... and-xhtml/

healeyb
Posts: 365
Joined: 07 Apr 2010, 16:05

27 Nov 2010, 19:29

Thanks for that, it fixes the problem. As I use templates I've only had to
make one change, so this is a good result for me. Cagatay, can I log an
issue to ask for this to be the default behaviour?

Regards,
Brendan.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 35 guests