cancel
Showing results for 
Search instead for 
Did you mean: 

Code of JavaBean Model - not executed?

Former Member
0 Kudos

Hello group,

after a while I finally got my JavaBean Model imported (now directly from inside the WD-Component).

But the code does not seem to be executed.

For the simplest kind of example I inserted some code in some setter-method of the Bean and simple called it directly:

wdContext.currentPackingListHeaderBeanElement().modelObject().setTemperatureTo("100");

It does not work.

Are the getters and setters just for context gerenation? Where exactly are the sources and what is generated? Is only the code of the "execute" method taken?

And: Once I imported the signature - can I change the coding without re-import?

Many questins - any answer would be GREAT!!

Thanks!

BTW - the code of the setter is as follows:

    public void setTemperatureTo(String temp) {
		System.out.println("setTemperatureTo");
		debug += "setTemperatureTo";
		TemperatureTo = temp;
		printLog();
	}

Accepted Solutions (1)

Accepted Solutions (1)

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hallo Simon,

please have a look at our Web Dynpro tutorial on how to apply the Java Bean Model Importer:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tu... on using ejbs in web dynpro - 20.html

Make sure, that all steps are also applied in your use case.

Regards, Bertram

Former Member
0 Kudos

Hi Bertram,

thanks for your reply!

Yes, I read the tutorial - but some more information (detailed, technical,..) would be great, to understand what the the "Importer" does exactly.

Thanks and regards,

Simon

P.S:

For example:

What if the code in my "execute" method changes, but not the attributes - do I have to reimport the bean?

Or do the "model-classes" just delegate to the bean class? (In which case I would not have to reimport the BeanModel)

Message was edited by: Simon Prinzleve

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Simon,

I am also facing the same problem as you've mentioned in this thread.But I cudn't find a solution to this.If it has been resolved by you and if u have any other alternative suggestions, kindly reply back ....

RamBabu

Former Member
0 Kudos

Hi Rambabu,

fortunately i could figure it out:

I had my beans twice in the classpath (they were on the server via two referenced components (one was old and not used any more))

That was it.

After solving this issue the code execution is quite "straight forward"...

Regards,

Simon