Skip to Content
0
Dec 30, 2007 at 04:57 AM

Creating Frames and including trees in it and navigating between frames

43 Views

Hello,

I didnt find any form topics about FRAMES and passing data to it. I googled and searched in this forms/blogs too..but couldnt find any which help me on my requirement. I'm here to seek your help on this. Could someone help please.

Here is my requirement:

-Frame1----


| - TreeA

| -Node1

| +Node21

| -Node22

-


-Frame2----


| - TreeB

| -Node1

| +Node21

| -Node22

-


I need to have 2 frames on a page and a tree in each of it. Once I press the last node of treeA, I should be able to pass control to the second frame and display the second tree in the frame2.

I am able to display the first tree but when I try to navigate to the second tree, the first tree disappears and the second tree is not even seen. The control doesnt go the second frame! I want the first tree to be seen as well as control passing to second frame.

I created a page with below:

1. maintree.htm

-


<frameset rows="50%,50%" frameborder="1">

<frameset cols="35%,*" noresize scrolling="auto">

treeleft.htm" />

</frameset>

<frameset cols="35%,* " noresize scrolling="auto" >

treedown.htm" />

</frameset>

</frameset>

2. treeleft.htm

-


Layout

<htmlb:content>

<htmlb:form>

<htmlb:page title = "BSP Extension: HTMLB / Element: tree"

marginLeft = "1" >

<htmlb:tree id = "myTree1"

title = "1. Tree"

height = "10"

tooltip = "Tooltip for myTree1" >

<htmlb:treeNode id = "tv1"

text = "tree1"

tooltip = "Click to expand" >

onNodeClick = "myOnTreeClick"

isOpen = "false" >

</htmlb:treeNode>

</htmlb:tree>

</htmlb:page>

</htmlb:form>

</htmlb:content>

On Input Processing

-


data: event type ref to cl_htmlb_event.

event = cl_htmlb_manager=>get_event( runtime->server->request ).

if event->name = 'tree' and event->id = 'myTree1'.

data: tree_event type ref to cl_htmlb_event_tree.

tree_event ?= event.

v_nodeid = tree_event->node.

if v_nodeid is not initial.

secondtree = 'X'.

endif.

navigation->set_parameter( name = 'v_nodeid'

value = v_nodeid ).

navigation->goto_page( 'treedown.htm' ).

return.

endif.

2. treedown.htm

-


Layout

<htmlb:content>

<htmlb:form>

<htmlb:page title = "BSP Extension: HTMLB / Element: tree"

marginLeft = "1" >

<htmlb:tree id = "myTree2"

title = "2. Tree"

height = "10"

tooltip = "Tooltip for myTree2" >

<htmlb:treeNode id = "tv2"

text = "tree2"

tooltip = "Click to expand" >

onNodeClick = "myOnTreeClick"

isOpen = "false" >

</htmlb:treeNode>

</htmlb:tree>

</htmlb:page>

</htmlb:form>

</htmlb:content>

I dont know what I am doing wrong. To put in a better way...i dont know how to do it 😉 !

Could someone please help me out on this. I want to do it preferable using html/ABAP only( I dont know javascript)!

Appreciate your help

Thanks

PK