cancel
Showing results for 
Search instead for 
Did you mean: 

Web dympro with component

Former Member
0 Kudos

hi,

I have two web dymprO, WEB_start and WEB_flow .

Web_flow is a component of WEB_START.

In web_start we have a node "ITEM_SELEZIONATO" in the context of componetcontroller: It has one view, V_100.

The action button on this view , call a "SET_ITEM" method (in componentcontroller of web_start) that value the attribute "ITEM" of node "ITEM_SELEZIONATO' , with a value 'FLOW1'.

Than this action call component WEB_FLOW.

In modify method of web_flow I call a method "get_flow" that is in componetcontroller of web_star.

This methos get value of attribute "ITEM", but it is empty instead "FLOW1'.

I SHOW THE CODE OF MY WEB DYMPRO :

*******************************

SET ITEM METHOD :

o_node = wd_context->get_child_node( 'ITEM_SELEZIONATO' ).

  • Setta l'Item selezionato nell'albero

W_ITEM = "FLOW1"

CALL METHOD o_node->set_attribute

EXPORTING

name = 'ITEM'

value = w_item.

wd_this->fire_op_to_w_flow_plg( ). "CALL COMPONENT Web_flow.

*******************************

METHOD wddomodifyview .COMPONENT WEB_FLOW

o_cmp_usage = wd_this->wd_cpuse_WEB_FLOW( ).

IF o_cmp_usage->has_active_component( ) IS INITIAL.

o_cmp_usage->create_component( ).

ENDIF.

o_interfacecontroller = wd_this->wd_cpifc_main( ).

CALL METHOD IN WEB_START.

o_interfacecontroller->get_item(

IMPORTING

w_flusso = v_flusso

!!!!!error V_FLUSSO IS EMPTY !!!!!!!!!!!

*************************************

METHOD get_item .

  • Dichiarazione oggetto

DATA: o_node TYPE REF TO if_wd_context_node.

o_node = wd_context->get_child_node( 'ITEM_SELEZIONATO' ).

o_node->get_attribute(

EXPORTING

name = 'ITEM'

IMPORTING

value = V_flusso ).

***********************************

wHERE IS THE ERROR?

thanks .

Accepted Solutions (1)

Accepted Solutions (1)

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

You want to pass the data from Web Start to Web Flo rght?

You can pass the data while firing the plugs.

See the code which I added.

I SHOW THE CODE OF MY WEB DYMPRO :

*******************************

SET ITEM METHOD :

o_node = wd_context->get_child_node( 'ITEM_SELEZIONATO' ).

  • Setta l'Item selezionato nell'albero

W_ITEM = "FLOW1"

CALL METHOD o_node->set_attribute

EXPORTING

name = 'ITEM'

value = w_item.

wd_this->fire_op_to_w_flow_plg( g_item = w_item ). "CALL COMPONENT Web_flow."here while firing the plug pass the pararmeter.

For this to be done in the outbound plugs add the paramater say g_item of type w_item*******************************

METHOD wddomodifyview .COMPONENT WEB_FLOW

o_cmp_usage = wd_this->wd_cpuse_WEB_FLOW( ).

IF o_cmp_usage->has_active_component( ) IS INITIAL.

o_cmp_usage->create_component( ).

ENDIF.

o_interfacecontroller = wd_this->wd_cpifc_main( ).

CALL METHOD IN WEB_START.

In the event handler of the inbound plug you can get the paramter g_item with value "FLOW1"

Pass the variable g_item where ever you want.

o_interfacecontroller->get_item(

IMPORTING

w_flusso = v_flusso

!!!!!error V_FLUSSO IS EMPTY !!!!!!!!!!!

*************************************

METHOD get_item .

  • Dichiarazione oggetto

DATA: o_node TYPE REF TO if_wd_context_node.

o_node = wd_context->get_child_node( 'ITEM_SELEZIONATO' ).

o_node->get_attribute(

EXPORTING

name = 'ITEM'

IMPORTING

value = V_flusso ).

***********************************

wHERE IS THE ERROR?

Please let me know if this is the one you wanted.

Regards,

Priya

Former Member
0 Kudos

Thanks, it's could be a solution but i have more nodes that are in web_start and that must be used by more component as web_flow. Are ther other solution for read the context of component controller in web_start from web_flow ? I have binding a context of component controller of web_start with context of web_flow, but this is not valued with value of context of web_start.

Thanks.

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

can you let me know the steps you followed for binding a context of component controller of web_start with context of web_flow.

in the properties of the NODE did u check the input element (ext).

Regards,

Priya

Former Member
0 Kudos

Hi,

i can explain my step.

i have created web_start with a

1) some nodes in contex of component controller

2) some view with own context that have some nodes biding with nodes of contex of component controller and someone live only in view.

In Web_start i have inserted web_flow as component .

I have created WEB_FLOW with component WEB_START.

The Web_flow has :

1) Some view with own context that has some nodes binding with the corresponding nodes of conponent controller of web_start.

The attribute "Input Element (Ext.) " of the nodes in the component controller is set on true.

The attribute "Interface Node" of the nodes in the component controller is set on true.

thaks.

Answers (1)

Answers (1)

Former Member
0 Kudos

hi ,

When you create your context at component controller level in component WEB_START , you have a property for the node which says as: "Interface Node" Just checkmark this checkbox. When you do this you would be able to share the data within your context nodes across other components.

refer this article on component usage :

http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2e71ce83-0b01-0010-11a4-98c28a331...

regards,

amit