Custom TextInput itemEditor not getting focus.

I have an AdvancedDataGrid that has a custom itemEditor on an amounts field. If I do an inline textInput itemEditor everything works fine, but if I separate out the textInput itemEditor into it's own component then when I click on the amounts column it doesn't seem to get focus. What happens is I click once and it appears like the text box has appeared, but there is not cursor, so I can't start typing my amount. I need to click a second time in the cell for the cursor to appear.
Here are my datagrid columns:
<datagrids:columns>
        <mx:AdvancedDataGridColumn dataField="Customer" headerText="Cust" editable="false"/>
        <mx:AdvancedDataGridColumn dataField="Balance" headerText="Bal" editable="false"/>
        <mx:AdvancedDataGridColumn dataField="paymentAmountString" headerText="Amount"
                           editable="true" textAlign="right"
                           editorDataField="amountText" itemEditor="com.ihcfs.flex.renderers.AdvancedAmountTextInputRenderer">
        </mx:AdvancedDataGridColumn>
    </datagrids:columns>
Here is my custom renderer/editor, I've tried both a spark TextInput and an mx:TextInput. They both have the same behavior.
<?xml version="1.0" encoding="utf-8"?>
<s:MXAdvancedDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                  xmlns:s="library://ns.adobe.com/flex/spark"
                                  xmlns:mx="library://ns.adobe.com/flex/mx"
                                  focusEnabled="true">
    <fx:Script>
        <![CDATA[
            public var amountText:String;
        ]]>
    </fx:Script>
    <s:TextInput id="amountTextInput"
                 width="100%" height="100%"
                 textAlign="right"
                 change="amountText = amountTextInput.text;"
                 focusEnabled="true"
                 editable="true"
                 restrict="[0-9][.]"/>
