Class KendoMessageHeaderContributor

  • All Implemented Interfaces:
    Serializable, org.apache.wicket.markup.html.IHeaderContributor, org.apache.wicket.util.io.IClusterable

    public class KendoMessageHeaderContributor
    extends Object
    implements org.apache.wicket.markup.html.IHeaderContributor
    IHeaderContributor to automatically add the KendoMessageHeaderItem to each rendered page, using the specified culture.
    If no culture is specified, the Session's Locale *culture* will be used. If that culture is invalid, the IHeaderContributor will not be rendered, providing a natural fallback to default widget's culture.

    Usage:
     
     public class MyApplication extends WebApplication
     {
            public void init()
            {
                    super.init();
                    
                    this.getHeaderContributorListeners().add(new KendoMessageHeaderContributor());
            }
     }
     
     
    Author:
    Sebastien Briquet - sebfz1
    See Also:
    Serialized Form
    • Constructor Detail

      • KendoMessageHeaderContributor

        public KendoMessageHeaderContributor()
        Constructor that will take the current Session.getLocale()
      • KendoMessageHeaderContributor

        public KendoMessageHeaderContributor​(String culture)
        Constructor
        Parameters:
        culture - the culture, ie: 'fr-FR'
      • KendoMessageHeaderContributor

        public KendoMessageHeaderContributor​(Locale locale)
        Constructor
        Parameters:
        locale - the Locale, ie: Locale.FRENCH
      • KendoMessageHeaderContributor

        public KendoMessageHeaderContributor​(KendoMessage culture)
        Constructor
        Parameters:
        culture - the KendoMessage
    • Method Detail

      • renderHead

        public void renderHead​(org.apache.wicket.markup.head.IHeaderResponse response)
        Specified by:
        renderHead in interface org.apache.wicket.markup.html.IHeaderContributor