HTML rendering in the field

Hello!

I need to a simple deposited with ability to render html. I want him to have a method like setHtmlText(String htmlText) or smth. The built-in browser control meets my needs.

Pleasegive me an idea how to have done;

Thank you everyone for help! Found the solution here http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/796557/800332/800440/...

Tags: BlackBerry Developers

Similar Questions

  • How to display the Html string into the field

    Hi guys. IM using Eclipse with jre 4.5.

    I need display text html (example"

    a text
    other tags... ")

    This text, I have to a String. I've read a lot of forums about this but never found.

    Can someone help me?

    Im trying using the browser, but it is not good... It hide my application and display the content (or a link such as "Google.com").

    I have to show this text in the field, with other areas.

    Help me please.

    Best regards, Peter.

    Thanks for the answer. But browserfield not supportede on 4.5. Is support for 5.0 +.

    While I do? (

  • 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.

  • Simple HTML code in the field of the screen

    Hi guys,.

    I read so much discussions on BrowserField, HTML etc but can't find a simple way to match my needs. I want to just use an html tag in my area of screen like this:

    Hello World!
    

    I do not want to use complex as ways HttpConnection or call a browser etc., please help me!

    for some new to bb like me guys

    public void showHTML(String p_strHTML)
        {
            try
            {
                MyThread thread = new MyThread(p_strHTML);
                thread.start(); 
    
            }
            catch(Exception e)
            {
            }
        }
    
         private static class MyThread extends Thread
        {
            String m_strHTML;
    
            public MyThread(String p_strHTML)
            {
                m_strHTML=p_strHTML;
    
            }
    
            public void run()
            {
                try
                {
    
                    ByteArrayOutputStream output = new ByteArrayOutputStream();
                    Base64OutputStream boutput = new Base64OutputStream( output );
    
                    output.write( "data:text/html;base64,".getBytes() );
                    boutput.write( m_strHTML.getBytes() );
                    boutput.flush();
                    boutput.close();
                    output.flush();
                    output.close();
    
                    BrowserSession bSession = Browser.getDefaultSession();
                    bSession.displayPage( output.toString() );
    
                }
                catch( Exception e )
                {
                    System.out.println( "Exception: " + e );
                }
            }
        }
    
  • Addition of HTML in the field of data entry of Client Application

    4.2 my users was previously able to enter standard html controls in a field that is displayed in a single application read for other users.

    Title: < b > Welcome > < /b > enterd by user in the form and recorded in the database.  Then another application pulls from the database to display information only.

    4.2 welcome not appear "BOLD", but with the html tags before and after the welcome.

    Joined the 4.2

    4.2 displayed

    Entered in 4.1

    Posted in 4.1

    This user has used this application for many years and a lot of html embedded in its text.  I am hoping that there is a quick fix here.  Any help would be appreciated.

    Thank you.

    Joyce

    Change the report columns display "Display (escape special characters) text" Type to "Standard report column.

    You can do it, but you must be aware of the security implications that opens upwards (i.e. XSS attacks).

  • need help on submit action when the form in HTML rendering

    When the FORM is rendered in HTML format, the Send button does not work,

    Here are the steps I performed in my existing XDP form.

    (1) added a button to the XFA object form dom

    2) gave the following properties for the button send in the object palette

    (a) selected the Type of Contron as run

    (b) gave a REST breakpoint in the Button property

    data packet XDP Selected c) as the type of shipment

    (d) selected UTF-8 as the type of coding of data

    3) I made the form in the browser (not in the workspace container), but by directly applying the profile with the url XFAFORMS http://localhost: 8080/lc/content/xfaforms/profile/default/html? contentRoot = repositor / / / pat h to the XDP file & template = file name

    (4) by clicking on the button send the form, the following error is thrown, please let me know where I'm wrong in the approach to invoke a REST call the end point of process

    "Error 500: DSCError: ComponentID = DSC ErrorCode = 122 MinorCode = 0 = parameter Input Message: {2} not found on the operation: {0}. {1} ErrorMessage: input parameter: {2} not found on the operation: {0}. {1}.

    Greetings-

    Ashok D

    Guys, the reason I was not able to send my form to the endpoint process was because I had designed the process to take an xml as input by the formData variable name, and it seems that the invocation of the REST of the HTML form sends the data as a map of the string.

    I changed my process to make a map as input as input instead of XML parameter and recovered the form data in the plan in the process.

    Steps of the

    (1) create a process with a variable of type of strings as input sheet

    (2) create your form and include the http submit button and provide the url of the endpoint REST as input for the button send or include a simple button and select the category that submit and provide the necessary entries in the tab submit.

    (3) in the process, use an execute event and get the value of the input as a string with the following expression data

    Map[@data]

    (4) converts the string into XML and use in your process.

    Greetings-

    Ashok D

  • Color of the text in the HTML text for the hyperlink field

    In a pure AS3 project, I have a field of dynamic text with 2 hyperlinks (onelink call a URL via href, in the Middle, one at the end to call a visible closing function = false, the field).

    I use the tags < u > < / u > with < a >, but when I try to turn on the Blue hypertext links (#0x0000FF) using the < font color = "#0x0000FF" >, nothing happens. The Adobe livedocs still show the tags do, including the color for Flash and AIR.

    For example, if I use the tag are, the following displays, point stressed and don't link works OK, but no color change.

    textfield1.htmlText = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor <a href='event:xyz.com'><u><font color:'#0x0000FF'>xyz.com</font></u></a>incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
    

    The color tag are still working or it was amortized?

    Any help appreciated.

    Which doesn't seem to be a properly written html tag (nor the color code) for the police.  Try:

  • Single registration form: the fields display whose width is bad

    I'm ask fields on a single form of registration and notice that the width of the fields is displayed when I run the shape is less than the width I specified on the page 'Edit Item Page. Here are 3 examples:

    field 1: display as text, Width = 100, maximum width = 100 =, == > width poster = 76
    area 2: display as text, width = 50 =, Maximum width = 50, == > width poster = 46
    field 3: display textarea width = width = Maximum 100 = 100 == > width = 100 poster

    Anyone know why this is happening? I try formatting so that it has a pleasing appearance. It is difficult to get aligned fields when they are not displayed according to the specified width.

    Published by: Lieutenant Commander on August 9, 2012 15:21

    Hello
    >
    I'm ask fields on a single form of registration and notice that the width of the fields is displayed when I run the shape is less than the width I specified on the page 'Edit Item Page. Here are 3 examples:

    field 1: display = text, Width = 100, width = 100, ==> displayed width = 76
    area 2: display = text, width = 50, Maximum width = 50, ==> displayed width = 46
    field 3: display = textarea width = width Maximum 100 = 100 ==> displayed width = 100

    Anyone know why this is happening? I try formatting so that it has a pleasing appearance. It is difficult to get aligned fields when they are not displayed according to the specified width.
    >
    Setting the width of the Page element sets the attribute 'size' of the input elements. Rendering HTML based on the size attribute is not a precise that you need. You must use CSS for accuracy. See Compatibility Notes

    See you soon,.

  • How can I find the field 'Other' in my Thunderbird contacts?

    I imported my Yahoo contacts into Thunderbird. All my keywords were in the 'Notes' field in Yahoo. After import in Thunderbird, it ended up in the field 'other '.

    When I go into the search tool, it lists all of the searchable fields. 'Other' is not included. Is it possible to search for 'other '? Or is it possible to import the contacts in a way that lands the Yahoo 'Notes' in a searchable field?

    Thank you!

    I think it's this add-on you want to https://nic-nac-project.org/~kaosmos/morecols-en.html

  • Why Firefox Add autocomplete = "off" for the fields of connection of my own web site?

    First of all: it's my own website, my own HTML code.

    When I look at the source code for my login form (both on my server and delivery to the browser), there is no autocomplete = "off" attribute it.

    And yet, when I look at the field using FireBug, I see that autocomplete = "off" there is in the DOM. It is applied to the fields "username" and "password" for me. Thank you, Lord for security mystery!

    Therefore, I can't use the stored credentials of the security apparatus to fill out the form.

    Does anyone know where this attribute is added and how to disable that?

    Again, this is my own code. Thank you!

    You can post a link to a page accessible to the public that doesn't require authentication (signature)?

    Note that scripts can also add such an autocomplete attribute, you should maybe check the generated code or right-click in these areas and use 'Inspect element' or select the fields and use the selection "View Source" from the context menu.

  • It is no longer possible to fill in the field "year" (Dutch: "jaar" with a date "1600" or an earlier version.)

    I used to fill in the field "jaar" with the date of origin of a piece of classical music. Many years before 1600 original parts. I spent many hours to fill the years because I have som 35000 tracks in my library. 2015 they was tgo is no longer possible to fill a date prior to 1600. Even worse: all already filled dates are missing.

    I ask reinstall the opportunity.

    lvhout wrote:

    I used to fill in the field "jaar" with the date of origin of a piece of classical music. Many years before 1600 original parts. I spent many hours to fill the years because I have som 35000 tracks in my library. 2015 they was tgo is no longer possible to fill a date prior to 1600. Even worse: all already filled dates are missing.

    I ask reinstall the opportunity.

    Lvhout,

    You seem to be the first person to notice him, but I just tried with iTunes 12.3.2 and found the same problem.

    You can send comments directly to Apple at this link:

    http://www.Apple.com/feedback/itunesapp.html

  • The field as Native SMS inbox list...

    Hello everyone...

    I made a request message in which I created an Inbox using the list field... I get 3 problems in that:

    (1) I stated the height equal to 40 before that I have to draw any text in the field and when I draw the text I followed it by a line to separate the two elements. His work well except for the first item whose row height does not change, and neither the line is drawn after...

    (2) Secondly, I want to have things in order, the latter comes on top... right, the opposite... How do I do that?

    (3) Finally, I wanted to know we can create our field list similar to the SMS Inbox native blackberry?

    Here's my code for the ListCallback for the list:

    class ListCallback implements ListFieldCallback {
    
    private Bitmap _rImage;
    private Bitmap _urImage;
    private Vector listElements = new Vector();
    private String cpa = "flse";
    
    public void drawListRow(
    ListField list, Graphics g, int index, int y, int w) {
    w = Graphics.getScreenWidth();
      if (list.getRowHeight() != 40) {
    
          list.setRowHeight(40);
        }
    
    _rImage = Bitmap.getBitmapResource("read.png");
    _urImage = Bitmap.getBitmapResource("unread.png");
    
    String texti = (String)listElements.elementAt(index);
    int ind = texti.length() - 4;
    
    String check = texti.substring(ind);
    String text = texti.substring(0,ind);
    
    System.out.println(list.getRowHeight());
    if(check.compareTo(cpa) == 0){
    
    g.drawBitmap(0,y,30,30,_urImage,0,0);
    g.drawText(text, 31, y, 0, w);
    
    g.setColor(Color.LIGHTGREY);
    int yPos = y - 2;
    g.drawLine(0, yPos, w, yPos);
    }
    
    else
    {
    g.drawBitmap(0,y,30,30,_rImage,0,0);
    g.drawText(text,31, y, 0, w);
    }
    g.setColor(Color.LIGHTGREY);
    int yPos = y + 30;
    g.drawLine(0, yPos, w, yPos);
    
    }
    
    public Object get(ListField list, int index) {
    return listElements.elementAt(index);
    }
    public int indexOfList(ListField list, String p, int s) {
    return listElements.indexOf(p, s);
    }
    public int getPreferredWidth(ListField list) {
    return Graphics.getScreenWidth();
    }
    public void insert(String toInsert, int index) {
    listElements.addElement(toInsert);
    }
    public void erase() {
    listElements.removeAllElements();
    }
    }
    

    Help, please!

    Thanks in advance...

    Yes. You can use the graphics class to control how each line is drawn.

    check http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/ui/Graphics.html

    for example, you use:

    drawBitmap to paint a small icon on the first 32 pixels

    drawText to draw text on pixel 40 - xxx

    drawBitmap to paint another icon on the right side

    You can find samples for implementations listfield on the basis of knowledge and forums.

  • Images in the field of the list does not

    Hello

    I create a list field that contains 10 lines and four fields in each line. The first field is the field of the image. But the image does not come. Other three fields (label field) do very well. I use the simulator of 4.7 and 9530.

    I give my code here also. Please help me.

    class TaskListField extends ListField implements ListFieldCallback {
         private Vector rows;
         private Bitmap _mReceiveAmount;
         private Bitmap _mSentAmount;
        private boolean hasfocus=false;
    
         public TaskListField() {
          super(0, ListField.MULTI_SELECT);
          setRowHeight(60);
          setEmptyString("It is Empty!", DrawStyle.HCENTER);
          setCallback(this);
    
          String images[]={"amount_received.png","amount_sent.png"};
    
          _mReceiveAmount = Bitmap.getBitmapResource("amount_received.png");
          _mSentAmount = Bitmap.getBitmapResource("amount_sent.png");
          BitmapField bitmap;
    
          rows = new Vector();
    
          for (int x = 0; x < 10; x++) {
           TableRowManager row = new TableRowManager();
    
           // SET THE  BITMAP FIELD
           // if amount received, display bitmap
         //  if (x % 2 == 0) {
            //bitmap=new BitmapField(_mReceiveAmount);
            row.add(new BitmapField(Bitmap.getBitmapResource(images[0])));
          //}
           // if amount is sent, set bitmap
           //else {
           // bitmap=new BitmapField(_mSentAmount);
              // row.add(new BitmapField(Bitmap.getBitmapResource(images[1])));
          // }
    
           // SET THE DATE LABELFIELD
    //
           LabelField _mDateField = new LabelField("OCT 10,2010", DrawStyle.ELLIPSIS);
           row.add(_mDateField);
    
           // SET THE LIST NAME
           row.add(new LabelField("Details" ,DrawStyle.ELLIPSIS) {
            protected void paint(Graphics graphics) {
             graphics.setColor(0x00878787);
             super.paint(graphics);
            }
           });
    
           // SET THE DUE DATE/TIME
           row.add(new LabelField("$220",DrawStyle.ELLIPSIS | LabelField.USE_ALL_WIDTH | DrawStyle.RIGHT) {
            protected void paint(Graphics graphics) {
             graphics.setColor(0x00878787);
             super.paint(graphics);
            }
           });
           rows.addElement(row);
          }
          setSize(rows.size());
    
         }
    
         // ListFieldCallback Implementation
         public void drawListRow(ListField listField, Graphics g, int index, int y,int width) {
    
            // g.drawBitmap(0, 0, _mReceiveAmount.getWidth(), _mReceiveAmount.getHeight(), _mReceiveAmount, 0, 0);
             TaskListField list = (TaskListField) listField;
    
             TableRowManager rowManager = (TableRowManager) list.rows.elementAt(index);
             rowManager.drawRow(g, 0, y, width, list.getRowHeight());
         // g.drawBitmap(0, 0, _mReceiveAmount.getWidth(), _mReceiveAmount.getHeight(), _mReceiveAmount, 0, 0);
         }
    
         public class TableRowManager extends Manager {
          public TableRowManager() {
           super(0);
          }
    
          // Causes the fields within this row manager to be layed out then
          // painted.
          public void drawRow(Graphics g, int x, int y, int width, int height) {
           // Arrange the cell fields within this row manager.
           layout(width, height);
    
           // Place this row manager within its enclosing list.
           setPosition(x, y);
    
           // Apply a translating/clipping transformation to the graphics
           // context so that this row paints in the right area.
           g.pushRegion(getExtent());
    
           // Paint this manager's controlled fields.
           subpaint(g);
    
           g.setColor(0x00CACACA);
           g.drawLine(10, 0, getPreferredWidth()-10, 0);
    
           // Restore the graphics context.
           g.popContext();
          }
    
          // Arranges this manager's controlled fields from left to right within
          // the enclosing table's columns.
          protected void sublayout(int width, int height) {
           // set the size and position of each field.
           int fontHeight = Font.getDefault().getHeight();
           int preferredWidth = getPreferredWidth();
    
           // start with the Bitmap Field of the priority icon
           Field field = getField(0);
           layoutChild(field, 32, 32);
           setPositionChild(field, 10, 20);
    
           // set the task name label field
           field = getField(1);
           layoutChild(field, 120, fontHeight + 1);
           setPositionChild(field, 70, 3);
    
           // set the list name label field
           field = getField(2);
           layoutChild(field, 150, fontHeight + 1);
           setPositionChild(field, 190, 3);
    
           // set the due time name label field
           field = getField(3);
           layoutChild(field, 150, fontHeight + 1);
           setPositionChild(field, preferredWidth - 172, 3);
    
           setExtent(preferredWidth, getPreferredHeight());
          }
    
          // The preferred width of a row is defined by the list renderer.
          public int getPreferredWidth() {
           return Graphics.getScreenWidth();
          }
    
          // The preferred height of a row is the "row height" as defined in the
          // enclosing list.
          public int getPreferredHeight() {
           return getRowHeight();
          }
         }
    
         public Object get(ListField listField, int index) {
          // TODO Auto-generated method stub
          return null;
         }
    
         public int getPreferredWidth(ListField listField) {
          // TODO Auto-generated method stub
          return 0;
         }
    
         public int indexOfList(ListField listField, String prefix, int start) {
          // TODO Auto-generated method stub
          return 0;
         }
    
         public void onUnFocus(){
             hasfocus=false;
             invalidate();
    
         }
    
    }
    

    your code is quite a mess, and you probably have a misconception on the listfield.

    in drawListRow you paint directly the object to the line. no need to use fields or similar, graphics methods.

    If you have different objects in your listfield you need to branch in your drawListRow method (if bitmap instanceof object etc.).

    your brief description, it appears you want to have the bitmap in the same line as your other information.

    create a bean with the attributes class, that you need, including the bitmap.

    put objects of beans in your listfield and the data structure (vector).

    drawListRow check that it is a bean and draw it.

    for example (rough code, no control null etc.):

    drawBitmap (0, bean.getBitmap ());

    drawText (bean.getBitmap (.getWidth () + 5,) bean.getText ());

  • How to change the height in table of the field of Bitmaps

    Dear developers BB,

    I work with a table of the field (3 x 3) whose I am filled with bitmap images.

    I loaded all 9 images successfully, but I don't know how to resize the height of the lines if the pictures would be good.

    Any help would be greatly appreciated.

    Code snippet:

    In the main routine:

    Field [] [] tableContent = new field [3] [3];

    tableContent [0] [0] = new BitmapField (TopLeft);

    ...

    tableContent [2] [2] = new BitmapField (BotRight);

    int [] width = {40, 40, 40};

    paddings of int [] = {20,20,20};

    Screen.Add (new TableListField (tableContent, widths, paddings));

    pushScreen (screen);

    outside the main routine...

    private final static Bitmap TopLeft = Bitmap.getBitmapResource ("topleft.jpg");

    ...

    private final static Bitmap BotRight = Bitmap.getBitmapResource ("botright.jpg");

    class TableListField extends ListField

    public TableListField ([] [], int [] columnWidths field content,
    int [] horizontalPaddings)
    {
    numRows = contents.length int;

    Create a line for each line.
    _rows = new TableRowManager [numRows];
    for (int curRow = 0;  curRow< numrows; ="" currow++)="">
    _rows [curRow] = new TableRowManager (happy [curRow]);
    }

    _columnWidths = columnWidths;
    _horizontalPaddings = horizontalPaddings;
    setSize (numRows);
    setCallback (RENDERER);
    }

    I imagine that your RENDERING engine takes three images for each line and displays those all the row using a drawBitmap (...) for each?

    In any case, the height of the row in the ListField is controlled by the ListField.setRowHeight () method.  You probably want to replace this:

    Screen.Add (new TableListField (tableContent, widths, paddings));

    with

    TabList TableListField = new TableListField (tableContent, widths, paddings);

    tabList.setRowHeight (TopLeft.getHeight () + 1);

    Screen.Add (tabList);

    I hope this helps.

  • Fill in the fields on the page loading

    The loading of the page, I like fill some fields to the result of a function and some fields to a sql query like

    SELECT LOGIN_DATA FROM APEX_TABLE WHERE LOWER(LOGIN_NAME) = LOWER ( NVL(V('APP_USER'), USER) ) ;
    

    I tried with processes and calculations. The calculation was before footer, but the fields are not filled.

    I use Apex 4.1 with the db 11 GR 2.

    Hi Wucis,

    Try a process "After Header".

    Write your "select into", something like:

    Select login_data

    in: P1_LOGIN_DATA

    of apex_table

    where the...

    Of course your page P1_LOGIN_DATA Articles needs to exist.

    I also suggest writing your process (PL/SQL) as a PL/SQL block, then beginning by BEGIN and ending with the END. This gives you the ability to make exceptions...

    It will be executed before the page is rendered, but after on the parameters that you have (possibly) linked through another page (through a URL).

    I hope this helps...

    Roeland

