Skip to Content

BarcodeReader:- onRead event is not getting invoked

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Nov 08, 2006 at 09:45 AM

    Hi Ashutosh,

    which example? Can you give me a link that I can check it?

    It's just a guess:

    The event onRead has two event parameters:

    String barCode - Event parameter for scanned barcode.

    String type - Event parameter for the type of barcode standards

    Maybe you have to map the type parameter, too.

    Kind Regards

    Stefanie

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 15, 2006 at 09:45 AM

    Hi Ashutosh,

    my guess was wrong: You don't need to map the second parameter.

    Next hint: Try using the PieClient (force through the URL parameter sap-wd-client=PieClient).

    Kind Regards

    Stefanie

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 16, 2006 at 05:56 AM

    Hi Ashutosh,

    See OSS note below. You need special Symbol or Intermec browser loaded on your device to use Mobile controls like barcode reader/RFID reader and function key UI.

    We also had to force client on URL to get mobile UI's to work.?sap-wd-client=PieClient. This was due to WD device recognition detecting PIE02 or PIE03 client and mobile UI's did not work under this...

    Note 894627 - Browser for Web Dynpro applications on Barcode/RFID devices

    Regards,

    Keith

    Add comment
    10|10000 characters needed characters exceeded