cancel
Showing results for 
Search instead for 
Did you mean: 

How to send data between 2 projects ?

Former Member
0 Kudos

Can,

Can we coomunicate between 2 components that are in 2 different applications in 2 different projects. If I want to reuse a component from another project in my current project, is this possible ?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hello,

You can communicate through 2 WD DC`s with Events and Methods defined in Interface controller and Plugs in Interface Views. You should create public part and add appropriate Web Dynpro Component. Then you have to add public part as used DC`s public part, add component to Used Web Dynpro Components.

Best regards, Maksim Rashchynski.

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks Maksim. Points awarded.

Former Member
0 Kudos

Thanks again Maksim.. I highly appreciate ur posts..

I have completely understood the method u have told . That was impressive.

However my problem is that I cannot add a component to the public part. When I right click on it , the "Add to Public Part" is not highlighted.....

I am ure I am not doind a intermediate step..cannot figure out what

Thanks

former_member182372
Active Contributor
0 Kudos

Hm, make sure that you have built your project with public part successfully and there is a jar file under "_comp\gen\default\public\<Public part name>\lib\java\" folder.

Former Member
0 Kudos

Hi Maksim,

SO if I underestand this whole thing correctly, I need to create a reusable component in a project. Then I need to add this component to the Public Part. Then in other projects current component I have to Include the first component from First project in under Used Web Dynpro Components

But my problem is that the reusable component is not visible in the first project ? May be cos its not in the Public Part. When I right click on the component I get the option to "Add to public Part" but its not highlited.

How do u add a component to the public part. Will it then be visible (its interface controller) in another project underr the Used WebDynpro Components ?

Thanks

former_member182372
Active Contributor
0 Kudos

Hello,

Well, step by step:

1) create WD DC "utils"

2) create WD Component "Component1"

3) In interface controller define method or event or context strucure

4) Right click on "Component1", select "Add to Public Part". Specify name (Utils). Build DC.

5) create WD DC "component"

6) In Used DCs of "component" add public part "Utils" from component "utils"

7) create WD Component "Component2"

😎 Add used Component for "Component2". Click "browse..." and select Component1, specify name (Comp1UC).

9) Open view from Comopnent2 and add Comp1UC (Web Dynpro Component Interface Controller) as Required Controllers.

Now you can call methods:

wdThis.wdGetComp1UCInterface().method();

Subscribe to events, and use context mapping with Interface Controller from Component1.

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Thanks Maksim. Thats what I thought. Actually I need this fundtionality because we want to keep the whole work in different projects(DC's) and not one. We dont want to deploy the whole code again and again even if only a small thing changes. Splitting into multiple DC's (Projects) will help that.

Also we want a project to be reusable in all others. But I think the only disadvantage of this design is that the context cannot be used to send and receive the data. So more custom coding may be required.

Thanks points awarded.

former_member182372
Active Contributor
0 Kudos

Hello,

BUT context CAN be used to send and receive the data! Just define Required Controllers (Custom Controller or other) in Interface Controller under Used Web Dynpro Controller and define context mapping.

Best regards, Maksim Rashchynski.