How to get the value of the TextField on Buton FieldChangeListener

friends I am new on the development of blackberry applications could you please help me how to get the value of text I typed in the textField when I click the button?


public Dialogs()
using design in the same screen
Display display = new MainScreen();
ButtonField btnPress = new ButtonField();
btnPress.setLabel ("press me");
btnPress.setChangeListener (ButtonPressListener);
TxtValue TextField = new TextField();
txtvalue.setLabel ("enter something :");
HFM VerticalFieldManager = new VerticalFieldManager (VerticalFieldManager.FIELD_VCENTER);
HFM. Add (txtValue);
HFM. Add (btnPress);
mainScreen.add (hfm);
pushScreen (mainScreen);

FieldChangeListener ButtonPressListener = new FieldChangeListener() {}
' Public Sub fieldChanged (field field, int context) {}
Dialog.Alert (t.GetText ());

any help would be appreciated.

You must ensure that your FieldChangeListener has access to the object of txtvalue, while it can make a

String inputString = txtvalue.getText ();

Tags: BlackBerry Developers

Similar Questions

  • How to get the peak value

    Can I know how to get the 2 peak values v1 and v2 and 2 duration times t1 t2.

    Since there is a small amplitude noise, difficult to use the Max simplely.

    May need to use a filter such as wavelets or TREE to Denoise it first. Can I know how to use, any Toolbox in labview. How do the curve smooth first.

    Thank you.

    I can't watch your vi now (I'm at work), but if your signals are long enough, you might consider a median filter.  You can set the number of points before and after use.  I found that it is useful for some smoothing problems (not all).

  • How to get the value of a variant as a string

    I have an existing codebase, which transmits the values of the user interface to business logic as variants. I was prompted to connect all values passed in this way in a text file. I'm trying to figure out how to get the data as a string to a Variant value without having to deal on the type for the data descriptor. The flag variant the fact, so I think I can, too.

    Anyone know how?

    Thank you, all! I decided to use the XML approach:

  • using PostDelayedCall how to get the value passed through void * callbackData?

    Can someone tell me how to get the data passed through void * callbackData?

    The following code, panel_ptr has the right address but still contains zero.

    void CVICALLBACK value_changed (void * callbackData)
    int * panel_ptr;
    panel_ptr = callbackData;
    calculate_new_value (* panel_ptr);

    int sign;

    Panel = 2;

    PostDelayedCall (value_changed & Panel, 0.2);

    The problem is using the callbackData parameter if it is a pointer, it must be a pointer to something which is still topical at the moment that the callback executes. That is to say, you cannot pass the pointer to a local variable in callbackData as when the callback executes the pointer is no longer valid. You can switch from its value, instead, in this way:

    ... SomeFunction)


    int sign;


    Panel = 2;

    PostDelayedCall (value_changed, (void *) Panel, 0.2);



    void CVICALLBACK value_changed (void * callbackData)
    int panel_ptr;
    panel_ptr = (int) callbackData;

    calculate_new_value (panel_ptr);


    There are many discussions on the forums on callbackData parameter that you might want to read.

  • How to get the parameter values of a step type custom when I create file and adding a type of step seq

    I use lv 8.5 and teststand 4.0.

    I did a step type custom and recorded at the MyTypes.ini in pallets of type.

    I specified a default module by opening the properties of the custom step of *.ini type window, then I put some values of the parameters.

    T1) when I open teststand and I add the custom step type manaully in seq file, the labview module parameter values are represented.

    But, if to use file (create and add support prototype stage), the labview module parameter values has the default value.

    Using joint file, how to get the setting custom step type values I put in *.ini?

    Q2) each type of step are automatically by name through the use of LoadTypePaletteFilesEx. When I open teststand and I add the custom step type manaully in seq file, the module is loaded automatically. Inside the attachment, I use a prototype of charge and a fixed path where the module labview is to load the labview module.

    Can I load module automatically without using a prototype of charge or how can I get a dynamic path of type step?

    I solved Q1 for myself by using the mapping tab of the parameter within the configuration to the default module window.

    Everyone knows Q2?

    Thank you.

  • How to get the value of an editField on onUnfocus()

    I want to check the value of an editfield on focusout/focusouthandler(), how to get the value in the onUnfocus() method?


  • How to get the decimal value of a string of international currency

    Hi all

    How to get the decimal values to a string of international currency.

    Finally, we get to the real problem.

    You can use location functions or write your own using string functions already mentioned...

  • How to get the value of a column in sql query?

    Hi, anyone knows how to get the value of a column in sql query?

    Here is my code, the value must be 1350079224397 in my PB, but I get 0

    QString query ("SELECT version FROM db_version");

    QVariant result = sda.execute (query);
    QVariantMap versionMap = result.toList () such () .toMap ();
    If (! versionMap.IsEmpty ())
    qDebug()<"Version: "=""><>

    OK, I have the solution

    QString query ("SELECT version as version FROM db_version");

  • How to get the input of a PromptDialog value?

    I went through the docs and cannot find how to get the value of the entry of a PromptDialog.  Someone at - he of the ides?

    In this doc:

    It seems that the text property is what you take.  Have you tried that?

  • How to get the value of varStatus in managed Bean

    Hi all

    I use jDeveloper version.

    I had a table with table with departments view object. I added an extra column to the table to display the serial numbers of the lines like this.

    < af:table...

    varStatus = 'vs' rowSelection = "multiple" id = "t1" binding = "#{ReferenceBeans.departmentTable}"> "

    < af:column id = "c5" headerText = "varStatus" >

    < af:outputText value = "#{vs.index + 1}" id = "ot1" binding = "#{ReferenceBeans.varStatus}" / > "

    at the bean, I get all the values of the selected line, but I don't get the varStatus value of the column.

    If I use

    Object varStatus is getVarStatus () .getValue ();.


    That's the impression first value only, but not the values of the selected line.


    How to get the varStatus value in the bean selected lines.

    Best regards

    Claude Reynier.

    You can get the index of the line of the ViewObject.getRangeIndexOf (row) method. Something like this:

    empIter.getViewObject () .getRangeIndexOf (currentRow)


        RowKeySet selectedEmps = getTable().getSelectedRowKeys();
        Iterator selectedEmpIter = selectedEmps.iterator();
        DCBindingContainer bindings = (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry();
        DCIteratorBinding empIter = bindings.findIteratorBinding("EmployeesView1Iterator");
        RowSetIterator empRSIter = empIter.getRowSetIterator();
        while (selectedEmpIter.hasNext())
          Key key = (Key) ((List);
          Row currentRow = empRSIter.getRow(key);
          System.out.println("FirstName" + currentRow.getAttribute("FirstName") + "  - Row Index= " + (empIter.getViewObject().getRangeIndexOf(currentRow) + 1));
  • How to get the balance of an element value


    I have a requirement to obtain related information with balance. I am able to read the information on the element except to get the value of the particular item balance.

    for the application-> transfer and process-> queries with trust-> value the month selected and chosen balances button and queries with the obtained item name break it down the value of the balance.

    These values I want in my query.i tried backend with calling package by passing parameters like the number of transfer, balance the id and date but iam getting value "0".

    IAM new to hrms, Please help me on how to get this balance of values

    Thank you


    It is not very clear what you want to display in the form of balance for a given range of dates.

    It depends on how you have configured your balances and periods and balance which you are referring.

    The API allows for a given only date that matches the date earned.

    Say, for example, that you have a "basic salary" defined with a "Treatment period assignment to Date" dimension and feed of the element that corresponds to the base salary.

    "If you need get the 'wage base Total' (balance?) for the period February 1, 2015 ' to March 31, 2015", then you need get dates earned for payroll passes made during that period and call the package above with the appropriate settings.

    Another way is by querying the tables/views directly: you can use, for example - it's perhaps easier to your situation:

    Select sum (nvl (pbv.value, 0))

    of pay_balance_values_v the VB.

    where pbv.balance_name = 'base salary.

    and pbv.database_item_suffix = '_ASG_PTD. '

    and pbv.assignment_id =

    and pbv.effective_date between to_date (' 01/02/2015 ',' dd/mm/yyyy')

    and to_date (' 31/03/2015 ',' dd/mm/yyyy');

    Kind regards

  • How to get the values of the table of the ADF to bean class?

    Hi all

    My Jdev

    Here I do not use BC ADF in my project.  I'll put values in the ADF table with bean.

    In the table, I put a checkbox. When I selected (Checkbox) a few rows in table and submit. In the submit method, I want to get all the values of line checkbox selected in my bean class.

    How can I get the values. ???

    Here my table UI code

    < af:table var = "row" rowBandingInterval = "0" id = "t1" value = "#{pageFlowScope.BinderSolutionsBean.uiBinderProperties} '"

    styleClass = "AFStretchWidth" emptyText = "no record found".

    Binding = "#{pageFlowScope.BinderSolutionsBean.binderTree}" >

    < af:column sortable = "false" headerText = "Script ID" id = 'c4' >

    < af:panelGroupLayout id = "pgl4" >

    < af:selectBooleanCheckbox id = 'sbc1' > < / af:selectBooleanCheckbox >

    < af:spacer width = "5" / >

    < af:outputText value = "#{row.scenarioId}" id = "ot5" / > "

    < / af:panelGroupLayout >

    < / af:column >

    < af:column sortable = "false" headerText = "Quote ID" id = "c1" >

    < af:outputText value = "#{row.quoteId}" id = "ot4" / > "

    < / af:column >

    < af:column sortable = "false" headerText = "NASP ID" id = "c2" >

    < af:outputText value = "#{row.naspId}" id = "ot2" / > "

    < / af:column >

    < af:column sortable = "false" headerText = "GCH ID" id = 'c3' >

    < af:outputText value = "#{row.gchId}" id = "ot3" / > "

    < / af:column >

    < af:column id = "c6" headerText = "Term" >

    < af:outputText value = "#{row.term}" id = "ot9" / > "

    < / af:column >

    < af:column sortable = "false" headerText = "Status" id = "c5" >

    < af:outputText value = "#{row.status}" id = "ot6" / > "

    < / af:column >

    < / af:table >

    follow some above recommendation such as the creation of additional attribute. You will also need the key in your collection, while making the data for your chart.

    You must write a custom selectionListener. On valueChangeEvent of box, get the key of a line and add the line at the bean.

    Maybe it's little help for you

    How to get the selected row in a table no-bind ADF

  • How to get the fnd_profile.value in the host program

    Hi all

    How to get the FND_PROFILE. VALUE('ORG_ID') in the host program.

    I loved not below, but it failed.

    v_return =' $ORACLE_HOME/bin/sqlplus - s $FCP_LOGIN < < END

    set pagesize 0

    trigger the echo

    fnd_profile. Value ('ORG_ID');


    END '

    echo $v_return

    but it error with the message: Retrun value SP-0734: unknown command beginning "fnd_profile...". »

    Kind regards


    > but it error with the message: Retrun value SP-0734: unknown command beginning "fnd_profile...". »

    .. .who is the same thing that will happen if you run SQL * more and type "fnd_profile.value...". »

    Assuming that fnd_profile.value is a function, you must select from the something (say double) or assign to a variable.

  • How to get the lov value(true/false) that is running by pressing the F3 function key


    I mapped key F3 function for list of values (lov), pressing F3 on the element of text (with associated lov) poster lov, but here the lov is implicitly run, so I am unable to get the value of lov(true/false), how to get the true or false value from the lov.

    I use Oracle forms 11 GR 2.

    What exactly do you mean by "the true or false value of the lov? Want to know if the user chose something from the lov. If so, you can create a KEY-LISTVAL-trigger on your textitem with something like

      -- do something here
    END IF;
  • How to get the value on a model that is defined in the java code in email


    I created a custom code and send email as well to custom component. I can send emails using the method:

    InternetFunctions.sendMailTo (EmailID, EmailTemplate, subject, cxt);

    But my problem is that I have to get a value in the model of "EmailTemplate" which are defined from java code. but I don't know how to get the value.

    I will highlight in the java code by using this code: binder.putLocal ("ErrorApproveRejectMsg", massegeBody);

    I'm trying to enhance the model using the code below, but not able to get.

    1 < $exec getValue ("#active", "ErrorApproveRejectMsg") $ >

    2 < $exec getValue ("#active", ErrorApproveRejectMsg) $ >

    3 < getValue ("ErrorApproveRejectMsg") $exec $ >

    4 < $exec getValue (ErrorApproveRejectMsg) $ >

    5 < getValue ("#local", ErrorApproveRejectMsg) $exec $ >

    6 < getValue ("#local", "ErrorApproveRejectMsg") $exec $ >

    7 < $ErrorApproveRejectMsg$ >

    8 < $exec ErrorApproveRejectMsg$ >

    Assuming that cxt will be your Service or execution context object

    You can do something like this

    DB. PutLocal ("ErrorApproveRejectMsg", "Error");

    cxt.setCachedObject ("DataBinder", db);

    PageMerger h = new PageMerger (db, cxt);

    cxt.setCachedObject ("PageMerger", h);

    InternetFunctions.sendMailTo (usersEmail, emailTemplate, emailSubject, cxt);

    where db is current databinder object, and you can put any variable custom in the workbook by using the putLocal method.

    Thank you


Maybe you are looking for