DataTable with BreadCrumbBar

125 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Marc Schanne

ungelesen,
03.05.2016, 09:16:1103.05.16
an wicket-jquery-ui
I try to use the DataTable component of Wicket JQuery UI with a default Wicket breadcrumb bar.
The table with lazy loading works fine, but when I leave the page/panel via an AJAX link and came back through the breadcrumb bar I got the following JS error in FireBug, der table isn't reloaded any more.

ReferenceError: jQuery is not defined                      kendo.a...1832.js (Zeile 26, Spalte 1)

Perhaps anybody had a similar failure?

Thanks for any help in advance!  Marc

Sebastien

ungelesen,
03.05.2016, 09:24:2303.05.16
an wicket-j...@googlegroups.com
Hi Marc,

I don't have any clue for the moment, it seems not logical that jQuery is missing...
Could you reproduce it in a simple quickstart and attach it here (or via github) so I can have a look?

Thanks in advance,
Sebastien.


--
You received this message because you are subscribed to the Google Groups "wicket-jquery-ui" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wicket-jquery-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wicket-jquery-ui/c9a96b24-124f-4181-b08e-acd4724a5b1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marc Schanne

ungelesen,
03.05.2016, 09:38:0103.05.16
an wicket-jquery-ui
I did an update from Version 7.2.0 to 7.2.1 for wicket-jquery-ui and wicket-kendo-ui.
The failure stays the same:


kendo.a...1832.js (Zeile 26, Spalte 1)

23: Wicket.Ajax.ajax(attrs);
24:  e.success();}
25: }, "type": "json", "error": function (xhr, error) { var dw = Wicket.Ajax.DebugWindow; if (typeof dw !== 'undefined') { dw.logError(kendo.stringify(xhr)); } }, "sync": function() { this.read(); } }); });
26: /*]]>*/
27: </script>




page?2 (Zeile 7, Spalte 1)

5: <script type="text/javascript" id="kendo-datasource_datatable7">
6: /*<![CDATA[*/
7: jQuery(function() { window.datasource_datatable7 = new kendo.data.DataSource({ "serverPaging": true, "schema": { "total": "__count", "data": "results", "model": { "fields": { "vendor": {  }, "name": {  }, "description": {  }, "id": {  } } } }, "serverFiltering": true, "serverSorting": true, "pageSize": 4, "transport": { "read": function(options) { jQuery.ajax({        url: './page?2-3.IBehaviorListener.0-mainPanel-pizzaForm-datatable',        data: options.data,        cache: false,        dataType: 'json',        success: function(result) {            options.success(result);        },        error: function(result) {            options.error(result);        }    });}, "create": function (e) {
8: var attrs = {"u":"./page?2-3.IBehaviorListener.2-mainPanel-pizzaForm-datatable","c":"datatable7","i":"ajax_loader"};

Sebastien

ungelesen,
03.05.2016, 09:41:4103.05.16
an wicket-j...@googlegroups.com
Hi again Marc,

My remark remains the same, I need a quickstart to investigate...

Thanks in advance,
Sebastien

--
You received this message because you are subscribed to the Google Groups "wicket-jquery-ui" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wicket-jquery-...@googlegroups.com.

Marc Schanne

ungelesen,
03.05.2016, 13:54:3103.05.16
an wicket-jquery-ui
Dear Sebastien,

thank you very much for your help and your work on this data table component.

Attached you can find a simple demo appication with uses AJAX to change between worflow panels.
The OrderPanel make use of the DataTable component and when I change back to this panel via breadcrumb bar you can create the error.

I hope this helps to find our failure?

Kind regards,
Marc
TableWorkflowTest.zip

Sebastien Briquet

ungelesen,
03.05.2016, 15:01:0303.05.16
an wicket-jquery-ui
Hi Marc,

Thank you very much for the quickstart, it actually helps me to understand what was happening, even if I should realized earlier what the problem could have been...
From your explanation, I had in mind an issue about Ajax, but that's not the case, the problem here is that the wiki about changing resource reference is not accurate, my bad!

To fix your issue, just replace

        KendoUILibrarySettings settings = KendoUILibrarySettings.get();
        settings.setJavaScriptReference(new JavaScriptResourceReference(WicketApplication.class, "kendo.all.min.js"));

by

        KendoUILibrarySettings settings = KendoUILibrarySettings.get();
        settings.setJavaScriptReference(new JQueryPluginResourceReference(WicketApplication.class, "kendo.all.min.js"));


JQueryPluginResourceReference ensures jquery is loaded before the specified javascript file (kendo.all.min.js).

Glad to read you enjoy the Kendo UI DataTable! :)
Sebastien.

Marc Schanne

ungelesen,
04.05.2016, 00:43:5604.05.16
an wicket-jquery-ui
Dear Sebastien,

thank you very much for your fast help, the change of the resource registration helps for the AJAX breadcrumb bar problem.
Now we can get into the application development :-)

And of course the next question shows up.
Is there any method to scroll the DataTable to an special item? Or is it the best way to handle this over the DataProvider in behind?

Thanks for any hint, kind regards,
Marc

Marc Schanne

ungelesen,
04.05.2016, 09:20:1404.05.16
an wicket-jquery-ui
Dear Sebastien,

another feature I'm looking for is the use of a checkbox at the first cell in a row to select several rows in a table.

Are there any examples where I can see which Options have to be set, and whcih methods can be used to get the selected rows (by id or directly the model object behind the row values)?

Thank you for your help!

Kind regards,
Marc

P.S.: I'm still looking forward to get an answer from telerik about the details of the commercial license. Can you send me the contact data of a responsible for sale?
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten