Need help for filterFunction with special char

Hi,
I'm doing a simple search/filter process to a dataGrid collection upon text inputs with filterFunction. What I'm facing problem is, in one of my column field (on which I'm filtering) has dot "." as a suffix and it doesn't includes in the search process.
Say I've a few values like - i_24., i_245., i_256.
Now with the present filterfunction when an user inputs i_24. it shows the other record as well - i_245., where the expected entry should only be i_24. (since i_245. is not i_24.5)
But it seems the search function is not taking the dot "." as a character in the search process, or at least when it is stays as suffix.
I thouht maybe some RegExp could overcome the problem, but I'm not good in that either.
Please, help.
Thank you.
Regards,
Santanu

aSuitableBoy,
Use the String's "indexOf" method.  (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/String.html#indexOf()).
The syntax would be: "String(<YOUR_COLLECTION>.<FIELD_TO_FILTER_ON>).indexOf(<COMPARE_STRING_FROM_TEXT_INPUT>)
Here's a really small code snippet that I just wrote up, that works:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="cc();">
          <mx:Script>
                    <![CDATA[
                         import mx.controls.Alert;
                         import mx.collections.ArrayCollection;
                         [Bindable] private var ac:ArrayCollection = new ArrayCollection();
                    private function cc():void
                                   var o:Object = new Object();
                                   o.field1 = "Value 1:";
                                   o.field2 = "i_24.";
                                   o.field3 = "Some other value...";
                                   ac.addItem(o);
                                   o = new Object();
                                   o.field1 = "Value 2:";
                                  o.field2 = "i_245.";
                                   o.field3 = "Some other value...";
                                   ac.addItem(o);
                                   o = new Object();
                                  o.field1 = "Value 3:";
                                   o.field2 = "i_256.";
                                   o.field3 = "Some other value...";
                                   ac.addItem(o);
                    private function filterFunc(o:Object):Boolean
                                   return String(o.field2).indexOf("i_24.") != -1;
                    ]]>
          </mx:Script>
          <mx:HBox width="100%" height="100%">
                         <mx:DataGrid id="dg" height="100%" width="100%" dataProvider="{ac}">
                                        <mx:columns>
                                                       <mx:DataGridColumn headerText="Column 1" dataField="field1" />
                                                       <mx:DataGridColumn headerText="Column 2" dataField="field2" />
                                                       <mx:DataGridColumn headerText="Column 3" dataField="field3" />
                                        </mx:columns>
                         </mx:DataGrid>
                         <mx:Button id="b1" label="Filter" click="{ac.filterFunction = filterFunc; ac.refresh();}" />
          </mx:HBox>
</mx:Application>

Similar Messages

  • Need help for retrieving parameter containing "\" char from ServletRequest

    I'm implementing a portal using Jetspeed 1.4, and I would like to include the "\" character in the login name of a HTML form like below:
    login_name=INTRANET\Guest
    And in many parts of the programs, it needs to interpret the path to identify the login name via the code segments below:
    StringTokenizer st = new StringTokenizer(req.getPathInfo(), "/");
    boolean name = true;
    String pathPart = null;
    while (st.hasMoreTokens()) {
    if (name == true) {
    tmp = URLDecoder.decode(st.nextToken());
    name = false;
    else {
    pathPart = URLDecoder.decode(st.nextToken());
    if (tmp.length() != 0) {
    /* start debug */
    System.out.println(pathPart);
    /* end debug */
    add(convert(tmp), pathPart);
    name = true;
    I expect that I should be able to be retrieved the login name as INTRANET\Guest. However, this is not the case, and I got INTRANET/Guest instead. By looking at the value of req.getPathInfo() of the 1st line, the path has already been wrongly interpreted as:
    /media-type/html/user/INTRANET/Guest/page/...
    Is there any way I can get the same parameter if "/" character is included? On the other hand, I want to reference the source code of Servlet 2.2 or above, but I can't find it available from java.sun.com, while the only v2.1.1 available here is simply a rubbish. Please help.
    Thank you for your attention.

    Thank you for your reply. However, because I'm trying to modify the open source, and the login name is hard-coded appended into the path, where effort modifying this is very huge. It will be very convenient if I ca n find an alternative to get the value of getPathInfo() but with "\", or I can reach the source code and modify it straightly.
    However, I can't imagine even Servlet 2.2+ source code (2.1.1 is available, but no use) is not made available by anywhere of java.sun.com, including the SCSL. What's so-called open source?!

  • Need help for deadline with timing issues

    Hello everyone,
    (I'm still using the '08 versions of iLife)
    I have to meet a deadline within a week, and am having a problem with timing. I have a group f 32 slides, which I want to sync with an existing narrative soundtrack. I've attempted this in Keynote, GarageBand, and iMovie, with identical results...
    When I preview the presentation in any of those apps, it all looks fine. But when I save it as a movie, and play it, the images do not change at the times I had set for them. In QuickTime, if I hit "pause", and then "play", the image jumps to the correct one, but during normal playback, it seems to "hang" on certain images, while the soundtrack continues to play smoothly. I've got to meet my deadline with this project. Can anyone help?
    Thanks in advance.

    Hi Namrata,
    Requirement is very clear, you need to handle it in different PCR's need to be called in single PCR.
    ex. ZSS1 in call ZSS2 and ZSS3.
    Create a Constant in T511k and maintain dates of your payroll periods.
    And then write as below:
    AMT=1
    * <then call new calculation PCR>
    < <then call Old calculation PCR>
    Thank you,
    Sreenvaas.

  • Need Help for Array with Object

    hey there guys... am trying to complete my project which is to create a Library System. Was able to create a list to show the books available when they select the book and click a borrow button it can print out the book.
    what problem i have now is that when a student click borrow... the value how can i transfer to an array inside the object student.
    i am usin a main screen (ms) who is controlling all the functions. been trying and trying on this for very long hopefully there will be those who are able to help me out.
    my customer screen would be like this... but how can i add in the array for books borrowed
    import javax.swing.*;
    class Customer
         private String name;
         private int accNo;
         private String password;
         private double balance;
         private Books borrow[]=new Books[5];
         int borrowCount=0;
         static int customerCount=0;
         private MainScreen ms;
         Customer(String n, int no, String p, double b)
              name=n;
              accNo=no;
              password=p;
              balance=b;
              customerCount++;
              JOptionPane.showMessageDialog(null,name +" record created");
              display();
    /* Trying to Create the Array to store information
         public void setStudentBorrow(String a)
              borrow[borrowCount]=a;
              borrowCount++;
              JOptionPane.showMessageDialog(null,"Book Borrowed");
         public String getStudentBorrow()
              for(int i=0;i<borrowCount-1;i++)
              {     return borrow;     }
         public String getPassword()
         {     return password;     }
         public String getName()
         {     return name;          }
         public int getAccNo()
         {     return accNo;     }
         public double getBalance()
         {     return balance;     }
         public void setName(String n)
         {     name=n;     }
         public void setPassword(String p)
         {     password=p;     }
         public void setBalance(double b)
         {     balance=b;     }
         public void setAccNo(int no)
         {     accNo=no;     }
         public void display()
              JOptionPane.showMessageDialog(null,
              "\nCutomer Number : "+ customerCount+
              "\nName :"+name+
              "\nAccount Number: "+accNo+
              "\nBalance (RM): "+balance,"Customer record",
              JOptionPane.INFORMATION_MESSAGE     );

    Cross Post:
    http://forum.java.sun.com/thread.jspa?threadID=779224&messageID=4433689#4433689

  • I have problem with buying in games , I got the massage that the purchased can not be completed , please contact iTunes support.. I need help for my case please

    I have problem with buying in games , I got the massage that the purchased can not be completed , please contact iTunes support.. I need help for my case please

    http://www.apple.com/support/itunes/contact/

  • Need help for finding objects impacted by size change for an infoobject

    hi all,
    need help for finding objects impacted by size change
    for xxx infoobject, due to some requirements, the size to be changed from
    char(4) to char(10), in the source database tables as well as adjustment
    to be done in BI side.
    this infoobject xxx is nav attribute of YYY as well as for WWW
    infoobjects. and xxx is loaded from infopkg for www infoobject load.
    now that i have to prepare an impact analysis doc for BI side.
    pls help me with what all could be impacted and what to be done as a
    solution to implement the size change.
    FYI:
    where used list for xxx infoobject - relveals these object types :
    infocubes,
    infosources,
    tranfer rules,
    DSO.
    attribute of characteristic,
    nav attribute,
    ref infoobject,
    in queries,
    in variables

    Hi Swetha,
    You will have to manually make the table adjustments in all the systems using SE14 trans since the changes done using SE14 cannot be collected in any TR.
    How to adjust tables :
    Enter the table name in SE14. For ex for any Z master data(Say ZABCD), master data table name would be /BIC/PZABCD, text table would be /BIC/TZABCD. Similarly any DSO(say ZXYZ) table name would be /BIC/AZXYZ00 etc.
    Just enter the table name in SE14 trans --> Edit --> Select the radio button "Save Data" --> Click on Activate & adjust database table.
    NOTE : Be very careful in using SE14 trans since there is possibility that the backend table could be deleted.
    How to collect the changes in TR:
    You can collect only the changes made to the IO --> When you activate, it will ask you for the TR --> Enter the correct package name & create a new TR. If it doesn't prompt you for TR, just goto Extras --> Write transport request from the IO properties Menu screen. Once these IO changes are moved successfully, then the above proceduce can be followed using SE14 trans.
    Hope it helps!
    Regards,
    Pavan

  • Need help for Format HD

    Hi I need Help for Formating HD so Wat Key need hold on start up for format HD I apprciated you Help

    Jesus:
    Formatting, Partitioning Erasing a Hard Disk Drive
    Warning! This procedure will destroy all data on your Hard Disk Drive. Be sure you have an up-to-date, tested backup of at least your Users folder and any third party applications you do not want to re-install before attempting this procedure.
    • With computer shut down insert install disk in optical drive.
    • Hit Power button and immediately after chime hold down the "C" key.
    • Select language
    • Go to the Utilities menu (Tiger) Installer menu (Panther & earlier) and launch Disk Utility.
    • Select your HDD (manufacturer ID) in left side bar.
    • Select Partition tab in main panel. (You are about to create a single partition volume.)
    • _Where available_ +Click on Options button+
    +• Select Apple Partition Map (PPC Macs) or GUID Partition Table (Intel Macs)+
    +• Click OK+
    • Select number of partitions in pull-down menu above Volume diagram.
    (Note 1: One partition is normally preferable for an internal HDD.)
    • Type in name in Name field (usually Macintosh HD)
    • Select Volume Format as Mac OS Extended (Journaled)
    • Click Partition button at bottom of panel.
    • Select Erase tab
    • Select the sub-volume (indented) under Manufacturer ID (usually Macintosh HD).
    • Check to be sure your Volume Name and Volume Format are correct.
    • Click Erase button
    • Quit Disk Utility.
    cornelius

  • Need help for my requirement...

    Need help for my requirement...
    Hello Experts,
    I have report where users can input the company, housebank, account ID and posting date.
    Now in one column of my report named 'Cash in Bank', I need to get all postings from cash
    accounts with GL code ending in '0'. Now, I know that I can get the amounts in BSIS/BSAS
    but how do I link it with the proper bank and account?
    For example:
                       Cash in Bank
    Bank A
      Account ID 1     1,000,000
      Account ID 2     25,000,000
    Hope you can help me guys. Thank you and take care!

    hi Viraylab,
    each house bank you can find in table T012, in T012K you'll find the bank accounts to the housebank, the G/L account will be in T012K-HKONT.
    hope this helps
    ec

  • Need help for flash builder

    i need help for flash builder 4 and papervison 3d. I need to create a slider with it ranges of value from 10 to 50 to adjust the camera values for the camera.fov and also need to create it for the yaw of the object from 0 to 360. I try to look for any slider event and classes in this program but cant find any, btw, i need to use the AS only project file.
    here is my codes:
    can you please tell me how i should modify the codes?
    package
        import flash.display.BitmapData;
        import flash.display.Sprite;
        import flash.events.Event;
        import org.papervision3d.materials.BitmapFileMaterial;
        import org.papervision3d.materials.BitmapMaterial;
        import org.papervision3d.objects.primitives.Sphere;
        import org.papervision3d.view.BasicView;
        [SWF (width="800", height="600", backgroundColor="0x000000",frameRate="30")]
        public class EarthBitmap extends BasicView
            private var sphere:Sphere;
            public function EarthBitmap()
                super(800 , 600);
                var earthmaterial:BitmapFileMaterial = new BitmapFileMaterial("../assets/Earth.jpg");
                sphere = new Sphere(earthmaterial,100,20,18);
                camera.fov = 25;
                scene.addChild(sphere);
                addEventListener(Event.ENTER_FRAME,rotateSphere);
            public function rotateSphere(evt:Event):void
                sphere.yaw(0.2);
                singleRender();

    Turn the click handler into a full on separate function. Then store all the views in an array and use Math.rand() to randomly choose one.
    Something like this:
    <fx:Script>
         <![CDATA[
              var questionsArray:Array = {question2,question3,question5,questionRed,questionGeography};
              function buttonClickHandler(event:MouseEvent){
                   var randomProblem:int = Math.floor(Math.random()*(questionsArray.length));     //generates a random integer between 0 and the total number of questions in the array (arrays are 0-based)
                   navigator.pushView(questionsArray[randomProblem]);
         ]]>
    </fx:Script>
    <s:Button id="randomProblemButton" label="Next Problem" click="buttonClickHandler(event)" />
    Haven't tested that, but something along that line should work

  • Need help for importing oracle 10G dump into 9i database

    hi, Someone help me to import oracle 10G dump into 9i database. I'm studying oracle . Im using oracle 10G developer suite(downloaded from oracle) and oracle 9i database. I saw some threads tat we can't import the higher version dumps into lower version database. But i'm badly need help for importing the dump...
    or
    someone please tell me the site to download oracle 9i Developer suite as i can't find it in oracle site...

    I didnt testet it to import a dump out of a 10g instance into a 9i instance if this export has been done using a 10g environment.
    But it is possible to perform an export with a 9i environment against a 10g instance.
    I am just testing this with a 9.2.0.8 environment against a 10.2.0.4.0 instance and is working so far.
    The system raises an EXP-00008 / ORA-37002 error after exporting the data segments (exporting post-schema procedural objects and actions).
    I am not sure if it is possible to perform an import to a 9i instance with this dump but maybe worth to give it a try.
    It should potentially be possible to export at least 9i compatible objects/segments with this approach.
    However, I have my doubts if this stunt is supported by oracle ...
    Message was edited by:
    user434854

  • Need Help for Nokia 6500 slide

    Hi all I'm A new Guy here ,
    But I do really need help for hard reset my phone
    I already try *#7073# But It doesn't work ,
    If Anybody know to make a hard reset please help

    rwss wrote:
    I'v got te same problem with my 6500 Slide, is there a button combination that we have to press
    to hard reset the 6500 Slide?!
    How does the 6500 slide hard reset?
    That's simple.
    All you have to do is:
    From MENU goto SETTINGS, When there scroll down and select 'Restore Factory Setting'.
    There are two options in there:
    "Restore Settings only"
    and
    "Restore all"
    Select "Restore All"
    When done the phone will delete every thing on the Phone memory(C:\)(contacts,picture,messages etc)
    and also restore phone to its original settings and will restart.
    This proceedure is mostly common on S40 phone.
    Hope this explain and solve the problem.

  • Need help for cenvat reversal

    Hi Friends,
    Need help for cenvat reversal.
    Reversed MIRO by MR8M & MIGO by 102 movement but not able to post & cancel cenvat by J1IEX.
    In table J_1IEXCHDR status = "P" and J1I5 does not update for document of 102 movement because reversal document of MIGO, i.e. material document with 102 movement type does not have excise tab. MBSM-Cancelled Material Documents, does not show any of the material documents.
    Want to reverse the cenvat credit, please help.
    --Anil Bhamere

    Hi,
    If I select Cancellation in MIGO then there is only Material Document option.
    In MIGO Purchase Order option shows for Goods Receipt, Goods Issue and Subsequet Adj.
    In this case I have been selected Goods Receipt option followed by purchase order number by which original goods receipt MIGO was created, selected 102 movement type and from line item respective MIGO document. The reversal document created successfully where as original MIGO document does not show in cancelled document list. When post option selected from J1IEX and entered vendor excise number then message appeared as No Part I exists for availing credit in excise invoice xxxxx.
    If Cancel option selected from J1IEX and entered vendor excise number then message appeared as Excise invoice xxxx has already been posted for vendor xxxxx.
    Please help.
    Regards,
    Anil Bhamere

  • Need help for writing extract program

    hi
    i need help for writing extract program to retriew data from legacy system.
    i already developed bdc programs for me31k and me21.
    my requirement is to write extract program s for those t.codes.
    to retriew data from legacy system and stored in flat file.

    i need help with a java program. it is a program that allows the user to enter a student's GPA, number of extracurricular activities, and number of service activities. The user can not enter a gpa above 4.0 or below 0. The user can not enter a negative number for the number of both activities. If the student meets the following criteria: 1) GPA of 3.8 or above and at least one extracurricular activity and one service activity, 2) GPA below 3.8 but at least 3.4 and a total of at least three extracurricular and service activities, 3) GPA below 3.4 but at least 3.0 and at least two extracurricular activities and three service activities, the message "Scholarship candidate" should display. If the student does not meet the criteria above, then the message"not a candidate" should display. Can you help me, please?
    You haven't posted ANY 'java program' for us to help with.
    The forum is NOT a coding service. It is to help you with YOUR code.
    Post the code you have written and SHOW us (don't just tell us) how you compile it and execute it and the results you get. Then we can help you with any problems you are are having.
    If you need help understanding just what the program should be doing you need to ask your instructor to clarify the assignment.

  • Need help for user exit mereq001

    Hi,
    I need help for user exit mereq001. I think I messed up with include table CI_EBANDB and CI_EBANMEM. And When I tried to check the syntax . It gives me error like : <b>Class IF_PURCHASE_REQUISITION. Inconsistency in the dictionary for the structure mereq_item_s_cust_data.</b> Anyone had experience for this exit? I just need to extract costcenter information of the each item from the requisition and block the requisiton if the costcenter are differents from each other before the requisition is saved. Any one has idea about it?
    Thanks.

    biao,
    Have you checked this struture consistency from SE11. Also check the activation log.
    If there are any errors and you are not able to rectify the same use RSDDCHECK program, give your table name and run the report.
    This will list down the error structures releated this table and also prompts for you to activate it.
    Regds
    Manohar

  • Need help for finding oracle payables tables

    Hi,
    I need help for finding tables relating fields INVOICE_ID, NOTIFICATION_ID and APPROVAL_STATUS or WFAPPROVAL_STATUS. I have searched a lot but has been unable to find any table containing all the above mentioned fields. I found the table WF_NOTIFICATIONS for INVOICE_ID, however have been unable to find the latest tables with INVOICE_ID and APPROVAL_STATUS as fields.
    All the tables having this combination are either very old tables which are not used anymore or doesnt give the required data. Please let me know where am i going wrong. Once i get the required tables, i need to join the tables to get the required data with the imp fields. Also, the values of WFAPPROVAL_STATUS are not very clear to me. I need values for it as APPROVED, REJECTED AND INITIATED.

    Hi Swetha,
    You will have to manually make the table adjustments in all the systems using SE14 trans since the changes done using SE14 cannot be collected in any TR.
    How to adjust tables :
    Enter the table name in SE14. For ex for any Z master data(Say ZABCD), master data table name would be /BIC/PZABCD, text table would be /BIC/TZABCD. Similarly any DSO(say ZXYZ) table name would be /BIC/AZXYZ00 etc.
    Just enter the table name in SE14 trans --> Edit --> Select the radio button "Save Data" --> Click on Activate & adjust database table.
    NOTE : Be very careful in using SE14 trans since there is possibility that the backend table could be deleted.
    How to collect the changes in TR:
    You can collect only the changes made to the IO --> When you activate, it will ask you for the TR --> Enter the correct package name & create a new TR. If it doesn't prompt you for TR, just goto Extras --> Write transport request from the IO properties Menu screen. Once these IO changes are moved successfully, then the above proceduce can be followed using SE14 trans.
    Hope it helps!
    Regards,
    Pavan

Maybe you are looking for

  • How to split ACC_DOCUMNET03 IDOC after 100 line items for given posting

    Hi Friends, I need to create an IDOC based on the company code and posting date & a particular company code for a given date has reached 100 line items then create another IDOC for that. EX: I have 150 Line Items in file 120 Items are related to Comp

  • HELP i dropped my ipod and now ....

    It doesn't turn on and when I connect my ipod to USB to my computer it work, the battery is charging. But on the left hand top it show a locked key icon. I try to rest and restored but still doesn't work. HELP!

  • Need external hard drive ....any recommendations?

    I have two internal hard drives (one just for movies = 250 gyg drive) which is almost full. Need to get an exernal drive what is recommended. Any experience with the 800 external drive? What about capacity? are those big ones noisy? Is having 2 bette

  • Adobe Interactive Forms in SAP HCM

    Hi, What do Adobe Interactive Forms in SAP HCM do? What is the difference between Interactive/Non-Interactive Forms? In which sub-modules of SAP HCM are such forms used? What is that an HCM consultant has to expect from Basis and ABAP consultants for

  • Trouble with variables

    Hi everyone. So, here we go, im about to pull what little hair Ive got left. I figured out how to accomplish the script, Im just screwing up somewhere in the execution. Basically, I'm trying to load a variable. The challenge is that this variable has