Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BootsFaces 0.8.1 Primeface5.3 b:dataTable bug? #360

Closed
sjljsw opened this issue May 4, 2016 · 25 comments
Closed

BootsFaces 0.8.1 Primeface5.3 b:dataTable bug? #360

sjljsw opened this issue May 4, 2016 · 25 comments

Comments

@sjljsw
Copy link

sjljsw commented May 4, 2016

The current problem of is the default use b: dataTable times (ReferenceError: jQuery is not defined) and (ReferenceError: $is not defined) 。

<h:outputScript library="bsf" name="jq/jquery.js"/>-》,Error: Syntax error, unrecognized expression: unsupported pseudo: j_idt15

@zhedar
Copy link
Collaborator

zhedar commented May 4, 2016

Could you provide a minimal example for us to reproduce this issue?
Also the datatable is an experimental component and should have gone through some changes in the current 0.8.2 Snapshot, did you try that one yet?

@sjljsw
Copy link
Author

sjljsw commented May 5, 2016

@zhedar my maven is

<dependency>
      <groupId>net.bootsfaces</groupId>
      <artifactId>bootsfaces</artifactId>
      <version>0.8.0</version>
      <scope>compile</scope>
</dependency>

Primefaces 5.3

my code

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:b="http://bootsfaces.net/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
    <title>Demo1</title>
</h:head>
<h:body>
     <h:form id="formId">
    <b:dataTable />
     </h:form>
      </h:body>
</html>

@zhedar
Copy link
Collaborator

zhedar commented May 5, 2016

Thanks for the feedback.
That doesn't look suspicious, however your POM says you're using BootsFaces 0.8.0, your title says 0.8.1, have you used 0.8.1 as well? And also could you try it with 0.8.2 yet?

@sjljsw
Copy link
Author

sjljsw commented May 5, 2016

@zhedar sorry my maven version 0.8.0.

Version 0.8.1 not under maven

@sjljsw
Copy link
Author

sjljsw commented May 5, 2016

my using the

<dependency>
            <groupId>net.bootsfaces</groupId>
            <artifactId>bootsfaces</artifactId>
            <version>0.8.2-SNAPSHOT</version>
            <scope>compile</scope>
        </dependency>

But there are still problems :

ReferenceError: jQuery is not defined
n;return this}}(jQuery);

eNrLSix...2907000 (第 3452 行,第 1 列)
ReferenceError: $ is not defined

<table id="formId:dataTableId" class="table table-striped table-bordered" cellsp...

orderView.xhtml (第 8 行,第 1 列)
ReferenceError: jQuery is not defined

typeof exports?module.exports=S(require("jquery")):jQuery&&!jQuery.fn.dataTable&...

my code:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:b="http://bootsfaces.net/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
    <title>Demo1</title>
</h:head>
<h:body>
     <h:form id="formId">
        <b:dataTable id="dataTableId" />
        </h:form>
   </h:body>
</html>

@stephanrauh
Copy link
Collaborator

I'm afraid I can reproduce your problem with BootsFaces-0.8.2-SNAPSHOT. I've even uploaded a running version of your code snippet to the showcase:
https://github.com/TheCoder4eu/BootsFacesWeb/blob/master/src/main/webapp/issues/issue360.xhtml
http://www3.bootsfaces.net/Showcase/issues/issue360.jsf
Maybe there's something wrong with your web.xml? Does it exclude jQuery for some reason?

@sjljsw
Copy link
Author

sjljsw commented May 5, 2016

@stephanrauh my web.xml config:

<context-param>
    <param-name>BootsFaces_USETHEME</param-name>
    <param-value>default</param-value>
</context-param>

<context-param>
    <param-name>net.bootsfaces.get_fontawesome_from_cdn</param-name>
    <param-value>false</param-value>
</context-param>

<context-param>
    <param-name>BootsFaces_THEME</param-name>
    <param-value>cerulean</param-value>
</context-param>

@sjljsw
Copy link
Author

sjljsw commented May 5, 2016

@stephanrauh I don't have exclude JQuery,

@zhedar
Copy link
Collaborator

zhedar commented May 5, 2016

@stephanrauh I can't see the error on the Showcase, neither in Safari nor Chrome, did you change anything?

@sjljsw
Copy link
Author

sjljsw commented May 5, 2016

@stephanrauh @zhedar
Want to use b: dataTable, want how to configure, need to be manually inserted into the jquery. Js? Don't like primeface p: dataTable used directly

@sjljsw
Copy link
Author

