Update the fields in a HorizontalFieldManager

I have this kind of configuration, basically, I have a refreshment menuitem that once selected will extract data from an xml page. I have already developed information retrieval, my problem is the display of the information. I searched the forums and found methods such as invalidate() or updateLayout(), but it does not work for me. (Well it should, but obviousky I do not know where to place/calling these methods)

the information is supposed to be displayed using the LetterA1a1RichTextField. Each chef has his own custom handler class.

Here is my code, it's a bit long.

Inside of the class that extends screen:

public void setupScreen(){   this.addMenuItem(new MenuItem("Refresh", 100, 1)   {          public void run()         {                    /***            * fetch information            */              fmi = new FetchMarketIndices(mi);            fmi.start();       updateScreen(fmi.getMarketIndices());                    }    });}public synchronized void updateScreen(MarketIndices mi){    letterAHorizontalFieldManager.updateFields(mi, getScreenComponents());    this.invalidate();}

The class inside LetterAHorizontalFieldManager:

public synchronized void updateFields(MarketIndices mi, ScreenComponents sc){    letterA1VerticalFieldManager.UpdateFields(mi, sc);    this.updateLayout();}

The class inside LetterA1VerticalFieldManager:

public void UpdateFields(MarketIndices mi, ScreenComponents sc){  int nColor=Color.WHITE;

 if(Double.parseDouble(mi.getAll()) > 0)    {     nColor = Color.LIMEGREEN;     letterA1aHorizontalfieldmanager.SetText("+"+mi.getAll(), sc, nColor); }                 else if(Double.parseDouble(mi.getAll()) < 0)   {     nColor = Color.RED;       letterA1aHorizontalfieldManager.SetText(mi.getAll(), sc, nColor); }

   this.invalidate();}

LetterA1aHorizontalfieldManager backwards:

public void SetText(final String text, final ScreenComponents sc, final int nColor){    deleteRange(1, 1);    letterA1a1RichTextField = new RichTextField(text, RichTextField.NON_FOCUSABLE | RichTextField.TEXT_ALIGN_RIGHT)    {        //override the paint method of RichTextField to allow changing of font color        public void paint(Graphics graphics)         {            setFont(sc.getContentFont());            graphics.setColor(nColor);            super.paint(graphics);

        }    };    add(fieldSetValue);    this.updateLayout();}

Help please!

Solved... apparently the RichTextField is updated, but the field was simply not visible. I forgot to update the width of the textfield object to fit inside the Manager... Thanks anyway.

Tags: BlackBerry Developers

