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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 52
Registered: ‎05-31-2012
My Device: Not Specified
My Carrier: Airtel

how to send data using post method in browser field

Hi,

 

 i need to open a webpage in browserfield by post hit.I need to send some data with url.How to do that.

Developer
Posts: 78
Registered: ‎05-17-2012
My Device: 9900 - OS 7.0 Torch device
My Carrier: Reliance

Re: how to send data using post method in browser field

Hi

 

To have webview, you may need to use the below

BrowserSession bs = Browser.getSession(Browser.CID_BROWSERCONFIG);
        

public void displayPage(String url,
                        String referrer,
                        HttpHeaders requestHeaders,
                        PostData postData)
here url would be your base url, you can add the postdata
Developer
Posts: 52
Registered: ‎05-31-2012
My Device: Not Specified
My Carrier: Airtel

Re: how to send data using post method in browser field

Hi 

 

I have open webpage successfully by post method below is my code

 

final HttpHeaders requestHeaders = new HttpHeaders();
requestHeaders.addProperty(
HttpHeaders.HEADER_CONTENT_TYPE,
HttpHeaders.CONTENT_TYPE_APPLICATION_X_WWW_FORM_URLENCODED
);

final URLEncodedPostData postData =
new URLEncodedPostData(URLEncodedPostData.DEFAULT_CHARSET, false);

postData.append("key", "value");


BrowserSession browserSession = Browser.getDefaultSession();
browserSession.displayPage("MYURL",
null, requestHeaders, postData);
browserSession.showBrowser();

 

 

 

But i need to open this page in browser field.

Developer
Posts: 571
Registered: ‎04-11-2009
My Device: BB 10 Dev Alpha

Re: how to send data using post method in browser field

Hi,

 

Check this - 

http://supportforums.blackberry.com/t5/Java-Development/Need-to-open-Browser-field-with-post-method-...

Regards,
Kanak Sony
------------------------------------------------------------------------------------------
http://dodevelopnshare.wordpress.com/ | http://www.linkedin.com/profile/view?id=188131481&trk=tab_pro
Developer
Posts: 52
Registered: ‎05-31-2012
My Device: Not Specified
My Carrier: Airtel

Re: how to send data using post method in browser field

I want to open the webpage in internal browser, not in externel browser.

Developer
Posts: 78
Registered: ‎05-17-2012
My Device: 9900 - OS 7.0 Torch device
My Carrier: Reliance

Re: how to send data using post method in browser field

Can you please be more explanative. You want to open the web page with in your application like WebView rt. If so, there is no need to go for BrowserField

Highlighted
Developer
Posts: 52
Registered: ‎05-31-2012
My Device: Not Specified
My Carrier: Airtel

Re: how to send data using post method in browser field

BrowserSession open the webpage in default web browser of device, but i does not want to open my page in any browser, It should  show like other pages of app.