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
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Device: 8520 curve

BrowserField redirection not happening

Hi guy's

  i am using BrowserField to post the data on some url.after posting the data that url redirecting on other url enternaly for the responce message,so what happening is that i am not getting the response message.

  I think browserField is not redirecting the url.

 

can any body help me what is the issue.

 

thanks

Developer
Jam321
Posts: 59
Registered: ‎06-15-2012
My Device: 9800

Re: BrowserField redirection not happening

can you share sample code so we can help

Trusted Contributor
ankitagrawal
Posts: 141
Registered: ‎02-15-2012
My Device: 9800

Re: BrowserField redirection not happening

Please use the following code:

 

BrowserSession browserSession = Browser.getDefaultSession();
browserSession.displayPage("http://www.google.com");

Developer
JoVinz
Posts: 255
Registered: ‎05-03-2012
My Device: 9930

Re: BrowserField redirection not happening

I think this code will work

BrowserFieldConfig myBrowserFieldConfig = new BrowserFieldConfig();
myBrowserFieldConfig.setProperty(BrowserFieldConfig.NAVIGATION_MODE,BrowserFieldConfig.NAVIGATION_MODE_POINTER);
myBrowserField.requestContent(URL);

 

Developer
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Device: 8520 curve

Re: BrowserField redirection not happening

Hi jam321

 

  Actualy i am posting some data on an url, after that i am getting responce as html form data and that form posting the data on some other url(another url starts with https://),

   so my problem is that form is not able to post the data on respective url.

 

  It is working fine in os6and os7 but not working on os5

 

initial url call


initialy i am calling like this

 

 BrowserField _bf2= new BrowserField(myBrowserFieldConfig);

_bf2.requestContent("URL");

 

Below is my responce code

after calling first url i am getting response as like below

 

<html>
<head><title>Processing Payment...</title></head>
<body ><center><h3>Please wait, your order is being processed...
</h3></center><form enctype='multipart/form-data' name="frmsendpaymentrequest" method="post"
action="https://sec.paymentexpress.com/pxmi3/pxfusionauth"><input type="hidden"
name="SessionId" value="0000010001840770045df11431d52801"><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="10"><input type="hidden" name="ExpiryYear" value="12">
<input type="hidden" name="Cvc2" value=""><input type="hidden" name="CardHolderName" value="jomp">
<input type="hidden" value="0000010001840770045df11431d52801"></form></body></html>
<script>document.frmsendpaymentrequest.submit();</script>

 

please reply if you have any idea

thanks

Developer
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Device: 8520 curve

Re: BrowserField redirection not happening

Hi ankit

  i can use browser session,But problem is that it is openning external browser and after that how to come back in app,and can we customize the external browser screen.even after clicking back button it is going on back page on browser. can we customize it

 

Thanks.

Trusted Contributor
ankitagrawal
Posts: 141
Registered: ‎02-15-2012
My Device: 9800

Re: BrowserField redirection not happening

Hi avinash, 

 

use following code.

just create instance to BrowserField and pass your URL as argument.

 

BrowserField browserField = new BrowserField();
browserField.requestContent("http://www.google.com");
add(browserField);

 

Now, you have no need to open the external browser.

 

Please press like, if you got the solution..

Developer
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Device: 8520 curve

Re: BrowserField redirection not happening

Hi ankit

 

thanks for response,

 

  But this code all ready i am using,it is working fine in os6 and os7,but it is not working in os5,

         So my problem is in os5. if you fined it please let me know.

 

Thanks

 

 

 

Developer
pankajace12
Posts: 206
Registered: ‎04-30-2011
My Device: BlackBerry Z10

Re: BrowserField redirection not happening

HI Avinash,

I am agree with ankit. because the same is working at my end also. I am using the same code in my project.

And, my project is working fine in os5,6,7

Thanks
Pawan
Developer
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Device: 8520 curve

Re: BrowserField redirection not happening

Hi pankaj

 

 are you getting response as html form,which is submitting autometicaly by javascript,and the action url is starting with https:// ,

 

to clear it please see my above code which is posted on 5th post from the top.

 

i am getting erro like -> Transport Descriptor not found for the spesified url.

 

Thanks.