UI fields trick

I have a screeen with about 12 fields could be more. I try to separate them with SeparatorField() but I still don't like the cluttered look.

I think to create 4 field groups and each group has a check box for the head field. The Group of fields can be a mixture of EditField, ListField, LabelField, argument CheckField. Checking and unchecking the head field checkbox dilate or contract sections.

I don't know exactly how to proceed. I have the imagery in the need to add and remove fields programmatically move the fields below for a compressed look.

If someone has done something similar? all of the suggestions.

Thank you.

Re/remvoing add fields, you will like to come back to this thread.  You want to put your optional fields in their own Manager and then add/remove Manager.

http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=5214

Tags: BlackBerry Developers

Similar Questions

  • Lookup fields - what is the trick?

    Hello

    I have currently developed/developing a cmdlet powershell features api MSM... including the CMDBItemCreateRequest.

    I have an entry that looks like 'Server' for CMDBEntityType but if I turn the server to lCMDBEntityType research, it returns nothing... using the ~ 1234 works very well...

    I could not find the query looking through std queries to establish how it searches... but I seem to always have problems searching when its on a nested list...

    IE...

    Hardware > server

    What Miss me?

    Or how can I use ExecuteQuery to get a list of valid entries / ID?

    Thank you


    David

    Hi David,

    There is always a query behind each list of choices (some of them may be hardcoded if).

    There are generally two search queries in the system: one by REF (you must provide value as ' ~ 1234') and the other by NAME/DISPLAY/GISELE (it depends on the research unit).

    You can check these files Config\queries - api .sql and Config\queries-api - Search API default queries entity.sql.

    Well, I think that this search for CMDB name entity Type uses the query (queries - api .sql) APILookupAssetType. Then try running this query directly against the database to check if you get results.

    Kind regards

    Gytis

  • Adding fields to a Manager different button clicks

    if (field == buttonField && label.equals("First")) {
                LabelField label = new LabelField("1");
            add(label);
            buttonField.setLabel("Last");}
    else if (field == buttonField && label.equals("Last")) {
            buttonField.setLabel("First");
            labelField2 = new LabelField("2");
            add(labelField2);
            labelField3 = new LabelField("3");
            add(labelField2);
    }
    

    Here is an example of my FieldChangeListener. It is clear what he does (even for me clear ). It simply adds fields - a field to the first button clicks - and two others to the second click.

    What I want to do is to add these fields to a manager - regardless of the vertical or horizontal, I just need to get the concept of how it should be done. The idea is to build a manager at the first click on a button and add labelField. When the second click occurs, I need this Manager to add an other field (s), for example as in my example code.

    Could you please indicate the way to do this? It might be very obvious of sth, yet lack me.

    EDIT: spelling errors, sorry...

    Edit2: Can it be reached via setter/getter?

    Setter / getter did the trick.

    if (field == buttonField && label.equals("First")) {
                getHFM();
                    LabelField label = new LabelField("1");
            setHFM().add(label);
            buttonField.setLabel("Last");
    }
    else if (field == buttonField && label.equals("Last")) {
            buttonField.setLabel("First");
            labelField2 = new LabelField("2");
            setHFM().add(labelField2);
            labelField3 = new LabelField("3");
            setHFM().add(labelField2);
    }
    
    public HorizontalFieldManager getHFM(){
            hfm = new HorizontalFieldManager(USE_ALL_WIDTH);
            add(hfm);
            return hfm;
    }
    public HorizontalFieldManager setHFM() {
            return hfm;
    }
    
  • How to place fields on a manager horizontal?

    Hello

    I want to place two fields on the same horizontal Manager on both ends. IE I want to place a label on the left-hand side field and a ButtonField on the corner of the side right of the same manager Hhorizontal. I tried the following code, but did not work.

    For example:

    VFM VerticalFieldManager = new VerticalFieldManager();
    HFM HorizontalFieldManager = new HorizontalFieldManager();
    LabelField lblField = new LabelField ("test1", LabelField.FIELD_LEFT);
    ButtonField btnField = new ButtonField ("test2", ButtonField.FIELD_RIGHT);
            
    HFM. Add (lblField);
    HFM. Add (btnField);
    VFM. Add (HFM);

    This has not produced the expected results but on the contrary the two fields are aligned on the left side.

    I'm doing something wrong in the code above? Is there any alternative for this? Waiting for a response as soon as possible...

    Thank you

    Thank you guys for the quick response. The following code does the trick

    VFM VerticalFieldManager = new VerticalFieldManager();
    HFM HorizontalFieldManager = new HorizontalFieldManager();
           
    LabelField lblField = new LabelField ("test1", LabelField.FIELD_LEFT);
    ButtonField btnField = new ButtonField ("test2", ButtonField.FIELD_RIGHT);
           
    VerticalFieldManager vfmLeft = new VerticalFieldManager();
    VerticalFieldManager vfmRight = new VerticalFieldManager (Manager.USE_ALL_WIDTH);
           
    vfmLeft.add (lblField);
    vfmRight.add (btnField);
           
    HFM. Add (vfmLeft);
    HFM. Add (vfmRight);
    VFM. Add (HFM);

  • problem with setting of the child fields

    Hi all

    I use this code for jde4.7. I'll have the field two custom bitmap and I stand ready on the other plain bitmap. in order to be simple, I just now targeting code to display the two bitmap using custom Manager, but it shows nothing. It's displaying empty me. Here is my custom handler code...

    HorizontalFieldManager hfm = new HorizontalFieldManager()
    {
        public void add(Field field)
        {
            this.add(_item1);//_item1 & _item2 is bustom bitmap field
            this.add(_item2);
        }
    
        protected void sublayout(int maxWidth, int maxHeight)
        {
            maxWidth =  Display.getWidth();
            maxHeight = Display.getHeight();
    
            System.out.println("In sublayout");
            System.out.println("Max Width "+maxWidth);//360
            System.out.println("Max Height "+maxHeight);//480
    
            int count = getFieldCount();//2
            Field field;
            System.out.println("Count "+count);
            for (int i = 0; i < count; i++)
            {
            field = getField(i);                        layoutChild(field,field.getWidth(),field.getHeight());
            setPositionChild(field, 50, 50);                    }
        }
    };
    this.add(hfm);
    

    He shows me the vacuum.

    but when I simply add

    Add (_item1);

    Add (_item2);

    He shows me the image.

    also, I want to add more to a bimap to specific position.

    As I mentioned above, the ways to use a picture as a background and putting fields on top of the background image are discussed in a number of other Threads.  The 'trick' is that the background image is not added as a BitmapField, it is painted directly on the screen, usually using paintBackground.  But the search for other Threads dealing with this - if you can't think in terms of research, try 'background image'.

  • How to imitate the event with a click of a field? for example the icon "mail".

    I can imagine a complicated way.

    1 use the API API net.rim.device.api.ui.UiApplication.getActiveScreen to get the active display.

    2. Use the net.rim.device.api.ui.Screen.getFieldCount API to retrieve the total number of fields on this screen; or use getFieldWithFocusIndex() to retrieve the index of the target field.

    3 use getField (int index) to retrieve the specific field.  With methods such as "KeyDown()", and then click the field.

    Is there an easier way to do this?

    Thank you.

    If you are allowed to inject events, the following code should do the trick

    invokeAndWait(new Runnable () {
      public void run() {
        EventInjector.NavigationEvent e;
    
        e = new EventInjector.NavigationEvent(EventInjector.NavigationEvent.NAVIGATION_CLICK, 0, 0, KeypadListener.STATUS_NOT_FROM_KEYPAD);
        EventInjector.invokeEvent(e);
    
        e = new EventInjector.NavigationEvent(EventInjector.NavigationEvent.NAVIGATION_UNCLICK, 0, 0, KeypadListener.STATUS_NOT_FROM_KEYPAD);
        EventInjector.invokeEvent(e);
      }});
    
  • Add text to change the field

    Hello

    I display a text field on a screen. Is it possible to add the user to add text to the editfield, even if the focus is on a button. So, no matter where the cursor is on the screen if the user types the text it is automatically sent to the editfield. Is this possible?

    Thank you

    I think it's possible.  You can issue a setText at any time update the field.  The trick is to get and then the interpretation of characters.

    To give you an easy solution. say that you override keyChar to your screen.  This will get the control regardless of the field is in fact in short.  So, you could do something like this (untested, no compiled code, as only learning tool):

    {} protected Boolean keyChar (char c, int status, int time)
    String current = myEditField.getText ();

    String = new current + c;

    myEditField.setText (new);

    Returns true;

    }

    There are problems with this, for example, how do you get back?

    Another option is to replace keyDown and if the focus is not on the EditField, set it to the EditField.  Then the EditField will receive all methods keyChar itself and treat them properly.

  • stack above the other fields

    Hello

    I would like to have a map field or a field list appear on the screen depending on the choice of a group of radio buttons. Now, I won't re - make the map whenever the user moves the map list because the rendering takes a long time. So, how do you stack the fields list and map above the other and one of them bring to the front, based on the choice of the user?

    I think we have a misunderstanding here.

    If you have a screen A, which was painted on the display area, and then you press one another B screen on the top of this screen, when the B of the screen on the top is popped, then screen has will be repainted to get pixels as they were.  Usually, no other treatment will take place.

    You can see this process in action when you view a menu on the screen.  If you just "ESC" menu (i.e. no action) the area of the screen which was covered by the menu is just repainted.

    If you have an X screen and you pop the stack showing the screen Y below and then press X screen again, it will usually just repaint itself with no other treatment.

    I'm not sure that this is the case for a MapField to 100%.

    But assuming that he did, so you can push the screen with the top of the screen with the MapField ListField, and when Pierce you the veil with the ListField, the screen with the MapField should just display.  Of course, this is my experience.

    And I think the other works elsewhere, although I have not tried.  In other words, if you create and display a screen with the MapField, then you pop the screen (but keep a reference to it), then push again (the same screen object), it should just display.

    Maybe the "trick" here is that you do not re-create the screens every time, you create and store a reference to them.

    I hope that makes sense.

  • Show/hide fields based on T/F control - only showing or hiding, not both.

    Hi Forum,

    I'm looking to show/hide fields address based on a T/F control (or a single entry check box).

    My online form has a number of business address fields, a T/F control and a number of postal address fields. I want the mailing address fields to hidden when a user clicks on the box 'As Above' (and demonstrated once again if they click this box once more).

    I used the sample code (https://docs.oracle.com/cloud/latest/process_gs/CPRCW/GUID-F3BD3386-F333-45C6-AA56-C77136D169E5.htm) as a starting point for my Web form rule and it works as expected the first time that a user clicks area T/F (i.e. He's hiding the post fields) but it does not work the second time they until it clicks (where I assumed that fields would still be visible).

    The T/F box has the following options:

    true = as above

    false = No

    And my web rule looks like this:

    If (AsAbove.value = true) {}

    PostalAddress.visible = true;

    PostalState.visible = true;

    PostalPostCode.visible = true;

    } else {}

    PostalAddress.visible = false;

    PostalState.visible = false;

    PostalPostCode.visible = false;

    }


    I tried the same thing (with similar results) using a Checkbox control with a single option (according to the example code)

    If (PostalAddressCheckbox [0] .value == 'As Above') {}

    PostalAddress.visible = true;

    PostalState.visible = true;

    PostalPostCode.visible = true;

    } else {}

    PostalAddress.visible = false;

    PostalState.visible = false;

    PostalPostCode.visible = false;

    }

    As verified does not seem to be supported, is there another way to accomplish what I'm after, or I missed something somewhere simple (and y at - it documentation on the T/F control)?

    See you soon,.

    James.

    Hello

    Web Forms address these true-false as the boxes and, as such, in the form of tables.

    You can see if you try to print the TrueFalse value. You should get something like java object lang @XXXXXX

    Try to put the code as follows (in bold and underlined):

    If (AsAbove[0].value = true """""") {}

    PostalAddress.visible = true;

    PostalState.visible = true;

    PostalPostCode.visible = true;

    } else {}

    PostalAddress.visible = false;

    PostalState.visible = false;

    PostalPostCode.visible = false;

    }

    This should do the trick

    See you soon

    José

  • You place your order by number Char field

    I have a char with data field.

    Required order is lower.

    Column1

    -------------

    12

    12-A

    12-B

    122

    122-A

    122-C

    123

    123-A

    123-B

    I have to order both at the level of form and report.

    Pasha

    Lahore, Pakistan

    The 'trick' is pad strings or a part of them to the same length. In your case, it may be sufficient for the whole string if lpad suffix (A, B, C) are always of length 1.

    Otherwise, you will need to split the string at the position of the hyphen and lpad for both parties.

    Ah, now I see that you do not always have a suffix. Just so add an artificially.

    As the length, you must choose a value greater or equal to the maximum length of the string or their parts RESP.

    order by lpad (decode (instr (column1,'-'), 0, column1 |)) ((' - 0', column1), 10, '0')

    or

    Select Column1 from)

    Select

    Column1

    , max (length (decode (instr (column1,'-'), 0, column1 |))) (((' - 0', column1))) on len)

    tab

    )

    order by (lpad, len, '0')

  • Value separated by commas in a table column to get each field separtely?

    Hello

    I have the table that a column has values separated by commas in it. This table is populated using SQL LOADER, which is staging table.

    I need to retrieve the records of these values separated by commas.

    format of. CSV file is as -

    A separate file of pipes.

    DHCP-1-1-1. WNLB-CMTS-01-1,WNLB-CMTS-02-2|

    DHCP-1-1-2. WNLB-CMTS-03-3,WNLB-CMTS-04-4,WNLB-CMTS-05-5|

    DHCP-1-1-3. WNLB-CMTS-01-1.

    DHCP-1-1-4. WNLB-CMTS-05-8,WNLB-CMTS-05-6,WNLB-CMTS-05-0,WNLB-CMTS-03-3|

    DHCP-1-1-5 | WNLB-CMTS-02-2,WNLB-CMTS-04-4,WNLB-CMTS-05-7|

    CREATE TABLE link_data (dhcp_token VARCHAR2 (30), cmts_to_add VARCHAR2 (200), cmts_to_remove VARCHAR2 (200));

    insert into link_data values ('dhcp-1-1-1','wnlb-cmts-01-1,wnlb-cmts-02-2',null);

    insert into link_data values ('dhcp-1-1-2','wnlb-cmts-03-3,wnlb-cmts-04-4,wnlb-cmts-05-5',null);

    insert into link_data values ('dhcp-1-1-3','wnlb-cmts-01-1',null);

    insert into link_data values ('dhcp-1-1-4','wnlb-cmts-05-8,wnlb-cmts-05-6,wnlb-cmts-05-0,wnlb-cmts-03-3',null);

    insert into link_data values ('dhcp-1-1-5','wnlb-cmts-02-2,wnlb-cmts-04-4,wnlb-cmts-05-7',null);

    Here the cmts_to_add column has comma separted

    I need values such as -.

    > for wnlb-cmts-01-1,wnlb-cmts-02-2 > > wnlb-CMTS-01-1

    > > wnlb-CMTS-02-2

    > for wnlb-cmts-03-3,wnlb-cmts-04-4,wnlb-cmts-05-5 > > wnlb-CMTS-03-3

    > > wnlb-CMTS-04-4

    > > wnlb-CMTS-05-5

    And so on...

    I do this because it's the staging table and I load data into the main tables using this table.

    This second field contain different values as the simple comma-delimited string.

    I need to write a PLSQL block to insert into the main table after checking as if dhcp-1-1-1 and wnlb-CMTS-01-1 is present in the main table so not to introduce other insert a new record.

    To meet this requirement, I need to get the distinct value of the cmts_to_add column to insert into DB.

    the value will be inserted as dhcp-1-1-1_TO_wnlb-cmts-01-1 and dhcp-1-1-1_TO_wnlb-cmts-02-2 for the first row of the array of link_data.

    The process will also be same for the rest of the lines.

    I use the function substrt and instr for this problem, but its does not work.

    declare

    cursor c_link is select * from link_data.

    l_rec_link link_data % rowtype;

    l_dhcp varchar2 (30);

    l_cmts varchar2 (20000);

    l_cmts_1 varchar2 (32000);

    Start

    Open c_link;

    loop

    extract the c_link in l_rec_link;

    l_cmts: = l_rec_link.cmts_to_add;

    loop

    l_cmts_1: = substr (l_cmts, 1, instr(l_cmts,',')-1);

    dbms_output.put_line (l_cmts_1);

    end loop;

    dbms_output.put_line(l_dhcp||) e '|| l_cmts);

    When the output c_link % notfound;

    end loop;

    exception

    while others then

    Dbms_output.put_line ('ERROR' |) SQLERRM);

    end;

    Its a peusdo code I write, but it also gives me the wrong answer it gives me error ORA-20000: ORU-10027: buffer overflow, limit of 20000 bytes

    I am using-

    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    Please tell me if my problem isn't clear!

    Hello

    little 'trick': Add a comma at the end of the chain... So it's easier to deal with the fact that there are zero, one, or N components...

    CREATE TABLE link_data (dhcp_token VARCHAR2 (30), cmts_to_add VARCHAR2 (200), cmts_to_remove VARCHAR2 (200));
    insert into link_data values ('dhcp-1-1-1','wnlb-cmts-01-1,wnlb-cmts-02-2',null);
    insert into link_data values ('dhcp-1-1-2','wnlb-cmts-03-3,wnlb-cmts-04-4,wnlb-cmts-05-5',null);
    insert into link_data values ('dhcp-1-1-3','wnlb-cmts-01-1',null);
    insert into link_data values ('dhcp-1-1-4','wnlb-cmts-05-8,wnlb-cmts-05-6,wnlb-cmts-05-0,wnlb-cmts-03-3',null);
    insert into link_data values ('dhcp-1-1-5','wnlb-cmts-02-2,wnlb-cmts-04-4,wnlb-cmts-05-7',null);
    COMMIT;

    SET SERVEROUT ON
    DECLARE
    l_cmts VARCHAR2 (200 CHAR);
    l_cmts_1 VARCHAR2 (200 CHAR);
    BEGIN
    FOR r IN (SELECT dhcp_token, cmts_to_add |) ',' cmts
    OF link_data
    )
    LOOP
    l_cmts: = r.cmts;
    l_cmts_1: = SUBSTR (l_cmts, 1, INSTR (l_cmts, ",") - 1);
    While l_cmts_1 IS NOT NULL
    LOOP
    DBMS_OUTPUT. Put_line (r.dhcp_token |) '|' || l_cmts_1);
    l_cmts: = SUBSTR (l_cmts, INSTR (l_cmts, ",") + 1);
    l_cmts_1: = SUBSTR (l_cmts, 1, INSTR (l_cmts, ",") - 1);
    END LOOP;
    END LOOP;
    END;
    /
    DHCP-1-1-1. WNLB-CMTS-01-1
    DHCP-1-1-1. WNLB-CMTS-02-2
    DHCP-1-1-2. WNLB-CMTS-03-3
    DHCP-1-1-2. WNLB-CMTS-04-4
    DHCP-1-1-2. WNLB-CMTS-05-5
    DHCP-1-1-3. WNLB-CMTS-01-1
    DHCP-1-1-4. WNLB-CMTS-05-8
    DHCP-1-1-4. WNLB-CMTS-05-6
    DHCP-1-1-4. WNLB-CMTS-05-0
    DHCP-1-1-4. WNLB-CMTS-03-3
    DHCP-1-1-5 | WNLB-CMTS-02-2
    DHCP-1-1-5 | WNLB-CMTS-04-4
    DHCP-1-1-5 | WNLB-CMTS-05-7

    Best regards

    Bruno Vroman.

  • Question of feasibility: extract information from the fields to the PDF format

    I explore options to collect answers to a PDF form.  Fields of entries by the user are created, the user saves the form in PDF format and sends the return form.  The data entered by the user entered in the fields can be retrieved electronically?  I hate the very idea of renewing the data entered by the user to get it in electronic format.  For now, the question is ' is it possible - extract the entries by the user of the data in an electronic format?  If possible, then I can begin to explore the format, etc.

    It is worth noting since you stevat from the outset that it may be problematic to rely on email. Much better to send the form just like an HTML form. This needs a professional web programmer to provide web scripts, however. Also PDF forms do not work on some browsers and phones.

    It is easy to assume that the big trick is to design the form. But it's just the 10% above the water. Personally I wouldn't consider PDF forms more due to browser issues. Same Adobe move to a dynamic conversion to HTML forms then why don't no start with a? There is full form service providers that provide tools to collect and analyze. For example forms of Google - create and analyze surveys, free.

  • The location of the custom metadata fields

    I'm trying to locate the custom metadata fields. Consider a custom metadata field where his dname = xPracticeWork and dCaption = practical work.

    I am trying to locate it using the old way.

    When to activate the settings regional french user and see this metadata field appears in English.When I turn on the location in the information system Audit, it is said

    unable to find string 'fr.Practice Work'

    So I tried including < @fr. The practice of work =Work practice@ >

    but he throws and error message saying unknown resource definition tag

    If I do the dCaption as PracticeWork and try to < @fr. PracticeWork =Work practice@ > it works absolutely well.

    It seems that the practical work being two letter word definition tag allows no space.

    Can someone please help me on this.


    Thank you

    Vanina

    It's very simple, you write a string that you want to display in the form of legend (I use this trick in the profiles, if I want to rename a metadata custom field exist for the type having a different meaning), or write you a string Id cannot contain spaces, which solved somewhere, usually a custom - component see what thread change location String for details how to create a resource exploitation translations.

  • AddRow on enter on the last field in a table

    Hello

    4.2.6.00.03 on 11.2 db APEX


    I am trying to find a way to add a new line when pressing enter in the last field in tabular form. The user does not want to press the new button to add a line every time, but I want to just press on enter the last field, indicating that a new line should be added.

    Anywbody is an easy trick for this (probably the JS that is not my specialty )?


    Concerning

    Bottom


    Hi there,

    Try the following steps below

    Create a dynamic action:

    Event: Down key

    * Type selection: dom

    * DOM object: window

    Condition: Expression of Javascript

    window.event.keyCode is 13;

    Real action

    Action: Run Javascript code

    under settings-> code->::AddRow();

    Check out this old thread for more details: Add addRow tabular without button

    Kind regards

    Jitendra

  • Multiples of the same object/value in a contact field

    Hello

    In our table of Contacts of the E10, I feel a very strange behavior with a field called 'Type of Contact'. The field has been set as a drop-down list.

    Suddenly, multiples of the value stored in this field in the documents that get 2-way sync between E and SFDC, Ont. Thus, for example, if the value of the field

    has been 'Operator', the actual value is passed to 'OperatorOperator '. And the more you synch, the value is (as seems to be added).

    Then, the value would be "OperatorOperatorOperatorOperator".

    Wake up to the problem and setting values is tricky, because in the E10 user interface, you won't notice them if you use a drop-down list.

    I then changed the field to be a textbox to think what might help. And there is progress here. If there are more than two objects of value in the field,

    they present themselves. IF there were only two, everything looks ok just as you can see in the screenshot below:

    More survey close using that an outgoing external call Test reveals, however, that the value is actually duplicated:

    Also, if you have opened upward the selected record under Contacts the contents of the field (after changing text box):

    and then remove the selection (by tapping the button Delete), you could actually get a hint that something does not always work with the field:

    The cursor remains in the right-hand side of the text box, while he should have all the way to the left.

    Finally, I tried to fix the multiplied values SFDC and autosych back to Eloqua, but unfortunately the values do not get it fixed but

    keep duplicate values stored in.

    Any other questions/experiences? Is it a problem with the autosynch get leads NOT to crush, but rather just adding?

    WBR,

    -tatu-

    Some additional screenshots: fi

    The choice list values:

    Yep!

    That did the trick. It must have been a flaw in the external call-out who copied the value out. would have not thought about it in the first place...

    PS. and of course the external call test has shown that the field mapping was abt to do, IE send a duplicated value (although the field could have only a single (or double) value in db at the time.)

    WBR,

    Tatu

Maybe you are looking for