Skip to Content
0
Former Member
Dec 09, 2006 at 02:41 PM

Localization : error at vehicleType

35 Views

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