OA Framework: How to list all parameter names and values in a page

The java utility java.util.Enumeration can be used to list the parameter names and values “in” a framework page at run time.

Add the following code snippet to both the ProcessRequest and ProcessFormRequest methods of the page controller:

 import java.util.Enumeration;

Enumeration enums = pageContext.getParameterNames();
while(enums.hasMoreElements())
{
String paramName = enums.nextElement().toString();
// if (paramName.equalsIgnoreCase("event")){
System.out.println("Parameter Name " + paramName + " : Parameter Value " + pageContext.getParameter(paramName));
// }
} 

You can un-comment the if statement to look for specific parameter names and values.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s