Re: Kendo UI - DataTable selection

2017-02-19 Thread Manfred Bergmann
Hi Sebastien.


Sebastien wrote
>> where "data.id" is a valid property to the data of the row.
> Actually, I think "id" is more valid.

The path to by model data id is in second level.
That's why "data.id". For the PropertyColumn/IdPropertyColumn that worked
fine.
Couldn't understand thus why the CommandButton wasn't able to pull that
data.
But you explanation makes sense.


Sebastien wrote
> So, in short: use "id" and an IdPropertyColumn.

Yep, doing that, thanks.


Manfred

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Kendo-UI-DataTable-selection-tp4677141p4677152.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Kendo UI - AjaxDropDownList, onChange

2017-02-19 Thread Sebastien
Hi Manfred,

AjaxDropDownList belongs to the kendoDropDownList widget, which can be
triggered this way:

var dropdownlist = $("#myDDL").data("kendoDropDownList"); // eq. to
KendoUIBehavior.widget(myDDL, DropDownListBehavior.METHOD) in wicket
dropdownlist.trigger("change"); // this will trigger change event

I'm not sure it can be triggered like the regular (on)change event...

Another option, maybe you can execute the OnChangeAjaxBehavior trough
BaseWicketTester#executeBehavior(AbstractAjaxBehavior).

Never tested, so hope this helps :)
Sebastien.


On Fri, Feb 17, 2017 at 6:44 PM, Manfred Bergmann 
wrote:

> Hi.
>
> I've tried to get the AjaxDropDownList under test.
> In a test I'm doing:
> val formTester = tester.newFormTester("form")
> formTester.select("cut:container:data.serviceType", )
> tester.executeAjaxEvent(basePath+":data.serviceType", "change")
>
> but the onSelectionChanged is never triggered in a test.
> It works when starting the app in a browser.
>
> How can I make this testable?
>
>
> Manfred
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Kendo-UI-AjaxDropDownList-onChange-tp4677142.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Kendo UI - DataTable selection

2017-02-19 Thread Sebastien
Hi Manfred,

> where "data.id" is a valid property to the data of the row.
Actually, I think "id" is more valid.

CommandButton and ToolbarButton are designed to return the row property
value(s), if supplied. If not supplied, the default property for
CommandButton is "id", and the default for ToolbarButton is null (because a
toolbar button is not necessary functionally linked to selectable rows).
Please also note that it is a good practice to use an IdPropertyColumn
(like in the samples), because it automatically sets the kendo grid model
id (used for default CRUD operations).

So, in short: use "id" and an IdPropertyColumn.

Hope this helps,
Sebastien.


On Sun, Feb 19, 2017 at 12:43 PM, Martin Grigorov  wrote:

> On Feb 19, 2017 10:35 AM, "Manfred Bergmann" 
> wrote:
>
> Solved. Problem was access to the model data
>
>
> Without more details it is hard to say what is inconsistent and how it
> could be improved!
>
>
> Interestingly though that the PropertyColumn could access the data but the
> CommandButton not.
> Not sure about the internals but that's not a consistent behavior.
>
>
> Manfred
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Kendo-UI-DataTable-selection-tp4677141p4677148.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>


Re: Kendo UI - DataTable selection

2017-02-19 Thread Martin Grigorov
On Feb 19, 2017 10:35 AM, "Manfred Bergmann" 
wrote:

Solved. Problem was access to the model data


Without more details it is hard to say what is inconsistent and how it
could be improved!


Interestingly though that the PropertyColumn could access the data but the
CommandButton not.
Not sure about the internals but that's not a consistent behavior.


Manfred

--
View this message in context: http://apache-wicket.1842946.
n4.nabble.com/Kendo-UI-DataTable-selection-tp4677141p4677148.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


Re: Kendo UI - DataTable selection

2017-02-19 Thread Manfred Bergmann
Solved. Problem was access to the model data.
Interestingly though that the PropertyColumn could access the data but the
CommandButton not.
Not sure about the internals but that's not a consistent behavior.


Manfred

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Kendo-UI-DataTable-selection-tp4677141p4677148.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org