Wicket Kendo Grid filter options Help!!!!

294 views
Skip to first unread message

Kurt Clauss

unread,
Feb 11, 2016, 3:44:01 PM2/11/16
to wicket-jquery-ui
I am trying to implement a checkable filter using Wicket-Kendo grid component.  I have the following code at http://stackoverflow.com/questions/35346556/wicket-kendo-datatable-filter-issue..  

It doesn't work as I'd expect, so any help would be appreciated!!

Thanks!

columns.add(new PropertyColumn("Type", "publicationType") {
        private static final long serialVersionUID = 1L;
        @Override
        public String getFilterable() {
                            return "{multi: true, dataSource: [{" +
                                "City: 'Seattle'," +
                              "},{" +
                               "City: 'Tacoma'," +
                              "},{" +
                                "City: 'Kirkland'," +
                              "},{" +
                                "City: 'Redmond'," +
                              "},{" +
                                "City: 'London'" +
                              "}]," +
                              "checkAll: false" +
                            "}}";
        }

Sebastien

unread,
Feb 11, 2016, 3:56:59 PM2/11/16
to wicket-j...@googlegroups.com
Hi Kurt,

Did you add the filterable DataTable's option ?
options.set("filterable", "{ mode: 'row' }");

Sebastien

unread,
Feb 11, 2016, 3:59:00 PM2/11/16
to wicket-j...@googlegroups.com
Actually there is no option arg in DataTable, you should override #onConfigure(JQueryBehavior)

    public void onConfigure(JQueryBehavior behavior)
    {
        behavior.setOption(("filterable", "{ mode: 'row' }");
    }


Kurt Clauss

unread,
Feb 12, 2016, 8:34:10 AM2/12/16
to wicket-jquery-ui
So I was getting the filter dialog with the option set either in the options param or by setting it in the onConfigure.  In neither case did I get the filter row.  Also, the 'Type', and a few other multiselect columns only had the text filter.  I also have a few other things I'm trying to figure out.  I greatly appreciate your assistance!!  I'm working on a few other issues as well.  Here they all are:

1.  Filter bar - how to get it to show
2.  Filter selection a selection using the DropDownListEditor component.
3.  How can I change the datasource for the #2 component when a user clicks on the ToolBar 'create' vs the CommandButton 'Edit'.  I need to change the datasource depending on which is clicked - using 'inline' or popup editors.

Thank you So much for your help!!  If there is a good resource for these and similar questions, please let me know as well!!

Thank You,
Kurt 

Sebastien

unread,
Feb 12, 2016, 9:01:58 AM2/12/16
to wicket-j...@googlegroups.com
Hi Kurt,

For filtering feature to be enabled, the DataProvider should implement IFilterStateLocator, but AFAIR filtering logic & operators are not completely integrated...

Please keep in mind that DataTable (kendoGrid widget) is a really complete (complicated?) component, and if course I wasn't able to integrate all advanced features for the time being (Telerik/Kendo UI is about 1 000 people, and roundly 1 poor guy who integrates it to Wicket... :/ )

Please create a quickstart with your requirements so I can have a look to see what is missing in your case exactly...
The best resource I can recommend you is kendo-ui demo/docs:
http://demos.telerik.com/kendo-ui/grid/filter-row

Best regards,
Sebastien.

Kurt Clauss

unread,
Feb 17, 2016, 4:37:12 PM2/17/16
to wicket-jquery-ui
Awesome, thank you Sebastien!!  I've looked at the few examples of IFilterStateLocator and am trying to figure out what I have to do to implement it.

The datagrid truly is complicated!!  I appreciate the work and responses you do have time for..  What exactly do you need for a quickstart?  I'll get it to you asap.

Thanks,
Kurt

Kurt Clauss

unread,
Feb 18, 2016, 8:39:27 AM2/18/16
to wicket-j...@googlegroups.com
I got just the column filter and no filter row..  Is there an example of the configuration/options that I might use to verify my stuff??
I'm also using the popup editor and need to know if there is a way to update the configuration (enable/disable) particular fields depending on whether the built-in create or edit button is selected.  This is a great component!!  Oh, I do have a text overflow issue when using the dropdownlist component.  Please see the attached image.  I'm sure it's an easy fix (famous last words)...

Thanks Sebastien!!!
Kurt

--
You received this message because you are subscribed to a topic in the Google Groups "wicket-jquery-ui" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wicket-jquery-ui/AsZa5oknCpg/unsubscribe.
To unsubscribe from this group and all its topics, 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/CAAJwaYUDk4jPmzNPUKVHBm5TcSzPPzm0shoW%3DOuUqehpyYPQ6g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

OverFlow_DropDown.JPG

Sebastien

unread,
Feb 18, 2016, 9:10:49 AM2/18/16
to wicket-j...@googlegroups.com
Hi Kurt,

I am glad you like the component :)

I am unfortunately very busy this week. I will try to look at your questions in detail over the WE.
The text overflow is not very logical. Can you reproduce this in a quickstart so I can have a look?

Thanks in advance & best regards,
Sebastien.

Kurt Clauss

unread,
Feb 18, 2016, 12:17:47 PM2/18/16
to wicket-j...@googlegroups.com
No problem at all.  Do you have an example of a quickstart??  I haven't built one before.

Thanks,
Kurt

--
You received this message because you are subscribed to a topic in the Google Groups "wicket-jquery-ui" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wicket-jquery-ui/AsZa5oknCpg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wicket-jquery-...@googlegroups.com.

Sebastien

unread,
Feb 18, 2016, 12:23:52 PM2/18/16
to wicket-j...@googlegroups.com
Hi Kurt,

Good exercise then! :)

Please follow instruction here:
http://wicket.apache.org/start/quickstart.html

Then:
- add wicket-kendo-ui dependencies (+ theme)
- add kendoGrid specific js files[1]

[1] https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui-samples/src/main/java/com/googlecode/wicket/jquery/ui/samples/pages/kendo/datatable/AbstractDataTablePage.html

Good luck & best regards,
Sebastien.

Kurt Clauss

unread,
Feb 22, 2016, 11:18:15 AM2/22/16
to wicket-jquery-ui
Awesome and thank you!!  I have a question that may have a simple answer.  I have a column that I need to be able to be enabled on the built-in create function call, but disabled during the built-in edit function call.  Is there an intermediary protected/public method I can intercept the call on and change the enabled flag on the column for either the pop-up on inline editor??

Thank you,
Kurt

Sebastien

unread,
Feb 22, 2016, 5:40:38 PM2/22/16
to wicket-j...@googlegroups.com
Hi Kurt,

If this is the builtin 'edit' method then I see no wicket way to achieve this. The built-in method is client side only, there is no server round-trip.

However, if you set the 'edit' option as described bellow, it might answer your question:
http://stackoverflow.com/questions/16415604/kendoui-grid-edit-popup-how-to-hide-field

Good luck,
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/539f714e-7c36-4f15-8c16-c0d341ec89cd%40googlegroups.com.

Kurt Clauss

unread,
Mar 8, 2016, 12:39:10 PM3/8/16
to wicket-jquery-ui
Hey Sebastian!!  Ok, I'm at it again.  I implemented the IFilterStateLocator which seemed easy enough, which just implements 2 methods.  Should the data table itself then do the actual filtering on the dataset, or does my data provider need to do the filtering?  I see that you stated previously that the filtering logic and operators may not be fully integrated.  As of now, what do I need to do (other than the IFliterStateLocator implementation)??

Thanks,
Kurt


Oh, the funny behaviors I was getting was due to an OLD kendo.all.js file.  Once I updated it, all worked as expected.  My list boxes are properly bound and the data table row filter shows correctly.  Now just to understand what I need to do to finish it up.
Reply all
Reply to author
Forward
0 new messages