Skip to Content

templateHeader.jsp

Is it possible to change the templateHeader.jsp with customHeader.jsp in com/sap/me/wpmf/cleint/template.jsp?

Please help ?

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jul 17, 2014 at 02:17 PM

    Hi ,

    yes , it is possible to do with custom code for custom POD.

    Please use such steps :

    1. Create customHeader.jsp with needed changes at web development component

    2. Create ExampleConfiguratorFilter at web DC :

    package com.sapdev.wpmf.web.podplugin;

    import com.sap.me.wpmf.application.ConfiguratorFilterInterface;
    import com.sap.me.wpmf.PodConfiguration;
    import com.sap.me.wpmf.PodLayoutConfiguration;

    /**
    * filter to modify POD Configuration prior to initialization
    */
    public class ExampleConfiguratorFilter implements ConfiguratorFilterInterface {

        /**
         * Method called to allow modification of PodConfiguration object
         * prior to initialization of POD.
         *
         * @param podConf PodConfiguration object
         */
        public void modifyPodConfiguration(PodConfiguration podConf) {
            String podName = podConf.getPodName();

            //  check to limit to specific POD's
            if (podName != null && podName.equalsIgnoreCase("workCenterPod")) {

                PodLayoutConfiguration layoutConf = podConf.getLayoutConfiguration();
                // overrides core templateHeader.jsp for this POD
                layoutConf.setHeaderAreaUrl("/com/sapdev/wpmf/podplugin/customHeader.jsp");

            }
        }
    }

    3. Modify faces-config.xml file to add managed bean configuration:

    <managed-bean>

            <managed-bean-name>podConfiguratorFilterBean</managed-bean-name>

            <managed-bean-class>com.sapdev.wpmf.web.podplugin.ExampleConfiguratorFilter</managed-bean-class>

            <managed-bean-scope>session</managed-bean-scope>

        </managed-bean>

    4. Build and deploy changed. Open  custom POD

    Thanks,

    Oksana

    Add comment
    10|10000 characters needed characters exceeded