Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
1 reply Latest Post - ‏2013-04-25T14:34:13Z by mburati
santhiramya
santhiramya
14 Posts
ACCEPTED ANSWER

Pinned topic how to see value of shared variable in WEF

‏2013-04-25T14:13:42Z |

Hi,

  how to see value of shared variable using webAppAccess ..

i want  to store pagination javascript value in a variable and store in WEF varaible to retain the forms pagination after reload....of the portlets.

i was using a variable of type integer and storing it in shared variable with Application scope...

and i tried to use this shared variable in my html using this syntax

<%= webAppAccess.getVariables().getInt("countRecordsV")%>;

but it raised error in jsp....but the same syntax helped me in getting value of normal variable of WEF....

so i need syntax for getting shared variable value.

plz help me

thanks in advance.......

Regards

Santhi

 

 

  • mburati
    mburati
    2552 Posts
    ACCEPTED ANSWER

    Re: how to see value of shared variable in WEF

    ‏2013-04-25T14:34:13Z  in response to santhiramya

    I'm not sure i completely understand what you're trying to do here,  (a sample of where you're trying to use that in a page and the error you got might help), but here are a few related pieces of info that may help:

     - Shared Variable is for when you need to share a variable value across multiple portlets.   If this is within the same portlet that the paging is being done in, then you shouldn't need to use a Shared Variable.

     - If you're just displaying text within the HTML, then you don't need to save and get it as an int as you likely just want it included as a text string in the html anyway.

     - If you're using WEF page automation based paging (eg, via Data Page/DCM or higher level builder), then you may be able to get the paging data directly from the paging assistant LJO rather than having to store it in a separate variable yourself.   Go to Eclipse -> Windows -> Preferences -> Web Experience Factory and enable the "Show Hidden" objects checkbox and click ok.   Then in your design view you should see helper objects created by the page automation builders, and in particular you're looking for a paging assistant LJO and the methods available on it to tell you the current page etc.

    I hope that info helps,

    ..Mike Burati 
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.