Maybe you are looking for

  • How can I show only URLs typed in the form of Top Sites?

    It is really unpleasant to see hundreds of ephemeral URL you visit never again on the screen in Top Sites. Is there a way to make this friendly so I don't see the URL I typed. I am happy to put something to the: config.

  • Symbol "Do Not Enter" appearing on the gray splash screen

    Hello I went to start my MBP 2010 with 4 GB of ram and a 240 gb SSD (installed in January) and I get a symbol as a symbol of the "no entry". I can't get around that. I tried the PRAM reset. I can't imagine it being the SSD as it is practically new an

  • How to uninstall a program with viruses

    Hello I bought a laptop 15-n228us Pavilion with Windows 8.1 in April. Several weeks ago, I searched for Microsoft Photo Editor, I've included in the Start Menu, somehow, I was guided to a site for free download. To make a long story short, I accident

  • is there a way two mouse can be used on the same desktop

    I would like to be able to connect a wireless mouse and a usb mouse.  One for a user of the left hand and the other for a user with the right hand on the same desktop.  Is there a way. Thank you

  • Synchronization of Smartphones from blackBerry BBStorm and portable

    When I synchronize my phone with my laptop two things have occurred: (1) my notifications of recall in my laptop seem to become uncontrolled 2) disappears from the history of my calendar in the laptop I use MS Outlook.