Skip to Content
0
Nov 07, 2006 at 11:42 PM

BarcodeReader:- onRead event is not getting invoked

34 Views

Hello experts,

I am facing problem while using Barcode and associated Event onRead.

I have gone through the example that SAP has given.

public void onActionScan(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String scanData )

  {

    //@@begin onActionScan(ServerEvent)

      wdThis.wdGetContext().currentContextElement().setData(scanData);

    //@@end
 
  }
 

 

public static void wdDoModifyView(IPrivateBarCodeTestView wdThis, IPrivateBarCodeTestView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)

  {

    //@@begin wdDoModifyView


      if (firstTime) {

         IWDBarCodeReader barCodeReader = (IWDBarCodeReader) view.getElement("BarCodeReader");

        

         barCodeReader.mappingOfOnRead().addSourceMapping("barCode", "scanData");

   }

 

    //@@end
}

Trust me, I have been following each and every instruction mentioned in the example.

I have a symbol scanning so I have kept type=symbol in the BarcodeReader property.

But all this hardwork(๐Ÿ˜Š) did not prove fruitful to me.

I am unable to get desired output.

The event onRead is not getting fired even when I scan the data from handhelp device.

I am using NWDS SP-16.

I appreaciate any sugesstion/solution given to my query.

Regards,

Ashutosh