Skip to Content
author's profile photo Former Member
Former Member

Event value across pages

How to get the subscribed event data across pages?

I have 6 pages, with team viewer as common iview in all pages. When a user click on first item say "employee1"in team viewer event is captured and is working fine. now how to retain the same event data across all my 6 pages.

for e.g when user clicks on 3 pages the data for employee1 should load .Any help would be appreciated.

below is my receive event function (Courtesy Prakash)

<script language="javascript">

EPCM.subscribeEvent( "urn:com.sap.pct.hcm.orgmanagement:CurrentObject", "objectChanged", window, "receiveEvent");

function receiveEvent(Evt) {

var pernr = Evt.dataObject;

var funcName = htmlb_formid+"_getHtmlbElementId";

func = window[funcName];

var inputfield = eval(func("pernr"));

if (inputfield)

inputfield.setValue(pernr);

var form = document.all(htmlb_formid);

form.submit();

}

</script>

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2005 at 02:22 PM

    Any ideas Peter

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      I didn't understand ur question...

      U can always get the stored data from Data Bag by accessing it...it doesn't matter where u are in the portal(works across all pages)..

      I guess thatz i how u submit your data to the server..

      Regards,

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 09:13 PM

    Simply store and load using EPCM.storeClientData("urn:com.sap.xx:....."); and then use EPCM.loadClientData("urn:com.sap.xx:....."); to get the data on any page.

    It works across the pages for sure...

    Let me know if u need more.

    Regards,

    P.S: Consider awarding points for helpful answers.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 09:44 PM

    Peter Thanks Very Much, still not getting the value

    <script

    language="javascript">

    EPCM.storeClientData("urn:com.sap.pct.hcm.orgmanagement:CurrentObject", "objectChanged");

    function receiveEvent(Evt)

    {

    var pernr = EPCM.loadclientdata("urn:com.sap.pct.hcm.orgmanagement:CurrentObject", "objectChanged");

    var funcName = htmlb_formid+"_getHtmlbElementId";

    func = window[funcName];

    var inputfield = eval(func("pernr"));

    if (inputfield) inputfield.setValue(pernr);

    var form = document.all(htmlb_formid); form.submit();

    }

    </script>

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Guess you are not storing the value..watz the value u trying to store?

      Go thru the syntax!

      Try something like this:

      EPCM.storeClientData("urn:com.sap.pct.hcm.orgmanagement:CurrentObject","ObjId", "objectChanged");

      Then use LOAD as:

      var pernr = EPCM.loadclientdata("urn:com.sap.pct.hcm.orgmanagement:CurrentObject", "ObjId");

      Also, where u calling this function:receiveEvent(Evt) ?

      Regards.

      Message was edited by: Peter

  • author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2005 at 04:18 AM

    Peter

    I am storing the eventdata in clientbag now how do i submit back to server without any event. I am getting the value when i print alert.

    Event is captured in first page and stored,when i go to second page if there is no event raised i want to use the eventdata stored in previous page.

    <script language="javascript">

    EPCM.subscribeEvent( "urn:com.sap.pct.hcm.orgmanagement:CurrentObject", "objectChanged", window, "receiveEvent");

    function receiveEvent(Evt) {

    var pernr = Evt.dataObject;

    EPCM.storeClientData ( 'urn:myOwnNameSpace', 'myvarname', pernr);

    if ( pernr != null ){

    pernr = EPCM.loadClientData('urn:myOwnNameSpace', 'myvarname');

    }

    var funcName = htmlb_formid+"_getHtmlbElementId";

    func = window[funcName];

    var inputfield = eval(func("pernr"));

    if (inputfield)

    inputfield.setValue(pernr);

    var form = document.all(htmlb_formid);

    form.submit();

    }

    </script>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2005 at 03:14 PM

    Sorry for my lously explaination of problem, I understand that the data is available across pages, what i am trying to do is to read this read in doafterprocessinput()and pass this value to import parameters.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.