2 Replies Latest reply on Oct 22, 2012 9:15 AM by nthornton

    custom widget - hide header and border

    nthornton

      All,

       

           I am currently developing some custom widgets for a jive 5.0.3 instance and would like to be able to have the widget render without the header and border.  I am assuming it is possible, because the built-in HTML widget for Jive allows you to select that you don't want the header and border to be rendered as shown by this screen shot:  Screen Shot 2012-10-19 at 11.57.12 AM.png

      If anybody could help figure out the code to allow my custom widget to render without the header and border, it would be very much appreciated.  Please let me know if you have any ideas at all as to how I can accomplish this.

       

      Thanks,

       

      Nate Thornton

        • Re: custom widget - hide header and border
          jrenaud

          Hi,

           

          try maybe looking to what is explained at this discussion: Re: Borderless Widget method?

           

          Your widget class would need to define a "hideBoder" property and getCssClass() method:

           

             @PropertyNames({ "hideBorder"})

              public class MyWidget extends BaseWidget {

                  private boolean hideBorder;

           

                  public String getCssClass() {

                      return hideBorder ? "jive-widget-borderless" : "";

                  }

           

          For the text displayed in the in the widget properties (The title "Hide Header and Border:" and the description line below, you would need to define, in your widget's resources (ex, in my plugin: /src/main/resources/beans/MyWidget.properties), the localized text entries for this property for all the languages you want to support:

             hideBorder.displayName=Hide Header and Border

             hideBorder.shortDescription=If you choose this option...

           

          Does this makes sense according to what you are trying to do?