sjljsw commented May 5, 2016

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:o="http://omnifaces.org/ui"
      xmlns:b="http://bootsfaces.net/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
    <title>Demo1</title>
   <h:outputScript library="bsf" name="jq/jquery.js" />
</h:head>
<h:body>
     <h:form id="formId">
   <b:dataTable   />



        </h:form>
       

</h:body>
</html>

error:
ReferenceError: jQuery is not defined
n;return this}}(jQuery);
eNrLSix...2907000
Error: Syntax error, unrecognized expression: unsupported pseudo: j_idt7
..value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized exp...

@zhedar
Copy link
Collaborator

zhedar commented May 5, 2016

Normally you won't need to manually include jquery, it should be included automatically.
However, we shouldn't ship it directly (only via CDN), but if you included PrimeFaces you may try <h:outputScript library="primefaces" name="jquery.js" />
Forget about the last bit, I looked into the wrong directory ;)

@sjljsw
Copy link
Author

sjljsw commented May 5, 2016

@zhedar
I saw b: dataTable source code. He doesn't like Primefaces including the jquery file. But I insert < h: outputScript library = "primefaces" name = "jquery/jquery. Js" / >, is still that mistake

@asterd
Copy link
Collaborator

asterd commented May 5, 2016

@sjljsw i've tryied your code on my environment and i haven't found any problem (obviously with 0.8.2-SNAPSHOT). Starting from v0.8.2 we doesn't explicitly load the jquery resource inside single component, because we choose to load it by default (in combination with bsf.js). So, if you use the latest version, jquery must be present by default.

@sjljsw
Copy link
Author

sjljsw commented May 5, 2016

@asterd Can I see your web. The configuration of XML and XHTML page code

@zhedar
Copy link
Collaborator

zhedar commented May 5, 2016

@sjljsw Did you try to drop all BootsFaces related parameters yet and run it 'vanilla', so without any further configuration?

@sjljsw
Copy link
Author

sjljsw commented May 5, 2016

@zhedar What do you mean to give up all of the configuration?

@asterd
Copy link
Collaborator

asterd commented May 5, 2016

@sjljsw i use your same web.xml params:

<context-param>
      <param-name>net.bootsfaces.blockUI</param-name>
      <param-value>true</param-value>
    </context-param>
    <context-param>
      <param-name>BootsFaces_USETHEME</param-name>
      <param-value>default</param-value>
    </context-param>
    <context-param>
      <param-name>BootsFaces_THEME</param-name>
      <param-value>cerulean</param-value>
    </context-param>
    <context-param>
        <param-name>net.bootsfaces.get_fontawesome_from_cdn</param-name>
        <param-value>false</param-value>
    </context-param>

@sjljsw
Copy link
Author

sjljsw commented May 5, 2016

@asterd
No... I have a problem is old

@stephanrauh
Copy link
Collaborator

stephanrauh commented May 5, 2016

Let's try two other things. First, please clone our showcase (https://github.com/TheCoder4eu/BootsFacesWeb) and deploy it on your Tomcat. It's a simple Maven application, so you should be able to do this in five minutes. After starting your Tomcat, test the demo (http://127.0.0.1:8080/BootsFacesWeb/issues/issue360.jsf). It should run fine. If it does, you can begin to compare our project setup to your project setup until you find the bug.

Second, please send us the HMTL source code and a screenshot of your browsers network tab (in the F12 tools). It should look like so:
image

@stephanrauh
Copy link
Collaborator

@zhedar You can't see any bug in my showcase demo because I didn't manage to reproduce the bug :).

@zhedar
Copy link
Collaborator

zhedar commented May 5, 2016

@stephanrauh So this should have said can not instead of can?

I'm afraid I can reproduce your problem with BootsFaces-0.8.2-SNAPSHOT.

I was wondering, what the difference was then, but if you couldn't reproduce it, we're all clear.

@sjljsw
Copy link
Author

sjljsw commented May 6, 2016

@stephanrauh OK,But, I still continue to use PrimeFaces DataTable temporarily

@stephanrauh
Copy link
Collaborator

I suggest we close the bug because we didn't manage to reproduce it despite trying hard to do so.

@sjljsw I suggest you create a small GitHub repository hosting your non-functional source code. It should be a minimal demo - just the basic files like the pom.xml, the web.xml, the faces-config.xml and the index.html. Once you've done that, and we've managed to reproduce the bug using your repository, we'll happily re-open this ticket. Thanks!

@sjljsw
Copy link
Author

sjljsw commented May 7, 2016

@stephanrauh OK , THANKS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants