cancel
Showing results for 
Search instead for 
Did you mean: 

Little Modification on framework.jsp

Former Member
0 Kudos

Hello,

my current task is to modify the default layout of the default Framework Page.

Our page should have a look like this: Example

Is there an easy way to insert such a spacing on the left and right side?

Therefore i need to modify the framework.jsp which defines the Framework Layout.

But my problem is that i am totally a beginner in jsp.

Here my try on this problem.

This is my try for these modifications. I inserted the code that is marked bold.

Would this be a possible solution. And how could i do these modifications on the LAyout for Light Framework? Because the Usage of HTMLB-Tags in Lightframeworks doesn't sound like a good idea.

I think this might be an easy question for you guys. But i don't want to learn the techniques of HTMLB and JSPs from the scratch to do this little modification.

Hope the experts here can help me here with saving lots of time:)

Points will be rewarded for sure if get good answers.

with kind Regards,

Marcus

Message was edited by:

Marcus Böhm

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This is htmlb and not really JSP.

I think you need to fill out the empty space with something like this.


<hbj:content id="myContext" >
<hbj:page title="Portal Page">
<hbj:gridLayout id="GridLayout1" width="100%" columnSize="3" rowSize="1" cellSpacing="1">
<hbj:gridLayoutCell rowIndex="1" columnIndex="1" width="10%" >
  
</hbj:gridLayoutCell>
<hbj:gridLayoutCell rowIndex="1" columnIndex="2" width="80%" horizontalAlignment="center" verticalAlignment="top">
<lyt:container id="FrameworkColumn"></lyt:container>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell rowIndex="1" columnIndex="3" width="10%" >
  
</hbj:gridLayoutCell>
</hbj:gridLayout>
</hbj:page>
</hbj:content>

this should work.

Code was edited by:

Rasmus Stokholm

Former Member
0 Kudos

I deployed the new layout successfully and i managed to create a template layout.

Now i wanted to use this layout in the Default Framework Page.

I can choose it as layout but i get this error:

Error in Layout Jsp component (pageId or jspName not available)

Any idea of what could have gone wrong? I think the problem has to be located in the portalapp.xml maybe?

Therefore here the relevant part of the portalpp.xml:

<component name="hccFrame">

<component-config>

<property name="ClassName" Value="com.sapportals.portal.pb.layout.PageLayout"/>

<property name="ResourceBundleName" value="pagebuilder_nls"/>

<property name="SafetyLevel" value="no_safety"/>

</component-config>

<component-profile>

<property name="ComponentType" value="com.sapportals.portal.layout" />

<property name="com.sap.portal.pcm.Title" value="Narrow HCC Frame"/>

<property name="com.sap.portal.pcm.Description" value="Layout displaying one column, that has some spacing to the left and the right side"/>

<property name="com.sap.portal.reserved.layout.TagLibLayout" value="/SERVICE/com.sap.portal.pagebuilder/taglib/layout.tld"/>

<property name="com.sap.portal.reserved.layout.TagLibHtmlb" value="/SERVICE/com.sap.portal.htmlb/taglib/htmlb.tld "/>

<property name="com.sap.portal.reserved.layout.TemplateFile" value="hcc_framework.jsp"/>

<property name="AuthScheme" value="anonymous"/>

<property name="com.sap.portal.reserved.layout.Cont1" value="frameworkColumn">

<property name="title" value="Framework Column"/>

<property name="orientation" value="vertical"/>

<property name="designClass" value="prtlHeaderCon"/>

</property>

</component-profile>

</component>

What does this error mean? Is it possible that the portal is unable to find my framework.jsp?

Thx in advance

Marcus

Former Member
0 Kudos

I guess if you remove the lines which are in bold from portalapp.xml it will work

<component name="hccFrame">

<component-config>

<property name="ClassName" Value="com.sapportals.portal.pb.layout.PageLayout"/>

<property name="ResourceBundleName" value="pagebuilder_nls"/>

<b><property name="SafetyLevel" value="no_safety"/></b>

</component-config>

