Skyve 20190302 released

The 20190302 version of the Skyve platform has been released in Nexus. This release adds improved push notifications and new background task features, and support for Swagger automatic API documentation.

New Features

  • Added Swagger resources for automatic API documentation. See the Skyve cookbook for implementation instructions

  • Introduce BackgroundTask function

Framework

  • Added message when generating an edit view to remind developers to rename the generatedEdit.xml file to edit.xml

  • Update admin JobSchedule actions to only allow Cancel after a job has been scheduled for immediate start

  • Add omnifaces push tech to WebContext and Job

  • Ensure that schema sync still occurs in a prod environment on application startup

  • Ensure that list view's with models are able to be used in menus in PF and can be linked to in SC

  • Add menuModule and itemModule to MenuRenderer. Tweak menu renderers and redo phone menu to use MenuRenderer.

  • Add Bean and WebContext arguments to Bizlet.resolve()

  • Rename mobile/menu.xhtml to mobile/home.xhtml to reduce the amount of Foundry configuration required in router.xml

  • Add CDATA blocks to meta data XML marshalling

  • Re-implement schema export and update in Hibernate 5

  • Add bootstrap email property to JSON configuration

  • Add fallback of "pleaseupdate@test.com" for a bootstrap user email address if one is not defined in the JSON

  • Move Conversation utility funtions in ConversationUtil in skyve-ext and leave the web utiltiy functions in WebUtil in skyve-web

  • Use webContext.currentBean in backgrounding

PrimeFaces

  • Remove bizPort feature in PF views as this is not yet implemented

  • Fix EL evaluation of an expression when rendering out faces markup in faces trace

  • Sort out PF list views for documents imported from another module

Background Tasks

This will be covered in the Dev guide in more detail, but a simple example will be shown here. Background tasks makes use of a new class, ViewBackgroundTask, and can be used anywhere a webContext is available. This allows a background task to be executed like so:

    webContext.background(TestTask.class);

Where TestTask extends ViewBackgroundTask like below:

public class TestTask extends ViewBackgroundTask<ChangePassword> {
    @Override
    public void execute(ChangePassword bean) throws Exception {
        bean.setResponse("Hello from TestTask");
        cacheConversation();
        EXT.push(new PushMessage().rerender();
    }
}