cancel
Showing results for 
Search instead for 
Did you mean: 

Where to map constants to texts

Former Member
0 Kudos

Hi all,

I have implemented the common architecture "WebDynpro --> WebService --> SessionBean --> JDO --> database". In my data-table that I access I do not find clear text but only constants. E.g. the constant 1 means in clear text "Dept. Marketing", constant 2 means "Dept. Controlling".

Of course I do not want to display the constants but the clear texts. Where and how should I perform the mapping from constants to clear texts and vice versa? Should I do this in the SessionBean after getting the constants via JDO from DB, i.e. WebService should deliver clear text instead of constants? Or should the WebService deliver constants that are translated in my WebDynpro-Application?

Thanks for help,

Christoph

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Christoph ,

The WebService should return the values for you.So you have mapping method in your bean also.

Ex : your webservice may have a method like getDept() then it should return texts not constants.I think your current implementation retuns constants .

Regards, Anilkumar

Former Member
0 Kudos

Hi Anilkumar,

thank you for your advice. I guess this is a good solution. But what about the possibility to map the values in WebDynpro using the IWDConfiguration interface? Did you make any experiences? What are the advantages / disadvatages of the one and the other solution (mapping in SessionBean vs. mapping in WebDynpro)?

Kind regards,

Christoph

Former Member
0 Kudos

Hi Christoph,

I haven't used this API much but I don't think using IWDConfiguration would be a good idea.

If i am not wrong in the above case you need to maintain a property file and read the configurations through IWDConfiguration api.

But i would prefer to have a well defined services so that in future it will be easy for any kind of enhancements.

Best Regards, Anilkumar