cancel
Showing results for 
Search instead for 
Did you mean: 

templateHeader.jsp

former_member557371
Participant
0 Kudos

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

Please help ?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member185234
Active Participant
0 Kudos

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

former_member557371
Participant
0 Kudos

Thanks Oksana, will check & update you.

thanks

Former Member
0 Kudos

Hi Oksana,

I am also having a similar requirement and i followed the steps given by you and deployed the same but I am not able to see any changes in headerURL.

Below are the steps i followed:

1. I copied the operator pod and saved with the custom name in POD maintenance.

2. Deployed the custom code (steps given by you).

3. Opened the URL http://localhost:50000/com/sap/me/wpmf/client/template.jsf?WORKSTATION=EXAMPLE_POD

Is this the correct approach or am I missing something here? Please suggest.

Thanks in advance.

Eswar

former_member185234
Active Participant
0 Kudos

Hi Eswar ,

The URL in step 3 is wrong , solution works only with custom PODs . As you have web DC then you should define context root (for example trainingwar ) in application.xml file for EAR DC.

<?xml version="1.0" encoding="ASCII"?>

<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5">

  <display-name>MEEXTDC00~apps~ear~philips.com</display-name>

  <module>

    <web>

      <web-uri>sapdev.com~apps~webphl.war</web-uri>

      <context-root>trainingwar</context-root>

    </web>

  </module>

</application>

Then I can open custom POD with such URL :

http://localhost:50400/trainingwar/com/sap/me/wpmf/client/template.jsf?WORKSTATION=Z1_OPERATION_DEF

Thanks,

Oksana

Former Member
0 Kudos

Thanks Oksana. It solved my problem.

Thanks

Eswar

former_member557371
Participant
0 Kudos

thanks Oksana it was helpfull

Answers (0)