cancel
Showing results for 
Search instead for 
Did you mean: 

dynamically position UI element depending on current position

Former Member
0 Kudos

Hi,

I have the following issue:

My application shows different documents of multiple categories in the browser. The categories are listed in a tree element (IWDTree) on the lefthand side of the application. There can be a lot different categories, so the populated tree may grow really large (> than 2 full pages in the browser).

Within each category you can then select a document (PDF or Word-DOC) that is then shown on the right-hand side of my application, in an IWDTransparentContainer-Element. Within the conatiner an IWDInteractiveForm or an IWDOfficeControl is created, depending on the type of the selected document and then the document itself is shown "in-place" in the browser within the corresponding control.

That all works fine, but the document is always shown "on-top". What I mean with that is, that in the NWDS I created one container for the tree (the left side of the application) and one container for the displayed document (the right side). These two elements are "on the same level", that means side by side in the NWDS. So, when you now scroll down two pages in the tree in my application and select a document, this docmunet is still opened "on-top" of the right-hand container and you have to scroll up the two pages in the browser to see the document!

My thought now is that I would like to place the container on the right-hand send dynamically! As near as possible to the position of the category I currently selected - is this possible?! Any ideas?!

Thanks for your help,

Bernhard

Accepted Solutions (1)

Accepted Solutions (1)

former_member192152
Active Participant
0 Kudos

In making its iView in Portal, based on this document [Integrating Web Dynpro and SAP NetWeaver Portal|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/0c7b2f25-0c01-0010-f2a2-f8a65a9dcad9] (Several Creating iViews for one application) and create two iViews, one for each side (left = tree / right = view) their WebDynpro app. Thus, every time you select a new item in the tree, the iView display is updated, causing the scroll to be regenerated.

regards,

Angelo

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi again,

I now found a solution!

As mentioned before, I now use a TransparentContainer, and set its height depending on the position of the users current selection in the tree. The way how I determine this "selection position" is now over an addtional "manual attribut" called treePosition where I store an incrementing integer value for each tree element. When redrawing the document I then set the height of the above TransparentContainer (which is actually empty) according to the selected position in the tree. Below this empty container the document itself is shown and the user does not need to scroll up again in order to see it!

Thanks for any inputs! Regards

Bernhard

Former Member
0 Kudos

Hello Angelo,

Thanks for the suggestion, although this is not really what I want/need...

We are buildung a Web Dynpro application that not necessarly should be integrated in a Portal. So I would like to solve the issue within the Web Dynpro application itself.

What I already found out in the meantime is that I could use another "IWDTransparentContainer" which I place over my "DocumentContainer" (on the righthand side) and where I set the height of this container depending on my position in the tree. The only difficulty for me right now is to find out where the user clicked in the tree, as there is no object representing the x/y-position of the user interaction - right?!

Thanks again and Regards

Bernhard