Field in the list with 2 columns

I am creating listfield with two columns as follows [2 |]  Cokes].

There is an example on how to do this?

There is an article on the basis of knowledge to developers to add checkbox to a field, but I don't see anything on the creation of several columns.

Maybe I can get away with adding a field of text instead of a checkbox or have two fields next to the list and sync.

any suggestions?

ListField on nature has a great column.

You can override drawListRow() to ListFieldCallback to divide each row number of columns.

In this case, you will need to control the width of each column using the class font getAdvance() method that returns the width of the displayed string. And if you combine graphics and text in columns, you will need to also use getWidth() instance method of the Bitmap class to calculate the width of each column.

Tags: BlackBerry Developers

Similar Questions

  • the list with table.column package

    Hello

    How to know if a package of database uses table.column.
    Ex: list of all packages that use emp.ename



    Thank you
    Sandy

    Sandy,

    Try this

    select * from user_source
    where upper(text) like '%COL_NAME%'
    

    Maybe it's not 100% way to get your results, given that the procedure might have select * from table_name, otherwise you could get lines, which are similar column name.

    SS

  • Select the list with doSubmit ('SAVE')

    Dear members,

    Please do not kill me for that matter...

    I use APEX 2.1.0.00.39 delivered with XE. What I need is a list of selection within a form region indicating the content of a source LOV which is a column of data. If the select list is replaced by another value, it should initiate a doSubmit ('SAVE').

    I tried the list with submit - did not work. I tried to change the STI to a selection list and:
    HTML Form Element Attributes: javascript:doSubmit('SAVE');
    But both times the result I have the same thing: when I change the select list of another element, the form is committed, but after reviewing it, the original of the select list item is selected again...

    What I am doing wrong?

    Best regards
    Johann

    Hi Johann,.

    The parameter must be defined:

    onchange="javascript:doSubmit('SAVE');"
    

    What are the parameters of complete Source, you have for the item? You use any calculation a process on the question?

    Andy

  • 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 ());

  • ORA-01481 when we click on the report with link column.

    Request Express 3.1.0.00.32

    I have a sql on a form page report with a column that clickable allowing the end user to quickly change the values.
    I seem to have is because there is a mask of format on the column ($1234,56) I get the error
    ORA-01481: invalid number format model
    Unable to fetch row.
    Googling the error came up with "check your manual.

    Under format of date column / number, I'm using the following:
    FML999G999G999G999G990D00
    The column in the database is number (15.2)

    The only value I'm passing is the pk_id which is present in the case of the URL:
    http://...f?p=293:2:3616213833707847::NO::P2_PK_BUDGET_ID:1
    Anyone had this problem and if so found a work around?
    Thank you.

    Leland,

    The error was caused by apply you the mask of YYYY format a number field. I changed a switch of dates for a list of selection and gave you an LOV query that would give you the current year, the last 3 years and the next two years. You can adjust that, according to the needs. I also put the definition LOV to accept other values incase you had a value in the db that was not in the LOV I've defined.

  • Select the list with a shipment does not save to the database

    OK, I have a form with several fields (text, radiobox, selection list, display text). I have one of these lists of selection fill a display in the text field. When I chose a selection of the selection list, she filled the screen in the text field with the correct information but erased all the other information that was the inscription in the other fields. I searched the forum and found that the selection list should be a selection with mailing list and the branch page on itself, which works, but now these 2 fields information is not saved in the database. All other fields are saved, but not both. Anyone know what im missing? Thank you

    Deanna

    Hi Deanna,
    First the display as a text cannot insert data into the database. It can only display data from database. I guess you do not want the user to enter these areas, and that's why you use display as text field.

    There is a good way to resolve this situation. Say, you have 3 select list P1_ITEM1, P1_ITEM2, P1_ITEM3 in your page. For the change of P1_ITEM1 the screen Select the list and the LOV type in your query, assuming you want the value to be retrieved from a table. Therefore, type-

    Select emp_id, ename from emp;

    type the default value and null -1 and display null YESvalue. Make sure that under the type of source, you have the selected with the correct name database column.
    for P1_ITEM2 to the section LOV retype your query - i.e.

    Select mng_id, executive pay where emp_id = NV('P1_ITEM1') or NV ('P1_ITEM1') = 1

    Basically, this statement updating the data in the list select second after the first selection. type the default value and null -1 and display null YESvalue. Make sure that under the type of source, you have the selected with the correct name database column.

    Do the same for the third. It should work fine.

    I hope this helps.

    Kind regards

    Pascal M
    http://Tajuddin.whitepagesbd.com

  • Select the list with the list of dynamic values with more than 4000 tank of query

    Hello

    I have no application where users can store SQL queries in a CLOB column. This query is then used to populate the list, select a dynamic element through LOV. Following the code returns the query for dynamic LOV used to populate the select list. It works fine except when the length of the lv_sqlStatement becomes more than 4000 characters. Then application crashes with "ORA-06502: PL/SQL: digital or value error: character string buffer too small" when Select the list item rendering.

    Any ideas how to get around this problem? Any help is appreciated. Do not say to them to write shorter than 4000 queries because I can't (it's operational requirements).

    DECLARE
    lv_sqlStatement end_user_set.sql_statement%type;
    BEGIN
    lv_sqlStatement: =: P2_SQL_STATEMENT;
    return ' select the label, value of (' | lv_sql_statement | t ')
    To_char (t.value) if not in (select value from end_user_set_member eusm)
    where eusm. EUSRSET_ID = ' | : P2_EUSRSET_ID | ')';
    END;

    I just blogged about this problem and posted a solution. See this announcement:

    http://www.deneskubicek.blogspot.de/2013/03/select-list-with-dynamic-lov-and-Ora.html

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    http://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • Select the list with propose pulling the values of %

    Hi all

    I have a tabular presentation of data app and from views of the choices selected in the 'list of selection with submit' the post, it works very well for the chosen values, when I choose '%' I want to display all existing records in the form of tables, but instead he said: "no data found". How to solve this? Kindly help and advice.

    ex:

    Query tabular-

    Select a, b
    table
    When a type: POINT

    Agenda:

    Type: select the list to submit
    Named LOV:
    Select a d, a r
    from table_recherche by 1

    Receive your answer.

    Thank you and best regards,
    Senana

    Hello

    You have to check what is the value returned by the selection list when you select '%' in the select...
    There is a null value to display field where you can enter '%' and the return NULL value you enter 0

    then change your query in a table
    Select a, b from table when one like: POINT GOLD: ITEM = 0

    Kind regards
    Shijesh

  • Deleting line field in the list

    Hi all

    I use ListField and a menu item to remove the line of list field. Line painting is made by ListFieldCallback drawListRow. The list is created by reading a persistent storage and insertion of data in the list below.

    for (vecCounter = 0; vecCounter)<=vectorSize-1;>

    data [vecCounter] = tmpsuccessStatus;
    myList.insert (vecCounter);
    myCallback.insert(dataElement[vecCounter],vecCounter);

    }

    . When I try to delete the row in the list, is not remove the line that has been a focus, instead of this removes the following line. Is there something missing in this implementation?

    selectedIndex int = myList.getSelectedIndex ();

    myList.delete (selectedIndex);

    tempRetriveVec.removeElementAt (selectedIndex);

    myList.invalidate ();

    the work of does ' t code above for me... could someone please help me?

    Thank you and best regards,

    Raghav.

    Remove the element of the vector which is present in the ListFieldCallback, I tried it, it works.

  • See the date with timestamp column column

    Hello

    In the table have am capture the creation_date as date data type column. I prepare a report to display the date. Is it possible to display the date with creation of time stamp

    I use oracle 10g Enterprise Edition

    The table name is LICENSING name column is CREATION_DATE

    Please suggest me

    Thank you
    Sudhir

    Which indicates that the data currently stored in the table always have an hour of midnight. Whatever the application / process that inserts the data is, apparently, not the component "time" DATE in the desired way. You will need to set the insertion process to spend time in your report.

    Justin

  • Fill the list with Instances

    Hi all

    Is it possible to fill the results in a drop-down list with the name of the entity instances.

    for example, I instantiated instances 4 x by the name of the child as part of the entity of children.
    HARRY
    BARRY
    SALLY
    LARRY
    Then on a separate screen, I want a drop-down list to be filled with the name of the child.

    for example
    Maybe, I have a question:
    what is your favourite child (which is a drop down showing 4 instance names (HARRY,BARRY,SALLY,LARRY)
    I'm on v10.1


    See you soon

    Hello

    There is a way to make this out-of-the-box, but all depends on your data model.

    I assume here that you have 2 entities, the person and the child. The child has an attribute called 'name of the child. "

    Creates a one-to-one between the person and the child relationship, that he calls "the child preferred person '...

    Then, create an individual question screen. Add a control to the "relationship of entry" to the screen in question. For the 'legend', write something like "Please choose your favorite child." For the "attribute" display, choose the name of the child.

    This will display the question exactly as you want - it will ask the user to select from a list of all children.
    Of course, if the person can have many favorite children, create a relationship one - several. However, this will display the names of the children as the boxes, because the user is now allowed to select more than one.

    If the relationship is just together, you can then use this relationship to access the name of the favourite on the level of the individual child (using InstanceValueIf), or you can run the rules that apply only to the favorite child.

    It's just a suggestion that Ive just tested in 10.3, I did 10.1 at hand at the moment but don't remember which is new to the brand (others, please correct me if I'm wrong). Give it a go, see if it works and get back to me, if it's not. If this does not work on 10.1 you should certainly consider the upgrade to 10.3 for a host of other reasons too. Otherwise, it is achievable with a custom control.

    See you soon,.
    Ben

    Ben Rogers
    Senior Consultant - Monad Solutions
    http://www.monadsolutions.com

  • How to paste into the text field of the Clipboard with JavaScript?

    I implement the following actions in the form of javascript:

    1. a user clicks on a link on the PDF to open a web page

    2. the user uses the web page to find information and then copy text from the web page

    3. the user clicks a button on the pdf form and it formats the text to the Clipboard and paste them into the text fields.

    I can't find any references for the reading of the data from the Clipboard with javascript in PDF Forms. is it not possible?

    Perhaps 'not possible' was a little too hard. It would be a security hole if she accepts a script in a form to copy the contents of the Clipboard without the user explicitly allowing it. It has been possible to copy the contents of the Clipboard into a form field using the app.execMenuItem method without the user knowing / allowing it, but that hole was closed. The restriction can be overcome, as explained in the documentation: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.143.html

  • Enumerate all fields of the form with JS?

    I guess it's a pretty easy thing, but nobody knows what the script would be to list all the form fields in the console?  Specifically, at the moment, I need only for buttons, but I imagine that it would be useful for all fields as well.

    Use something like this:

    var number = 0;

    for (var i = 0; i)

    fname = this.getNthFieldName (i) var;

    If (this.getField (fname) .Guy == 'button') count ++;

    }

    Console.println ("There are" + count + "button fields.");

  • The list with many images

    Hello!

    I have a list with a lot of images in the itemRenderer, over 500.

    I use virtualization on this list.

    When people scroll quickly down, it can take a bit to load images.

    Issues related to the:

    1. in what order the list control to load images? Up and down the entire list or Topp down only the visible part?

    2. is there anyway I can give priority to a certain image to load first on others? The images have the source property set to a relative path on the server.

    3. is there anything I can do to speed up the process of loading in general?

    Thank you!

    The list does not load images, because of your item converter.  I suppose you load these images by substituting the data setter method in the rendering engine.

    When the list of the first loads it creates just enough converters to show what is in view (due to virtualization), let the top 10 items.  This means that the first 10 images will be loaded, but no other images will be loaded unless you scroll the list to expose new items.  If you want to have some images available before others so you can have your application load them if its not busy and in this way, they could be available before the user scrolls.

    Even if you were to load all images before creating the list you might seem still some flickering when scrolling because what are they are recharged in as user autour scrolls.  To remedy this, you might want to consider caching the images as they are loaded, there is an example here: http://flexponential.com/2010/01/10/caching-images-loaded-from-a-spark-item-renderer/

  • The list with the variable row height

    Hi, please look at the example below

    What I do is:

    -J' I create an item in list with variableRowHeight set to true.

    -The dataProvider contains 2 numbers: 2 and 3

    -In the itemRenderer, this causes in progress of creation, respectively 2 and 3 buttons

    -As you can see, the height of the list is badly calculated, a scroll bar appears.

    -When you switch 2 and 3 (so that the table becomes 3 and 2), the list is too large.

    -I could make a custom list class and override the method of measurement, but I can't understand what to measure. I should be able to walk through the itemRenderers and measure their height.

    Any ideas?

    THX,

    Dany

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "layout ="vertical"creationComplete =" init () "> "

    < mx:Script >
    <! [CDATA]
    Import mx.collections.ArrayCollection;

    [Bindable]
    private var dp:ArrayCollection;

    private function init (): void
    {
    var a: Array = [2, 3];
    DP = new ArrayCollection (a);
    }

    []] >
    < / mx:Script >
    < mx:List width = "100%" dataProvider = variableRowHeight "{dp}" = "true" rowCount = "{dp.length}" >
    < mx:itemRenderer >
    < mx:Component >
    < mx:VBox >
    < mx:Script >
    <! [CDATA]
    Import mx.controls.Button;
    override public function set data(value:Object):void
    {
    Super.Data = value;

    If (this.numChildren == 0)
    {
    for (var i: int = 0; i < value; i ++)
    {
    var b:Button = new Button();
    b.label = "Row" + value;
    this.addChild (b);
    }
    }
    }
    []] >
    < / mx:Script >
    < / mx:VBox >
    < / mx:Component >
    < / mx:itemRenderer >
    < / mx:List >
    < / mx:Application >

    Sorry, it's a method on a list called measureHeightOfItems.  The results,

    Add viewMetrics.top and down and you should have the exact size of the

    List.

Maybe you are looking for