
|
If you were logged in you would be able to see more operations.
|
|
|
OpenQuote
Created: 27/Jul/09 04:49 AM
Updated: 30/Jul/11 05:04 AM
|
|
| Component/s: |
openquote
|
| Affects Version/s: |
1.1
|
| Fix Version/s: |
1.3SP1
|
|
| Release Notes Comment: |
Quotation page no longer only partially generates when accessed by WSRP
|
|
Exception thrown when rendereing the login section on WSRP
See below from com.openquote.ui.Functions
public static String getPortalName(RenderResponse response) {
String[] actionUrlPart=response.createActionURL().toString().split("/");
if ("auth".equals(actionUrlPart[2])) { **** throws array out of bounds error here
return actionUrlPart[4];
}
else {
return actionUrlPart[3];
}
}
|
|
Description
|
Exception thrown when rendereing the login section on WSRP
See below from com.openquote.ui.Functions
public static String getPortalName(RenderResponse response) {
String[] actionUrlPart=response.createActionURL().toString().split("/");
if ("auth".equals(actionUrlPart[2])) { **** throws array out of bounds error here
return actionUrlPart[4];
}
else {
return actionUrlPart[3];
}
} |
Show » |
|
/**
* Return the name of the portal that a render response relates to.
* The action URL for non-authenticated takes this kind of form:
* /portal/portal/<portal-name>/<page-name>/<window-name>
* When authenticated the same URL looks like this:
* /portal/auth/portal/<portal-name>/<page-name>/<window-name>
* Alternative URL's may contain no portal name
* /wsrp_rewrite?wsrp-urlType=blockingAction&wsrp-interactionState=JBPNS_/wsrp_rewrite
*/
public static String getPortalName(RenderResponse response) {
String actionUrl = response.createActionURL().toString();
String[] actionUrlPart=actionUrl.split("/");
// find index in url of portal name
int nameIndex = 0;
if (actionUrlPart.length>2 && "auth".equals(actionUrlPart[2])) {
nameIndex = 4;
}
else{
nameIndex = 3;
}
// if none found return nothing
if(nameIndex == 0 || actionUrlPart.length<=nameIndex){
return "";
}
// return portal name
return actionUrlPart[nameIndex];
}