3 Replies Latest reply on Jan 5, 2017 3:17 AM by jgoldhammer

    Converting customized widgets to tiles

    jaymenon Novice

      We have a number of customized widgets on our current jive on prem instance. This includes back-end modifications using custom widget classes.

      As we now plan to migrate to Jive 9 (on prem), we wish to migrate most of these widgets to tiles. However, on researching Jive docs, we could not find any details as to how to build a custom tile with back-end Java classes as well.

      Elaborating a bit on that,

      For widgets, there are corresponding widget classes which house the functionality logic. These classes are associated with a particular SOY/FTL file for rendering the front end UI of the widgets.


      For example:

      In the case of the Featured Content Widget, the corresponding java class is FeaturedContentWidget.java.

      FeaturedContent.java is associated with the corresponding freemarker template (/template/widget/featured-content.ftl) via the following method:


      public String render(WidgetContext widgetContext, ContainerSize size) {

              return applyFreemarkerTemplate(widgetContext, size, FREEMARKER_FILE);




      We require something similar with tiles. But the documentation does not mention this association of back-end java classes with front end SOY/FTL files for rendering tiles.

      We have already tried creating custom view tiles, but could not club it with our back-end logic (fetching data from the database, calling third-party APIs etc)


      ansaxena@informatica.com: FYI


      Could you please help with some details as to how this can be achieved?

      Once again, watered down, my question is:


      Is there any way tile functionalities can be developed in Java classes, and then displayed on the front end using SOY/FTL files?

      If yes, how does this association between a Java class and a SOY/FTL file happen?




        • Re: Converting customized widgets to tiles
          jgoldhammer Jive SME



          developing tiles is totally different to widgets. You cannot deploy Java code to Jive backend.

          Please read all the documentation provided here in the community and come back with specific questions.


          Creating Custom View Tiles

          Tiles, Templates & Streams - Developer Resources

          Tiles and Tile Styles


          When creating a custom view tile, you have to use html/js (or any framework)/css for developing your frontend and use the jive REST API to fetch data. Due to security settings, you should use the provided osapi js api instead of pure ajax...

          Jive REST API v3.14


          If my answer helps you, please mark it as helpful and correct answer.




          1 person found this helpful
            • Re: Converting customized widgets to tiles
              jaymenon Novice

              Thank you for the response, Jens.


              An additional query. If I have a customization that requires a call to a third party API, can those be integrated into the tile code as well?

              Also, in such a case, wouldn't calling both the Jive APIs and the third party APIs take a toll on performance?




                • Re: Converting customized widgets to tiles
                  jgoldhammer Jive SME

                  Third Party falls must be made by using jive connects (Jive is used as Proxy die to Same origin policy) if this call should be made in the JS runtime of the browser.


                  Jive provides a batch API to wrap several HTTP calls into one. Look for the batchservice in the Jive Rest api docs...


                  Due to security or performance reasons it might be necessary to provide your own (separate from Jive) server backend Implementation. In this implementation you could so everything you want to cache data or run Background falls to other Services. A separate Server is also needed if you want to run Jive Rest api calls as another user, e.g. as admin...



                  2 people found this helpful