Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
sowjanya1919
Posts: 109
Registered: ‎08-21-2012
My Device: Blackberry curve

browserfield

i want to open an html document in browser fiel ,where the html file contains a form which is submiting some data to some other url using action tag. i tried with the following code but it show me error that   "it could not select proper transport descriptor for the url specified the action tag of html file".

 

BrowserFieldConfig myBrowserFieldConfig = new BrowserFieldConfig();
        myBrowserFieldConfig.setProperty(BrowserFieldConfig.NAVIGATION_MODE,BrowserFieldConfig.NAVIGATION_MODE_POINTER);
        myBrowserFieldConfig.setProperty( BrowserFieldConfig.JAVASCRIPT_ENABLED, Boolean.TRUE );
        myBrowserFieldConfig.setProperty( BrowserFieldConfig.MDS_TRANSCODING_ENABLED, Boolean.TRUE );
        myBrowserFieldConfig.setProperty(BrowserFieldConfig.USER_AGENT,  "Profile/MIDP-2.0 Configuration/CLDC-1.0");
       
       
       BrowserField _bf2= new BrowserField(myBrowserFieldConfig);  
       subVertical.add(_bf2);

   _bf2.displayContent(pxfussionlURL, "http://localhost");

 
and the html codeis:
=====================

<html>

    <head><title>Processing Payment...</title></head>

    <body >

    <center><h3>Please wait, your order is being processed...<img src=http://184.107.195.21/globalcitysteals//public/default/manage/standard/images/ajax-loader.gif /></h3></center>

    <form enctype='multipart/form-data' name="frmsendpaymentrequest" method="post" action="https://sec.paymentexpress.com/pxmi3/pxfusionauth">

    <input type="hidden" name="SessionId" value="00000100011068068daef1b88891e201"><input type="hidden" name="Action" value="Add"><input type="hidden" name="Object" value="DpsPxPay"><input type="hidden" name="CardNumber" value="4111111111111111"><input type="hidden" name="ExpiryMonth" value="05"><input type="hidden" name="ExpiryYear" value="13"><input type="hidden" name="Cvc2" value="111"><input type="hidden" name="CardHolderName" value="Ambilii"><input type="hidden" value="00000100011068068daef1b88891e201"></form>

    </body></html>

Please use plain text.
Developer
Kiran_Snist
Posts: 174
Registered: ‎01-25-2011
My Device: Not Specified

Re: browserfield

[ Edited ]

That particular errors pops up when ever the html file is unreachable, Neverthless Instead of using displayContent use requestContent method of browser field 

Please use plain text.
Developer
sowjanya1919
Posts: 109
Registered: ‎08-21-2012
My Device: Blackberry curve

Re: browserfield

i used the requestcontent too...but the same error is coming....can you give any other suggestion

Please use plain text.
Developer
Kiran_Snist
Posts: 174
Registered: ‎01-25-2011
My Device: Not Specified

Re: browserfield

One simple thing is to use the empty constructor of browser field... But my feeling is that the page u r trying to access to unreachable... So verify the path of the file...
Please use plain text.
Developer
sowjanya1919
Posts: 109
Registered: ‎08-21-2012
My Device: Blackberry curve

Re: browserfield

when i am opening that html file in normal browser ...it is working fine.  In my browser field or httpconnection something is wrong . some property has to define. That i dont know what.

Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: browserfield

Hi @sowjanya1919

 

The error talks about "the action tag of html file".

 

The action tag in your html points to "https://" URL and my guess that this is the reason for the failure.

 

First, check if you can post to your own simple page (a page on your server which simply shows the details).

 

If it works, then the problem is with the https. Try setting a BrowserFieldConnectionManager to your browserField and make the connection by yourself.

 

If it still doesn't work, try changing the URL parameter in the call to the displayContent.

 

Hope that helps,

 

E.

Please use plain text.