Closed
List all properties of a Clipboard Page in Java
How to list all properties of a Clipboard Page in Java?
This content is closed to future replies and is no longer being maintained or updated.
Links may no longer function. If you have a similar request, please write a new post.
How to list all properties of a Clipboard Page in Java?
Hi Jaya,
You can use below code to refer all the properties in clipboardpage
ClipboardPage interface has below method that can be leveraged.
java.util.Set entrySet()
Use the iterator() method of the returned object to perform an operation on each property in turn. Note that this iterator reflects the contents of this page at the time of its creation. Further changes to this page will not be reflected in this iterator.
entrySet
in interface java.util.Map
please refer java step in OOTB activity
RULE-OBJ-ACTIVITY @BASECLASS CLIPBOARDVIEWER_GETPAGEUPDATEXML
Here you go, include a Java step in your activity and use this code
try {
ClipboardPage clipboardPage = tools.getStepPage();
//Or ClipboardPage clipboardPage = tools.findPage("<page name>");
oLog.infoForced(clipboardPage.getXML());
java.util.Iterator itr = clipboardPage.values().iterator();
while(iter.hasNext()){
ClipboardProperty prop = (ClipboardProperty) iter.next();
oLog.infoForced(prop.getName() + ": " + prop.getModeName());
}
}catch(Exception ex){
oLog.infoForced(ex.getMessage());
}
try {
ClipboardPage clipboardPage = tools.getStepPage();
java.util.Iterator itr = clipboardPage.values().iterator();
while(iter.hasNext()){
ClipboardProperty prop = (ClipboardProperty) iter.next();
try {
ClipboardPage clipboardPage = tools.getStepPage();
java.util.Iterator itr = clipboardPage.values().iterator();
while(iter.hasNext()){
ClipboardProperty prop = (ClipboardProperty) iter.next();
}
} catch(Exception ex){
e.printStackTrace();
}
Here we are getting the clipboard page first and then we are getting the values. Iterating each value assigning that cilpboardProperty.
Question
Question Solved
Question
Question
Discussion
Question
Question Solved
Question
Discussion
Discussion
Pega Collaboration Center has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.