Package net.rim.device.api.browser.field2

Examples of net.rim.device.api.browser.field2.BrowserFieldRequest


                Object o = bfConfig.getProperty( BrowserFieldConfig.CONTROLLER );
                if( o instanceof BrowserFieldController ) {
                    BrowserFieldController bfController = (BrowserFieldController) o;

                    // Create request for config.xml file
                    BrowserFieldRequest request = new BrowserFieldRequest( WidgetUtil.getLocalPath( _configXML ) );
                    InputConnection inputConn = bfController.handleResourceRequest( request );

                    // Create a Document object out of the config.xml
                    _configXMLDoc = docBuilder.parse( inputConn.openDataInputStream() );
                }
View Full Code Here


    public static BrowserField getBrowserField() {
        return _browserFieldReference;
    }

    private BrowserFieldRequest createRequest( String url ) {
        BrowserFieldRequest result = new BrowserFieldRequest( WidgetUtil.getLocalPath( url ) );
        return result;
    }
View Full Code Here

    /**
     * Creates a new BrowserField2Demo object
     */
    BrowserField2Demo() {
        try {
            final BrowserFieldRequest request =
                    new BrowserFieldRequest("local:///index.html");
            _browserScreen = new BrowserFieldScreen(request, true);
            extendJavaScript(_browserScreen.getBrowserField());
            pushScreen(_browserScreen);
        } catch (final Exception e) {
            errorDialog("An error occurred, exiting Browser Field 2 Demo: "
View Full Code Here

                JSExtensionRequest req = new JSExtensionRequest( request.getURL(), request.getPostData(), request.getHeaders(),
                        ( (WidgetConfigImpl) _widgetConfig ).getFeatureTable() );
                JSExtensionResponse res = new JSExtensionResponse( request.getURL(), null, request.getHeaders() );
                try {
                    ( (IJSExtension) ext ).invoke( req, res );
                    return new BrowserFieldResponse( res.getURL(), res.getPostData(), res.getHeaders() );
                } catch( net.rim.device.api.web.WidgetException e ) {
                    // this block is reached if the method cannot be found within the extension
                    return new HTTPResponseStatus( HTTPResponseStatus.SC_NOT_IMPLEMENTED, request ).getResponse();
                }
            } else {
View Full Code Here

            addCacheItem( ci );
        } else {
            System.out.println( "WEBWORKS ==> cache not created: " + url );
        }

        return new BrowserFieldResponse( url, data, headers );
    }
View Full Code Here

        if( o instanceof CacheItem ) {
            CacheItem ci = (CacheItem) o;
            HttpHeaders headers = ci.getHeaders();
            byte[] data = ci.getData();
            return new BrowserFieldResponse( url, data, headers );
        }

        return null;
    }
View Full Code Here

    public HTTPResponseStatus( int responseCode, BrowserFieldRequest request ) throws IOException {
        buildCodeMessageDict();
        String message = buildMessage( responseCode, request.getURL() );
        ByteArrayInputStream input = new ByteArrayInputStream( message.getBytes() );
        _response = new BrowserFieldResponse( responseCode, message, request.getURL(), input, request.getHeaders() );
    }
View Full Code Here

TOP

Related Classes of net.rim.device.api.browser.field2.BrowserFieldRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.