Portalruntime error
can anybody help in solving this pblm
Portal Runtime Error
An exception occurred while processing a request for :
iView : pcd:portal_content/com.gssl.folders.FL_GSSL_Content/com.gssl.folders.FL_GSSL_Standard_User_Role/com.gssl.folders.FL_GSSL_Portal_Users/com.gssl.roles.gssl_eu_role/com.sap.portal.eu_ws/com.sap.netweaver.bc.uwl.uwl_page/com.sap.netweaver.bc.uwl.uwl_iview
Component Name : com.sap.netweaver.bc.uwl.ui.UWL
Form elements must have unique ids: ImageAttachment-24300-0000090900$BUS2034$BO (class com.sapportals.htmlb.Link).
Exception id: 04:23_11/12/07_0265_2755150
See the details for the exception ID in the log file
Hi,
The following forum link might help,
/message/4073536#4073536 [original link is broken]
Regards
Srinivasan T
Similar Messages
-
IView TimeOut - PortalRunTime Error
Hi,
I am using EP6sp2 JspDynPage. i am getting F4 values only once(doInitialization) , store the values in RecordSet Object and display in JSP page.But i lost the values sometimes.
For example , I have 4 screens to do some validation.
First screen, the F4 values ok. then i moved to 3rd screen also F4 values are ok.
when i click the button from 3rd screen and go back to the 1st screen i lost the data.The F4(Dropdown) showing empty.
its happened only i am waiting more than 5 mins in my 3rd screen.If i click continuously everything working fine.
any ideas....
Regds,
AntoHi,
Note however, that you should not create any threads on the java application server, this is not allowed by the Java EE specifiction since the application server is responsible for handling threads.
You could try to implement as a service (not sure if this will work), or a combination of a service and a message driven bean (service sends JMS message to MDB which process it, and sends back to the service which listens on a queue). Note however that the MDB solution has a high overheader (It does work, as I've implement it myself one time).
Dagfinn -
Hi All,
We are EP7.0 and for some reasons the KM doesnt work.
None of the KM fodler icons are displayed, I only see a square with red 'X' on it.
Altough it lets me upload documents, images but when I try to view it I get a Portal Runtime Error(see below).
I have also put the defaul trace logs below, pelase help me on this - Thanks .........................
Portalruntime error.
An exception occurred while processing your request. Send the exception ID to your portal administrator.
Exception ID: 08:03_20/10/09_0026_8578051
Refer to the log file for details about this exception.
Below is the full trace file
#1.#000B5DE01D88005C000021D30000328100047663935234C9
#1256069952320#com.sap.portal.prt.runtime#sap.com/irj#com.sap.portal.prt.runtime#administrator#52795
##host_SID_8578050#Administrator#a8257190bdb511de867b000b5de01d88#SAPEngine_Application_Thread[impl:3]_3
##0#0#Error##Java###08:19_20/10/09_0074_8578050
[EXCEPTION]
#1#com.sapportals.portal.prt.runtime.PortalRuntimeException: iView not found: pcd:portal_content/every_user/general/eu_role/com.sap.km.home_ws/com.sap.km.hidden/com.sap.km.urlaccess/com.sap.km.docs
at com.sapportals.portal.prt.deployment.DeploymentManager.getPropertyContentProvider(DeploymentManager.java:1937)
at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.refresh(PortalComponentContextItem.java:234)
at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.getContext(PortalComponentContextItem.java:316)
at com.sapportals.portal.prt.component.PortalComponentRequest.getComponentContext(PortalComponentRequest.java:387)
at com.sapportals.portal.prt.connection.PortalRequest.getRootContext(PortalRequest.java:488)
at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:607)
at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
at com.sapportals.wcm.portal.connection.KmConnection.handleRequest(KmConnection.java:52)
at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:524)
at java.security.AccessController.doPrivileged(Native Method)
at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:407)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)Hi.
Please check the permissions for the KM Documents iView (portal_content/every_user/general/eu_role/com.sap.km.home_ws/com.sap.km.hidden/com.sap.km.urlaccess/com.sap.km.docs).
The most common solution is to assign either the Standard User Role (eu_role) or at least End User Permission on this role for your user.
Best regards,
Aliaksandr -
Dear Experts,
I am developing a WebDynpro application to access uwl tasks,
Have added the following code
IUWLService uwlService=(IUWLService)PortalRuntime.getRuntimeResources().getService(IUWLService.ALIAS_KEY);
UWLContext myContext = new UWLContext();
try {
IUWLSession mySession = uwlService.getUwlSessionForWebDynproClient(myContext);
} catch (Exception e) {
IWDMessageManager myMan = wdComponentAPI.getMessageManager();
myMan.reportSuccess(e.toString());
" The code builds and deployes.
have added tckmcbc.uwl.api as Library reference.
While running I am getting
java.lang.NoClassDefFoundError: com/sapportals/portal/prt/runtime/PortalRuntime error
Regards,
DebasishThe sharing reference is already added. I solved the problem by addding the library prtapi.jar.
But now I when I run I get java.lang.NullPointerException
I am runnning this application directly via NWDS.
Regards,
Debasish -
Error while consuming web service in portal component
Hi All,
I am working on a portal application which uses web services in portal component via web service.
I have tested the web service and then creted a relevant portal service to it .When using this portal service in the portal component and running it Im getting the following run time error
Portal Runtime Error
An exception occurred while processing a request for :
iView : Test_portal_service_app.Test_portal_service_app
Component Name : Test_portal_service_app.Test_portal_service_app
com.sap.portal.ivs.global.ume.UMECLient.
Exception id: 11:17_03/07/08_0028_2739150
See the details for the exception ID in the log file
I did not use any ume attributes or ume api methods in the portal component .
I have also added sharingreference= portalserviceapplication name in deploymentdescriptor of the portal application which has the portal component.
Please provide any suggestion for the possible cause of error .
Urgent!!!!
Thanks.Hi all,
Please throw some light into this issue i am getting the following exception.
com.sap.engine.services.webservices.jaxm.soap.accessor.NestedSOAPException: Problem in server response: Proxy Authentication Required.
I have given the proxy settings in the com.sap.portal.ivs.httpservice in the portal and also
defined a proxy server in the Visual Administrator under Services -> Webservice Container -> HTTP Proxy Server
I am calling service in the following manner.
IPortalRuntimeResources runtime = PortalRuntime.getRuntimeResources();
IService service = runtime.getService(IWS_P_Service.KEY);
IWS_P_Service ws_service = (IWS_P_Service)service;
Volumes from = new Volumes(Volumes.VOLUMES_KILOLITER_VALUE);
Volumes to = new Volumes(Volumes.VOLUMES_LITER_VALUE);
ChangeVolumeUnit cvu = new ChangeVolumeUnit(1200,from,to);
// working upto here
response.write("working");
ChangeVolumeUnitResponse cvu_res = ws_service.ChangeVolumeUnit(cvu);
double result = cvu_res.getChangeVolumeUnitResult();
response.write(result+"");
It is working upto "working".
If any body has any solutions please post.
Thanks -
Getting error while consuming google webservice in jspDynpage
Hi All,
I am consuming google webservices in my JspDyn page
i am getting following error
An exception occurred while processing a request for :
iView : GoogleSer.google
Component Name : GoogleSer.google
Could not find portal application <b>com.company.global.enterprise.portal.wsdl.webservices.service.</b>
Please help me to resolve this issue
code ::
MyGoogle googleService =
(MyGoogle) PortalRuntime.getRuntimeResources().getService("com.company.global.enterprise.portal.wsdl.webservices.service.MyGoogle");
GoogleSearchResult result = googleService.doGoogleSearch("google", "SAP", 0, 10, false, "", false, "", "", "");
Thanks & Regards
RudraHi,
I am still having the same problem, however the scenario in which I am getting varies.
I am getting this exception:
"com.sap.engine.services.webservices.jaxm.soap.accessor.NestedSOAPException: IOError while working with the message."
Some users when trying to login into the portal are getting blank screen and for some the portal launcher page is loading fine and could go to the Home Page.
When I view the logs I am seeing the Nested Soap Exception.
Any Ideas??? Starting the J2EE engine also did'nt help.
Thanks in advance.
Madhavi -
While Consuming a WebService in JSP Dyn Page - There is an Error
Hi Friends,
I have a web service created in ASP.NET web Service.
And I have Consumed the Web Service using WSDL URL.
I need to write a code to refer that class in the JSP DynPage
I have created like this in DoIntialization
MyServiceName obj=(MyServiceName) PortalRuntime.getRuntimeResources().getService(MyServiceName.KEY);
int a = 10;
int b = 20;
obj.Add1(a,b);
but it shows an error
"The method Add1 Method(Add1 Method) is the type. MySErviceName is not Applicable for the arguements(int,int)"
Please Help me in this regard.
Thanks in Advance
Thanks & Regards,
PalaniHi Andy,
I will let u know the sequence which i followed to consume the Webservice.
NWDS --> File --> New --> Project --> Portal Application --> Create New Portal App Project.
The Project is created.....
After that i want to consume the Webservice for the same project...
for that...
NWDS --> File --> New --> Other --> Portal Application --> Create New Portal Application Object --> Selecting My Project?(intended prjct) --> Portal Webservice --> Portal Service from WSDL file - Client Side --> My WSDL URL --> Selecting the methods which i need to expose from the Webservice --> I gave unique name for my 1) Service 2) Alias 3) Package....and that was done....(other way is to add from portalapp.xml ??)
After that i created a new JSPDyn page for my application in DoInitialization() method i tried to access the method from that webservice using the following code...
MyServiceName obj=(MyServiceName) PortalRuntime.getRuntimeResources().getService(MyServiceName.KEY);
I am successfully able to access the method from the webservice using the object which i have created but i am not able to pass arguments to that method...???
I tried consuming same webservice created in .NET in .NET itself and i am able to pass arguments successfully.
I tried to consume webservice created in ABAP in .NET and able to implement successfully...
but the same ABAP webservice when i tried to consume its not working with this NWDS.
Is there any thing else i need to follow while consuming a webservice in the EP Perspectice of NWDS ???
Deployable Proxy is required for that ?? if required how to create and use that ??
Thanks in Advance,
Palani -
Error in the standard htmlb.jar from EP6 SP9 (HTMLx)
I've successfully migrated my custom developed applications from EP5 SP5 to EP6 SP9. I've used the well known 3rd party
HTMLxframework for the DatePicker and Locale corrections only (I am a brazilian developer).
In the org.sapportals.htmlb.rendering there is a class named RenderUtil.
This class has two places with this specific code:
ResourceBundle r = ResourceBundle.getBundle("java.text.resources.LocaleElements", locale);
Which is very wrong as the "java.text.resources.LocaleElements" is available only until j2sdk 1.3. In the EP5 that runs under 1.3 there's no problem but EP6 uses j2sdk 1.4 and this packages has been relocated from the standard package to a "ext" (extension) package and been renamed as "sun.text.resources.LocaleElements".
So, as HTMLx uses this RenderUtil class, I had to decompile the original from the htmlb.jar using JAD and corrected the above line with the following new line or code:
ResourceBundle r = ResourceBundle.getBundle("sun.text.resources.LocaleElements", locale);
More than that, I had to change several places of the HTMLx's HxInputFieldRenderer to reflect the class name changes made to the CSSs of the EP6. In the new version SAP does not open a pop-up window for the DatePicker. Instead they chose to rewrite it as a dynamic layer. So the HTMLx code has to change to reflect that.
Here follows the workaround version of HxInputFieldRenderer.java (notice that some strings are not internationalized, I just copied and pasted the parts I needed, so it's not a definitive version, but will help you get a clue of what to do):
* HxInputFieldRenderer.java
* Copyright (C) 2003 Alan Hobbs
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package org.open.sapportals.htmlx.rendering;
import javax.servlet.jsp.PageContext;
import org.open.sapportals.htmlx.HxField;
import org.open.sapportals.htmlx.HxInputField;
import org.open.sapportals.htmlx.HxLocaleUtil;
import com.sapportals.htmlb.Component;
import com.sapportals.htmlb.Form;
import com.sapportals.htmlb.InputField;
import com.sapportals.htmlb.enum.DataType;
import com.sapportals.htmlb.enum.InputFieldDesign;
import com.sapportals.htmlb.enum.ResourceType;
import com.sapportals.htmlb.rendering.DefaultInputFieldRenderer;
import com.sapportals.htmlb.rendering.IPageContext;
import com.sapportals.htmlb.type.AbstractDataType;
import com.sapportals.htmlb.type.DataDate;
import com.sapportals.htmlb.type.DataString;
import com.sapportals.htmlb.type.Date;
import com.sapportals.portal.prt.component.IPortalComponentRequest;
import com.sapportals.portal.prt.component.IPortalComponentResponse;
import com.sapportals.portal.prt.logger.ILogger;
import com.sapportals.portal.prt.runtime.PortalRuntime;
import com.sapportals.portal.prt.service.urlgenerator.IUrlGeneratorService;
import com.sapportals.portal.prt.service.urlgenerator.specialized.IPortalUrlGenerator;
import com.sapportals.portal.prt.service.urlgenerator.specialized.ISpecializedUrlGenerator;
* @author Alan.Hobbs
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
* Render the HxInputField.
* Version Date Author Description
* 0.1.0 1-Aug-2003 AHobbs Origional
* 0.1.0 4-Aug-2003 AHobbs Added resource bundle
* 0.1.1 6-Aug-2003 AHobbs Write hidden fields to store the locale
* 0.1.1 8-Aug-2003 AHobbs Don't show the date picker button if the field is disabled
* 0.1.2 10-Aug-2003 AHobbs Only generate the month and day name javascript once per form
* 1.1.0 1-Apr-2004 AHobbs Added render methods to allow a HTMLB InputField
* to be used instead of a HxInputField
* 1.1.0 6-Apr-2004 AHobbs Changed the names for the hidden fields to "_HTMLX_xxxxx"
* 1.1.0 20-Apr-2004 AHobbs Allow debug code to be written to the console with System.out.println()
* 1.3.0 4-May-2004 AHobbs Added PopUp rendering
public class HxInputFieldRenderer extends DefaultInputFieldRenderer {
protected ILogger m_logger = PortalRuntime.getLogger("htmlx");
private static boolean writingDebugToConsole;
public HxInputFieldRenderer() {
super();
public void render(Component component, IPageContext pc)
m_logger.info("Entry: HxInputFieldRenderer.render()");
if (!(component instanceof HxInputField)) {
m_logger.warning(
"HxInputFieldRenderer.render() component is not instanceof HxInputField " +
"(component.getClass().getName()='" + component.getClass().getName() + "')");
return;
HxInputField inf = (HxInputField)component;
DataType type = inf.getType();
if (writingDebugToConsole) {
System.out.println("Start rendering HxInputField (id='" + inf.getId() + "') ...");
m_logger.info(" id='" + inf.getId() + "'");
m_logger.info(inf.toString());
/* Only include for PDK version 5.0.5.0 and above - may not be required ???
// m_logger.info(" VersionInfo.getVersion()='" + VersionInfo.getVersion() + "'");
// if (VersionInfo.?????) {
// if (pc.isUsingSession() && !inf.isVisible() && inf.getParkInSession()) {
// String uniqueName = pc.getParamIdForComponent(inf);
// Object value = inf.getValue();
// String valueString = null;
// if (value != null) {
// if (value instanceof AbstractDataType) {
// AbstractDataType dataValue = (AbstractDataType)value;
// if (dataValue != null)
// if (dataValue.isValid())
// valueString = dataValue.toString(pc);
// else
// if (dataValue instanceof DataString)
// valueString = dataValue.toString(pc);
// else
// valueString = dataValue.getValueAsString();
// else {
// valueString = value.toString();
// else {
// valueString = "";
// pc.getParamList().put(uniqueName, valueString);
// return;
boolean showDateHelp = false;
if (DataType.DATE.equals(type)
&& inf.isShowHelp()
&& !inf.isDisabled()) {
showDateHelp = true;
boolean showPatternHint = false;
if (inf.isShowPatternHint()
&& (DataType.DATE.equals(type)
|| DataType.TIME.equals(type))
|| ((inf.getPatternHint() != null) && (inf.getPatternHint().length() > 0))) {
showPatternHint = true;
boolean showStatusMsg = false;
if (inf.isShowStatusMsg() && (inf.getStatusMsg() != null) && (inf.getStatusMsg().length() > 0)) {
showStatusMsg = true;
if (showDateHelp || showPatternHint || showStatusMsg) {
pc.write("<table cellspacing="0" cellpadding="0" border="0" id="");
pc.write(""><tr><td>");
String uniqueName = pc.getParamIdForComponent(inf);
if (inf.isVisible()) {
pc.write("<span id="");
pc.write(uniqueName);
pc.write("-r" class="urEdfHelpWhl">");
if (inf.isPassword())
pc.write("<input type="password" class="sapEdf");
else
pc.write("<input type="text" class="sapEdf");
if (inf.isInvalid())
pc.write("i");
if (inf.isRequired())
pc.write("Req");
else
pc.write("Txt");
if (inf.isDisabled())
pc.write("Dsbl");
else
pc.write("Enbl");
if (inf.getDesign() == InputFieldDesign.SMALL)
pc.write("Sml");
pc.write("" autocomplete="off");
int mySize = inf.getSize();
if (mySize > 0) {
pc.write("" size="");
pc.write(mySize);
int maxlength = inf.getMaxlength();
if (maxlength > 0) {
pc.write("" maxlength ="");
pc.write(maxlength);
java.lang.String value = inf.getWidth();
if (value != null && !"".equals(value)) {
pc.write("" style="width:");
pc.write(value);
pc.write(";");
java.lang.String tooltip = inf.getTooltip();
if (tooltip != null) {
pc.write("" title="");
pc.writeEncoded(tooltip);
pc.write(" onchange="return htmlbDoEvent(this,'TV','onchange','0','");
pc.write(uniqueName);
pc.write("',1,1,'',0);" ");
pc.write(" onblur="return htmlbDoEvent(this,'TV','onblur','0','");
pc.write(uniqueName);
pc.write("',1,1,'',0);" ");
if(inf.isDisabled())
pc.write("" readonly="");
else {
pc.write("<input type="hidden");
pc.write("" name="");
pc.write(uniqueName);
if (inf.isLabeled()) {
pc.write("" id="");
pc.write(uniqueName);
Object value = inf.getValue();
pc.write("" value="");
if (value != null) {
String valueString = null;
if (value instanceof AbstractDataType) {
m_logger.info("-- Abstract Data Type");
AbstractDataType dataValue = (AbstractDataType)value;
if (dataValue != null) {
m_logger.info("-- dataValue != null");
if (dataValue.isValid()) {
m_logger.info("-- dataValue.isValid()");
if (dataValue instanceof DataDate) {
m_logger.info("-- dataValue instanceof DataDate");
Date date = ((DataDate)dataValue).getValue();
valueString = HxLocaleUtil.formatDate(date, pc.getLocale());
else {
m_logger.info("-- NOT dataValue instanceof DataDate");
valueString = dataValue.toString(pc);
else if (dataValue instanceof DataString) {
m_logger.info("-- dataValue instanceof DataString");
valueString = dataValue.toString(pc);
else {
m_logger.info("-- dataValue.getValueAsString()");
valueString = dataValue.getValueAsString();
else {
// Not Abstract Data Type
m_logger.info("-- Not Abstract Data Type");
valueString = value.toString();
pc.writeEncoded(valueString);
pc.write(""/>");
if (showDateHelp) {
String dateFormat = HxLocaleUtil.getSapDatePatternNumber(pc.getLocale());
pc.write("</td><td align='left'><button id='");
pc.write(uniqueName);
pc.write("-btn' type="button" tabindex="-1" ti="-1" class="urEdfHlpDate" onclick="htmlb_showDateHelp(event,'");
pc.write(uniqueName);
pc.write("','");
pc.write(dateFormat);
pc.write("','1')"></button>");
pc.write("<script>htmlb_addTexts('pt_BR',{SAPUR_OCTOBER:"Outubro",SAPUR_MSG_LOADING:"Processo de carga em andamento"," +
"SAPUR_SUNDAY_ABBREV:"Do",SAPUR_F4FIELD_TUTOR:"Pressionar F4 para exibir as entradas possíveis"," +
"SAPUR_INVALID:"Não válido",SAPUR_FEBRUARY:"Fevereiro",SAPUR_F4FIELD:"F4- campo de entrada"," +
"SAPUR_FRIDAY_ABBREV:"6ª",SAPUR_WEDNESDAY_ABBREV:"4ª",SAPUR_MAY:"Maio",SAPUR_MSG_WARNING:"Advertência"," +
"SAPUR_DECEMBER:"Dezembro",SAPUR_SEPARATOR:"-",SAPUR_MSG_SUCCESS:"Com êxito",SAPUR_SATURDAY_ABBREV:"Sa"," +
"SAPUR_THURSDAY_ABBREV:"5ª",SAPUR_MSG:"{0} {1} {2}",SAPUR_BUTTON_WHL:"{0} - {1} - {2} - {3}",SAPUR_JULY:"Julho"," +
"SAPUR_APRIL:"Abril",SAPUR_FIELD_TIME:"Hora",SAPUR_MSG_ERROR:"Erro",SAPUR_REQUIRED:"Necessário"," +
"SAPUR_BUTTON_WHL3:"{0} - {1} - {2}",SAPUR_SEPTEMBER:"Setembro",SAPUR_NOVEMBER:"Novembro",SAPUR_AUGUST:"Agosto"," +
"SAPUR_JANUARY:"Janeiro",SAPUR_BUTTON:"Botão",SAPUR_FIELD_PW:"Senha",SAPUR_FIELD:"Texto editável"," +
"SAPUR_DISABLED:"Não disponível",SAPUR_FIELD_DATE:"Data",SAPUR_MARCH:"Março",SAPUR_FIELD_NUMBER:"N°"," +
"SAPUR_MSG_STOP:"Stop",SAPUR_BUTTON_WHL4:"{0} - {1} - {2} - {3}"," +
"SAPUR_BUTTON_ENABLED:"Para ativar, utilizar a barra de espaço",SAPUR_TUESDAY_ABBREV:"3ª",SAPUR_READOLNY:""," +
"SAPUR_MSG_JUMPKEY:"Pressionar a barra de espaço para navegar para o campo correspondente",SAPUR_JUNE:"Junho"," +
"SAPUR_MONDAY_ABBREV:"2ª"});</script>");
if (showPatternHint) {
String pattern = "";
String patternTooltip = "";
if (DataType.DATE.equals(type)) {
pattern = HxLocaleUtil.getDatePatternInLocaleLanguage(pc.getLocale());
patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.DatePatternTooltip", pattern);
else if (DataType.TIME.equals(type)) {
pattern = HxLocaleUtil.getTimePatternInLocaleLanguage(pc.getLocale());
patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.TimePatternTooltip", pattern);
pattern = " " + pattern;
else if ((inf.getPatternHint() != null) && (inf.getPatternHint().length() > 0)) {
pattern = " " + inf.getPatternHint();
patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.PatternTooltip", pattern);
pc.write("</td><td align='left'>");
pc.write("<span class='sapTxtLeg' title='" + patternTooltip + "'><nobr>");
pc.write("<font color='666666' face='Microsoft Sans Serif' style='vertical-align:super' size='1'><b>" + pattern + "</b></font>");
pc.write("</nobr></span>");
if (showStatusMsg) {
if (inf.getStatusMsgPosition().equalsIgnoreCase("RIGHT")) {
pc.write("</td><td align='left'>");
pc.write("<font color='990000' face='Microsoft Sans Serif' size='1'>");
else if (inf.getStatusMsgPosition().equalsIgnoreCase("BELOW")) {
pc.write("</td></tr><tr>");
if (showDateHelp && showPatternHint) {
pc.write("<td align='left' colspan='3'>");
else if (showDateHelp ^ showPatternHint) { // '^' is Exclusive OR (XOR)
pc.write("<td align='left' colspan='2'>");
else {
pc.write("<td align='left'>");
pc.write("<font color='990000' face='Microsoft Sans Serif' style='verticle-align:super' size='1'>");
pc.write("<nobr>" + inf.getStatusMsg() + "</nobr>");
pc.write("</font>");
if (showDateHelp || showPatternHint || showStatusMsg) {
pc.write("</td></tr></table>");
// Generate code to store the current Locale in the HTML form,
// and make the month and day names available in javascript arrays.
// The form's Language attribute is used as a flag so that this is only
// done once for each form.
Form form = pc.getCurrentForm();
if ((form.getLanguage() == null)
|| (!form.getLanguage().equals(pc.getLocale().toString()))) {
// Save the locale in the html form as hidden fields so that the
// same locale can be used to parse returned data.
pc.write("<input type="hidden" name="_HTMLX_LANGUAGE_" value="" + pc.getLocale().getLanguage() + "">");
pc.write("<input type="hidden" name="_HTMLX_COUNTRY_" value="" + pc.getLocale().getCountry() + "">");
pc.write("<input type="hidden" name="_HTMLX_VARIANT_" value="" + pc.getLocale().getVariant() + "">");
// Write javascript arrays of month and day names in the locale language
StringBuffer sb = new StringBuffer(250);
String javaScriptPath = pc.getJavascriptPath();
sb.append("var javaScriptPath='");
sb.append(javaScriptPath);
sb.append("';");
java.lang.String dayNames[] = RenderUtil.getDayAbbreviations(pc.getLocale());
if (dayNames.length != 7) {
throw new IllegalStateException("Only locales with 7 days are supported!");
sb.append("var htmlbDayNames = new Array('");
for (int i = 0; i < 6; i++) {
sb.append(dayNames<i>);
sb.append("','");
sb.append(dayNames[6]);
sb.append("');n");
sb.append("var htmlbMonthNames = new Array('");
java.lang.String monthNames[] = RenderUtil.getMonthNames(pc.getLocale());
for (int i = 0; i < 11; i++) {
sb.append(monthNames<i>);
sb.append("','");
sb.append(monthNames[11]);
sb.append("');n");
java.lang.String jscript = sb.toString();
pc.getDocument().getIncludes().addBodyEndResource(ResourceType.DIRECTJSCRIPT, "HTMLB_INPUTFIELD_DATEHELP", jscript);
// Set the language in the form so we don't do this again
form.setLanguage(pc.getLocale().toString());
if (writingDebugToConsole) {
System.out.println("Finished rendering HxInputField (id='" + inf.getId() + "')");
m_logger.info("Exit: HxInputFieldRenderer.render()");
// Methods to allow the Standard HTMLB InputField to Mimic HxInputField
// The key idea here is to use the standard InputField ONLY as a String
// field (never Date) so that we have total control over the display format
// and then HTMLX looks after ofrmating the string, abd displaying the
// help icons, status messages etc.
* Render the HTML placed before a HTMLB InputField, an InputField,
* and the code placed after the InputFIeld, so that it behaves like a
* HTMLX HxInputField
* @param field
* @param pc
public static InputField mimicRender(HxField hxField, IPageContext pc) {
HxInputField hxInputField = new HxInputField(hxField, pc.getLocale());
return mimicRender(hxInputField, pc);
* Render the HTML placed before a HTMLB InputField, an InputField,
* and the code placed after the InputFIeld, so that it behaves like a
* HTMLX HxInputField
* @param field
* @param pc
public static InputField mimicRender(HxInputField hxInputField, IPageContext pc) {
// Render stuff before InputField
renderBeforeInputTag(hxInputField, pc);
// Render InputField
InputField inputField = new InputField(hxInputField.getId());
setUpInputField(hxInputField, inputField, pc);
// This is a kludge to make a field read only. It is achieved by
// adding the flag to the 'width' attribute. HTMLB then unknowingly
// adds the flag when it renders the 'width' attribute.
if (hxInputField.isReadOnly()) {
inputField.setWidth( inputField.getWidth() + ";" readonly="");
inputField.render(pc);
String uniqueName = pc.getParamIdForComponent(inputField);
String popUpKeyUniqueName = "";
// If the field has a Pop Up add a hidden field for the Key populated by the Pop Up
if (hxInputField.isShowPopUp()) {
InputField keyInputField = new InputField(hxInputField.getId() + "PopUpKey");
keyInputField.setVisible(false);
keyInputField.setValue(hxInputField.getPopUpKeyValue());
keyInputField.render(pc);
popUpKeyUniqueName = pc.getParamIdForComponent(keyInputField);
// Render stuff after InputField
renderAfterInputTag(hxInputField, pc, uniqueName, popUpKeyUniqueName);
return inputField;
* Render the HTML to be placed before a HTMLB InputField so that it
* behaves like a HTMLX HxInputField
* @param field
* @param pc
public static void renderBeforeInputTag(HxField field, IPageContext pc) {
renderBeforeInputTag(new HxInputField(field), pc);
* Render the HTML to be placed before a HTMLB InputField so that it
* behaves like a HTMLX HxInputField
* @param inf
* @param pc
public static void renderBeforeInputTag(HxInputField inf, IPageContext pc)
if (writingDebugToConsole) {
System.out.println("Start rendering mimic HxInputField (id='" + inf.getId() + "') ...");
if (showDateHelp(inf) || showPopUp(inf) || showPatternHint(inf) || showStatusMsg(inf)) {
pc.write("<table cellspacing="0" cellpadding="0" border="0" id="");
pc.write(""><tr><td>");
* Set a HMTLB InputField with the values stored in the HxField.
* This makes for less code in the JSP, and some versions of the PDK/EP
* do not support some paramters in the TAG (e.g. Tooltip)
* @param hxField
* @param myContext
* @param pageContext
public static InputField setUpInputField(HxField hxField, IPageContext pc, PageContext pageContext) {
Component component = (Component)pageContext.getAttribute(hxField.getId());
if (!(component instanceof InputField)) {
String msg =
"HxInputFieldRenderer.setUpInputTag() component is not instanceof InputField " +
"(hxField.getId()='" + hxField.getId() + "' " +
" component.getClass().getName()='" + component.getClass().getName() + "')";
PortalRuntime.getLogger("htmlx").severe(msg);
throw new IllegalArgumentException(msg);
InputField inf = (InputField)pageContext.getAttribute(hxField.getId());
setUpInputField(hxField, inf, pc);
return inf;
* Set a HMTLB InputField with the values in the HxField.
* This makes for less code in the JSP, and some versions of the PDK/EP
* do not allow you to set some paramters in the TAG (e.g. Tooltip)
* @param hxField
* @param myContext
* @param pageContext
public static void setUpInputField(HxField hxField, InputField inf, IPageContext pc) {
inf.setDisabled(hxField.isDisabled());
inf.setInvalid(hxField.isInvalid());
inf.setMaxlength(hxField.getMaxLength());
inf.setRequired(hxField.isRequired());
inf.setShowHelp(false);
inf.setTooltip(hxField.getTooltip());
inf.setType(DataType.STRING);
inf.setValue(hxField.getValueAsString(pc.getLocale()));
inf.setVisible(hxField.isVisible());
inf.setSize(hxField.getMaxLength());
* Set a HMTLB InputField with the values stored in the HxField.
* This makes for less code in the JSP, and some versions of the PDK/EP
* do not support some paramters in the TAG (e.g. Tooltip)
* @param hxField
* @param myContext
* @param pageContext
public static void setUpInputField(HxInputField hxInputField, InputField inf, IPageContext pc) {
inf.setDisabled(hxInputField.isDisabled());
inf.setInvalid(hxInputField.isInvalid());
inf.setMaxlength(hxInputField.getMaxlength());
inf.setRequired(hxInputField.isRequired());
inf.setShowHelp(false);
inf.setTooltip(hxInputField.getTooltip());
inf.setType(DataType.STRING);
inf.setValue(hxInputField.getPreformattedValueAsString());
inf.setVisible(hxInputField.isVisible());
inf.setSize(hxInputField.getSize());
* Render the HTML to be placed after a HTMLB InputField so that it
* behaves like a HTMLX HxInputField
* @param field
* @param myContext
* @param pageContext
public static void renderAfterInputTag(HxField field, IPageContext pc, PageContext pageContext) {
renderAfterInputTag(new HxInputField(field), pc, pageContext);
* Render the HTML to be placed after a HTMLB InputField so that it
* behaves like a HTMLX HxInputField
* @param inf
* @param myContext
* @param pageContext
public static void renderAfterInputTag(HxInputField inf, IPageContext pc, PageContext pageContext) {
Component component = (Component)pageContext.getAttribute(inf.getId());
String uniqueName = pc.getParamIdForComponent(component);
String popUpKeyUniqueName = "";
if (inf.isShowPopUp()) {
component = (Component)pageContext.getAttribute(inf.getId() + "PopUpKey");
popUpKeyUniqueName = pc.getParamIdForComponent(component);
renderAfterInputTag(inf, pc, uniqueName, popUpKeyUniqueName);
* Render the HTML to be placed after a HTMLB InputField so that it
* behaves like a HTMLX HxInputField
* @param inf
* @param pc
* @param uniqueName
* @param popUpKeyUniqueName
public static void renderAfterInputTag(
HxInputField inf,
IPageContext pc,
String uniqueName,
String popUpKeyUniqueName)
if (showDateHelp(inf)) {
String dateFormat = HxLocaleUtil.getSapDatePatternNumber(pc.getLocale());
pc.write("</td><td align='left'><button id='");
pc.write(uniqueName);
pc.write("-btn' type="button" tabindex="-1" ti="-1" class="urEdfHlpDate" onclick="htmlb_showDateHelp(event,'");
pc.write(uniqueName);
pc.write("','");
pc.write(dateFormat);
pc.write("','1')"></button>");
pc.write("<script>htmlb_addTexts('pt_BR',{SAPUR_OCTOBER:"Outubro",SAPUR_MSG_LOADING:"Processo de carga em andamento"," +
"SAPUR_SUNDAY_ABBREV:"Do",SAPUR_F4FIELD_TUTOR:"Pressionar F4 para exibir as entradas possíveis"," +
"SAPUR_INVALID:"Não válido",SAPUR_FEBRUARY:"Fevereiro",SAPUR_F4FIELD:"F4- campo de entrada"," +
"SAPUR_FRIDAY_ABBREV:"6ª",SAPUR_WEDNESDAY_ABBREV:"4ª",SAPUR_MAY:"Maio",SAPUR_MSG_WARNING:"Advertência"," +
"SAPUR_DECEMBER:"Dezembro",SAPUR_SEPARATOR:"-",SAPUR_MSG_SUCCESS:"Com êxito",SAPUR_SATURDAY_ABBREV:"Sa"," +
"SAPUR_THURSDAY_ABBREV:"5ª",SAPUR_MSG:"{0} {1} {2}",SAPUR_BUTTON_WHL:"{0} - {1} - {2} - {3}",SAPUR_JULY:"Julho"," +
"SAPUR_APRIL:"Abril",SAPUR_FIELD_TIME:"Hora",SAPUR_MSG_ERROR:"Erro",SAPUR_REQUIRED:"Necessário"," +
"SAPUR_BUTTON_WHL3:"{0} - {1} - {2}",SAPUR_SEPTEMBER:"Setembro",SAPUR_NOVEMBER:"Novembro",SAPUR_AUGUST:"Agosto"," +
"SAPUR_JANUARY:"Janeiro",SAPUR_BUTTON:"Botão",SAPUR_FIELD_PW:"Senha",SAPUR_FIELD:"Texto editável"," +
"SAPUR_DISABLED:"Não disponível",SAPUR_FIELD_DATE:"Data",SAPUR_MARCH:"Março",SAPUR_FIELD_NUMBER:"N°"," +
"SAPUR_MSG_STOP:"Stop",SAPUR_BUTTON_WHL4:"{0} - {1} - {2} - {3}"," +
"SAPUR_BUTTON_ENABLED:"Para ativar, utilizar a barra de espaço",SAPUR_TUESDAY_ABBREV:"3ª",SAPUR_READOLNY:""," +
"SAPUR_MSG_JUMPKEY:"Pressionar a barra de espaço para navegar para o campo correspondente",SAPUR_JUNE:"Junho"," +
"SAPUR_MONDAY_ABBREV:"2ª"});</script>");
if (showPopUp(inf)) {
String dateFormat = HxLocaleUtil.getSapDatePatternNumber(pc.getLocale());
pc.write("</td><td align='left'><div class="urEdfHlpSml" onClick="");
pc.write("htmlxPopUp('");
pc.write(getPopUpUrl(pc, inf.getPopUpPage()));
pc.write("', '");
pc.write(uniqueName);
pc.write("', '");
pc.write(popUpKeyUniqueName);
pc.write("', ");
pc.write(inf.getPopUpWidth());
pc.write(", ");
pc.write(inf.getPopUpHeight());
pc.write(", '");
pc.write(inf.getPopUpAttributes());
pc.write("')">");
pc.write(" </div>");
if (showPatternHint(inf)) {
String pattern = "";
String patternTooltip = "";
if (DataType.DATE.equals(inf.getType())) {
pattern = HxLocaleUtil.getDatePatternInLocaleLanguage(pc.getLocale());
patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.DatePatternTooltip", pattern);
else if (DataType.TIME.equals(inf.getType())) {
pattern = HxLocaleUtil.getTimePatternInLocaleLanguage(pc.getLocale());
patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.TimePatternTooltip", pattern);
pattern = " " + pattern;
else if ((inf.getPatternHint() != null) && (inf.getPatternHint().length() > 0)) {
pattern = " " + inf.getPatternHint();
patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.PatternTooltip", pattern);
pc.write("</td><td align='left'>");
pc.write("<span class='sapTxtLeg' title='" + patternTooltip + "'><nobr>");
pc.write("<font color='666666' face='Microsoft Sans Serif' style='vertical-align:super' size='1'><b>" + pattern + "</b></font>");
pc.write("</nobr></span>");
if (showStatusMsg(inf)) {
if (inf.getStatusMsgPosition().equalsIgnoreCase("RIGHT")) {
pc.write("</td><td align='left'>");
pc.write("<font color='990000' face='Microsoft Sans Serif' size='1'>");
else if (inf.getStatusMsgPosition().equalsIgnoreCase("BELOW")) {
pc.write("</td></tr><tr>");
if (showDateHelp(inf) && showPatternHint(inf)) {
pc.write("<td align='left' colspan='3'>");
else if (showDateHelp(inf) ^ showPatternHint(inf)) { // '^' is Exclusive OR (XOR)
pc.write("<td align='left' colspan='2'>");
else {
pc.write("<td align='left'>");
pc.write("<font color='990000' face='Microsoft Sans Serif' style='verticle-align:super' size='1'>");
pc.write("<nobr>" + inf.getStatusMsg() + "</nobr>");
pc.write("</font>");
if (showDateHelp(inf) || showPopUp(inf) || showPatternHint(inf) || showStatusMsg(inf)) {
pc.write("</span></td></tr></table>");
// Generate code to store the current Locale in the HTML form,
// and make the month and day names available in javascript arrays.
// The form's Language attribute is used as a flag so that this is only
// done once for each form.
Form form = pc.getCurrentForm();
if ((form.getLanguage() == null)
|| (!form.getLanguage().equals(pc.getLocale().toString()))) {
// Save the locale in the html form as hidden fields so that the
// same locale can be used to parse returned data.
pc.write("<input type="hidden" name="_HTMLX_LANGUAGE_" value="" + pc.getLocale().getLanguage() + "">");
pc.write("<input type="hidden" name="_HTMLX_COUNTRY_" value="" + pc.getLocale().getCountry() + "">");
pc.write("<input type="hidden" name="_HTMLX_VARIANT_" value="" + pc.getLocale().getVariant() + "">");
// Write javascript arrays of month and day names in the locale language
StringBuffer sb = new StringBuffer(250);
String javaScriptPath = pc.getJavascriptPath();
sb.append("var javaScriptPath='");
sb.append(javaScriptPath);
sb.append("';");
java.lang.String dayNames[] = RenderUtil.getDayAbbreviations(pc.getLocale());
if (dayNames.length != 7) {
throw new IllegalStateException("Only locales with 7 days are supported!");
sb.append("var htmlbDayNames = new Array('");
for (int i = 0; i < 6; i++) {
sb.append(dayNames<i>);
sb.append("','");
sb.append(dayNames[6]);
sb.append("');n");
sb.append("var htmlbMonthNames = new Array('");
java.lang.String monthNames[] = RenderUtil.getMonthNames(pc.getLocale());
for (int i = 0; i < 11; i++) {
sb.append(monthNames<i>);
sb.append("','");
sb.append(monthNames[11]);
sb.append("');n");
String jscript = sb.toString();
pc.getDocument().getIncludes().addBodyEndResource(ResourceType.DIRECTJSCRIPT, "HTMLB_INPUTFIELD_DATEHELP", jscript);
pc.getDocument().getIncludes().addBodyEndResource(ResourceType.DIRECTJSCRIPT, "HTMLX", getHtmlxJavascript());
// Set the language in the form so we don't do this again
form.setLanguage(pc.getLocale().toString());
if (writingDebugToConsole) {
System.out.println("Finished rendering mimic HxInputField (id='" + inf.getId() + "')");
private static boolean showDateHelp(HxInputField inf) {
if (DataType.DATE.equals(inf.getType())
&& inf.isShowHelp()
&& !inf.isDisabled()) {
return true;
return false;
private static boolean showPopUp(HxInputField inf) {
if (!showDateHelp(inf)
&& !inf.isDisabled()
&& inf.isShowPopUp()) {
return true;
return false;
private static boolean showPatternHint(HxInputField inf) {
boolean isDateOrTime = DataType.DATE.equals(inf.getType()) || DataType.TIME.equals(inf.getType());
boolean patternHintSet = (inf.getPatternHint() != null) && (inf.getPatternHint().length() > 0);
if (inf.isShowPatternHint()
&& (isDateOrTime || patternHintSet)) {
return true;
return false;
private static boolean showStatusMsg(HxInputField inf) {
if (inf.isShowStatusMsg()
&& (inf.getStatusMsg() != null)
&& (inf.getStatusMsg().length() > 0)) {
return true;
return false;
private static String getPopUpUrl(IPageContext pc, String pageName) {
IPortalComponentRequest request = (IPortalComponentRequest)pc.getRequest();
IPortalComponentResponse response = (IPortalComponentResponse)pc.getResponse();
IPortalUrlGenerator portalGen = null;
IUrlGeneratorService urlGen = (IUrlGeneratorService)request.getService(IUrlGeneratorService.KEY);
ISpecializedUrlGenerator specUrlGen2 = urlGen.getSpecializedUrlGenerator(IPortalUrlGenerator.KEY);
if (specUrlGen2 instanceof IPortalUrlGenerator) {
portalGen = (IPortalUrlGenerator) specUrlGen2;
// Create the url to the iView
String url = "";
if (portalGen != null) {
// Create the parameters passed to SAP transaction for mesima
url = portalGen.generatePortalComponentUrl(request, pageName); // "htmlxJarMimicExample.default");
return url;
protected static String getHtmlxJavascript() {
return "n" +
" if(window.document.domain == window.location.hostname) { n" +
" document.domain = document.domain.substring(document.domain.indexOf('.')+1); n" +
" } n" +
" var popUpTextId; n" +
" var popUpKeyId; n" +
" var myPopUp; n" +
" function setTextField(text) { n" +
" field = document.getElementById(popUpTextId); n" +
" if (field) { n" +
" field.value = text; n" +
" } n" +
" else { n" +
" alert('Text target field for pop up not found (' + popUpTextId + ')'); n" +
" } n" +
" } n" +
" function setKeyField(key) { n" +
" field = document.getElementById(popUpKeyId); n" +
" if (field) { n" +
" field.value = key; n" +
" } n" +
" } n" +
" function setFields(text, key, close) { n" +
" setTextField(text); n" +
" setKeyField(key); n" +
" if (close) { n" +
" myPopUp.close(); n" +
" } n" +
" return false; n" +
" } n" +
" function htmlxPopUp(url, textId, keyId, width, height, attributes) { n" +
" popUpTextId = textId; n" +
" popUpKeyId = keyId; n" +
" if (myPopUp) { n" +
" myPopUp.close(); n" +
" } n" +
" if (event!=null){ n" +
" xPos = event.screenX-event.offsetX; n" +
" yPos = event.screenY-event.offsetY; n" +
" } n" +
" if ((xPos+width) > screen.availWidth) { n" +
" xPos=screen.availWidth - width - 10; n" +
" } n" +
" if ((yPos+height) > screen.availHeight) { n" +
" yPos=screen.availHeight - height - 10; n" +
" } n" +
" sizeAndPos = 'width=' + width + ', height=' + height + ', top=' + yPos + ', left=' + xPos; n" +
" myPopUp = window.open(url, 'PopUp', sizeAndPos + ', ' + attributes); n" +
" if (!myPopUp) { n" +
" alert('You may have unrequested popup blocking on.'); n" +
" } n" +
" }n";
// Methods to assist dubugging JSP pages
* @return True if debug messages are being written to the console
public static boolean isWritingDebugToConsole() {
return writingDebugToConsole;
* When an error occurs in a JSP page the line number given in the stack
* trace is rarely the line that caused the error. This can make traking
* down errors in a JSP page can be very difficult. By writing debug messages
* to the console every time a field is rendered, it can be much easier to
* identify the area of code causing a problem.<p>
* <b>Do NOT set this in the production release of your application.</b>
* @param b
public static void setWritingDebugToConsole(boolean b) {
writingDebugToConsole = b;
* Initialise to NOT write debug to the console
static {
writingDebugToConsole = false;Try these
[http://help.sap.com/saphelp_nwmobile71/helpdata/en/45/65ad4ee0531aa8e10000000a114a6b/content.htm]
[http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5c6a85b11d6b28500508b5d5211/content.htm]
[http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01381.0120/doc/html/koh1278435126915.html]
Reagards,
Mouli -
Error with HeaderiView.jsp file
Hi there,
I took the masthead par file from the portal and I did some changes in the HeaderiView.jsp. When I try the iview in the preview I see the next error:
Portal Runtime Error
An exception occurred while processing a request for :
iView : pcd:portal_content/pruebasjanet/ZiwImage/zprueba54
Component Name : prueba1701.default
Error occurs during the rendering of jsp component.
Exception id: 10:14_06/09/07_0075_33099350
See the details for the exception ID in the log file
I already added the com.sap.portal.navigation.mastheadapi.jar in \PORTAL-INF\lib
and com.sap.portal.navigation.masthead_core.jar \PORTAL-INF\private\lib.
Any help would be greatly appreciated!
JeanetteHi Malini,
Yes, I did some changes in Jsp file. I'm trying to make a copy of the Help Link. I copied all the components in the portalapp.xml (only changes, for example, <property name="ShowHelpLink" value="true"> <property name="ShowSiteLink" value="true">)
Would you please help me checking the code?
Thanks.
Jeanette
With the jsp file I have problems:
<%@ page import = "java.util.ResourceBundle" %>
<%@ page import = "com.sapportals.htmlb.*" %>
<%@ page import = "com.sapportals.portal.prt.session.IUserContext" %>
<%@ page import = "com.sapportals.portal.prt.component.*" %>
<%@ page import = "com.sapportals.portal.prt.service.laf.*" %>
<%@ page import = "com.sap.security.api.UMFactory" %>
<%@ page import = "com.sapportals.portal.prt.service.license.ILicenseService"%>
<%@ page import = "com.sapportals.portal.navigation.*" %>
<%@ page import = "com.sapportals.portal.prt.runtime.PortalRuntime" %>
<%@ page import = "com.sapportals.portal.prt.util.StringUtils" %>
<%@ taglib uri="prt:taglib:tlhtmlb" prefix="hbj" %>
<%!
final String PERSONALIZE_PAGE_EVENT_URN = "urn:com.sapportals:navigation";
final String PERSONALIZE_PAGE_EVENT_NAME = "PersonalizePage";
final String PERSONALIZE_PAGE_EVENT_PARAMS = "";
final String PERSONALIZE_PORTAL_EVENT_URN = "urn:com.sapportals:navigation";
final String PERSONALIZE_PORTAL_EVENT_NAME = "PersonalizePortal";
final String PERSONALIZE_PORTAL_EVENT_PARAMS = "";
final String LOGOFF_CONFIRM_MSG_COMPONENT = "logoffConfirmMsg";
final String LOGON_REDIRECT_COMPONENT = "logInComponent";
final String LOGOFF_REDIRECT_COMPONENT = "LogOutComponent";
final String LOGOFF_CONFIRM_MSG_ARGS_IE = "dialogHeight: 170px; dialogWidth: 350px; edge: Raised; center: Yes; help: No; resizable: No; status: No";
final String LOGOFF_CONFIRM_MSG_ARGS_NS = "Height=170,Width=350";
final String LOGOFF_CONFIRM_WINDOW_NAME = "LOG_OFF_WINDOW";
final String HELP_URL = "HelpUrl";
final String SITE_URL = "SiteUrl";
final String HELP_WINDOW_NAME = "HELP_WINODW";
final String SITE_WINDOW_NAME = "SITE_WINODW";
final String SHOW_PERSONALIZE_LINK = "ShowPersonalizeLink";
final String SHOW_HELP_LINK = "ShowHelpLink";
final String SHOW_SITE_LINK = "ShowSiteLink";
final String SHOW_NEW_WINDOW_LINK = "ShowNewWindowLink";
final String SHOW_LOG_OFF_LOG_ON_LINK = "ShowLogInLogOffLink";
//String constants for NLS
final String WELCOME_CLAUSE = "WELCOME_CLAUSE";
final String HELP_TEXT = "HELP_TEXT";
final String SITE_TEXT = "SITE_TEXT";
final String LOG_OFF_TEXT = "LOG_OFF_TEXT";
final String LOG_ON_TEXT = "LOG_ON_TEXT";
final String PERSONALIZE_TEXT = "PERSONALIZE_TEXT";
final String PERSONALIZE_PORTAL_TEXT = "PERSONALIZE_PORTAL_TEXT";
final String NEW_WINDOW_TEXT = "NEW_WINDOW_TEXT";
final String HELP_TOOLTIP = "HELP_TOOLTIP";
final String SITE_TOOLTIP = "SITE_TOOLTIP";
final String LOG_OFF_TOOLTIP = "LOG_OFF_TOOLTIP";
final String LOG_ON_TOOLTIP = "LOG_ON_TOOLTIP";
final String PERSONALIZE_TOOLTIP = "PERSONALIZE_TEXT";
final String PERSONALIZE_PORATL_TOOLTIP = "PERSONALIZE_PORATL_TOOLTIP";
final String NEW_WINDOW_TOOLTIP = "NEW_WINDOW_TOOLTIP";
final String BEGINNING_OF_PAGE = "BEGINNING_OF_PAGE";
final String MASTHEAD_ENTER_TOOLTIP = "MASTHEAD_ENTER_TOOLTIP";
final String MASTHEAD_EXIT_TOOLTIP = "MASTHEAD_EXIT_TOOLTIP";
final String UNLOAD_MSG = "UNLOAD_MSG";
private String GetWelcomeMsg(IPortalComponentRequest request, String welcomeClause)
IUserContext userContext = request.getUser();
if (userContext != null)
String firstName = userContext.getFirstName();
String lastName = userContext.getLastName();
String salutation = userContext.getSalutation();
if ((firstName != null) && (lastName != null))
if(salutation != null)
return java.text.MessageFormat.format(welcomeClause, new Object[] {firstName, lastName, salutation}).toString();
else
return java.text.MessageFormat.format(welcomeClause, new Object[] {firstName, lastName, " "}).toString();
else
return java.text.MessageFormat.format(welcomeClause, new Object[] {userContext.getDisplayName()," ", " "}).toString();
return "";
private String GetLicenseText(IPortalComponentRequest request){
ILicenseService license = (ILicenseService)request.getService(ILicenseService.KEY);
if (license.sapInternalUsageOnly())
return "<FONT color=orangeRed size=4><STRONG> Licensed For SAP Internal Usage</STRONG></FONT>";
else
return " ";
private boolean getParameter(IPortalComponentRequest request, String param)
String value = (String)request.getNode().getValue(param);
return new Boolean(value).booleanValue();
private String getHelpUrl(IPortalComponentRequest request)
String value = (String)request.getNode().getValue(HELP_URL);
return value;
private String getSiteUrl(IPortalComponentRequest request)
String value = (String)request.getNode().getValue(SITE_URL);
return value;
private String GetLogoffConfirmMsgURL(IPortalComponentRequest request)
String componentName = request.getComponentContext().getComponentName();
componentName = componentName.substring(0, componentName.lastIndexOf(".") + 1);
IPortalComponentURI msgURI = request.createPortalComponentURI();
msgURI.setContextName(componentName + LOGOFF_CONFIRM_MSG_COMPONENT);
return msgURI.toString();
// Attaching the "UnsavedData=true" flag to the Confirm logoff message
private String GetLogoffConfirmUnsavedMsgURL(IPortalComponentRequest request)
String basicUrl = GetLogoffConfirmMsgURL(request);
String separator = (basicUrl.indexOf("?") >=0) ? "&" : "?";
return basicUrl + separator + "UnsavedData=true";
private String GetLogoffURL(IPortalComponentRequest request)
/*IPortalComponentURI logoffURI = request.createPortalComponentURI();
return logoffURI.toString();*/
String componentName = request.getComponentContext().getComponentName();
componentName = componentName.substring(0, componentName.lastIndexOf(".") + 1);
IPortalComponentURI msgURI = request.createPortalComponentURI();
msgURI.setContextName(componentName + LOGOFF_REDIRECT_COMPONENT);
return msgURI.toString();
private boolean isAccessabilityOn(IPortalComponentRequest request)
//End: Temporary, till there's a way to set the accessibility for a user
IUserContext user = request.getUser();
//if((user.getAccessibilityLevel() != IUserContext.DEFAULT_ACCESSIBILITY_LEVEL) ||(isAccessibility == true) ) // 508 is on
if (user.getAccessibilityLevel() != IUserContext.DEFAULT_ACCESSIBILITY_LEVEL) // 508 is on
return true;
return false;
private String GetLoginURL(IPortalComponentRequest request)
INavigationGenerator navigationService = (INavigationGenerator)PortalRuntime.getRuntimeResources().getService(INavigationService.KEY);
StringBuffer URL = new StringBuffer(200).append(navigationService.getPortalURL(request , null));
return URL.append("/login").toString();
private String GetPortalUrl(IPortalComponentRequest request)
INavigationGenerator navigationService = (INavigationGenerator)PortalRuntime.getRuntimeResources().getService(INavigationService.KEY);
return navigationService.getPortalURL(request , null);
private String getNLSString(IPortalComponentRequest request, String resource_key)
try
ResourceBundle bundle = request.getResourceBundle();
if(bundle != null)
return bundle.getString(resource_key);
return resource_key;
catch(MissingResourceException e)
return resource_key;
private String GetThemeURLPath(IPortalComponentRequest request)
ILAFService iLAFService = (ILAFService)request.getService(ILAFService.KEY);
String currentTheme = iLAFService.getCurrentTheme(request).getThemeName();
String url = iLAFService.getRelativeThemeRootURLPath(request, ILAFService.PORTAL_THEME) + "/" + currentTheme + "/prtl";
return url;
//Get the external logoff URL
private String getExternalLogOffUrl()
return UMFactory.getProperties().get("ume.logoff.redirect.url");
//Get the external logoff Mode (silent / not silent)
private boolean getExternalLogOffMode()
return UMFactory.getProperties().getBoolean("ume.logoff.redirect.silent" , false);
private boolean isAnonymous(IPortalComponentRequest request)
NavigationEventsHelperService helperService = (NavigationEventsHelperService)
PortalRuntime.getRuntimeResources().getService(NavigationEventsHelperService.KEY);
return helperService.isAnonymousUser(request);
%>
<%
boolean isPreview = false;
// initializaing the labels with the localized labels
String welcomeClauseStr = getNLSString(componentRequest, WELCOME_CLAUSE);
String helpTextStr = getNLSString(componentRequest, HELP_TEXT);
String siteTextStr = getNLSString(componentRequest, SITE_TEXT);
String logOffTextStr = getNLSString(componentRequest, LOG_OFF_TEXT);
String logInTextStr = getNLSString(componentRequest, LOG_ON_TEXT);
String personalizeTextStr = getNLSString(componentRequest, PERSONALIZE_TEXT);
String newWindowTextStr = getNLSString(componentRequest, NEW_WINDOW_TEXT);
String helpTooltipStr = getNLSString(componentRequest, HELP_TOOLTIP);
String siteTooltipStr = getNLSString(componentRequest, SITE_TOOLTIP);
String logOffTooltipStr = getNLSString(componentRequest, LOG_OFF_TOOLTIP);
String logInTooltipStr = getNLSString(componentRequest, LOG_ON_TOOLTIP);
String personalizeTooltipStr = getNLSString(componentRequest, PERSONALIZE_TOOLTIP);
String personalizePortalTooltipStr = getNLSString(componentRequest, PERSONALIZE_PORATL_TOOLTIP);
String beginningOfPageStr = getNLSString(componentRequest, BEGINNING_OF_PAGE);
String newWindowStr = getNLSString(componentRequest, NEW_WINDOW_TOOLTIP);
String mastheadEnterTable = getNLSString(componentRequest, MASTHEAD_ENTER_TOOLTIP);
String mastheadExitTable = getNLSString(componentRequest, MASTHEAD_EXIT_TOOLTIP);
String unLoadMsg = getNLSString(componentRequest, UNLOAD_MSG);
boolean showPersonalizeLink = getParameter(componentRequest, SHOW_PERSONALIZE_LINK);
boolean showHelpLink = getParameter(componentRequest, SHOW_HELP_LINK);
boolean showSiteLink = getParameter(componentRequest, SHOW_SITE_LINK);
boolean showNewWindowLink = getParameter(componentRequest, SHOW_NEW_WINDOW_LINK);
boolean ShowLogInLogOffLink = getParameter(componentRequest, SHOW_LOG_OFF_LOG_ON_LINK);
String mode = (String)componentRequest.getNode().getValue("mode");
if ((mode != null) && (mode.equals("preview")))
isPreview = true;
String themeRootURLPath = GetThemeURLPath(componentRequest);
boolean isAnonymous = isAnonymous(componentRequest);
boolean isAccessabilityOn = isAccessabilityOn(componentRequest);
if (isAccessabilityOn)
helpTooltipStr = helpTextStr", "helpTooltipStr;
siteTooltipStr = siteTextStr", "siteTooltipStr;
logOffTooltipStr = logOffTextStr", "logOffTooltipStr;
logInTooltipStr = logInTextStr", "logInTooltipStr;
newWindowStr = newWindowTextStr", "newWindowStr;
personalizePortalTooltipStr = personalizeTextStr", "personalizePortalTooltipStr;
%>
<script>
function openLogoffMsg()
<%if (!isPreview){%>
if (EPCM.getUAType() == EPCM.MSIE)
releaseProducerSessions();
if(EPCM.getGlobalDirty())
// unsaved data on the page, display modified dialog
var val = window.showModalDialog('<%=GetLogoffConfirmUnsavedMsgURL(componentRequest)%>', '', '<%=LOGOFF_CONFIRM_MSG_ARGS_IE%>');
if (val == 'logoff')
disableWorkProtectCheck = true;
logoff();
else //no unsaved data
// data saved, nothing get lost on the page, display normal dialog
var val = window.showModalDialog('<%=GetLogoffConfirmMsgURL(componentRequest)%>', '', '<%=LOGOFF_CONFIRM_MSG_ARGS_IE%>');
if (val == 'logoff')
logoff();
else
if(EPCM.getGlobalDirty())
window.open('<%=GetLogoffConfirmUnsavedMsgURL(componentRequest)%>', '<%=LOGOFF_CONFIRM_WINDOW_NAME%>', '<%=LOGOFF_CONFIRM_MSG_ARGS_NS%>');
else
window.open('<%=GetLogoffConfirmMsgURL(componentRequest)%>', '<%=LOGOFF_CONFIRM_WINDOW_NAME%>', '<%=LOGOFF_CONFIRM_MSG_ARGS_NS%>');
<%}%>
var isLogoffFinalAllowed = true;
var logoffStartTime = (new Date).getTime();
function logoff()
EPCM.raiseEvent("urn:com.sapportals.portal:user", "logoff", "");
logoffStartTime = (new Date).getTime();
window.setTimeout("logoffDelay()", "50");
function logoffDelay()
var isLogoffDelayElapsed = ((new Date).getTime() - logoffStartTime) > (60*1000);
if(isLogoffFinalAllowed || isLogoffDelayElapsed) {
logoffFinalCall();
} else {
window.setTimeout("logoffDelay()","50");
function logoffFinalCall()
logoffThirdParty();
document.forms["logoffForm"].submit();
function logIn()
location.replace("<%=GetLoginURL(componentRequest)%>");
function runPersonalizePage()
EPCM.raiseEvent("<%=PERSONALIZE_PAGE_EVENT_URN%>", "<%=PERSONALIZE_PAGE_EVENT_NAME%>", "<%=PERSONALIZE_PAGE_EVENT_PARAMS%>");
function runPersonalizePortal()
<%if (!isPreview){%>
EPCM.raiseEvent("<%=PERSONALIZE_PORTAL_EVENT_URN%>", "<%=PERSONALIZE_PORTAL_EVENT_NAME%>", "<%=PERSONALIZE_PORTAL_EVENT_PARAMS%>");
<%}%>
function onPersonalizePortalDisable()
var linkElem = document.getElementById("personalizePortal");
var linkSepElem = document.getElementById("personalizePortalSep");
var linkLogoffSepElem = document.getElementById("logoffsep1");
if(linkElem != null)
linkElem.style.display = "none";
if(linkSepElem != null)
linkSepElem.style.display = "none";
if(linkLogoffSepElem != null)
linkLogoffSepElem.style.display = "none";
EPCM.subscribeEvent("urn:com.sapportals:navigation", "PersonalizePortalDisable", onPersonalizePortalDisable);
function openNewPortalWindow()
<%if (!isPreview){%>
var navTarget = EPCM.getSAPTop().gHistoryFrameworkObj.GetActiveTrackingEntryValue().URL;
var context = EPCM.getSAPTop().gHistoryFrameworkObj.GetActiveTrackingEntryValue().context;
if (context != null && context.length > 0)
EPCM.doNavigate(navTarget, 2, null, null, null, null, context);
else
EPCM.doNavigate(navTarget, 2);
<%}%>
function openHelp()
<%if (!isPreview){%>
window.open('<%=getHelpUrl(componentRequest)%>', '<%=HELP_WINDOW_NAME%>');
<%}%>
function openSite()
<%if (!isPreview){%>
window.open('<%=getSiteUrl(componentRequest)%>', '<%=SITE_WINDOW_NAME%>');
<%}%>
function setFocusOnHeader() {
var melcomeMessage = document.getElementById("welcome_message");
var headerNotch = document.getElementById("header_notch");
if(EPCM.getUAType()==EPCM.MOZILLA) {
// No focus
} else {
if(melcomeMessage!=null && melcomeMessage.currentStyle.display!="none") {
melcomeMessage.focus();
} else if(headerNotch!=null && headerNotch.currentStyle.display!="none") {
headerNotch.focus();
function logoffThirdParty()
<% if(getExternalLogOffUrl()!= null){ %>
var logOffUrl = '<%=getExternalLogOffUrl()%>';
var silent = <%=getExternalLogOffMode()%>;
if(silent)
var newIFrame = document.getElementById("externalLogOffIframe");
if(newIFrame == null)
newIFrame = document.createElement("IFRAME");
newIFrame.style.visibility = "hidden";
newIFrame.width=0;
newIFrame.height=0;
newIFrame.id = "externalLogOffIframe";
newIFrame.src = logOffUrl;
document.body.appendChild(newIFrame);
else
newIFrame.src = "javascript:void(0)";
newIFrame.src = logOffUrl;
<% } %>
</script>
<hbj:content id="PageContext">
<hbj:page title="Header Area">
<hbj:form id="HeaderForm" >
<!--<a href="#" tabindex=0 title= "<%=beginningOfPageStr%>" accesskey="m">
<img src="<%=themeRootURLPath%>/../common/1x1.gif" border="0" style="display:none">
</a>-->
<% if (isAccessabilityOn)
{%>
<TABLE width="100%" border="0" id="myTable" ti="0" tabindex="0" title="<%=mastheadEnterTable%>" onkeydown="nav_skip('myTable',event)" ct="PortalMasthead" cellspacing="0" cellpadding="0" ><% if (isPreview) {%>ondragover="window.event.cancelBubble = true;" ondragleave="window.event.cancelBubble = true;"<%}%>>
<%} else
{%>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="prtlHdrWhl" id="myTable" ti="0" tabindex="0" onkeydown="nav_skip('myTable',event)" ><% if (isPreview) {%>ondragover="window.event.cancelBubble = true;" ondragleave="window.event.cancelBubble = true;"<%}%>>
<%}%>
<tbody>
<TR>
<TD width="1%" nowrap class="prtlHeaderNotch" id="header_notch"> </TD>
<TD width="5%" nowrap class="prtlHdrWelcome" id="welcome_message" ti="0" tabIndex="0"><%=StringUtils.escapeToHTML(GetWelcomeMsg(componentRequest, welcomeClauseStr))%></TD>
<TD width="3%" nowrap class="prtlHdrWelcome" id="welcome_message" ti="1" tabIndex="1">
<SCRIPT LANGUAGE="JavaScript">
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000))
year="19" + year;
if (navigator.appName == "Netscape")
year=1900 + year;
document.write("<center>" + lmonth + " ");
document.write(date + ", " + year + "</center>");
</SCRIPT>
</TD>
<% if (showSiteLink || showHelpLink || showPersonalizeLink || showNewWindowLink || ShowLogInLogOffLink)
{%>
<TD width="79%" class="prtlHeaderFunctionsTable">
<TABLE border="0" cellspacing="0" cellpadding="0"
class="prtlHeaderFunctionsContainer" height="100%">
<TR>
<TD nowrap >
<!--<hbj:link id="SiteLink" tooltip="<%=siteTooltipStr%>" linkDesign="FUNCTION" reference="javascript:openSite();"><hbj:textView nested="true" text="<%=siteTextStr%>"/></hbj:link> -->
<hbj:link id="SiteLink" tooltip="<%=siteTooltipStr%>"
linkDesign="FUNCTION" reference="#">
<% if (!isPreview) { SiteLink.setOnClientClick("javascript:openSite();");} %>
<hbj:textView nested="true" text="<%=siteTextStr%>"/>
</hbj:link>
</TD>
<TD nowrap>
<%}%>
<%
if (showHelpLink)
{ %>
<TD nowrap >
<!--<hbj:link id="HelpLink" tooltip="<%=helpTooltipStr%>" linkDesign="FUNCTION" reference="javascript:openHelp();"><hbj:textView nested="true" text="<%=helpTextStr%>"/></hbj:link> -->
<hbj:link id="HelpLink" tooltip="<%=helpTooltipStr%>"
linkDesign="FUNCTION" reference="#">
<% if (!isPreview) { HelpLink.setOnClientClick("javascript:openHelp();");} %>
<hbj:textView nested="true" text="<%=helpTextStr%>"/>
</hbj:link>
</TD>
<TD nowrap>
<%}%>
<%
if (!isAnonymous)
if (showPersonalizeLink)
if (showHelpLink)
{ %>
<TD nowrap id="personalizePortalSep" class="prtlHdrSep"></TD>
<%} %>
<TD nowrap id="personalizePortal">
<hbj:link id="PersonalizeLink"
tooltip="<%=personalizePortalTooltipStr%>"
linkDesign="FUNCTION"
reference="#">
<% if (!isPreview) {PersonalizeLink.setOnClientClick("javascript:runPersonalizePortal();");}%>
<hbj:textView nested="true" text="<%=personalizeTextStr%>"/>
</hbj:link>
</TD>
<TD nowrap></TD>
<%}
if (showNewWindowLink)
if (showHelpLink || showPersonalizeLink)
{ %>
<TD nowrap id="newWindowSep" class="prtlHdrSep"> </TD>
<%}
else
{%>
<TD nowrap> </TD>
<%}%>
<TD nowrap id="newWindow">
<hbj:link id="newWindowLink" tooltip="<%=newWindowStr%>"
linkDesign="FUNCTION"
reference="#">
<% if (!isPreview) {newWindowLink.setOnClientClick("javascript:openNewPortalWindow();");}%>
<hbj:textView nested="true" text="<%=newWindowTextStr%>"/>
</hbj:link>
</TD>
<%}%>
<%}%>
<TD>
<%if (ShowLogInLogOffLink)
{%>
<TABLE cellspacing="0" cellpadding="0" border="0" class="prtlHeaderFunctionsContainer" height="100%">
<TR><%
if (showHelpLink || showPersonalizeLink || showNewWindowLink)
{%>
<%
if(!showHelpLink && !showNewWindowLink)
{%>
<TD nowrap id="logoffsep1" class="prtlHdrSep"> </TD>
<%
}else
{%>
<TD nowrap id="logoffsep2" class="prtlHdrSep"> </TD>
<%}%>
<TD nowrap>
<%
}else
{%>
<TD nowrap > </TD>
<%
if (isAnonymous)
{%>
<TD nowrap>
<!<hbj:link id="LoginLink" tooltip="<%=logInTooltipStr%>" linkDesign="FUNCTION" reference="javascript:logIn();"><hbj:textView nested="true" text="<%=logInTextStr%>"/></hbj:link>>
<hbj:link id="LoginLink"
tooltip="<%=logInTooltipStr%>"
linkDesign="FUNCTION"
reference="#">
<% LoginLink.setOnClientClick("javascript:logIn();"); %>
<hbj:textView nested="true" text="<%=logInTextStr%>"/> </hbj:link>
</TD>
<%}
else
{%>
<TD nowrap>
<!<hbj:link id="LogoffLink" tooltip="<%=logOffTooltipStr%>" linkDesign="FUNCTION" reference="javascript:openLogoffMsg();"><hbj:textView nested="true" text="<%=logOffTextStr%>"/></hbj:link>>
<hbj:link id="LogoffLink"
tooltip="<%=logOffTooltipStr%>"
linkDesign="FUNCTION"
reference="#">
<%if (!isPreview) { LogoffLink.setOnClientClick("javascript:openLogoffMsg();");} %>
<hbj:textView nested="true" text="<%=logOffTextStr%>"/> </hbj:link>
</TD>
<%}%>
</TR>
</TABLE>
<%} %>
</TD>
</TR>
</TABLE>
</TD>
<%}%>
<TD width="12%" nowrap class="prtlHdrLogoContainer">
<% if (isAccessabilityOn)
{%>
<%}%>
</TD>
</TR>
</tbody>
</TABLE>
</hbj:form>
</hbj:page>
</hbj:content>
<form name="logoffForm" style="display:none;position:absolute;top:-5000;left:-5000" action="<%=GetLogoffURL(componentRequest)%>" method="POST">
<input type="hidden" name="logout_submit" value="true">
</form>
<script>
<% if (!isPreview) {%>
if (disablePersonalize) {
EPCM.raiseEvent("urn:com.sapportals:navigation", "PersonalizePortalDisable", "");
<%}%>
setFocusOnHeader();
EPCM.subscribeEvent("urn:com.sapportals.portal:browser","load",setFocusOnHeader);
</script> -
Error while creating IViews using collaboration API
Hi
I have created one Dynpage portal component, in that i would like to utilize collaboration API.
I am keep on getting errors like "<b>The compilation unit directly references the missing type ...."</b>"
import com.sapportals.htmlb.page.DynPage;
import com.sapportals.htmlb.page.PageException;
import com.sapportals.portal.htmlb.page.PageProcessorComponent;
import com.sap.ip.collaboration.room.api.IRooms;
import com.sapportals.portal.prt.runtime.PortalRuntime;
import com.sapportals.htmlb.*;
import com.sapportals.htmlb.enum.*;
public class Sample extends PageProcessorComponent {
public DynPage getPage() {
return new SampleDynPage();
public static class SampleDynPage extends DynPage
IRooms roomsAPI = (IRooms)PortalRuntime.getRuntimeResources().getService(IRooms.PORTAL_SERVICE_ID);
Initialization code executed once per user.
I have included the following jar files:
bc.rf.framework_api.jar
coll.shared.extension_api.jar
coll.shared.roomobject_api.jar
coll.shared.types_api.jar
com.sap.security.api.ep5.jar
and also i have included com.sap.netweaver.coll.shared in portal.xml as servicesreference
Experts can you please help in the above problem
I am sure u will get reward points.
Thanks in AdvanceHI,
You have to add the following jars apart from the jars you have mentioned
1. kmc.util.core_api.jar
2. umapi.jar
To find jar files
==================
Download and install the JAR Finder. how to is mentioned in this <a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2951">Weblog</a>. see what jar is required by copying the com.sap.ip.BaseException from the error "compilation unit references................." and put the "BaseException" in the jar finder and search. from the given options select the correct jar "com.sap.ip.BaseException" right click and add to the project. You can add all the jars required by this method.
Portalapp.xml
==============
<application-config>
<property name="SharingReference" value="com.sap.portal.htmlb"/>
<property name="ServicesReference" value="com.sap.netweaver.coll.shared"/>
</application-config>
HI,
use the BaseException etc the errors you get in NWDS to search for the jar. paste the BaseException and search in jarfinder.
Message was edited by: Kirupanand Venkatapathi
Message was edited by: Kirupanand Venkatapathi -
Error while migrating PAR 7.0 to 7.4
Hi Experts,
As we are migrating form EP 7.0 to EP 7.4 .
I got ear file from Par migration tool.
Importing ear in nwds 7.3 and resolving error , I deploy the ear in portal it is working fine.
But when i migrate the web Project to Web dc in Track . It is showing errors at build time but in Java files there is no Red mark .
To resolve errors i have created External Library and ear for External and add the htmlb_api.jar as public part . and Define dependecy in Web dc but it is still showing errors.
Build File is below
Development Component Build (2014-05-31 12:00:27 GMT+05:30 (IST))
Component name: appls/usefullink_d0_newnwdidc_web
Component vendor: adani.com
SC compartment: com.adani_ADANI_PAR_1
Configuration: EP1_ESS_D
Location: EP1_ESS_D
Source code location: http://aimdmp:50100/dtr/ws/ESS/com.adani_ADANI_PAR/dev/inactive/DCs/adani.com/appls/usefullink_d0_newnwdidc_web/_comp/
DC root folder: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\
DC type: Java
Host: ADMINIB-9G29PH6
DC Model check:
DC is available locally
validating dependency to build plugin "sap.com/tc/bi/bp/javaLib"
validating dependency to public part "api" of DC "adani.com/appls/externallib"
validating dependency to public part "archives" of DC "adani.com/appls/externallib"
validating dependency to public part "extlib_assembly" of DC "adani.com/appls/externallib"
validating dependency to public part "extlib_compilation" of DC "adani.com/appls/externallib"
validating dependency to used DC "adani.com/appls/extlibear"
validating dependency to public part "extlibear_assembly" of DC "adani.com/appls/extlibear"
DC model check OK
Start build plugin:
using build plugin: sap.com/tc/bi/bp/javaLib
starting build plugin from : C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\sap.com\tc\bi\bp\javaLib\_comp\gen\default\public\saplib\
Build Plugin 'JavaPlugin', Version 7.30 SP 5 (NW731CORE_10_REL, built on 2013-11-30 00:01:40 +0100, CL166627)
development component: appls/usefullink_d0_newnwdidc_web (adani.com)
software component: ADANI_PAR (com.adani)
location: EP1_ESS_D
type: Java
build variant: default
source location: http://aimdmp:50100/dtr/ws/ESS/com.adani_ADANI_PAR/dev/inactive/
output location: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\t2\467E48D66F1396B5F9AE0955FA811780\default
generation folder: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\t\467E48D66F1396B5F9AE0955FA811780
plugin start time: 2014-05-31 12:00:28 GMT+05:30 (IST)
Java VM: SAP Java Server VM, 6.1.066 24.55-b13 (1.6, SAP AG)
General options:
convert *.xlf to *.properties: yes
include sources for debugging: yes
Package folder ".apt_generated" exists but is empty and will be ignored.
Checking path lengths for sources
Path length checks finished in 0 seconds
Preparing data context..
Data context preparation finished in 0.015 seconds
Creating Ant build file..
Creating output file: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\t2\467E48D66F1396B5F9AE0955FA811780\default\logs\build.xml
Using Java class: com.sap.tc.buildplugin.BuildJavaLib
Build file creation finished in 0.063 seconds
Starting Ant..
Using build file: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\t2\467E48D66F1396B5F9AE0955FA811780\default\logs\build.xml
Using build target: build
Using Ant version: 1.7.1
compile:
[echo] Starting Java compiler using the current JVM
[echo] Settings:
[echo] debug: on
[echo] optimize: off
[echo] deprecation: default
[echo] verbose: default
[echo] encoding: UTF-8
[echo] source: 1.6
[echo] target: 1.6
[echo] source path: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src
[echo] class path: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\externallib\_comp\gen\default\public\extlib_compilation\lib\java\com.sap.portal.htmlb_api.jar
[echo] output dir: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\t\467E48D66F1396B5F9AE0955FA811780\classes
[javac] Compiling 7 source files to C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\t\467E48D66F1396B5F9AE0955FA811780\classes
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Alert.java:3: package com.sapportals.portal.prt.component does not exist
[javac] ERROR: import com.sapportals.portal.prt.component.*;
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Alert.java:4: package com.sapportals.portal.prt.resource does not exist
[javac] ERROR: import com.sapportals.portal.prt.resource.IResource;
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Alert.java:6: cannot find symbol
[javac] ERROR: symbol: class AbstractPortalComponent
[javac] ERROR: public class Alert extends AbstractPortalComponent
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Alert.java:8: cannot find symbol
[javac] ERROR: symbol : class IPortalComponentRequest
[javac] ERROR: location: class com.adani.usefullink.Alert
[javac] ERROR: public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Alert.java:8: cannot find symbol
[javac] ERROR: symbol : class IPortalComponentResponse
[javac] ERROR: location: class com.adani.usefullink.Alert
[javac] ERROR: public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:3: package javax.servlet.http does not exist
[javac] ERROR: import javax.servlet.http.HttpSession;
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:9: package com.sapportals.portal.prt.component does not exist
[javac] ERROR: import com.sapportals.portal.prt.component.IPortalComponentContext;
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:10: package com.sapportals.portal.prt.component does not exist
[javac] ERROR: import com.sapportals.portal.prt.component.IPortalComponentRequest;
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:11: package com.sapportals.portal.prt.component does not exist
[javac] ERROR: import com.sapportals.portal.prt.component.IPortalComponentResponse;
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:13: cannot access com.sapportals.portal.prt.component.AbstractPortalComponent
[javac] ERROR: class file for com.sapportals.portal.prt.component.AbstractPortalComponent not found
[javac] ERROR: public class Userful extends PageProcessorComponent {
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:18: cannot find symbol
[javac] ERROR: symbol : class HttpSession
[javac] ERROR: location: class com.adani.usefullink.Userful
[javac] ERROR: static HttpSession session;
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userlinkformail.java:15: package com.sap.security.api does not exist
[javac] ERROR: import com.sap.security.api.IUser;
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userlinkformail.java:20: package com.sapportals.portal.prt.component does not exist
[javac] ERROR: import com.sapportals.portal.prt.component.IPortalComponentContext;
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userlinkformail.java:23: package com.sapportals.portal.prt.runtime does not exist
[javac] ERROR: import com.sapportals.portal.prt.runtime.PortalRuntime;
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\usefullinknew.java:4: package javax.servlet.http does not exist
[javac] ERROR: import javax.servlet.http.HttpSession;
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\usefullinknew.java:7: package com.sapportals.connector.connection does not exist
[javac] ERROR: import com.sapportals.connector.connection.IConnection;
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\usefullinknew.java:12: package com.sapportals.portal.prt.component does not exist
[javac] ERROR: import com.sapportals.portal.prt.component.IPortalComponentContext;
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\usefullinknew.java:20: cannot find symbol
[javac] ERROR: symbol : class HttpSession
[javac] ERROR: location: class com.adani.usefullink.usefullinknew
[javac] ERROR: static HttpSession session;
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Alert.java:11: cannot find symbol
[javac] ERROR: symbol : class IResource
[javac] ERROR: location: class com.adani.usefullink.Alert
[javac] ERROR: IResource jspResource = request.getResource(IResource.JSP,"jsp/"+request.getParameter("page"));
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Alert.java:11: cannot find symbol
[javac] ERROR: symbol : variable IResource
[javac] ERROR: location: class com.adani.usefullink.Alert
[javac] ERROR: IResource jspResource = request.getResource(IResource.JSP,"jsp/"+request.getParameter("page"));
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:29: cannot find symbol
[javac] ERROR: symbol : class IPortalComponentRequest
[javac] ERROR: location: class com.adani.usefullink.Userful.UserfulDynPage
[javac] ERROR: IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:29: cannot find symbol
[javac] ERROR: symbol : class IPortalComponentRequest
[javac] ERROR: location: class com.adani.usefullink.Userful.UserfulDynPage
[javac] ERROR: IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:30: cannot find symbol
[javac] ERROR: symbol : class IPortalComponentResponse
[javac] ERROR: location: class com.adani.usefullink.Userful.UserfulDynPage
[javac] ERROR: IPortalComponentResponse response = (IPortalComponentResponse) this.getResponse();
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:30: cannot find symbol
[javac] ERROR: symbol : class IPortalComponentResponse
[javac] ERROR: location: class com.adani.usefullink.Userful.UserfulDynPage
[javac] ERROR: IPortalComponentResponse response = (IPortalComponentResponse) this.getResponse();
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:35: cannot find symbol
[javac] ERROR: symbol : class IPortalComponentRequest
[javac] ERROR: location: class com.adani.usefullink.Userful.UserfulDynPage
[javac] ERROR: IPortalComponentRequest req = (IPortalComponentRequest) this.getRequest();
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:35: cannot find symbol
[javac] ERROR: symbol : class IPortalComponentRequest
[javac] ERROR: location: class com.adani.usefullink.Userful.UserfulDynPage
[javac] ERROR: IPortalComponentRequest req = (IPortalComponentRequest) this.getRequest();
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:65: cannot find symbol
[javac] ERROR: symbol : class IPortalComponentContext
[javac] ERROR: location: class com.adani.usefullink.Userful.UserfulDynPage
[javac] ERROR: IPortalComponentContext ctxt = ((IPortalComponentRequest)getRequest()).getComponentContext();
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:65: cannot find symbol
[javac] ERROR: symbol : class IPortalComponentRequest
[javac] ERROR: location: class com.adani.usefullink.Userful.UserfulDynPage
[javac] ERROR: IPortalComponentContext ctxt = ((IPortalComponentRequest)getRequest()).getComponentContext();
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:155: cannot find symbol
[javac] ERROR: symbol : class IPortalComponentRequest
[javac] ERROR: location: class com.adani.usefullink.Userful.UserfulDynPage
[javac] ERROR: IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:155: cannot find symbol
[javac] ERROR: symbol : class IPortalComponentRequest
[javac] ERROR: location: class com.adani.usefullink.Userful.UserfulDynPage
[javac] ERROR: IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:156: cannot find symbol
[javac] ERROR: symbol : class IPortalComponentResponse
[javac] ERROR: location: class com.adani.usefullink.Userful.UserfulDynPage
[javac] ERROR: IPortalComponentResponse response = (IPortalComponentResponse) this.getResponse();
[javac] ERROR: ^
[javac] ERROR: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\src\com\adani\usefullink\Userful.java:156: cannot find symbol
[javac] ERROR: symbol : class IPortalComponentResponse
[javac] ERROR: location: class com.adani.usefullink.Userful.UserfulDynPage
[javac] ERROR: IPortalComponentResponse response = (IPortalComponentResponse) this.getResponse();
[javac] ERROR: ^
Ant runtime 0.421 seconds
Ant build finished with ERRORS
Compile failed; see the compiler error output for details.
Build stopped due to an error: Compile failed; see the compiler error output for details.
Build plugin finished at 2014-05-31 12:00:29 GMT+05:30 (IST)
Total build plugin runtime: 1.732 seconds
Build finished with ERROR
==== Post-Processing ==== started at 2014-05-31 12:00:29.905 IST
Copy the build logs
from: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\t2\467E48D66F1396B5F9AE0955FA811780\default\logs\
to: C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\gen\default\logs\
Build results in folder C:\Users\IBM_ADMIN\Desktop\Jayesh\nwds-extsoa-7.3-EHP1-SP11-PAT0002-win32\eclipse\workspace.jdi\0\DCs\adani.com\appls\usefullink_d0_newnwdidc_web\_comp\gen\default\ remain unchanged.What was the issue? Is your SAP now up?
>in Management console disp+exe is not turning to gree, its in yellow color from long time
for this if you search on marketplace you will get notes, and this issues already discussed many times. Hence request you to search.
Check https://service.sap.com/sap/support/notes/72248 -
Error while running a portal component.
Hi,
I am not able to access portal service from an abstract portal component that I created in the same project as the portal service. Here is the error I am getting:
Portal runtime error.
"An exception occurred while processing your request. Send the exception ID to your portal administrator.
Exception ID: 11:45_15/01/09_0068_15350950
Refer to the log file for details about this exception."
Here is the portalapp.xml:
<?xml version="1.0" encoding="utf-8"?>
<application>
<application-config/>
<components>
<component name="AOSTestComp">
<component-config>
<property name="ClassName" value="com.gfc.ume.service.AOSTestComp"/>
</component-config>
<component-profile/>
</component>
</components>
<services>
<service name="OfficeListService">
<service-config>
<property name="className" value="com.gfc.ume.service.OfficeListService"/>
<property name="startup" value="false"/>
</service-config>
</service>
</services>
</application>
Here is the code for the service:
public interface IOfficeListService extends IService
public static final String KEY = "OfficeListService";
public String testMyService(String user);
Here is the code for the component:
package com.gfc.ume.service;
import com.sapportals.portal.prt.component.*;
import com.sapportals.portal.prt.runtime.IPortalRuntimeResources;
import com.sapportals.portal.prt.runtime.PortalRuntime;
import com.sapportals.portal.prt.service.IService;
public class AOSTestComp extends AbstractPortalComponent
public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
IPortalRuntimeResources runtimeResources = PortalRuntime.getRuntimeResources();
IService aService = runtimeResources.getService(IOfficeListService.KEY);
IOfficeListService myService = (IOfficeListService)aService;
response.write(myService.testMyService("Longivity"));
Thanks
TonyTony,
this is Java Web Dynpro forum.You already have posted this same question twice in Portal forums. This is third time. please dont do so. We have to keep SDN clean (no redundancy).
Regards,
Yogesh Varma -
Getting error in consuming google webservices from JspDynPage
Hi All,
Getting following error while consuming google webservices from JspDynPage
An exception occurred while processing a request for :
iView : GoogleSer.google
Component Name : GoogleSer.google
Could not find portal application com.company.global.enterprise.portal.wsdl.webservices.service.
Code :
MyGoogle googleService =
(MyGoogle) PortalRuntime.getRuntimeResources().getService("com.company.global.enterprise.portal.wsdl.webservices.service.MyGoogle");
GoogleSearchResult result = googleService.doGoogleSearch("google", "SAP", 0, 10, false, "", false, "", "", "");
ResultElement[] results = result.getResultElements();
if(results != null) {
response.write("<br> Search Result Size " +results.length );
for (int i = 0; i < results.length; i++) {
response.write((i + 1) + ": " + results);
Thanks
RudraHi,
I am still having the same problem, however the scenario in which I am getting varies.
I am getting this exception:
"com.sap.engine.services.webservices.jaxm.soap.accessor.NestedSOAPException: IOError while working with the message."
Some users when trying to login into the portal are getting blank screen and for some the portal launcher page is loading fine and could go to the Home Page.
When I view the logs I am seeing the Nested Soap Exception.
Any Ideas??? Starting the J2EE engine also did'nt help.
Thanks in advance.
Madhavi -
HELP: Error while consuming Web Service: ClassCastException
Hi,
I am trying to consume a web service that I deployed on Tomcat/Axis. Any guideline will be helpful. I generated stubs using WSDL2Java utility from Axis. The method I am trying to call is getFibo(), which returns an object FiboHolder. Unfortunately everytime it is throwing ClassCastException. I have couple of other methods in the service that returns int and int[] and both works fine. Could anyone please help why I am not able to consume the service when it is returning the object FiboHolder but works fine when I consume other methods of the service that returns int or int[]?
Following is my client code:
FibonacciService service = new FibonacciServiceLocator();
FibonacciSoapBindingStub stub = (FibonacciSoapBindingStub) service.getfibonacci(new URL("http://localhost:8080/axis/services/fibonacci"));
// Now use the service to get a stub to the service
FiboHolder fibHold = stub.getFibo(); //code errors out at runtime here
System.out.println(fibHold.getFibo1());Following is the error message I get:
org.apache.axis.AxisFault: java.lang.ClassCastException
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.ClassCastException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:
Thanks,Hi all,
Please throw some light into this issue i am getting the following exception.
com.sap.engine.services.webservices.jaxm.soap.accessor.NestedSOAPException: Problem in server response: Proxy Authentication Required.
I have given the proxy settings in the com.sap.portal.ivs.httpservice in the portal and also
defined a proxy server in the Visual Administrator under Services -> Webservice Container -> HTTP Proxy Server
I am calling service in the following manner.
IPortalRuntimeResources runtime = PortalRuntime.getRuntimeResources();
IService service = runtime.getService(IWS_P_Service.KEY);
IWS_P_Service ws_service = (IWS_P_Service)service;
Volumes from = new Volumes(Volumes.VOLUMES_KILOLITER_VALUE);
Volumes to = new Volumes(Volumes.VOLUMES_LITER_VALUE);
ChangeVolumeUnit cvu = new ChangeVolumeUnit(1200,from,to);
// working upto here
response.write("working");
ChangeVolumeUnitResponse cvu_res = ws_service.ChangeVolumeUnit(cvu);
double result = cvu_res.getChangeVolumeUnitResult();
response.write(result+"");
It is working upto "working".
If any body has any solutions please post.
Thanks -
Error after deploying JCA on EP6( Portal Applications with RFC)
<b><u><b>Error</b></u>
Portal Runtime Error
An exception occurred while processing a request for :
iView : N/A
Component Name : N/A
iView not found: ewParProject.JspPage.
Exception id: 06:22_23/03/07_0104_14574950
See the details for the exception ID in the log file</b>
I<u><i><b> have written code in java file for connection as follows
please help me.</b></i></u>
package com.rr.JspPage;
import javax.resource.cci.MappedRecord;
import javax.resource.cci.RecordFactory;
import com.sap.security.api.umap.NoLogonDataAvailableException;
import com.sapportals.connector.ConnectorException;
import com.sapportals.connector.connection.IConnection;
import com.sapportals.connector.execution.functions.IInteraction;
import com.sapportals.connector.execution.functions.IInteractionSpec;
import com.sapportals.connector.execution.structures.IRecordMetaData;
import com.sapportals.connector.execution.structures.IRecordSet;
import com.sapportals.htmlb.page.DynPage;
import com.sapportals.htmlb.page.PageException;
import com.sapportals.portal.htmlb.page.JSPDynPage;
import com.sapportals.portal.htmlb.page.PageProcessorComponent;
import com.sapportals.portal.ivs.cg.ConnectionProperties;
import com.sapportals.portal.ivs.cg.IConnectorGatewayService;
import com.sapportals.portal.ivs.cg.IConnectorService;
import com.sapportals.portal.prt.component.IPortalComponentRequest;
import com.sapportals.portal.prt.runtime.PortalRuntime;
@author laxmikant.pathak
To change the template for this generated type comment go to
Window>Preferences>Java>Code Generation>Code and Comments
public class JspPage extends PageProcessorComponent {
public DynPage getPage(){
return new JspPageDynPage();
public static class JspPageDynPage extends JSPDynPage{
/* (non-Javadoc)
@see com.sapportals.htmlb.page.DynPage#doInitialization()
public void doInitialization() {
try {
IConnectorGatewayService cgService =(IConnectorGatewayService)
PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
IPortalComponentRequest request=(IPortalComponentRequest) this.getRequest();
ConnectionProperties cp = new ConnectionProperties(request.getLocale(),request.getUser());
IConnection connection = cgService.getConnection("P35",cp);
IInteraction ix = connection.createInteractionEx();
IInteractionSpec ixspec = ix.getInteractionSpec();
// Put Function Name into interaction Properties.
ixspec.setPropertyValue("Name","ZHRESS_ESEPARATION_DETAILS");
RecordFactory rf = ix.getRecordFactory();
// create input MappedRecord from
MappedRecord input;
input = rf.createMappedRecord("input");
input.put("YYMOD","DIS");
input.put("YYUSR","EMP");
MappedRecord output = (MappedRecord)ix.execute(ixspec, input);
IRecordSet rs = null;
Object result = output.get("T_P9100");
if (result instanceof IRecordSet)
rs = (IRecordSet) result;
IRecordMetaData rsmd = null;
try
rsmd = rs.retrieveMetaData();
} catch (Exception ex)
ex.getStackTrace() ;
// Do something with the Metadata
finally
if (connection != null)
try
connection.close();
//logMsg("* Iview: Closing connection ok.");
connection = null;
catch (Exception e)
//logMsg("* Iview: Error closing connection.");
} catch (ConnectorException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NoLogonDataAvailableException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (javax.resource.ResourceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
public void doProcessAfterInput() throws PageException {
public void doProcessBeforeOutput() throws PageException {
this.setJspName("JspPageFile.jsp");
<b>My Jsp file</b>
hbj:content id="myContext" >
<hbj:page title="PageTitle">
<hbj:form id="myFormId" >
Test
</hbj:form>
</hbj:page>
</hbj:content>
<b><u>XML File</u></b>
<?xml version="1.0" encoding="utf-8"?>
<application>
<application-config>
<property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
<property name="ServicesReference" value="com.sap.portal.ivs.connectorservice"/>
</application-config>
<components>
<component name="JspPage">
<component-config>
<property name="ClassName" value="com.rr.JspPage.JspPage"/>
<property name="ComponentType" value="jspnative"/>
<property name="JSP" value="pagelet/JspPageFile.jsp"/>
<property name="ServicesReference" value="com.sap.portal.ivs.connectorservice"/>
</component-config>
<component-profile/>
</component>
</components>
<services/>
</application>
<b>Error
Portal Runtime Error
An exception occurred while processing a request for :
iView : N/A
Component Name : N/A
iView not found: ewParProject.JspPage.
Exception id: 06:22_23/03/07_0104_14574950
See the details for the exception ID in the log file</b>Hi Laxmi,
this is a portal application problem - nothing to do with this forum. Anyway - you can try by changing your component-config portion in portalapp.xml and see whether it works or not.
Your current component config is like below
<component-config>
<property name="ClassName" value="com.rr.JspPage.JspPage"/>
<property name="ComponentType" value="jspnative"/>
<property name="JSP" value="pagelet/JspPageFile.jsp"/>
<property name="ServicesReference" value="com.sap.portal.ivs.connectorservice"/>
</component-config>
Try replaing the same with below:
<component-config>
<property name="ClassName" value="com.rr.JspPage.JspPage"/>
<property name="SecurityZone" value="com.sap.portal.pdk/low_safety"/>
</component-config>
Check once and let me know...
regards,
Shubho
Maybe you are looking for
-
Smileys are not displaying in the message. How can I see the smileys?
Can anyone help me?
-
IPhoto has disappeared!!! How do i get it back??
HELP!! My iphoto is/was located on an external harddrive. it was workong fine. the only 2 new things i did was register my computer to DropBox & re-plugged in my external harddrive via a newUSB 3.0 Hub, to give me extra USB ports. My externaldrive th
-
"Your computer has restarted because of a problem."
Hello, I've got a question, since two weeks my MacBook Air turns of and reboot it selfs. It just happend again, and it was the 4th time thi week. I get screenmessage: "Your computer has restarted because of a problem. Press a key or wait a few second
-
My speakers are making a stuttering noise and the mouse is flickering random software glitches
Hi as soon as I boot my speakers are making a stuttering noise unless I turn them down to nothing. this noise will continue while I work if I turn my speakers up. But if I watch or listen to anything the noise is gone. The mouse flickers and links on
-
Can boot to disk in single user mode. But not regular boot.
I setup an alias called md-rootdisk for booting my Solaris 10 System on a V440. I tried to reboot using the alias md-rootdisk twice. It only worked once. The first attempt was to single user mode. The sytem booted but there was a krtld error. The Sec