<component-profile>

<property name="ComponentType" value="com.sapportals.portal.layout" />

<property name="com.sap.portal.pcm.Title" value="Narrow HCC Frame"/>

<property name="com.sap.portal.pcm.Description" value="Layout displaying one column, that has some spacing to the left and the right side"/>

<property name="com.sap.portal.reserved.layout.TagLibLayout" value="/SERVICE/com.sap.portal.pagebuilder/taglib/layout.tld"/>

<property name="com.sap.portal.reserved.layout.TagLibHtmlb" value="/SERVICE/com.sap.portal.htmlb/taglib/htmlb.tld "/>

<property name="com.sap.portal.reserved.layout.TemplateFile" value="hcc_framework.jsp"/>

<b><property name="AuthScheme" value="anonymous"/></b>

<property name="com.sap.portal.reserved.layout.Cont1" value="frameworkColumn">

<property name="title" value="Framework Column"/>

<property name="orientation" value="vertical"/>

<property name="designClass" value="prtlHeaderCon"/>

</property>

</component-profile>

</component>

Former Member
0 Kudos

This didn't work.

I have downloaded the com.sap.portal.layouts.framework.par.bak and modified it for my needs. I renamed it and deployed it.

Could this be a source for errors?

But this was a suggested way, i have read in a how to.

Best Regards,

Marcus

Former Member
0 Kudos

I still didn't solve the problem. Some additional help would be very very nice:)

Former Member
0 Kudos

Hi Marcus,

I think that the component name and jsp file should match and be in small caps.

yours

<component name="<b>hccFrame</b>">

<property name="com.sap.portal.reserved.layout.TemplateFile" value="<b>hcc_framework</b>.jsp"/>

Hope it helps

Br Rasmus

Former Member
0 Kudos

I think we are getting closer to the problem.

Here my current code version:

protalapp.xml

<application>

<application-config>

<property name="Vendor" value="sap.com"/>

<property name="SecurityArea" value="NetWeaver.Portal"/>

<property name="SharingReference" value="com.sap.portal.htmlb,com.sap.portal.themes.lafservice,com.sap.portal.useragent,com.sap.portal.pagebuilder"/>

</application-config>

<components>

<component name="hccframe">

<component-config>

<property name="ClassName" Value="com.sapportals.portal.pb.layout.PageLayout"/>

<property name="ResourceBundleName" value="pagebuilder_nls"/>

</component-config>

<component-profile>

<property name="ComponentType" value="com.sapportals.portal.layout" />

<property name="com.sap.portal.pcm.Title" value="Narrow HCC Frame"/>

<property name="com.sap.portal.pcm.Description" value="Layout displaying one column, that has some spacing to the left and the right side"/>

<property name="com.sap.portal.reserved.layout.TagLibLayout" value="/SERVICE/com.sap.portal.pagebuilder/taglib/layout.tld"/>

<property name="com.sap.portal.reserved.layout.TagLibHtmlb" value="/SERVICE/com.sap.portal.htmlb/taglib/htmlb.tld "/>

<property name="com.sap.portal.reserved.layout.TemplateFile" value="hccframe.jsp"/>

<property name="com.sap.portal.reserved.layout.Cont1" value="FrameworkColumn">

<property name="title" value="Framework Column"/>

<property name="orientation" value="vertical"/>

<property name="designClass" value="prtlHeaderCon"/>

</property>

</component-profile>

</component>

</components>

<services/>

</application>

Still the old error:

Error in Layout Jsp component (pageId or jspName not available)

null

Former Member
0 Kudos

here my hccframe.jsp

<%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.TagLibHtmlb" prefix="hbj" %>

<%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.TagLibLayout" prefix="lyt" %>

<%@ page import="com.sapportals.portal.pb.layout.taglib.variabledef.RunMode" %>

<%

RunMode pageRunMode = null;

%>

<lyt:template>

<%

pageRunMode = epPageVariables.getRunMode();

if(pageRunMode == RunMode.RUN_TIME){

%>

< script>

var scrollLocation=0;

document.body.style.margin=0;

document.body.scroll = "no";

< /script>

<%}%>

