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

Custom dropdownbox for currency

Hi Experts,

I am trying to create dropdownbox for Currency in B2C scenario in checkout screen.

I am able to capture values from shop admin but unable to place them in Table and ResultData.

It seems the issue is at initializing " tab" in the following code.

How to initialize Table and capture value in ResultData?

protected ResultData _supportedCurrencies;

public ResultData readSupportedCurrencies(Shop shop)

throws CommunicationException{

if ( _supportedCurrencies == null ){


String supportedCurrencies = (String)shop.getExtensionData(CNpShopExtensionNames.CURRENCIES);

StringTokenizer st = new StringTokenizer(supportedCurrencies, ","); tab = _supportedCurrencies.getTable();

int i=1;

String sCurrency = "";

Object rowKey;

TableRow tabRow;


sCurrency = st.nextToken();

rowKey = sCurrency;

tabRow = tab.insertRow();


tabRow.setValue(i, sCurrency);


}catch(Exception cex){

log.error("Exception occured in reading currency "+ cex.toString());



return _supportedCurrencies;



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 11, 2011 at 06:35 PM

    Fixed by myself.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.