cancel
Showing results for 
Search instead for 
Did you mean: 

Layout (Height and Scrolling) behaviour in EP (NW 7.3)

christoph_buehlmann
Participant
0 Kudos

Hi Experts

I am trying to modify the Layout of Enterprise Portal (NW 7.3), but I get stuck with the height of the page.

The out of the box Layout shows the Masthead and TLN and below the Content Area (with Detail Navigation, Breadcrumbs and the Content Area). If the iViews shown in the Content area are bigger than the rest of the ScreenSize a scrollbar shows up on the right side.

What we would like to have is, that the page can be bigger(higher) than the screen, and the whole page can be scrolled and not only the content area. (Like for example on the SCN page). We also have Masthead and TLN on the top like the out of the box layout. Only when the iView is bigger then the rest of the Screen the whole page should be scrolled and not only the content area.

How can I achieve this?

So far I tried to modify the LShapeLayout.jsp file. I can change quite a lot of things and can also get the height of the Content Area to a fixed height of for example 2000px. InternetExplorer will then start scrolling the whole page as desred. But FireFox is in this case not showing any scrolling possibilites at all but only shows the top part of the page.

And the solution with a fixed height is not a solution anyway as the size of the page should be always as big as the content shown of the page. What means that I should use Height="auto", but unfortunately this does not work, or I didn not modify the right height attribute.

Has anybody alrady done this and can give me a hint how to achieve the desired layout?

Thank you very much.

Christophe

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member188326
Active Participant
0 Kudos

Hi Christoph,

If you have reosloved the issue with firefox than can you please share your resolution.

Regards,

Bharat V. Mistry

christoph_buehlmann
Participant
0 Kudos

Hi Bharat

unfortunately I could never resolve the issue and recalculate the page height to ist real hight. As I was loosing to much time on this in the end I just made the page a fixed hight which is bigger than any Screen size we have (something like 4000px).

Like this basically our Portal site works fine. Just a lot of emtpy space below some pages. And some trouble with popupwindows that pop up in the middle window, as the middle of the window can be outside of the actual Screen...

Let me know if you find a better way.

Best regards

Christophe

former_member188326
Active Participant
0 Kudos

Hi Christophe,

Thanks for your reply.

Can you please share me what exactly you have done?

Regards,

Bharat V. Mistry

christoph_buehlmann
Participant
0 Kudos

Hi Bharat

sorry for not getting back to you earlier, but I did not have Access to that System last week. Now I just had a look on where I adjusted the height.

Important for you to know is that I am working in the light Framework page.

In dist - mimes you find a file called Framework.js

In this file there is a function 'adjustHeight'. There I replaced the line

//wh = $(window).height();

wh = 4000;

Now my Content area is always 4000px height.

As mentioned not a very nice solution but at least all the Content can be seen.

Regards

Christophe

christoph_buehlmann
Participant
0 Kudos

Thanks for all the answers so far. Unfortunately I did not manage do realise what we need. I am still stuck with the automatic resizing that the portal is doing. Does anybody know how to change this recalculation in order to nor set the size of the ContentArea to the screen size but to set it to the content size?

When I look at the code of my actual page I find the following lines:

<tr id="layoutCenterTR">

...

<tr id="pageToolbarTR">

...

<div tabIndex="0" title="Content Area - To enter press Tab" class="canvasBorder" id="divContentArea" skipable="true">

...

<iframe name="contentAreaFrame" title="Content Area" id="contentAreaFrame" src="/com.sap.portal.pagebuilder/html/EmptyDocument.html" frameBorder="0" style="width: 1328px; height: 529px; display: block;">

=> my iView is resized to 529px. But it should be the original value of the iView which ist 1500px. How and where do I have to change the portal to get here not a recalculated value but the original Hight of the iView?

I guess it must be somewhere in com.sap.portal.pagebuilder....

Thanks for any ideas and hints

Best regards

Christophe

saar_dagan
Employee
Employee
0 Kudos

Hi Christoph,

Like i wrote before, to achieve what you want it is suggested to create your own framework page.

Best Regards,

Saar

christoph_buehlmann
Participant
0 Kudos

Hi Saar

thanks for your reply. I know that this is a solution, but it is a difficult solution as all the browser compability, navigation etc has to be done again and the time in the project is short.

As the existing Layout does almost everything I need except this automatic resizing I would prefer if I could just adapt this resizing feature.

So far I can not see a reason why it should not be pretty easy to change the calculation of the height. But I do also not completely understand all the behaviour of the Portal in this subject so maybe you can put some light in the dark and then I can accept that it is not possible...?

Thanks and best regards

Christophe

saar_dagan
Employee
Employee
0 Kudos

Hi Christoph,

Try changing the ContentArea to automatic height.

if that doesn't work please give me the properties of the iviews/pages.

Best Regards.

Saar

former_member246153
Active Contributor
0 Kudos

Hi Christroph,