<hbj:content id="myContext" >

<hbj:page title="Portal Page">

<hbj:gridLayout id="GridLayout1" width="100%" columnSize="3" rowSize="1" cellSpacing="1">

<hbj:gridLayoutCell rowIndex="1" columnIndex="1" width="10%" >

</hbj:gridLayoutCell>

<hbj:gridLayoutCell rowIndex="1" columnIndex="2" width="80%" horizontalAlignment="center" verticalAlignment="top">

<lyt:container id="FrameworkColumn" />

</hbj:gridLayoutCell>

<hbj:gridLayoutCell rowIndex="1" columnIndex="3" width="10%" >

</hbj:gridLayoutCell>

</hbj:gridLayout>

</hbj:page>

</hbj:content>

</lyt:template>

<%

if(pageRunMode == RunMode.RUN_TIME){

%>

< script>

// Set the Top Level Navigation iView size and position.

EPCM.raiseEvent("urn:com.sapportals:toplevelnavigation", "Onload", null);

</ script>

<%}%>

Former Member
0 Kudos

I rewarded 2 points to you for your help so far.

10 points will follow if you find the error somehow.

Maybe you can test it in your portal?

null

Former Member
0 Kudos

Hi Marcus

I'm not quite sure what you start with in your portalapp.xml

But i think i would start from scratch, so you dont have to modify it.

download the

com.sap.portal.layouts.framework.par

and change the framework.jsp with the changes from the original question.

Afterwards deploy the file with a new name like

com.yourcompany.portal.layouts.framework.par

then follow step 5.3 in this guide

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e549a890-0201-0010-3f8b-d3b...

This should enable you to create a new framework page with out changing the portalapp.xml.

Afterwards you can connect your new framework page to a portal desktop.

GL Rasmus

Former Member
0 Kudos

I have tried it this way.

But when i create a new layout the archive com.yourcompany.portal.layouts.framework.par isn't available as choice -.-

Don't know what i have. I imported the par and changend the .jsp.

I think i will try again after weekend. This is a bad day ;( .

Can you maybe test it yourself?

Regards,

Marcus

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Marcus Böhm, I have the same problem in one Portal 7.0 SP9, but in EP 7.0 SP13, 14 or 15 the same layout framework running without errors, what are your SP?

Fabrício Stein

Former Member
0 Kudos

is there any solution to this problem. i am getting the same error :

Error in Layout Jsp component (pageId or jspName not available)

Former Member
0 Kudos

Hi,

this custom layout in portalapp.xml works for us:

<component name="DTN_Content_Layout">
  <component-config>
	<property name="ClassName" value="com.sapportals.portal.pb.layout.PageLayout"/>
	<property name="ResourceBundleName" value="pagebuilder_nls"/>
  </component-config>
  <component-profile>
	<property name="AuthScheme" value="anonymous"/>
	<property name="EPCFLevel" value="0"/>
	<property name="com.sap.portal.pcm.Title" value="DTN and Content page layout"/>
	<property name="ComponentType" value="com.sapportals.portal.layout"/>
	<property name="LayoutTagLibrary" value="/SERVICE/com.sap.portal.pagebuilder/taglib/layout.tld"/>
	<property name="com.sap.portal.reserved.layout.TemplateFile" value="dtn_content.jsp"/>
	<property name="com.sap.portal.reserved.layout.Cont1" value="navigation_container">
	  <property name="plainDescription" value="Navigation Page Area"/>
	  <property name="orientation" value="vertical"/>
	  <property name="CachingLevel" value="none"/>
	  <property name="ValidityPeriod" value="0"/>
	</property>
	<property name="com.sap.portal.reserved.layout.Cont2" value="content_container">
	  <property name="plainDescription" value="Content Page Area"/>
	  <property name="orientation" value="vertical"/>
	  <property name="CachingLevel" value="none"/>
	  <property name="ValidityPeriod" value="0"/>
	</property>
  </component-profile>
</component>