adding field on top of a VerticalFieldManager

Hello

In my application I have a list of images inserted inside that a VerticalFieldManager.To be more clear, the list is a VerticalFieldManager, and each row is a HorizontalFieldManager hosting internally an image and a label. Now, I would like to insert the newest one on top, so I can't use add (row). If I use insert(row,0) the element REPLACES the first and in fact is not inserted before and the image is not painted. I've fixed the first problem, add a copy of the line in the and and inclusion later the same thing on the top (in this way, there are always enough space allocated) but the image is not always painted (if I add the element instead is painted). Why insert(row,0) has that effect on the image and add (row) is not?

Thank you very much

I'm surprised that insert replace and correctly add painted - I perform a similar treatment without any problem.  But I suspect that if you disable the Manager after your insert, it should work fine.  Do you have overridden the insert method in your VerticalFieldManager?

Tags: BlackBerry Developers

Similar Questions

  • Adding fields to a Manager slows down application

    Is there a reason why adding fields to a Manager directly slows my application?

    In the constructor of my screen, I loop and add 200 LabelFields.  This causes the user interface is very slow.

    However, if I loop and add fields to a temporary VerticalFieldManager and then add only the Manager screen, works fast.

    The disadvantage of this approach is that the user will not be able to see the added both fields.

    I am surprised that I did not notice this earlier.

    Here's the slow code:

    import net.rim.device.api.system.Application;import net.rim.device.api.ui.Manager;import net.rim.device.api.ui.component.ButtonField;import net.rim.device.api.ui.component.LabelField;import net.rim.device.api.ui.container.MainScreen;import net.rim.device.api.ui.container.VerticalFieldManager;
    
    public class TestScreen extends MainScreen {
    
      private static final int NUM_ROWS = 200;
    
        VerticalFieldManager outerRowManager;
    
       public TestScreen() {     super();
    
            ButtonField runBackgroundButton = new ButtonField("Background") {         protected boolean navigationClick(int status, int time) {             new BackgroundThread();               return true;          }     };
    
          outerRowManager = new VerticalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR);
    
           add(runBackgroundButton);     add(outerRowManager); }
    
       public class BackgroundThread {
    
         public BackgroundThread() {           (new WorkerThread()).start();     }
    
           private class WorkerThread extends Thread {
    
             public void run() {
    
                 for (int i = 0; i < NUM_ROWS; i++) {
    
                     synchronized (Application.getEventLock()) {                       outerRowManager.add(new LabelField("ROW " + i, LabelField.FOCUSABLE));                    }             }         }
    
           } }}
    

    And here is the quick code:

    import net.rim.device.api.system.Application;
    import net.rim.device.api.ui.Manager;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    
    public class TestScreen extends MainScreen {
    
        private static final int NUM_ROWS = 200;
    
        VerticalFieldManager outerRowManager;
    
        public TestScreen() {
            super();
    
            ButtonField runBackgroundButton = new ButtonField("Background") {
                protected boolean navigationClick(int status, int time) {
                    new BackgroundThread();
                    return true;
                }
            };
    
            add(runBackgroundButton);
        }
    
        public class BackgroundThread {
    
            public BackgroundThread() {
                (new WorkerThread()).start();
            }
    
            private class WorkerThread extends Thread {
    
                public void run() {
    
                    outerRowManager = new VerticalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR);
    
                    for (int i = 0; i < NUM_ROWS; i++) {
                        outerRowManager.add(new LabelField("ROW " + i, LabelField.FOCUSABLE));
                    }
    
                    synchronized (Application.getEventLock()) {
                        add(outerRowManager);
                    }
    
                }
    
            }
        }
    }
    

    The answer is actually quite simple. Every time that you add a field to a Manager, updateLayout() is called. In the first example, you already added "outerRowManager" to the screen and it was posted until you start adding LabelFields. In the second example you add fields to the Manager until the Manager has been added to the screen and displayed. Its always faster to add bottom up (onscreen Manager fields)... In addition, you are synchronizing with the interface thread user 200 times compared to 1 time.

  • new line added at the top of advancetable

    Hello

    IAM trying to add the line in a table dynamically so i have used adds the concept of line in the table advance.

    But while trying to add new lines they are added to the top of the current line is not the bottom of the current line.

    can someone help me please how to reach this.i want to add new lines to the bottom of the current line.

    Hello

    When inserting new line in take VO control in the last row and try to add a new line after the last of them.

    Below the code could help.

    public void InsertRecord() {}

    TempVOImpl vo = getTempVO1();

    vo.setMaxFetchSize (0);

    Line TempVORowImpl = (TempVORowImpl) vo.createRow ();

          VO. Last();

    VO. Next();

    vo.insertRow (row);

    row.setNewRowState (rank. STATUS_INITIALIZED);

    }

    BR, 906099

  • Problems with adding fields of digital signature

    OK, so I'm an IT Manager / developer DB for a defense contractor. And I consider myself reasonably technically competent in MOST things. But this problem has left me speechless (for the most part) for lack of decent instructions or advice are on the lines.

    , I'm looking to create a form for use by the employees of my company to follow the 'signatures'. we have so far put in forms manually signed for this purpose, my goal is to go paperless with this process. I know it can be done because the air force (my client) uses a form that allows you to do something similar (see here: http://www.dtic.mil/whs/directives/infomgt/forms/eforms/dd2875.pdf). Forward listed form allows you to 'click' on the signature block and add your digital signature (which, for the AF, comes from an IDENTITY card). Let explain me the dev environment, I am using / testing on:

    Creation of the form:

    I use my laptop with my own personal copy of Adobe Pro 9. I have no installed dig signature or any ability to use on this system. I CAN, however, add the field to the GIS during the creation of the form and the field responds when you click on it, but with a command prompt different than the 2875 (I think this may be part of the question). Then I tried sending it to my AF computer to test whether it will actually allow me to add a signature block.

    Tested the form:

    On my AF computer I only software adobe reader 9 installed, and it will allow me to add my signature to the DD 2875. When I do my newly created form with my added field GIS that nothing happens at ALL when you click it.

    Troubleshooting:

    I first noticed that under form properties security has been put in place to NOT allow the signing. I changed that and returned on one system to the other, and it seems that in the translation he loses this setting. First, I assumed it might be due to the security the AF place on its e-mail servers. So in response I burned the form of a cd and manually transferred but got the same result.

    Conclusion:

    I terribly bit educated on the development of PDF I suspect to understand everything that happens here, but I feel there's a script attached to the FA form that works and allows him to function properly. If this is the case I don't know what recourse I have, if any. BUT, if its something simple that I'm missing just in cause of my lack of experience I hope someone here can help me.

    Thank you!

    Hi LBitner99,

    Before you can use Adobe Reader to add a digital signature to a PDF document, the file must be "enabled for the drive.  There are two ways to do this, you must use a server, what the DoD because they need to drive helps thousands of documents. The other way is to use Acrobat Pro (I know that you said you have Pro, but for anyone else reading this has has Acrobat Standard, this version is not the feature activate Reader).

    With the file you worked on open in select Acrobat the Advanced > extend features in Adobe Reader menu item. Click the Save button in the dialog box that followed, and the new file will have digital signature rights in Reader.

    I hope this helps.

    Steve

  • How can I get rid of "Recently added" at the top of iTunes page?

    For the Album, iTunes playlist has two sections. The highest is "recently added" - and the songs or albums, well, more recently added. Below, there is a complete list of all your albums, by icon.

    I do not use "Recently added." In fact, I would like to get rid of if. How can I prevent iTunes who trace "recently added"? I want just a list of albums, and that's all.

    Thank you!

    Not exactly sure iTunes on Mac, but on Windows, the top right where you area selection where you see artists or Albums, if you tap it, you will see a checkbox for recently added. I have not found a way on my Windows computer so that it can remember this setting, but it's where you can turn it on or off.

  • bring a field on top of the other

    How can I do this? I have 2 bitmapfields in a Manager. Depending on the option chosen by the user, I want a field to display above the other.

    On top?  Do you mean above on the screen (so the first bitmap is located closer to the title area), or do you mean that they are both in the same place on the screen.

    I suspect you want to see one or the other - in which case you can simply delete one and adds another in its place.

  • adding field of electronic signature to AIA Contract pdf

    Does anyone have an experience by adding a signature field to a contract of AIA (architecture)?  AIA software spits out a "secure" PDF that cannot be changed, but based on what I see of executed previously pdfs in our office files, there is a way to add the signature field to obtain the contracts as an unsecured pdf. It is not a "certified" signature or anything like that. He is currently in my office who knows how to do this.  Thank you.

    Hilaural89998734,

    If the PDF is secured in this case it can not be used with eSign.

    Thank you

    Abhishek

  • Update of the newly added field faulty/bad driving!

    Hi, I use APEX 4.1.1 on: 10 x e.

    It is an incredibly simple thing I do and yet I can not understand what the question... I am pulling my hair with the simplicity of what I'm trying to do and the ridiculousness of why it doesn't work! :(

    I have a form created by the wizard form/report. I have added a field in the source table and therefore added a page element to the form (with the "Source Type" column DB 'Source value or the expression' value field name, etc.) ... it will display the item in the table but will not update the field when I click on apply changes. There, somehow (I think that via in clicking previous/next buttons on the update form) has managed to update the value to one value of another record... now both records are the same (table test and there only 2 rows) or update the form no matter what I do.

    To test this question, I deleted a page element and recreated. It includes the same way - it will display the data in the table, but not update it. I am very confused: this is such a simple thing!

    Hello

    There is a bug in the APEX that attaches to the 4.2. The bug occurs if a page item is renamed and that you run your application in another browser or a tab (not started from the APEX manufacturer). In this case, the name change is not picked up for this session. To resolve this problem, you just have to log out of your application to create a new session.

    Concerning
    Patrick

  • Adding field values into multiple lines in a dynamic table

    Hello!

    I have create this form (timesheet) where I have a dynamic array with a variable number of lines (I'm adding instances with a single click of a button).

    All rows with a field of totalLinhaRelatorio , it is a time field and I need all of these fields to be added to get a total final.

    So, I tried these two lines of script (FormCalc):

    var finalTotal = sum (Time2Num (rio parteInferior.atividades.tabelaAtividades.linhaAtividade [*] [*] .totalLinhaRelato, "HH: mm"))

    $.formattedValue = Num2Time (finalTotal, "HH: mm")

    It doesn´t works as I expected. The field gets properly just the value of the first row.

    I tried other combinations, such as linhaAtividade.totalLinhaRelatorio [*] and .totalLinhaRelatorio linhaAtividade [*], but nothing seems to work.

    Help, please!

    Marcos

    You're welcome Marcos!

    Yes, it is possible, but I've never used FormCalc to do, preferring to JavaScript. As you use the time functions, it makes sense to stick with FormCalc.

    Take a look at the syntax here:

    http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=000211.html.

    Hope that helps,

    Niall

  • Added field, without visible border?

    I did my first pdf with an addition of the comments field. I set it up correctly I think, insertion of a text field multiline, adding a black border of reflection and a white fill. Looks fine in Acrobat but when I save and open in the preview there is no visible border. Has to do with the preview? Or I'm not doing something good?

    Richard

    Yes. It's one thing to preview. It works well with Adobe forms. To view the form, use Reader or Acrobat.

  • Adding field in the item table programmatically

    Hello.

    I'm doing a generic 'engine' for generating test reports/certificates.

    I made a custom data containing type report item, I used to do a local variables array of report called table of report item items.

    The data type contains generic areas (chain of title elements, a string of type item, etc.) and a container of the element data.

    The idea is to increment the array of items to report with report items and then fill the data container of the element with the fields of for example a Table element container.

    Either that, or just add a field in the report item with the data Table element type.

    But I can't find a way to add fields programmatically in a container.

    Anyone know if this is even possible?

    Found!

    Using from one stage of education, who points to the array of report items using the NewSubProperty method.

    Finished with the following statement:

    Parameters.Report_Element_Array.InsertElements (GetNumElements (Parameters.Report_Element_Array), 1, 0),
    Parameters.Report_Element_Array [GetNumElements (Parameters.Report_Element_Array)-1]. NewSubProperty("Element_Data",PropValType_NamedType,False,"NSE_Report_Table",0)

  • 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;
    }
    
  • A field on top of the other

    I use JDE 4.6, Eclipse plugin.

    I need a PasswordEditField and a LabelField, both in the same place on the screen of the app.  I need to be able to make a visible according to the needs.

    I thought that I could simulate it by using only the pwd and field implementation as a label as necessary field (controlling the label, by disabling the pwd entered and this which makes unfocussable), but it is a bit of a hack.

    I have a feeling it must be achievable using screens or something, but after searching around the forum and the ref of the API, I thought I would check with you guys...  Any suggestions on how to do it?  THX - fd

    How about using the API to replace the Manager:

    replace (Field oldField, field newField)
    Deletes a field from this Manager and replace it with another field.

    Rab

  • Adding fields to fill-able to multiple pages, multiple documents?

    I work in a disciplinary school where we produce and distribute the schedule of courses for incoming students by using PDF (we have a database online that extracts the relevant data, and then generates a PDF file with a page for each student). Due to the need for internal follow-up, he must add information to each PDF page which varies per student. As a quick and dirty workaround, we've been copy - paste it into a text box on each page which is then manually edited. It of OK, but will not be enough in the long term (seems not professional, pasted cells change their position, etc.).  In this context, for now I'm just looking for pointers to a reasonably effective solution that I can research. In fact, I'm looking for a quick way to, on no matter what PDF, add something like:


    Date of the contribution:

    Assigned days:
    Release date

    and so forth, with the editable fields to follow different descriptors. Ideally, our receptionist could open a calendar PDF in Acrobat Pro XI add shape to all the pages in the PDF file, and it could go through and add information to different fields for each student, save, then e-mail.

    As you can tell, perhaps, to the point that I'm stuck on that moment is what would be the best way to achieve this. A stamp? A macro that creates fields to fill? etc. So, your advice on what you see as less complicated approach is welcome.

    This can be done very easily by using a script. The developer would just set the locations (as well as other properties, such as the fonts, size text, fill color, border style, etc.) fields, then write a loop that adds a unique on each field version (so that they don't have the same values).

    If you are interested in hiring someone to this develop for you, do not hesitate to contact me privately.

  • [OIM11gR1] Adding fields looking for the user in the free service request

    Hello

    Someone at - he already tried to add additional fields to the query under IOM search component? For example, when to change the user profile assigned role or a resource of supply?

    Unlike in the administration interface, I have not found a way to add self-service research fields.

    Thanks for your help

    MOS article: 1311568.1

    -Marie

Maybe you are looking for