</s:MXAdvancedDataGridItemRenderer>
If I do an inline item editor it works just fine, it's when I move it out to a reusable component that this behavior happens.
Inline:
<datagrids:columns>
        <mx:DataGridColumn dataField="customer" headerText="Cust"
                           editable="false" textAlign="center"/>
        <mx:DataGridColumn dataField="balance" headerText="Bal"
                           editable="false" textAlign="center"/>
        <mx:DataGridColumn dataField="paymentAmountString" headerText="Amount"
                           editable="true" editorDataField="text" textAlign="right">
            <mx:itemEditor>
                <fx:Component>
                    <mx:TextInput width="100%" height="100%" textAlign="right"
                                  focusOut="textinput1_focusOutHandler(event)"
                                  focusIn="textinput1_focusInHandler(event)">
                        <fx:Script>
                            <![CDATA[
                                import mx.controls.Alert;
                                import mx.controls.Text;
                                import mx.events.FlexEvent;
                                import mx.formatters.CurrencyFormatter;
                                [Bindable]
                                private var originalAmount:Number;
                                private var amountFormatter:CurrencyFormatter = new CurrencyFormatter();
                                protected function textinput1_focusOutHandler(event:FocusEvent):void
                                    var e:TextEvent = new TextEvent("amountEntered", true);
                                    var textField:TextField = event.target as TextField;
                                    var newAmount:Number = 0;
                                    if(!isNaN(parseFloat(textField.text))){
                                        newAmount = parseFloat(textField.text);
                                    e.text = new String((newAmount - originalAmount) + "");
                                    dispatchEvent(e);
                                protected function textinput1_focusInHandler(event:FocusEvent):void
                                    var textfield:TextField = event.target as TextField;
                                    if(!isNaN(parseFloat(textfield.text))){
                                        originalAmount = parseFloat(textfield.text);
                                    } else {
                                        originalAmount = 0;
                            ]]>
                        </fx:Script>
                    </mx:TextInput>
                </fx:Component>
            </mx:itemEditor>
        </mx:DataGridColumn>
    </datagrids:columns>
Thanks for the help!

I attempted to do as you said using the following code:
override public function setFocus():void{
     stage.focus = amountTextInput;
     amountTextInput.setFocus();
I also tried adding an event handler to my renderer to capture the focus in event and try the same thing:
<s:MXAdvancedDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                  xmlns:s="library://ns.adobe.com/flex/spark"
                                  xmlns:mx="library://ns.adobe.com/flex/mx"
                                  focusEnabled="true"
                                  focusIn="mxadvanceddatagriditemrenderer1_focusInHandler(event)">
protected function mxadvanceddatagriditemrenderer1_focusInHandler(event:FocusEvent):void
     amountTextInput.setFocus();
Neither of these solutions work. I could just go back to using the inline code, but I'd prefer to not copy and paste that code into several different grids.
Thanks again for the help.

Similar Messages

  • FD33 - Receivable Field in Customer master is not getting updated

    FD33 - Receivable Field in Customer master is not getting updated for the FI documents posted in the customer account. I need to know is there any setting either in FI or in SD, which control whether the FI document is relevant to credit check?
    In SD, we are having the item category but i am not getting how to control for FI documents? How can i make them credit relevant item. Also for special item, we are controlling the same through Transaction code : OBXY - by special GL indicators but what about the normal/general item?
    How can I control the general FI documents having various FI documents type as relevant to credit check?

    Apart from the above,please also check the below:
    FD33 - Receivable Field in Customer master is not getting updated for the FI documents posted in the customer account. I need to know is there any setting either in FI or in SD, which control whether the FI document is relevant to credit check?
    As per me there is no specific control to active the credit active field in FI values unlike for updating the sales values in FD32 we activate credit active for the item cat(VOV7) which will ensure the sales values to update (open order, open delivery and open invoices) in to credit management.
    For FI values to update i think this is inbuilt in the program only.( example update group 000012,15,18 etc).
    Any way coming into query not updating the receivables, please check the below points once again.
    1. Check the whether invoice has accounting document generated or not, make sure that it is generated then only system update the receivables.
    2. Even if the above all points are checked including above all posts,then also still the same issue repeating  then try to run the program RVKRED77, before this first run RVKRED88 and compare this values with FD32.
    thanks,
    Srinu.

  • Custom Duty is not getting inventorised

    Hi All
    I am doing MIGO for import PO.
    Custom Duty is not getting debited in stock account but it is posting into a separate line of Account key FR3.
    FR3 is maintained in pricing procedure for this condition tye JCDB for both Account key and accrual.
    Credit is going to the current account custom clearing account , but debit is nit going to stock account.
    Can anybody help please.
    Further how do I know that JCDB is non cenvatable.
    Regards
    Mukta

    Hi Mukta,
    >price difference account will remain same at the month/year end , and that cannot be inventorized later on as well, right?
    >>> Right
    >So how we will treat this account balance, income or loss kind off on the product?
    >>> This PRD GL values will hit P&L account & not the Balance sheet of company, At the end of the year depending upon the values coming in Credit side or Debit side, Profit or Loss is determined, I think some FI guy may explain you about this in much clear way w.r.t. Accounting.
    In case if you are having COPA, your material will be updated with standard price only,
    here also same logic is applied, normally standard price of any finished product is determined by running the product costing considering all the factors, if at all there is variance they will all go to Production variance & again it will be determined as profit or loss at the end of the year,
    for getting the right standard price for finished product you need to run the costing at regular intervals & update the material standard price accordingly w.r.t.COPA.

  • Tab not getting focus on left-click after suspend in Windows 7 64-bit.

    When I left-click on a tab in Firefox 4 rc 2 after my pc wakes up from suspend in Windows 7 64-bit the tab is not getting focus. I have to use the hotkeys in order to move to that tab. My mouse works fine in other programs.

    I have an imac
    I have an magic pad (same thing as the touch pad on a macbook really)
    I have an usb mouse I use both in windows and osx
    if your trackpad somehow was registered as actived for some reason it would seem as if it was the mouse
    had some *** situations both in windows and osx when my cat sit on the magicpad

  • How to make a JScrollPane not getting Focus?

    How to make a JScrollPane not getting Focus?
    When i tab out from a textfield inside a scroll pane focus is going to ScrollPane .And if i press tab once more then only focus is going to other textField which is outside the scrollpane.
    For me when i press tab from a text field inside a scrollPane ,i should go to textfield out side the scroll pane.
    satish

    Hi,
    I've the same problem, that I have to double click on tab
    to step from a textfield with a scrollpane to the next textfield in my panel.
    I tried to implement a FocusListener on my JScrollPane, but without success.
    Can you tell me in detail how to implement this listener ?
    Kind regards
    Andy Kanzlers

  • Swing JTextFeild is not getting focus -  Using jdk-7u17-windows-i586

    Hi All
    Recently I upgraded my Application with Java 1.7 (using jdk-7u17-windows-i586) from java 1.6. Swing component JTextfeilds used to get focus when using java1.6. But after up-gradation to Java 1.7 in few scenarios JTextFeild is not getting focus and I am unable to do any thing with keyboard. Again I have to click on some button with Mouse and need to keep focus using mouse in the textfeild.
    OS : Windows
    Used Java Version : jdk-7u17-windows-i586
    Issue : JTextFeild is not getting focus

    993277 wrote:
    Hi All
    Recently I upgraded my Application with Java 1.7 (using jdk-7u17-windows-i586) from java 1.6. Swing component JTextfeilds used to get focus when using java1.6. But after up-gradation to Java 1.7 in few scenarios JTextFeild is not getting focus and I am unable to do any thing with keyboard. Again I have to click on some button with Mouse and need to keep focus using mouse in the textfeild.
    OS : Windows
    Used Java Version : jdk-7u17-windows-i586
    Issue : JTextFeild is not getting focusThat's an incomplete bug report, not a question. This is a forum, not a bug tracking system. Try bugs.sun.com. And you may want to include a small sample program in the bug report that demonstrates the problem.

  • Toolbar icons are not getting focus

    The buttons on the toolbar are not getting focus when I move the mouse over the buttons. I am facing this problem if I use JRE 1.5.0_15 but it is working fine in JRE 1.6.0_6.
    But I need solution in JRE1.5.0_15.
    Can anybody please help me out is there any work around in JRE 1.5.0_15.
    Regards
    Venkat

    I found the solution, We need to change
    some coding style by giving conditions for particular version , foe example we should make changes in color initialisation. Insteatof color.red , use [RGB,1,0,0] and many.........

  • [OpenBox] Window not getting focus if skip_taskbar is set to 'yes'

    I have bound gmrun to ALT-F2. When I have skip_taskbar set to yes in rc.xml, gmrun does not get focus. This is quite annoying as I have manually click on it to get the focus.
    <application name="gmrun">
    <position>
    <x>center</x>
    <y>center</y>
    </position>
    <focus>yes</focus>
    <layer>above</layer>
    <skip_taskbar>yes</skip_taskbar>
    </application>
    If, however, I remove skip_taskbar as shown below, gmrun get its focus when launched.
    <application name="gmrun">
    <position>
    <x>center</x>
    <y>center</y>
    </position>
    <focus>yes</focus>
    <layer>above</layer>
    </application>
    * Same issue with mplayer/terminal - Doesn't get focus when skip_taskbar is set to 'yes'.
    Last edited by keerthi (2008-10-03 19:45:36)

    I have the same problem, but, and this part is really bad, I also mostly don't have this issue.
    So I can't help except to say I run OB 3.4.7.2 and [sometimes!] have the same issue as you.
    -dav7
    Last edited by dav7 (2008-10-04 03:49:06)

  • Custom control in custom page layout not getting shown

    Hi,
    I have created a site column for Date field:
    <Field ID="{GUID}" Name="MyCustomPageLayoutDate" StaticName="MyCustomPageLayoutDate" Group="TestGroup" Type="DateTime" Format="DateOnly" DisplayName="Date" Required="FALSE" ><Field ID ="{guid}" Name ="MyCustomLayoutDateDisplay" DisplayName="Date Display"
             Group="TestGroup"
             Type="Calculated"
             ResultType="Text"
             ReadOnly="TRUE"
             Required="FALSE">
        <Formula>=TEXT([Date],"MMMM dd, yyyy")</Formula>
      </Field>
    This is added in the page layout content type:
    <FieldRef ID="{guid}" Name="MyCustomPageLayoutDate" />  <FieldRef ID="{guid}" Name ="MyCustomLayoutDateDisplay" />
    In the custom page layout, it is added as below:
    <Publishing:EditModePanel ID="EditModePanel5" runat="server" CssClass="edit-mode-panel">
    <tr>
    <td>
    Date
    </td>
    </tr>
    </Publishing:EditModePanel>
    <PublishingWebControls:EditModePanel ID="DateEditModePanel" runat="server" PageDisplayMode="Edit" SupressTag="True">
    <tr>
    <td >
    <PageFieldDateTimeField:DateTimeField ID="DateTimeField1" FieldName="GUID" runat="server">
    </PageFieldDateTimeField:DateTimeField>
    </td>
    </tr>
    </PublishingWebControls:EditModePanel>
    <PublishingWebControls:EditModePanel ID="DatePublishModePanel" PageDisplayMode="Display" runat="server">
    <tr>
    <td>
    <SharePoint:CalculatedField ID="CalculatedDateField" FieldName="guid" runat="server" />
    </td>
    </tr>
    </PublishingWebControls:EditModePanel>
    In the edit mode, the date is getting shown, and I am able to select a date. When the page is published, the entered date is not getting displayed.
    How to fix this?
    Thanks

    Hi,
    I tried to reproduce this issue like this:
    1. Create a DateTime site column “MyDateTimeCol01”;
    2. Create a Calculated site column “MyCalculated03” with formula “=TEXT(MyDateTimeCol01,"MMMM dd, yyyy")”;
    3. Create a Page Layout content type contains the two site columns above;
    4. Create a Page Layout with the Page Layout content type, the source code of this page layout as below:
    <asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server">
    <PublishingWebControls:EditModePanel runat=server id="EditModePanel1" PageDisplayMode="Edit">
    <SharePointWebControls:DateTimeField FieldName="9492c1ff-851f-4d1c-bcbf-5637b69ebd63" runat="server"> </SharePointWebControls:DateTimeField>
    </PublishingWebControls:EditModePanel>
    <br/>
    <PublishingWebControls:EditModePanel runat=server id="EditModePanel2" PageDisplayMode="Display">
    date time text:
    <br/>
    <SharePointWebControls:CalculatedField FieldName="9c00c4dc-6a53-4abd-9fa4-6b4dd266c898" runat="server"></SharePointWebControls:CalculatedField>
    </PublishingWebControls:EditModePanel>
    </asp:Content>
    5. After that, create a publishing page with this custom page layout:
    In Edit mode:
    In Display mode:
    I suggest you follow the steps above to make another test to see if the issue persists.
    Thanks 
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Custom duty is not getting captured

    Dear all,
      I have configured import pricing procedure and craeted PO with that pricing procedure.While capturing the Custom duty in miro,value and Quantity is not getting captured in it.As per the procedure import purchasing i m following steps given below
    1) I m creating Import PO
    2)Capturing custom duty in miro with defining commissioner of customs as a vendor
    3)Capturing excise invoice at the time of good receipt
    4)Posting excise invoice.
    5)Miro for capturing the goods cost for normal vendor 
       Pls. help me out for this.
    Thank and Regards
    Vaishali G.

    hi vaishali,
    i have confgiured, a import pricing schema, and enters all values manully in po, and its not calculated in invoice tab like local purchase,.
    can u tell me, what will be the finace impact of this, and is it correc to do this, does this will have any entry on CIN  tables.
    pls reply,
    asif

  • Custom Search Portlet not getting the results as expected.

    Hi All,
    I am using CustomSearchPortlet and I am having following problems. I created an itemtype IT with attributes A1,A2.Then I configured my custom search portlet to search based on A1,A2 attributes only. I have created 3 instances of items Item1,Item2,Item3 based on itemtype IT as follows
    Item1(A1=value11,A2=value12)
    Item2(A1=value21,A2=cat22)
    Item3(A1=value11,A2=value32)
    and when I search for value11, I get Item1,Item3 as results. Till here it was nice and behaving as expected. Suddenly after some time, it stopped working and i am not getting the results I used to get before. The only thing i remember to have changed in the meanwhile was to change the A2 attribute values of some of these items. my searchtext remained the same as value11. I was confused as to why the custom search portlet is not getting these results that it was getting before...Thanks for any help in solving this.
    Thanks,
    Prasanth.

    Hi,
    If Oracle Text is enabled in your portal, the updated items need to be synchronised before they can be returned in the Search. Since you updated those items, though not changing values for this particular attribute, it will be in the queue for indexing and hence will not be returned until it is indexed.
    Thanks.

  • Custom Afaria Client not getting installed on IOS devices

    Hello,
    I am using Afaria SP4 in my organization with no hotfix applied
    I have created a custom Afaria Client App for IOS devices.
    I am succesfully able to enroll my IOS devices and install the custom app during enrollment,when i am trying to hit the system tenant.
    However,when i am trying to hit manually created tenants,enrollment is
    done and also the device is under MDM control,but custom Afaria client app is not getting installed during enrollment.
    I have attached the screenshot of the page where i have uploaded the ios afaria application in Afaria console.
    The error that i can see in the icu logs while enrolling ios device in manually created tenant is as follows-
    "The manifest for the app at
    http://65.240.141.130:23003/ps2/ps.svc/Package/Content/0435A04B083AB0E663FE410BBFE7238D31E6B113/7de2f89d-6cdf-458d-a68c-0bb72e616c68/3/Virt.Def.App.plist
    could not be validated"
    Please guide to resolve the issue.
    thanks and regards,
    Jigar Salecha

    I'm quite sure you need to set this up per tenant. Have you tried to upload the custom client to each tenant ?
    BR
    Peter

  • A custom perks wagetype not getting adding to taxable salary

    Hi experts.
    I need advice on the below issue.
    My client recently raised this issue. There is this custom perk wage type which they pay through Infotype 14. Now while generating form 16 the amount paid through this wage type is not getting added to Gross salary in F 16.
    I checked the configurations for this wage type in table V_512W_D  and found that it doesn't cumulate to anything(Total gross salary, Annual irregular income etc) and hence it is not getting added to Gross salary in F16. Which means due to wrong configuration of this wagetype the problem occured.
    Even if I correct the configuration now, the payroll has already been run and results cant be reversed as financial year 2014 books are closed now.
    So is there a way to add the custom wage type amount to Gross salary in F16. I explored table V_T52D3 and V_T52D4 but it cant be done through it.
    Kindly suggest how to correct this issue by atleast correcting the amounts in Form 16.
    Best regards
    Mahwish Khatib.

    Hi Jagan
    I am talking about Gross salary total on page one and not the segregation of components of Gross salary on pg 2. In the segragation it can be added but can it be added in the total of Gross salary on page 1?

  • Query:  Customer Exit variable not getting populated

    Hello Experts,  I created a Customer Exit variable (ZPREV_MTH_OPS) in the query designer (7.0).  I also put the necessary code in the function module "Z_BWFI_QUERY_CELL_MANIPULTN", but the query variable is not getting populated when I run the query using RSRT.  The boxes for "Variable is ready for input" and "variable is without context" boxes when defining the variable.
    This is my code in the exit:
    case i_vnam.
        when 'ZPREV_MTH_OPS'.
         break-point.
          if i_step = 2.
            clear l_s_range.
            if sy-datum+4(2) = '01'.
              wa_prev_month = '12'.
              wa_prev_year = sy-datum+0(4).
              wa_prev_year = wa_prev_year - 1.
            else.
              wa_prev_month = sy-datum+4(2) - 1.
              wa_prev_year = sy-datum+0(4).
            endif.
            concatenate wa_prev_year wa_prev_month '01' into wa_datum.
            call function 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
              exporting
                day_in            = wa_datum
              importing
                last_day_of_month = wa_datum2.
            concatenate wa_prev_year wa_prev_month '01' into wa_datum.
    *        l_s_range-low = wa_datum.
    *        l_s_range-sign = 'I'.
    *        l_s_range-opt = 'BT'.
    *        l_s_range-high = wa_datum2.
    *        l_s_range-sign = 'I'.
    *        append l_s_range to e_t_range.
            l_s_range-low = '20080901'.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'BT'.
            l_s_range-high = '20080930'.
            l_s_range-sign = 'I'.
            append l_s_range to e_t_range.
          endif.
      endcase.
    I also put a break point the exit, but it's not coming to the breakpoint. 
    Any suggestions?
    Thanks.

    Josh,  the link you provided reminded me to include the code in the include ZXRSRU01 also, instead of just changing the function module.  Thanks for your help and all those who tried to help me.
    case i_vnam.
       when 'ZREL12MTH' or 'ZPREV_MTH_OPS'.
         call function 'Z_BWFI_QUERY_CELL_MANIPULTN'
           EXPORTING
             i_vnam        = i_vnam
             i_vartyp      = i_vartyp
             i_iobjnm      = i_iobjnm
             i_s_cob_pro   = i_s_cob_pro
             i_s_rkb1d     = i_s_rkb1d
             i_periv       = i_periv
             i_t_var_range = i_t_var_range
             i_step        = i_step
           IMPORTING
             e_t_range     = e_t_range
             e_meeht       = e_meeht
             e_mefac       = e_mefac
             e_waers       = e_waers
             e_whfac       = e_whfac
           CHANGING
             c_s_customer  = c_s_customer.
    endcase.

  • Why my textfield can not get focus?

    I put a textfield on the first tab of a tabbed panel. I need this textfield to get the focus when I open the first tab. I tried to use grabfocus() method in the constructor of class, but it does not work. Does anybody know why? and how can I solve it?
    Thanks!

    No, I didn't call grab/requestFocus on the event thread.
    My code is like this:
    public class GeneralPane extends JPanel {
    JPanel ltPane;
    private JTextField txtCountry;
    public GeneralPane() {
    initComponents();
    private void initComponents(){
    setLayout(new BorderLayout());
    //Add another Panel to contain Labels and Text fileds
    ltPane = new JPanel();
    FocusListener mFL = new FL();
    txtCountry = new JTextField("US", 20);
    //this listener is used to store the data in the textfield into a variable
    txtCountry.addFocusListener(mFL);
    // add the textfield into ltPane
    mUtil.insertTextPane(txtCountry,ltPane);
    //txtCountry got focus
    //txtCountry.setFocusable(true);
    ltPane.requestFocus();
    //txtCountry.requestFocusInWindow();
    Then in the main program, I create an instance of this class and then use addTab(...) function into the my tabbedPanel.
    The logic is simple, but the textfield still couldn't get focus when I open the tabbedPanel.

Maybe you are looking for

  • Disk Utility Error Message for Firewire HD: Could not unmount disk

    I have one internal HD with 10.4.2, another with 9.2.2, and an external firewire with 9.2.2. Sometimes the firewire does not show up on my desktop, or when I try to copy files onto it the beachball spins endlessly. When I try to reboot holding down t

  • Problem with the data source and web.xml

    I have an issue where JSC is removing my resource reference: <resource-ref> <description>Creator generated DataSource Reference</description> <res-ref-name>jdbc/localOracleDatabase</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Co

  • Acrobat 8 Unable to Search for words after convertion from mircrosoft word

    Hi all, I got a problem with a user using Adobe Acrobat 8 search function. he converted his Microsoft Word document to PDF file. But he is unable to search/find most of the words after convention, even thou the word is right there it will just say it

  • Using Prepared Statement to pass array of primary key

    How can i use the PreparedStatement to send the array (It can be variable depend upon the user selection) of primary keys to database For example I want prepare statement somthing like this public Collection findByIds(long[] ids){ String sql = "selec

  • Querry over pricing procedure used in creation of BIlling request

    Hi,      While creation of BIlling request via DP90 , system considers DIP Profile & pricing procedure and brings data /rates to billing procedure .. I am trying to understand the pricing procedure, i am using standard pricing procedure RVAA01 -> Whe