Question
bitsinglass
CA
Last activity: 19 Apr 2016 5:34 EDT
Get Clipboard property using JavaScript/JSP
Can anyone help me to write a JS code to get a property value from clipboard page and assign it to a variable?
I tried below code from JS function but not working , it seems.
var flag ='<%= tools.findPage("TemporaryProviderPage").getString("Availability")%>';
Message was edited by: Lochan to add Category
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
Virtusa Consulting Services Pvt. Ltd.
US
Hi,
Try this
var flag ="<%= tools.findPage("TemporaryProviderPage").getString(".Availability")%>";
Thanks & Regards,
Goutham
bitsinglass
CA
I tried below three codes , but nothing worked.
This is used in a javascript function in text file and function is calling from onchange of text input.
var testvar = "<pega:reference name="TemporaryProviderPage.Availability"/>";
var testvar = "<%=tools.findPage("TemporaryProviderPage").getProperty(".Availability").getStringValue();%>";
var flag ="<%= tools.findPage("TemporaryProviderPage").getString(".Availability")%>";
Please comment.
bitsinglass
CA
Pegasystems Inc.
US
JSP syntax is only valid in stream rules (e.g. Section, Control, Harness, Correspondence, Corr Fragment). It requires assembly to compile and execute the java. JS text files do not go through this process.
Can you describe your use case and what you are trying to achieve? There might be an alternative solution depending on what you need to do.
Pegasystems Inc.
US
One solution would be to include a hidden text control bound to TemporaryProviderPage.Availability in the UI. You could add a class to the cell of the hidden text control allows you to easily find it in the DOM by selector and then retrieve the value from the DOM element. This would be outside the guardrails but is a potential solution.
bitsinglass
CA
Hi Dennis,
In a data transform, setting a flag.Based on flag value , need to call a local action as overlay.This is doing by a JS function.
For getting the flag value, used above script.
Can you place the script code in a non auto generated section rule and try once ?
AIG
US
I was looking to confirm "JSP syntax is only valid in stream rules" .Thanks Dennis.