As i understood , you need to Re-size the Content Area <IFrame> based on its content and also you need the the Scroll Bar on the Browser. If this the case , create a new layout using  com.sap.portal.navigation.afp.layout.war, then inside the Layout JSP write the Custom java script  code to re-size the "contentAreaFrame".

Regards,

Srinivasan V

christoph_buehlmann
Participant
0 Kudos

Hi Srinivasan

thanks for your reply. I im trying since a few days now to do what you suggested. But I am having troubles with the script to resize the contentAreaFrame. Do you have a code example or some more hints for me?

Thank you and best regards

Christophe

0 Kudos

Christophe,

I did this some time ago but currently I don't have files to give you correct path. However, here is what you should do.

Look for a javascript file either called framework.js or paylayout.js or pagesupport.js . These files should be part of framework par file. This javascript contains a function tentatively called "adjustheight"/"adjustFullPageIViews"  which resizes the iframe after every browser refresh. you can play with this code.

Regards

Pallayya

saar_dagan
Employee
Employee
0 Kudos

Hi,

Call this function that is in the pagesupport:

pageSupport._adjustFullPageIViews();

it will calculate all the IFRAMES in the page and will resize them according to their size.

BR,

Saar

former_member246153
Active Contributor
0 Kudos

Hi,

Use this following code to get the window height

windowheight=document.documentElement.clientHeight;

Use the below code to get the Scroll height of iFrameContent Area

for  IE scrollheight=document.getElementById('contentAreaFrame').contentWindow.document.body.scrollHeight;

For Netscape browser

scrollheight=document.getElementById('contentAreaFrame').contentDocument.documentElement.scrollHeight;

Check whether the Scroll height of iFrame is greater than 75% of the window height (or what ever percent) , then set the Scroll height as height of contentAreaFrame . I think it will work.

Regards,

Srinivasan V

christoph_buehlmann
Participant
0 Kudos

Hello Saar

thanks for your reply. Sorry for allready getting back to you. But as an ABAP Developper this is all very new and different to me.

All my iViews and Pages that should be displayed are currently set to Full Page and URL. Can I now call that function directly from my LShapylayout.jsp? Or do I still miss somehting?

Like in the end of the .jsp:

......

</div>

<script>

window.onresize = pageSupport._adjustFullPageIViews();

window.onload =      pageSupport._adjustFullPageIViews();

</script>

</lyt:template>

Thanks for your support

best regards

Christophe

christoph_buehlmann
Participant
0 Kudos

Thank you for the feedbacks. As I would prefer to stay in the AFP Framework and the Standard L-Shape changing to a T-Layout is not my prefered option.

But I guess I found out where my problem is. The Content Area used in the standard L-Shape has some Javascript that calculates and resizes the height of the site.

So all I need to do is making a copy of the component holding the standard Content Area iView, change the code, redeploy and make my own custom Content Area iView.

So I downloaded the com.sap.portal.navigation.contenarea component from my portal server and imported it into NWDS. But when I redeploy it I can not find the new Compoment under Portal Applications.

Can anybody tell me why or where it is?

When I use the search function in Portal Content then I find the PRT:iView like:

gpar:/com.sap..portal.navigation.contenarea/default or

gpar:/CUSOMERCONTENT/default

but I can't find it in the tree and thus not make a copy of it to build my own iView.

What am I doing wrong?

Thanks for your support!

Message was edited by: Christoph Bühlmann By the way I am on NW 7.3

Former Member
0 Kudos

Hi Christoph,

To me it sounds like you are doing everything right, after you deploy your component it should be visible under the Portal Applications folder in the PCD - then you could copy and paste it into the Portal Content folder to create an iView from it....

All I can conclude is that your deployment failed. Did you rename the component or leave it in the SAP namespace? Also make sure when you deploy that you tell it to deploy any version, sometimes if you haven't updated the version number if won't deploy since the same version already exists on the server. Check the deployment console for some clues...

Hope this helps,
Simon

christoph_buehlmann
Participant
0 Kudos

Hi Simon

thanks for your reply. I could solve my deployment problem in the end. The problem was that I was following a HowTo Guide that created a component with NWDI and I am working with NWDS which means that I do not have to make a new Development Component and import my files but just zip the .war file and rename it as .ear and then import that .ear directly and then everything works.

Unfortunately my resizing problem is still not solved. If you have any clues on this then let me know...

Best regards

Christophe

former_member187970
Participant
0 Kudos

Hi Christophe,

which code did you used to getting scroll bar either java script  or html code?

before executing this scroll bar code, check broswer value if it is IE execute same code or else use some other code for scroll bar .

Prasad.

saar_dagan
Employee
Employee
0 Kudos

Hi Christoph,

in order to achieve scrollbar on the entire page you will need to change the framework page to a T-layout for example.

you can look at the light framework page to see what you need to change in your layout.

hope this guide will be usefull

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a03ead25-4288-2e10-57ae-c70b8c412...

regards,

Saar