
| Key: |
DISPL-428
|
| Type: |
Improvement
|
| Status: |
Open
|
| Priority: |
Major
|
| Reporter: |
Raúl Herranz
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
Time Tracking:
|
|
Original Estimate:
|
30 minutes
|
|
|
Remaining Estimate:
|
30 minutes
|
|
|
Time Spent:
|
Not Specified
|
|
|
|
|
To make configurable the class created by the PortletRequestHelperFactory, there should be a new config line in the displaytag.properties file with the complete name (package name + class name) of the class. Then, the PortletRequestHelperFactory's getRequestHelperInstance method should be changed to something similar to this:
String className = //GET THE CLASSNAME FROM THE displaytag.properties
if (className!=null && !"".equals(className)) {
try {
Class requestHelperClass = Class.forName(className);
Constructor requestHelperConstructor = requestHelperClass.getConstructor(new Class[]{javax.servlet.jsp.PageContext.class});
retorno = (RequestHelper)requestHelperConstructor.newInstance(new Object[]{pageContext});
} catch (Exception e) {
//do whatever is needed (by example, the exception should be logged)
}
} else {
//do whatever is needed (by example, className not finded should be logged)
}
|
|
Description
|
To make configurable the class created by the PortletRequestHelperFactory, there should be a new config line in the displaytag.properties file with the complete name (package name + class name) of the class. Then, the PortletRequestHelperFactory's getRequestHelperInstance method should be changed to something similar to this:
String className = //GET THE CLASSNAME FROM THE displaytag.properties
if (className!=null && !"".equals(className)) {
try {
Class requestHelperClass = Class.forName(className);
Constructor requestHelperConstructor = requestHelperClass.getConstructor(new Class[]{javax.servlet.jsp.PageContext.class});
retorno = (RequestHelper)requestHelperConstructor.newInstance(new Object[]{pageContext});
} catch (Exception e) {
//do whatever is needed (by example, the exception should be logged)
}
} else {
//do whatever is needed (by example, className not finded should be logged)
}
|
Show » |
Sort Order:
|