on 09-06-2009 7:01 AM
Hi Experts,
For the MSS worklist, I have created a custom WD headerless screen. In this screen, I have created one linktoURL UI element. When the user clicks on the screen, URL is called using following code. This code is working fine in Development. How I can remove the hardcoding related with https://ruepd.mycompany.com:50001. As for Quality the URL will be different say https://abcpd.mycompany.com:50001. Please help.
public static void wdDoModifyView(IPrivateAutoSettlementAppView wdThis, IPrivateAutoSettlementAppView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
{
//@@begin wdDoModifyView
wdContext.currentContextElement().
setUrl("https://ruepd.mycompany.com:50001/irj/portal?" +
"NavigationTarget=ROLES%3A%2F%2Fportal_content%2Fcom.mycompany.all.folder.mycompany%2Fcom.mycompany.ep.folder.enterprise_portal%2Fcom.mycompany.portal.folder.roles%2Fcom.mycompany.portal.folder.employee_self_service%2Fcom.mycompany.portal.role.employee_self_service%2Fcom.mycompany.portal.workset.employee_self_service%2Fcom.mycompany.portal.workset.area_travel_expenses%2Fcom.mycompany.portal.page.create_expense_report&DynamicParameter=trip_number%3D"+
(wdContext.currentContextElement().getTripNumber()).replaceAll("^0*","") +
"%26mode%3Dcreate&TarTitle=Create%20Expense%20Report");
One alernative is to create a push button and then use the navigate absolute. However navigate absolute code does not work for headerless WD screen.
How I can convert headerless into non - headerless screen. As the screen is being called from Worklist. I does not have any control on making the screen non headerless screen.
The questions are
1) Is there is any way to keep the code as shown above and remove "https://ruepd.mycompany.com:50001" by some variable. So that we can avoid hard coding the value of https://ruepd.mycompany.com:50001
2) How to change the screen from hearless screen to non headerless screen. In this case I will use navigate absolute
3) Can we use navigate absolute in case of headerless screen. FYI - I have checked and found that I can not use it in headerless screen
Regards,
Gary
Hi,
With navigationTarget you can use &NavMode=3 for headerless portal screen.
And for removing the hardcoded url,for time being i can suggest you to add application parameter and code the url based on applcation param
Hope you have created an iView based on the WD application in which the posted WDModfycode exists.
Add an appplication property to that iview.. for example system=DEV in development server and system=QA in Quality server. Then you can use the following condition in wdDoModify
IWDProtocolAdapter protocolAdapter = WDProtocolAdapter.getProtocolAdapter();
IWDRequest request = protocolAdapter.getRequestObject();
String paramValue = request.getParameter("system");
if(paramValue.equals("DEV")
{
<ur dev url>
}
else
{
<ur QA url>
}
If ur EP version is 6.0 then use the below line to fecth application param
WDWebContextAdapter.getWebContextAdapter().getRequestParameter("system");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am using following code:
String hostName = TaskBinder.getCurrentTask().getProtocolAdapter().getServerName();
if (hostName.equalsIgnoreCase("development.mycompany.com"))
{
wdContext.currentContextElement().
setUrl("https://ruepd.mycompany.com:50001/irj/portal?" +
"NavigationTarget=ROLES%3A%2F%2Fportal_content%2Fcom.mycompany.all.folder.mycompany%2Fcom.mycompany.ep.folder.enterprise_portal%2Fcom.mycompany.portal.folder.roles%2Fcom.mycompany.portal.folder.employee_self_service%2Fcom.mycompany.portal.role.employee_self_service%2Fcom.mycompany.portal.workset.employee_self_service%2Fcom.mycompany.portal.workset.area_travel_expenses%2Fcom.mycompany.portal.page.create_expense_report&DynamicParameter=trip_number%3D"+
(wdContext.currentContextElement().getTripNumber()).replaceAll("^0*","") +
"%26mode%3Dcreate&TarTitle=Create%20Expense%20Report");
}
if (hostName.equalsIgnoreCase("quality.mycompany.com"))
{
wdContext.currentContextElement().
setUrl("https://ruepd.mycompany.com:50001/irj/portal?" +
"NavigationTarget=ROLES%3A%2F%2Fportal_content%2Fcom.mycompany.all.folder.mycompany%2Fcom.mycompany.ep.folder.enterprise_portal%2Fcom.mycompany.portal.folder.roles%2Fcom.mycompany.portal.folder.employee_self_service%2Fcom.mycompany.portal.role.employee_self_service%2Fcom.mycompany.portal.workset.employee_self_service%2Fcom.mycompany.portal.workset.area_travel_expenses%2Fcom.mycompany.portal.page.create_expense_report&DynamicParameter=trip_number%3D"+
(wdContext.currentContextElement().getTripNumber()).replaceAll("^0*","") +
"%26mode%3Dcreate&TarTitle=Create%20Expense%20Report");
}
Is it a correct approach?
Regards,
Gary
Probably URL generator can be used to genearate URL dynamically,but i am not sure how to use the same
May be you can go ahead with u current approach,not sure though..
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.