on 12-09-2006 2:41 PM
Hi Friends,
I copied the code and pasted and approaching the way they explained in the PDF , at the vehicleType i am getting an error, any quick idea how to sort this?
public void onPlugInResult(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onPlugInResult(ServerEvent)
String text, image;
// provides access to translatable texts from Message Pool
IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();
if (<b>vehicleType</b>.equals("E")) {
// text = "You have chosen an economy class car.";
text = textAccessor.getText("text_E");
image = "Economy.jpg";
}
else if (<b>vehicleType</b>.equals("F")) {
// text = "You have chosen a first class car.";
text = textAccessor.getText("text_F");
image = "Firstclass.jpg";
}
else if (<b>vehicleType</b>.equals("B")) {
// text = "You have chosen a business class car ";
text = textAccessor.getText("text_B");
image = "Business.jpg";
}
else if (<b>vehicleType</b>.equals("C")) {
// text = "You have chosen a cabriolet.";
text = textAccessor.getText("text_C");
image = "Cabrio.jpg";
}
else { //Van
// text = "You have chosen a van.";
text = textAccessor.getText("text_V");
image = "Van.jpg";
}
wdContext.currentContextElement().setText(text);
wdContext.currentContextElement().setImage(image);
//@@end
}
Many thanks
Peter
Hi Peter,
Where is the variable vehicleType declared? The code does not give a declaration for it ..Is it declared as a class variable? If not, it needs to be declared and initialised before it can be used in the method. That could be the problem. Check the tutorial to see where its declared and include it in your code as well.
Hope that helps,
LM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You probably forgot to add parameter "vehicleType" to the inbound-plug.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What error your getting? Post the error message.
Regards
Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.