Skip to Content
author's profile photo Former Member
Former Member

How to reuse

Hi Friends,

I can create different webdynpro components and all components can have different component controllers.

hwo to handle common logic for Model? I mean database data methods written in Java.

I am connecting to database using a Java class.

i have some methods in it.

I want to use this class as a model to be reused in different components.

is it good idea?

is there any other way?

and..

How to handle common data between different components?

How to handle session management, login to database to get data?

Thanks!

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 10:03 AM

    Nav

    Place all model related stuff in the component controller and then access the data in different Iviews using mapping

    Do reward points if this helps.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Nav,

      Putting the code in the java files and then accessing it for values can be much more difficult. It is better to put the code in the controllers.

      1) If you want to put the common code for <b>view</b> and <b>window</b> then put it in <b>Component Controller</b>.

      2) If you want to put the common code for <b>components</b> the pit it in <b>Interface controller</b>. (Well, this is your case!!).

      Putting the common code in the controller is always a better idea since then you can access it from various other components of the same application.

      I hope you understood it.. If any problem then kindly revert back.

      Also kindly close your earlier thread if the problem is solved. It is better to close thread if you get answer of your question. (how-to-design-webdynpro-aplication)

      Regards

      Pravesh

      PS: Please consider rewarding points if helpful and solved.