Similar Questions

  • I want to update the field of choice of option on the selection of another field of choice of option

    Hello...

    I want to update the field of choice of option on the selection of the value of the choice field another option.

    Thanks in advance

    Welcome on the support forums.

    use

    http://www.BlackBerry.com/developers/docs/6.0.0api/NET/rim/device/API/UI/component/ObjectChoiceField...

    to set the new choices in the field. It should update automatically, otherwise you could try to call invalidate.

  • Update the field Date according to the date of another field

    Hi I have a field called "contract end Date" which I update manually according to the contract, and a field called "notify contract end Date" I want to be updated automatically with the "end of contract date" - 45 days.
    Is this possible via workflow? can someone give me the syntax that works? If I want to manually insert the value of the field 'Date to end the contract to notify' it will overwrite it?
    Thank you, David

    Hello!

    Create your workflow on your object type, select the before saving the trigger modification event, put the following condition:

    [< contract end date >] <>MEADOW ("< the contract end date > '")

    And in action, update the field End Date of the contract to notify with end Date of contract - 45 and check the replacement value. You contract end Date field must be with the type date.

    I hope this will help, do not hesitate to ask for more!

    Max

  • Forms and update the fields

    I have a PDF document that has a bunch of formulas to calculate the mileage, etc.. I entered the formulas in the "total" fields, but once I fill in the other fields, the 'total' number will not refresh. Y at - it a tip secret to automatically update the number or is it possible that my formula is simply wrong? It is in simplified notation of field as "End MileageRow1 - start MileageRow1."  (Ending MileageRow1 is the name of a field and start MileageRow1 is the name of another.) Any help with this would be awesome!

    The field calculation order is not correct. To define it, go to the forms editing mode (forms > add or edit fields), and then select "forms > change > set field calculation order of fields. Set the order of everything that makes sense for your form.

  • Did not update the field lengths

    All,

    I changed the lengths of field forms all day to IOM 9.1, and it does not update the actual column length when the form is activated. I came back to directly update to the sizes of the column in the database to get things to work. I missing something here, or are completely useless in IOM field length variations?

    S

    My experience is the same. You cannot change just reliable lengths using the client interface design.

    Slightly irritating and very dangerous if you don't know the question.

    Best regards
    / M

  • API to update the fields in the table cn_payment_transactions_all (OIC module)

    Hello
    I have an obligation to put the lines of Sales Commission (Oracle Incentive Compensation package) waiting for a specific vendor, if the corresponding invoice line has a sum not equal to zero.
    Now to put the commission lines on hold that to date the hold_flag of the cn_payment_transactions_all table is necessary.

    I need help to find the API that I can use to update the hold_flag. I searched on the same metalink but can't find anything suitable.

    Please advice what API should I use or reference where I can find all the documentation on that. Can I update the hold_flag directly in case I can't find any API for updating this indicator.

    Thanks in advance...

    Concerning
    Lucile

    Published by: user10816003 on December 28, 2009 06:05

    Update of the base tables directly without using the approved API is not supported by Oracle, and may leave your database damaged without repair possible. If you can't find the information you need in the User Guides or ETRM, pl open an SR with the applicant for assistance on how to get what you need to support.

    HTH
    Srini

  • Update the fields after the harvest with LOV

    Hi guys
    I've seen similar to this topic topics, but I failed to understand. I have a LOV me returning multiple values, but I do not see them until I refresh the page. How can I do for the fields auto refresh on change of field LOV?
    Thank you

    use partial-page rendering by:

    1. giving inputListOfValues Id (ex. myLOV)
    2-set inputListOfValues property to AutoSubmit
    3. for each component will be LOV return value that set its ParialTriggers property to the inputListOfValues Id (myLOV)

  • How can I update the field when the enabled checkbox

    Hi all

    I am using oracle 10 g forms,

    I have a block with 20 areas. So first 10 fields are not editable and remaining are editable. If the user enters data and modifies the data. And check the box and save the data.

    Inside save button I wrote the code update.

    When the user change records of two or three and three check box and click on save button only a recording is done in my custom table.

    It's my code please correct me where I went worng.

    It's my code inside my button

    declare
    Begin
    If: ASSEMBLIES_BLOCK. CHECK_IN_OUT = 'Y' THEN
    IF SHOW_ALERT ("UPDATE_ALERT") = alert_button1 THEN
    LOOP
    XXTLX_PO_LOGOSTICS. XXTLX_PO_LOGOSTICS_UPDATE;
    WHEN THE OUTPUT: SYSTEM. LAST_RECORD = "TRUE";
    NEXT_RECORD;
    END LOOP;
    STANDARD.COMMIT;
    fnd_message.set_string ("Transaction saved successfully");
    fnd_message. Show;
    On the other
    NULL;
    END If;
    END IF;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    NULL;
    WHILE OTHERS
    THEN
    NULL;
    END;


    I write a procedure in the program unit.

    XXTLX_PO_LOGOSTICS. XXTLX_PO_LOGOSTICS_UPDATE

    Is my block of current assemblies that the user enter data and click the save data check box.

    Update XXTLX_PO_ASSEMBLIES set CASE_NO = nvl(:assemblies_block.) CASE_NO, Null),
    PACKAGE_TYPE = nvl(:assemblies_block.) PACKAGE_TYPE, null),
    PACKAGE_QTY = nvl(:assemblies_block.) PACKAGE_QTY, Null),
    GROSS_WT = nvl(:assemblies_block.) GROSS_WEIGHT, Null),
    OPI_DATE = nvl(:assemblies_block.) OPI_DATE, Null)
    Where ponum =: DETAIL_BLOCK. PO_NUMBER
    AND PO_LINE_NUM =: DETAIL_BLOCK. LINE_NUM
    AND BOM_NO =: assemblies_block. BOM_NO;




    So when we click on the multiple check box and save the data that one is striking.

    Thanks and greetings
    Srikkanth

    I guess that I do not understand.

    >
    ... my requirement is that active fields must get updates. If there is way to 10 records in a block, sick day only registration of the 3rd and 4th and then click on the box... and then ill click on save button.
    >

    Is - this block a block of data or a block of data non-base? If it is a block of data, Oracle can manage updates of this block for you because if keep tabs if a record has been updated or not and you wouldn't need to do an UPDATE statement.

    If it is a non-base of data block and you are a loop in each folder and only update items that have checkboxes next to them you would still go to the first record, and then scroll through each record and see if it needs to be updated. I guess right here because I don't think I have a good knowledge on what you're doing, but you can change your XXTLX_PO_LOGOSTICS. Package XXTLX_PO_LOGISTICS_UPDATE update only elements that have checkboxes next to them, by checking every box:

    -- Check Case No
    if nvl(:assemblies_block.chase_no_check,'N') = 'Y' then
      update xxtlx_po_assemblies
         set case_no = :assemblies_block.case_no
       where ponum = :detail_block.po_number
         and po_line_num = :detail_block.line_num
         and bom_no = :assemblies_block.bom_no;
    end if;
    
    -- Check Package Type
    if nvl(:assemblies_block.package_type_check,'N') = 'Y' then
      update xxtlx_po_assemblies
         set package_type = :assemblies_block.package_type
       where ponum = :detail_block.po_number
         and po_line_num = :detail_block.line_num
         and bom_no = :assemblies_block.bom_no;
    end if;
    
    -- Check Package Qty
    .
    .
    .
    
  • How do I know which updated the field in a table

    Hi all

    There is a table that stores the information of bank account that has been updated from last month. Anyway is to know which user, what iP or any other detail that has updated.

    Auditing is enabled.

    Thanks in advance.

    Kind regards


    Hi John,.

    The audit is at the database level. sys. AUD$ table. I m new with the part of the audit. With this we can retrieve information about who has updated.

    Thanks in advance

    Kind regards

  • How to limit the small number of users in the group to update the fields in the table of the adv

    I have integrated a custom in customer support specialist area. Custom zone advanced table with some columns editable.

    My cusotmization works fine, but only some users need access to
    addmorerows - button in SD in my rn custom table
    -col1 should be updated and for the rest read-only

    These users are in the same group of resources than others, but some people need more energy than others...
    How can I do?

    Thank you

    Hello

    Amol, I could filter the users and rendered all property, but they would add more users in the future, and this change would require the amendment of the code and therefore recompile

    You can create a list of choices and store valid usernames here.

    And in the application process first enter the username.

    User String = pageContext.getUsername ();

    Now check whether or not this user is in this search

    Create a prepared statemnt as select count (*) in the fnd_lookups where lookup_type = 'test' and lookup_code =: 1

    then pass the user name as lookup_code.

    If count > o which means that there is a row, and then set made by property...

    In this way, you have no need to recompile any code... just add new values in search of...

    Thank you
    Gerard

  • Allow the user to update the fields between some time. If not just to see

    Hi Experts,

    I was thinking about the following example. Can I know how can I implement this in project web ADF.

    Allow the user to change the shape of the page on some time interval of time rest allows them to view only. I can put this check in time of connection or the loading of the page. How ever how to apply this connection between the cut-off time. Can I disconnect all users of the system to time limits and ask them to re-login again. In the affirmative. How to implement that.

    Thank you.

    t

    A brainstorm of my response, possibly other posters will give a better answer...

    Is the requirement actively disconnect everyone once the time-out occurs, or can at least delay to the next request for each client?

    If the old I suggest to use some sort of component Ajax poll on the page that keeps checking with the server if the delay has occurred. Maybe later if a Java EE filter or listener to detect the expiration time. In both cases once the delay has occurred to redirect the user to the adfAuthentication servlet will disconnect the current session/user.

    CM.

  • Impossible to update the currentStatus in Contact field

    I'm trying to update the field currentStatus using REST APIs to a contact record, and the result is still "pending action". Can update us this field to a custom string?

    Why you try to change the status?

    It is related to a cloud connector, if the external status you need to update.  See Cloud Connector API - with members in a stage of the program for more information.

    the currentStatus field is a reserved domain that PB and the canvas campaign uses, so you can't change it.

  • Form is not updated once the fields in Adobe Reader XI

    I created a form in Acrobat X Pro has a lot of radio buttons, the user must select. The last page is the results page, which has the code JS that is executed when you enter the page. If I test the form in Acrobat X, the results page correctly updates the fields of results as soon as you enter the page.

    But if I open the page in Adobe Reader XI, the fields in the result page will not update until I save the page. This has happened before, forms behave the same in Acrobat and Reader. I also tested the forms created months ago and got the same result.

    Anyone know what is happening here?  Thank you.

    Yes, you can do everything from a single calculation script.

    Using the option Page Open should work as well, it's just an unusual way

    do...

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

  • Change the color of the field

    I want to create a field that contains a rectangle I want to change the color of the rectangle it flashes. The implementation of flashing

    With some delay in treatment, I think that the approach proposed by stef will tie up your Blackberry looped continuously update the field.  Invalidate in the paint method will stop the treatment immediately in order to redraw this field.

    Instead, use a Thread or a TimerTask to invalidate the ground at regular intervals.

    As example where it's done, take a look on:

    How - to view an animated GIF
    Article number: DB-00652
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800345/...

    This article uses a Thread to schedule updates on a field that displays an animated gif image.

Maybe you are looking for