Move a JSP-based theme to the new architecture

You can migrate JSP-based theme to the new theme architecture by using different ways.


Parent

Migrate existing themes to the new theme architecture


Minimal conversion to support server-side rendering mode only

JSP-based themes are comprised of JSPs that include markup, JSP logic. They can be factored into multiple JSP fragments that are included into the base Default.jsp. For a minimal conversion to the new architecture you create only a static theme.html file that delegates everything to JSP components. To migrate existing custom theme, proceed as follows:

  1. Start out with a copy of the portal Page Builder theme. This includes the bootstrapping and <head> contributions required for the new theme.

  2. Edit the file theme.html and include the static markup produced by the JSP-based theme.

  3. Convert JSP elements into dynamic content spots in the file theme.html .

    1. All inline JSP logic needs to be isolated into a separate JSP and included as a dynamic content spot

    2. Dynamic content spots are dynamic includes, not static includes. This means that the JSP is executed independently, and is not compiled into a parent page, and it can therefore not access content or state set in another JSP. This often requires some slight tweaking of the included JSPs to include required headings, jspInit() functions, variable presets, that the JSP needs to setup itself rather than have it set up by a parent JSP.

    Example:

    • JSP element:

        <%@include file=”./banner.jspf”%>

    • Static template dynamic content spot:

        <a rel=”dynamic-content” href=”res:/MyTheme/banner.jsp”></a>

  4. You need to replace <portal-core:screenRender/> with <a rel=”dynamic-content” href=”lm:template”></a> .


Add client-side rendering support

Client-side rendering requires JavaScript and iWidget components to handle the client-side interaction model rather than the server-side elements. Starting with the minimal migration you need to implement or reuse existing iWidgets for each JSP dynamic content spot that you want to support the client-side model.

 


+

Search Tips   |   Advanced Search