sebfz1 / wicket-jquery-ui

jQuery UI & Kendo UI integration in Wicket
http://www.7thweb.net/wicket-jquery-ui/
Other
93 stars 58 forks source link

Multiple KendoUITemplateBehaviors not possible per component / id conflict #255

Closed Patrick1701 closed 7 years ago

Patrick1701 commented 7 years ago

Hi Sebastien, happy new year! :-)

We've found a problem, when using multiple kendo templates for a component.

This code uses the particular markup id of the component it is bound to.

KendoUITemplateBehavior:

    @Override
    public void bind(Component component)
    {
        super.bind(component);

        this.token = String.format("%s_template", component.getMarkupId());
    }

when having another template for this component (e.g. in Scheduler, the editTemplate combined with the eventTemplate, (By the way, this bug should currently occure, when using both)), the ids are conflicting, because the are equal.

We have this problem, when using different templates for different scheduler views. The first template wins...

We currently fix this issue by overriding KendoUITemplateBehavior for months with

    @Override
    public String getToken() {
        return String.format("%s_template", component.getMarkupId() + "-month");
    }

kind regards Patrick

sebfz1 commented 7 years ago

Hi Patrick,

Happy new year too! :) Hope that will be an exciting year! ;)

Yes, sorry about this bug, I introduced it by solving a github isssue. I fixed it recently; I think the fix is in 6.x branch too, but somehow the snapshot is not automatically deployed on that branch...

I will deploy next 6.x version over the next week-end...

Sorry for the inconvenience, Sébastien

sebfz1 commented 7 years ago

Erratum: fix is not in wicket6.x yet, only in wicket8.x (cc284cf). I'll do it shortly...

sebfz1 commented 7 years ago

Hi Patrick,

Wicket jQuery UI 6.26.0 is now released. Please reopen this issue if it is not working as expected.

Thanks & best regards, Sebastien.