Field of browser pointing to html content in my device

Hi all

I'm currently exploring the field of browser and its related APIs and met an interesting query.

Scenario: I have a file HTML bundled with my cod file, and when the browser field is called, that the HTML content must be displayed in the field of the browser instead of seek it from the internet.

Can this be achieved? If so, how can I go about it?

Thank you...

Thanks for all the suggestions, guys...  They really helped me sort this one out... Just to sum everything up, there are 3 ways to make the HTML content in the browser field.

  1. Using the "cod://ProjectName/FileName.html" as the url for establishing the HttpConnection where the name of the file is placed in my project .cod file.
  2. Provide the HTML in a string, convert it to a ByteArrayOutputStream, encode it with the Base64OutputStream and challenges in the form of url for the opening of HttpConnection.
  3. Simulate an implementation of the HttpConnection and use it instead of the original HttpConnection. (However, this only works for static HTML content, it is to say no links or references should be included in this happy)

All of these solutions have worked with JDE 4.0.0 and I used the BrowserContentManagerDemo and the BrowserFieldSampleApplication (packed in the JDE) as reference implementations.

I hope this helps everyone who crosses with the same requirement...

See you soon,.

Solène...

Tags: BlackBerry Developers

Similar Questions

  • Display HTML content in the field of browser Blackberry eception illegalstateexception?

    My code what I do wrong here please help me?

    String content = ("< police =" verdana"size ="1"> SUREBUILD is a general purpose cement.) Typical applications are of concrete, mortar, plaster, masonry, paving, precast, grout, shotcrete products, the stabilization of soils and other general home and DIY applications. & nbsp; < br / > < br / > SUREBUILD is & nbsp; a proven product that has been designed to achieve a constant and appropriate performance. SUREBUILD is & nbsp; compatible with commercial chemical admixtures. ("< / police > < br / > ');

    BrowserFieldConfig config = new BrowserFieldConfig();
    HttpHeaders headers = new HttpHeaders();
    headers.addProperty (HttpHeaders.HEADER_CONTENT_TYPE, HttpHeaders.CONTENT_TYPE_TEXT_HTML);
    headers.addProperty (HttpHeaders.HEADER_ACCEPT_CHARSET, "UTF - 8");
    config.setProperty (BrowserFieldConfig.HTTP_HEADERS, headers);
    BrowserField contentField = new BrowserField (config);
    This.Add (contentField); Add to the form
    contentField.displayContent (content, "http://localhost"); content-> your HTML content
    listVfm.add (contentField);

    I posted an answer to this on StackOverflow, and now the question seems to have been deleted...  In summary, the comments that have been included:

    (a) the code provided does not fail, can we have an extract that makes?

    (b) it would be useful to have additional information, such as the environment of the failuire, the detailed message for the Exception and the line to wich that failure occurred.

    (c) when you try to view an html page, it should be a full html page.

  • CTRL + S changes HTML content

    When I press ctrl + s (or navigate to the menu item to 'save'), the browser saves the page to a file. This is the expected behavior, and I love it! However, it seems to change the HTML content.

    For example:

    If I save a page that contains the links like this:

    < a href = "google.com" > < /a > Google

    They turn out like this:

    "< a href ="google.com"> < /a > Google.

    Do not see the difference? The quotes to change of single-phase double. Although often it is not serious, I'm performing a regex search on the file and I downloaded it so I wouldn't have to go search for it on the server each time. It would be nice if there was an option to create an exact copy of the page.

    Is it available? Or could it be created?

    Thank you!

    36.0a2 Firefox Developer Edition - however, the same thing happens with all versions of Firefox
    Aurora update channel

    If you use the "Web Page, complete" Firefox needs to change the source because that link to files saved locally must be corrected and therefore Firefox links formats.
    If you use "Web Page, HTML only" while Firefox does not need to do.

  • Not able to send HTML content in E-mail Apex

    Hello

    I use Oracle Apex 4.2 and Oracle 11g XE

    I am trying to add HTML content into the procedure of apex_send mail. But it gives me the error below.

    > > •ORA-06502: PL/SQL: digital error or value: specified incorrect LOB Locator: ORA-22275


    Here is the code I am trying to add in the mail to apex_send


    DECLARE
    l_from varchar2 (1000);
    l_body CLOB.
    l_body_html CLOB.

    BEGIN
    l_body: = null;

    l_body_html: = '
    <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
    < html >
    < head >
    < meta http-equiv = "Content-Type" content = text/html"; Charset = UTF-8 "/ >"
    < property meta = "og: title" content = "Seasons Greetings from sudhir networks" / >

    < title > Seasons Greetings of sudhir networks < /title >
    < style type = "text/css" >
    / * Client-specific styles * /.
    #outlook {padding: 0 ;} / * Force Outlook to provide a "view in browser" button.} */
    Body {width: 100%! important;}. ReadMsgBody {width: 100%;}. ExternalClass {width: 100% ;} / * Force Hotmail to display the emails to full-width * /}
    body {- webkit - text-size-adjust: none ;} / * platforms Webkit preventing to change the default text sizes.} */

    / * Reset Styles * /.
    Body {margin: 0; padding: 0 ;}}
    IMG {border: 0; height: auto; line-height: 100%; border: none; text-decoration: none ;}}
    table td {border-collapse: collapse ;}}
    #backgroundTable {height: 100%! important; margin: 0; padding: 0; width: 100%! important ;}}

    body {#backgroundTable}
    /*@Editable*/ background-color: #FAFAFA;
    }
    {#templateContainer}
    /*@Editable*/ border: 1px solid #DDDDDD;
    }
    H1, .h1 {}
    /*@Editable*/ color: #202020;
    Display: block;
    /*@Editable*/ do-family: Arial;
    /*@Editable*/ font-size: 34px;
    /*@Editable*/ make-weight: bold;
    /*@Editable*/ line-height: 100%;
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 10px;
    margin-left: 0;
    /*@Editable*/ text-align: left;
    }
    H2, .h2 {}
    /*@Editable*/ color: #202020;
    Display: block;
    /*@Editable*/ do-family: Arial;
    /*@Editable*/ font-size: 30px;
    /*@Editable*/ make-weight: bold;
    /*@Editable*/ line-height: 100%;
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 10px;
    margin-left: 0;
    /*@Editable*/ text-align: left;
    }
    H3, .h3 {}
    /*@Editable*/ color: #202020;
    Display: block;
    /*@Editable*/ do-family: Arial;
    /*@Editable*/ font-size: 26px;
    /*@Editable*/ make-weight: bold;
    /*@Editable*/ line-height: 100%;
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 10px;
    margin-left: 0;
    /*@Editable*/ text-align: left;
    }
    H4 {.h4}
    /*@Editable*/ color: #202020;
    Display: block;
    /*@Editable*/ do-family: Arial;
    /*@Editable*/ do-size: 22px;
    /*@Editable*/ make-weight: bold;
    /*@Editable*/ line-height: 100%;
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 10px;
    margin-left: 0;
    /*@Editable*/ text-align: left;
    }
    {#templatePreheader}
    /*@Editable*/ background-color: #FAFAFA;
    }
    .preheaderContent div {}
    /*@Editable*/ color: #505050;
    /*@Editable*/ do-family: Arial;
    /*@Editable*/ do-size: 10px;
    /*@Editable*/ line-height: 100%;
    /*@Editable*/ text-align: left;
    }
    .preheaderContent div one: link, .preheaderContent div one: visited, / * substitute Yahoo! Mail * / div .preheaderContent a .yshortcuts / * substitute Yahoo! Mail * / {}
    /*@Editable*/ color: #336699;
    /*@Editable*/ police-weight: normal;
    /*@Editable*/ text-decoration: underline;
    }
    {#templateHeader}
    /*@Editable*/-Couleur background: #FFFFFF;
    /*@Editable*/ border-bottom: 0;
    }
    {.headerContent}
    /*@Editable*/ color: #202020;
    /*@Editable*/ do-family: Arial;
    /*@Editable*/ font-size: 34px;
    /*@Editable*/ make-weight: bold;
    /*@Editable*/ line-height: 100%;
    /*@Editable*/ padding: 0;
    /*@Editable*/ text-align: center;
    /*@Editable*/ vertical-align: middle;
    }
    .headerContent a: link, .headerContent a: visited, / * substitute Yahoo! Mail * / .headerContent a .yshortcuts / * substitute Yahoo! Mail * / {}
    /*@Editable*/ color: #336699;
    /*@Editable*/ police-weight: normal;
    /*@Editable*/ text-decoration: underline;
    }

    {#headerImage}
    height: auto;
    Max-width: 600px;
    }
    #templateContainer, {.bodyContent}
    /*@Editable*/-Couleur background: #FFFFFF;
    }
    .bodyContent div {}
    /*@Editable*/ color: #505050;
    /*@Editable*/ do-family: Arial;
    /*@Editable*/ do-size: 14px;
    /*@Editable*/ line-height: 150%;
    /*@Editable*/ text-align: left;
    }
    .bodyContent div one: link, .bodyContent div one: visited, / * substitute Yahoo! Mail * / div .bodyContent a .yshortcuts / * substitute Yahoo! Mail * / {}
    /*@Editable*/ color: #336699;
    /*@Editable*/ police-weight: normal;
    /*@Editable*/ text-decoration: underline;
    }

    .bodyContent img {}
    Display: inline;
    height: auto;
    }
    {#templateFooter}
    /*@Editable*/-Couleur background: #FFFFFF;
    /*@Editable*/ border-top: 0;
    }

    .footerContent div {}
    /*@Editable*/ color: #707070;
    /*@Editable*/ do-family: Arial;
    /*@Editable*/ do-size: 12px;
    line /*@editable*/-hauteur: 125%;
    /*@Editable*/ text-align: left;
    }
    .footerContent div one: link, .footerContent div one: visited, / * substitute Yahoo! Mail * / div .footerContent a .yshortcuts / * substitute Yahoo! Mail * / {}
    /*@Editable*/ color: #336699;
    /*@Editable*/ police-weight: normal;
    /*@Editable*/ text-decoration: underline;
    }

    .footerContent img {}
    Display: inline;
    }

    {#social}
    /*@Editable*/ background-color: #FAFAFA;
    /*@Editable*/ border: 0;
    }

    #social div {}
    /*@Editable*/ text-align: center;
    }

    {#utility}
    /*@Editable*/-Couleur background: #FFFFFF;
    /*@Editable*/ border: 0;
    }
    #utility div {}
    /*@Editable*/ text-align: center;
    }

    #monkeyRewards img {}
    Max-width: 190px;
    }
    < / style >
    < / head >
    < body leftmargin = "0" marginWidth don't = "0" topmargin = "0" marginheight = "0" offset = "0" >
    < center >
    < table border = "0" cellpadding = "0" cellspacing = "0" height = "100%" width = "100%" id = "backgroundTable" >
    < b >
    < td align = "center" valign = "top" >

    < table border = "0" cellpadding = "0" cellspacing = "0" width = "600" id = "templateContainer" >
    < b >
    < td align = "center" valign = "top" >
    <!-/ / start model header------->
    < table border = "0" cellpadding = "0" cellspacing = "0" width = "600" id = "templateHeader" >
    < b >
    < class td 'headerContent' = >
    < img src = "http://www.sudhirnetworks.com/i/logo/sudhir-logo.png" style = "max-width: 600px;" padding-top: 20px; "id ="headerImage campaign-icon"mc:label ="header_image"mc:edit ="header_image"mc:allowdesigner mc:allowtext / >
    < table >
    < /tr >
    < /table >
    <!-/ / end Header Template------->
    < table >
    < /tr >
    < b >
    < td align = "center" valign = "top" >
    <!-/ / start model body--->
    < table border = "0" cellpadding = "0" cellspacing = "0" width = "600" id = "templateBody" >
    < b >
    < td valign = "top" class = "bodyContent" >

    <!-/ / start Module: Content Standard postal card------->
    < table border = "0" cellpadding = "20" cellspacing = "0" width = "100%" >
    < tr mc: repeatable >
    < td valign = "top" >
    < img src = "http://www1.sudhirnetworks.com/ecard/sudhir_holidaycard_clickhere.jpg" style = "width: 560px;" mc:label = "postcard_image" mc:edit = mc:allowtext "postcard_image" / >
    < div mc:edit = "std_content00" >
    < Facilities > < strong > custom message goes here.


    < / div >
    < table >
    < /tr >
    < /table >
    <!-/ / end of Module: Content Standard postal card------->

    < table >
    < /tr >
    < /table >
    <!-/ / end of model body--->
    < table >
    < /tr >
    < /table >

    < table >
    < /tr >
    < /table >
    < /Center >
    < / body >
    < / html >
    ';

    l_from: = lower(:app_user) | Lower('@sudhirnetworks.com');

    () apex_mail. Send
    p_to = >: P1_TO,.
    P_FROM = > l_from,.
    p_body = > l_body,
    p_body_html = > L_BODY_HTML,
    p_subj = >: P1_SUBJECT);

    APEX_MAIL. PUSH_QUEUE;

    END;


    Please suggest me how to solve this problem.

    Thank you
    Sudhir

    Sudhir_Meru wrote:
    I'll add the message in the body, the question do face is now with html code. Please address this question. not the text of the aircraft.

    Please read carefully the answers before answer you.

    Trent has clearly mentioned that you must fill in the p_body parameter

    And also read the documentation for the parameters for the send procedure

    You must pass a value in p_body and it's not question of what format you want to send your email.

    See you soon,.
    Vikram

  • Interaction with the existing HTML content - how?

    I'm treying to build a Facebbok connect app that will enter the name and email address of FB and then complete a subscription by email automatically.

    I got the job part of Facebook. Because I don't know how to add the element of form within the EA I have it in the HTML code I create before staring with EA.

    The form code is:

    " < form action =" http://someUrl.list-manage.com/Subscribe/post "method ="post"> "

    < input type = "hidden" name = "u" value = "33a31e512f3b54d8f0db234f6" >

    < input type = "hidden" name = "id" value = "40ecd723418" >

    "< input type ="text"name ="MERGE1"id ="MERGE1"size ="25"value =" * | MERGE1 | "*" class = "edgeLoad-EDGE-467457915" / >

    "< input type ="text"autocapitalize ="off"= automatic correction 'off' name ="MERGE0"id ="MERGE0"size ="25"value =" * | MERGE0 | "*" class = "edgeLoad-EDGE-467457915" / >

    < input type = "submit" value = "Subscribe" class = "edgeLoad-EDGE-467457915" / >

    < / make >

    I can see the fields in the EA and move

    However, I can not pass values to the fields.

    For example, for text with id: MERGE1 I am doing

    S('MERGE1').html ("value"); but he throws and error at run time. I guess since creation EA MERGE1 out I need to reference another way.

    But how?

    So 2 questions:

    1. how to reference items that are found in the existing HTML code from within the EA (as in the above case)?

    2. how to create the entire form inside the EA?  I know how to do the input elements, but not the form element.

    1. how to reference items that are found in the existing HTML code from within the EA (as in the above case)?

    You can use the notation of jQuery to select an existing element. If the element has an ID, then it is very simple to do:

    $("#theElementID")

    There are certainly other ways to select items, in the case where using an ID is not practical. See this page for more information: http://api.jquery.com/category/selectors/

    As an example of using your code above, you can change the value of the entry of text MERGE1 by adding jQuery something like this as a trigger on board animate:

    $("#MERGE1").attr ('value', 'Text');

    2. how to create the entire form inside the EA?  I know how to do the input elements, but not the form element.

    You can add HTML content dynamically using jQuery, most probably using either using the. append() or. prepend().

    See this page for info: http://api.jquery.com/category/manipulation/dom-insertion-inside/

  • DPS HTML content

    Hi, I am using the HTML content but a problem.

    I am creating interactive content where you can fill in some fields (exercises), I hava a javascript file where to check your answers and whether exercise is good or bad. The problem is when you tap the fied to fill. I had a div with a width of 500px avoid the content to scroll, but his does not work. When you touch it, you can scroll horizontal and vertical.

    Can someone helo me with this problem. Is there a way to correct the content in the InDesign container. PS. I tried the scale to fit.

    Thank you.

    Hello

    Make the frame slightly larger than your content HTML web content and must have your frame does not scroll. Do not select the scale to fit.

  • Pop Up with HTML content

    Hello

    I have the following requirement to achieve. Please let me know if any of you have a solution for this.

    The requirement is:
    User click on the PRINT (this is an af:commandButton) button. When the user clicks this button, the... managed bean we prepare the HTML content. And then a pop up should get opened with the prepared HTML content in the managed bean. And we do not want to use, in this case adf:popUp. Because the content should be displayed in the popup browser(IE/MOZILLA).
    Content will be < reports > list. And we want to separate each report by a page break. So, it should be as follows.
    > Open a popup.
    > Report 1
    > Page break
    > Report 2... etc.

    I would like to know if the question is unclear

    Thank you and best regards,
    Kiran kristelle

    Put an af:outputText in the pop-up window and set its value to the HTML of the managed bean its escape property set to false.

  • The images are not display with html content in browserfield

    Hi friends, I am display local html content in the browserfield. It is are display fine but pictures are not display is also local resources stored in the project. I use jde 5.0. Whats to display pictures.

    After so much, I solved it and the images are displayed correctly. I had the habit now of base64 class and image data are passed to the base64 format.

  • Embedded video does not play in the field of browser on os 5.

    Hi all

    I tried to play a video embedded in the field of the Navig. It has worked well in the Simulator. But does not work in the real aircraft. I use 8900. When I open the url in the default browser in 8900 its works perfectly. Y at - it all nedded field of browser settings play audio or the embedded video?

    Am the url is http://devweb.wizzpers.com/chat/seewizzper/wizzperid/30305

    Another problem is the time for video playback in the default browser for the blackberry 8900. When I tried the same thing in android and iphone taking 7-8 seconds to play. But 8900 takes 45 to 60 seconds.

    My code snippet is as shown below

    VerticalFieldManager browserManager = new VerticalFieldManager();

    BrowserField browser = new BrowserField();

    browserManager.add (browser);
    browser.requestContent (url);

    Add (browserManager);

    Any idea about this problem?

    Thanks in advance.

    Sujith.

    I am able to reproduce this problem.  It is caused by a problem with the BrowserField himself.  I don't have a work around for this when using the BrowserField.  You could launch the browser to display the page or play the video directly in your application using the player class.

    Our development team is aware of this problem, which should be resolved in a future version of BlackBerry Device Software.

  • images of the SSL vpn-html-content filtering

    Hello

    I'm trying to do content filtering via ssl VPN (clientless) on ASA 5505

    Above command is supposed to block anything with the html img tag, but it seems not to do.

    # sh run Group Policy

    Group without internal customer-grp-policy policy

    attributes without customer-grp-policy-group policy

    value of server DNS 8.8.8.8

    VPN-tunnel-Protocol webvpn

    Split-tunnel-policy tunnelall

    WebVPN

    bookmark URL-list value

    filtering the content-HTML-java images cookies

    SVC request to enable default webvpn

    #sh run tunnel-group

    Remote clientless-tunnel tunnel-group type

    attributes global-tunnel-group clientless-tunnel

    without client group policy - by default-grp-policy

    tunnel-group clientless-tunnel webvpn-attributes

    Group-alias clientless-alias enable

    What I'm missing here? or am I just misunderstood how it works?

    Thank you!

    Hello

    How it works for you?

    HTML-content-filter

    Thank you.

    Portu.

  • Empty browser page displaying html/swf exported in Indesign

    We have created a "flip book" in Indesign and exported as a swf and html docs. These documents both to display correctly locally, but when uploaded in the same directory on our server and accessed via safari or chrome, they both appear in the pages of empty browser.

    HTML page is here: http://www.thinktankcd.com/SmartsquareBrochure_030215_test.html

    No idea what we have done wrong?

    InDesign CC 2014 OSX10.9.2

    Scratch this issue, it has nothing to do with the swf or html, this is the URL that was wrong!

  • In the html content of dps, it has a url link to a pdf file. When click on url to load the pdf file, the zoom does not work

    I load html content in an application of dps.

    In the html page, there is a url to a pdf file. When I click on the url, the page loads a pdf file.

    Here's the question: is able to zoom in pdf?

    It's difficult because I can zoom in the first html page, but when I load a pdf file, zoom effect does not work.

    Please let me know if this is a way to make the pdf was able to zoom in.

    Thank you

    Post edited by: monsteryu

    No, this is not possible.

    Neil

  • Need Flash submenu to overlap HTML content

    I have a Flash header with a menu item which descends from a submenu and resumes a 200px additional more or less space. I need the menu to overlap the HTML content below without having to make the largest SWF file, because all would push down. Is there a way to do this?

    Thank you.

    IIRC, you need make the largest SWF, together, it's wmode to transparent, and the content below negative margin ghetto it upward in the swf file.

    HTH

    -Ted

  • Change of HTML content with a persistent Navigation SWF (always busy)

    I need to develop a site with navigation SWF file that modifies the contents of an HTML page, WITHOUT reloading itself and lose its current state.

    Is what I think I should do to have smooth transitions of keep the swf file loaded, while having, it changes the contents of the page below it.

    I have complex to include in pages html content that is not supported by the tags available in the dynamic Flash text boxes. I looked at the idea of iframes, but I don't know how to load iframes using flash, or how to use it without refreshing the page.

    Any help is appreciated, thanks!

    iframes would be the easiest option.  you target the framework with the 2nd parameter to the getURL() function.

  • Hide the download link of file browse point

    Hello.

    How can I hide the download link of file browse point, we show that when the article is not empty?

    Question for apex 3.2.

    Hello

    APEX 3.2 there is no declarative switch to do so. You should use JavaScript to remove the download link.

    APEX 4.0, the item type of "Browse file" has a new attribute 'Display Download Link' in which you can define if you want to view the download link.

    Concerning
    Patrick

Maybe you are looking for

  • Anti virus companys.

    I remember when I am gone from Norton to McAfee Mozilla me asked my new antivirus company and I replyed McAfree. Now, I've changed from McAfee to Norton and me, nothing would change anything. I've searched and can't find anything tell me how to go ba

  • Not closing of Firefox

    When you exit Firefox, I get a message saying that you must close firefox but I have already left the application. If I turned off the PC and put back me in, Firefox allows me to get back in. If I don't stop I get the message and cannot get back into

  • Realtek RTL8187B is not recognized Vista - Satellite Pro L300

    Hello I have a Toshiba Satellite Pro L300. It came with vista but I upgraded to 7.Now I have installed Vista with all the drivers but there is a problem, the wireless card does not work (RTL8187B) I get to a point that the Device Manager recognizes i

  • EliteBook 2170p: administrator BIOS password reset

    I bought a used laptop on ebay and installed Windows 7 above. I am able to use it very well. But the BIOS is protected by an administrator password that I can not understand how to clear. I tried to reset/reinitting but TPM module which has not helpe

  • HP USB 3.0 SuperSpeed PCIe x 1 card does not install on HP 8200 Elite SFF

    I buy the HP USB 3.0 Super speed PCIe x 1, QT587AA card. I have istalled the card in a HP 8200 Elite SFF, Windows 7, 64 bit. Connected to power auxiliary esata. After installing the drivers from the CD, I get a message from ball of Windows indicating