Funny behavior with Item Editors

I have a DataGrid which has a column with CheckBoxes (item
editors), initially they are all unselected (suppose there are 5
rows), if i click on the 5 of them quickly to change them to
selected then something funny happens, some of them change to
selected and then to unselected again. If i do this slowly, then it
works fine. And the same happens if they are all selected and then
i quickly click on the 5 of them to unselect them, some of them
became selected again.
It is as if Flex wasn't able to process the changes so fast,
so by the time it is processing a CheckBox's change another one
changes too and it reverts the first one to its previous state.
Any idea why this happens? is it a bug, a mistake in my code,
a normal behavior? what is it?

Code:
<mx:DataGrid id="dgcatalogo" width="100%" editable="true"
height="236" dataProvider="{arrCCostoDisplay}" >
<mx:columns>
<mx:DataGridColumn dataField="ccoEstatus"
headerText="{resource.getString('incluir')}" width="50"
editable="true" rendererIsEditor="true"
itemRenderer="renderer.CheckRenderer"
editorDataField="result"/>
<mx:DataGridColumn dataField="ccoDescripcion"
headerText="{resource.getString('descripcion')}" editable="false"
width="200"/>
</mx2:columns>
</mx:DataGrid>
where CheckRender is:
<mx:VBox xmlns:mx="
http://www.adobe.com/2006/mxml"
horizontalAlign="center">
<mx:Script>
<![CDATA[
// Define a property for returning the new value to the
cell.
public var result : Boolean = false;
]]>
</mx:Script>
<mx:Binding source="editor.selected" destination="result"
/>
<mx:CheckBox id="editor"
selected="{data.ccoEstatus}"/>
</mx:VBox>
That's the code, and like i said, it behaves funny when you
select/unselect the checkboxes quickly

Similar Messages

  • Aperture - strange behavior with external editor

    Although I don't do this often, there are times I need to edit images with a 3rd party editor like Elements or Pixelmator. I noticed when I send an image by Photos> Edit with Pixelmator, the image that comes in is lacking any edits I may have created previously, particularly with Nik filters. Obviously, those edited versions are not being exported to the editor correctly. However, if I first "export" the image, and then bring it in an editor, the edits are carry over as one would expect. I am using the latest versions of both Aperture and Lion.
    Anyone else noticing this and is there a way to change this strange behavior?
    Ken

    Hi Perfectism-
    Most likely it is a bad power supply brick. This can be difficult to troubleshoot as the drive appears to spin up and the little light blinks but that is about all you get.
    If the drive is still under warranty contact LaCie about replacing the power supply brick.
    Luck-
    -DP

  • Funny behavior with port 25

    hi,
    i am developing an SMTP server, and therefore have to use port 25. the thing is i use a printwriter for the output and a bufferedstreaminput for the input. the program works well on any other port, except port 25 where it will only chuck out a line and one has to click enter for it to chuck the other. this then crashes the program has it should. i am using sdk1.4 and windows 2000. any idea has to why this odd behavior?
    thanks

    that is the joy of it, it doesn't give me any exception, it just doesn't work properly on port 25. that is what i don't understand. is it something to do with my setup of windows 2000, or is it a bug of some sort?
    the code for 2 of the classes is shown below
    import java.net.*;
    import java.util.*;
    class EmailServer implements Runnable {
         ServerSocket server = null;
         public static void main(String[] args) {
              Thread email = new Thread(new EmailServer());
              email.start();
         public void run()
              try {
                   server = new ServerSocket(26);
                   System.out.println("The server has started");
                   while (true) {
                        Socket socket = server.accept();
                        Thread request = new Thread(new EmailRequest(socket));
                   request.setDaemon(true);
                        request.start();
              catch (Exception e) {
                   System.err.println("Unable to start EmailServer: " + e.getMessage());
                   e.printStackTrace();
    import java.net.*;
    import java.io.*;
    import java.util.*;
    class EmailRequest implements Runnable {
    private Socket clientconnection;
         String word = "";
              PrintWriter output;
         BufferedReader in;
         String line =""     ;
    public EmailRequest(Socket clientconnection) {
    this.clientconnection = clientconnection;
    private void process()
              try
                   System.out.println("The connection has opened.");
                   output = new      PrintWriter(clientconnection.getOutputStream(),true);
                   in = new BufferedReader(new InputStreamReader(clientconnection.getInputStream()));
                   boolean OPEN=true;
                   SMTPRequest request = new SMTPRequest(clientconnection.getOutputStream(),clientconnection.getInputStream());
    //               SMTPPlay playing = new SMTPPlay(clientconnection.getOutputStream());
    //               playing.PrintIt();
                   output.println("220 192.168.0.27");
                   while (OPEN)
                        line = in.readLine().trim();
                        System.out.println(line);
                        output.println(line);     
                        if (line.compareToIgnoreCase("QUIT")==0)
                             OPEN=false;
                             in.close();
                             clientconnection.close();
                        else
                             request.commandParser(line);
                   if (request.MAIL)
                        request.PrintEmail();
                   System.out.println("The connection has closed");
              } catch (Exception e) {
              System.err.println("There was an error with EmailServer: " + e.getMessage());
    //               e.printStackTrace();
    public void run()
         try
              process();
         }catch(Exception e)
              System.out.println("upss");
    }

  • Double Click to Activate Tree Item Editor

    Hi, I have an mx:Tree that uses an MXML component as an item
    editor. I only want to activate the editor when the user double
    clicks on a tree's node. As a default, a single click will open the
    the item editor on the Tree list. Can anyone help me with
    this?

    I am pretty sure it is possible, but I have not done it. You
    will probably need to cancel the default behavior of click event.
    Tracy

  • Textarea with HTML editor is not working

    Hi all,
    This is producing me a real headache.
    I created the simplest application in the world with one Textarea with HTML editor, and the editor control does not show the usual tool bar for fonts, color, alignment, etc. Just a ordinary textarea.
    Moreover, this was working before... I moved to another location in my work (me, not the server). Yes, I thought about the Internet Explorer, but Firefox has the same issue.
    So any idea I can try to make this work?
    I have another applications already in production with the same issue.
    Need help!!!!!!!!!
    Thanks in advance.
    Lukas.
    Application Express 2.1.0.00.39
    Oracle Database 10g Express Edition Release 10.2.0.1.0
    Internet Explorer 7.0.5730.11
    Firefox 1.5.0.11
    Windows XP Service Pack 2
    1 G Ram
    Pentium D CPU 2.80GHz

    Lukas,
    I would go and integrate FCKEDITOR (http://www.fckeditor.net/ ) into your application.
    Here are instructions on how to achieve this (sorry but only in German):
    http://www.oracle.com/global/de/community/tipps/einbinden_fckeditor/index.html
    It basically means:
    1) copying the files from fckeditor under the /images directory
    (you can use the instructions here: http://daust.blogspot.com/2006/03/where-are-images-of-application.html)
    2) creating two shortcuts INCLUDE_EDITOR_SCRIPTS and EDITOR
    3) placing the shortcut INCLUDE_EDITOR_SCRIPTS into the page html header and
    4) placing the shortcut EDITOR into the post element text of your plain textarea element
    That's it.
    BTW, FCKEDITOR has been included in Apex 3.0 as a standard item type.
    Regards,
    ~Dietmar.

  • Use of javascript and textarea with HTML editor

    Hi all,
    I have been trying to use some onchange javascript in the HTML Form Element Attributes of an item which is a textarea with an HTML Editor. It just seems to ignore the code. When you "view source" the code does not seem to be there.
    What I am attempting to do is described in thread: detecting changes to items prior to submitting page
    i.e. to warn a user that if they leave the page without saving they will lose their changes. It works fine with most of the other items on the page i.e. text boxes, select lists but not the textarea with html editor.
    Is there somewhere else I should be putting my js for items of this type? I have spent some time looking through the forum posts but cannot find an answer so far.
    Thanks,
    Brian

    I'm having the same problem.
    Would like to use the onChange event in a textarea with html editor.
    This works in Firefox (where I don't get the html editor but only a textarea) but doesn't seem to work in IE.
    Is there another way of detecting the user has changed the text in the html editor?
    Thanks,
    Pieter

  • APEX - Textarea with HTML Editor.

    All,
    I am working with Application Express Version 2.2.1.00.04
    I have the following problem:
    I have an item "Textarea with HTML Editor" which I am inserting
    information CLOB in a table.
    This data is consulted by a Region Report of APEX which has a Link that
    will be a popup. Inside the report, I use wwv_flow_utilities.URLENCODE
    (here the column is a CLOB) where it gives me the error "ORA-06502:
    PL/SQL: numeric or value error: character string buffer too small".
    I started to investigate which might be the problem and saw that the
    item "Textarea with HTML Editor" usually inserts special characters.
    I show an example of the special character that inserts and which is the
    error.
    SELECT wwv_flow_utilities.URLENCODE(' ')
    FROM dual;
    This character, which is like a space in target, is bringing problems to
    be able to execute the report.
    A provisional solution to solve this problem is to put a REPLACE into
    the Query.
    Has anyone this problem.???? Do you know why this character can be
    inserted??????
    Thx..

    Thanks Dimitri!
    I'm trying to find this place in the application but I don't have enough privileges. Here, we are working with Application Express 2.2.1 and we have to upgrade to 3.1.1.
    In order to improve the behaviour of HTML Editor Standard, I think we should integrate FCK to our application, do you know about any step by step explanation to achieve this? Because I was searching this information in the forums, but I can't find anything. Please, any information you can share with me will be very helpful
    Thanks again!

  • Custom Popup - Passing values back to Textarea with HTML Editor

    I have created a Custom Popup which is to populate a "Textarea with HTML Editor".
    I have found that the Custom Popup works fine if the target item is defined as a "Textarea", or "Textarea (auto-height)", or "Textarea w/Character Counter" (although the counter is not automatically updated), or "Textarea w/Character Counter & Spellcheck", or "Textarea with Spell Checker".
    However, if the target item is defined as "Textarea with HTML Editor" the Custom Popup does not populate the target item. No error message is produced. If the target item already had data, the data is unchanged.
    Is this a known bug?

    "Textarea with HTML Editor" is actually two objects on the screen with javascript keeping the data in the two objects in sync as you type in the editor.
    You have to populate both objects as you try to syncronize the data from your popup.
    I built a screen using dHTML that switches between the HTML Editor and the Text with Spell check and use Javascript to keep the two (actually three objects in sync)
    My button that switches from one view to the other uses the following syntax:
    javascript:setEqual('P9904_HTML_MESSAGE','P9904_MESSAGE','P9904_MESSAGEDiv');
    'P9904_HTML_MESSAGE' is the HTML view of the data with spell check
    'P9904_MESSAGE' is the html editor view of the data
    'P9904_MESSAGEDiv' is the extra object that Oracle uses for the editor
    This is the fuction that keeps the data in sync:
    function setEqual(fromObjectID,toObjectID,htmlObjectID)
    document.getElementById(toObjectID).value = document.getElementById(fromObjectID).value;
    document.getElementById(htmlObjectID).innerHTML=document.getElementById(fromObjectID).value;
    I hope this helps.
    Michael Snyder

  • Strange behavior with DefaultCellEditor

    Hello everybody,
    I found a strange behavior with DefaultCellEditor using a JTextField in a JTable. The following line will show, what I mean:
    setDefaultCellEditor(String.class,new DefaultCellEditor(new JTextField()));
    Imho this should do the same as JTable does already, when it installs a JTextField as default cell editor for cell values of the String class. But, it seems, that it is not the same:
    When I add this line in the constructor of a JTable subclass the editor component seems to be less wide and less high to the right and bottom - it looks so with Win95 with JDK 1.4.0 - but with Win2000 it is correct for example.
    My question is - how can it be, that the normal default cell editor does not have this behavior but when I use the line above, it is displayed in the wrong way?- What does the default cell editor in another way than I do it, that it has not this ugly display?
    I would like to look in the sources, but unfortunately I can't find the source code in JDK 1.4.0 - perhaps you have a hint, where to find it.
    greetings Marsian

    It seems the Label doesn't like it, that it is in a GridCell with rowspan = 2
    If it is in a normal cell (no rowspan), it works.
    If I add ColumnConstraints to the gridpane, it kind of works, but the Label still occupies more space than it should.
    Edited by: csh on 19.07.2012 03:51

  • 10g Text Item Editor Not Working Correctly

    We're having problems with the Text Item Editor in both Add and Edit modes, but esp. in Edit mode. The problems range from getting a gray text screen (no toolbar); getting a white editor screen (no toolbar); tools that do not load (e.g. font color); and tools that do not work even though everything else seems fine. Sometimes refreshing the screen works but not always. Our users are getting very frustrated continually refreshing and logging out/in. It's become worse in the past few weeks such that it occurs in nearly every instance when editing a text item.
    Can anyone point us in a possilbe direction? We are using IE 6.0 and above as the browser.

    Kristin -
    This sounds like a bug that should be handled through Oracle Support.
    Regards,
    Candace

  • Intercept value passed to item editor?

    Hello! I'm trying to intercept the value that is taken from a DataGrid's GridColumn's itemRenderer and applied to the itemEditor, and vice-versa. I need to be able to format this value. However, my project is complex, so I may be focusing on the wrong idea in what I'm trying to accomplish. Please have a look and let me know if there's something else I could try.
    I have a Spark DataGrid component (with ID dg) that I am dynamically populating from XML. I create an ArrayCollection from some nodes, and a regular Array from sub-nodes that is added as a property of the ArrayCollection. That ArrayCollection is then used as the dataProvider for the DataGrid.
    Here is an example segment of a typical XML node and it's sub-nodes:
        <item name="physOrderTable" text="" type="notes">
            <cols>
                <col id="0" text="Day/Time" />
                <col id="1" text="Order Type" />
                <col id="2" text="Physician's Orders" />
                <col id="3" text="Physician's Signature" />
            </cols>
            <rows>
                <row id="r0" name="" text="">
                    <col id="0"><![CDATA[Tues 15:24]]></col>
                    <col id="1"><![CDATA[General]]></col>
                    <col id="2"><![CDATA[BMP, CBC, Cardiac Enzymes, ABG, EKG STAT, NS@ 125 mL/hr, Blood Sugar AC & HS, 02 via NC to keep oxygen saturation above 97%]]></col>
                    <col id="3"><![CDATA[J. Nelms]]></col>
                </row>
            </rows>
        </item>
    Here is the code that reads through the XML and utilizes it:
        protected function sparkDG_creationCompleteHandler(event:FlexEvent):void
            trace("grid created");
            var colsList:XMLList = xml.cols.col;
            var rowsList:XMLList = xml.rows.row;
            colAL = new ArrayList();
            for(var i:Number = 0; i < colsList.length(); i++)
                var gc:GridColumn = new GridColumn();
                gc.maxWidth = 500;
                gc.resizable = false;
                gc.headerText = String(colsList[i].@text);
                gc.dataField = "col";
                gc.labelFunction = labelFunc;
                colAL.addItem(gc);
            for each(var row:XML in XML(value).rows.children())
                var rowArr:Array = new Array();
                for each(var col:XML in row.children())
                    if(col == "")
                        rowArr[Number(col.@id)] = "_";
                    }else{
                        rowArr[Number(col.@id)] = col;
                colAC.addItem({
                    rowID: row.@id,
                    rowName: row.@name,
                    rowText: row.@text,
                    col: rowArr
            dg.columns = colAL;
            dg.dataProvider = colAC;
    So I build the header for the DataGrid first, telling it to use the "col" dataField, which corresponds to the .col property of the colAC ArrayCollection. That .col property is the array of values for each cell of that row.
    Now this part of code is important, as it displays the relevant index of the .col array by using the .columnIndex:
        private function labelFunc(item:Object, column:GridColumn):String
            var displayText:String;
            var valArr:Array = new Array();
            if(column.dataField == "col")
                valArr = item[column.dataField];
                displayText = String(valArr[column.columnIndex]);
            return displayText;
    This is the only method I've been able to use to achieve the desired result. This all works fine, if all I want to do is merely display information. But I need to be able to edit the values in each cell, and apply this back to the dataProvider, as I need to rebuild XML with the updated values later.
    I have tried everything I can possibly think of to be able to do this. I built my own itemRenderer, then my own itemEditor, then scrapped them because it felt like I was re-inventing the wheel. But was I? I tried reading through the code for the DataGrid, GridColumn, and related classes, but I couldn't find any reference to the itemEditor beyond it being an IFactory. I have no idea where or how it tells that IFactory to be a text input or whatever it is.
    Here is my issue:
    When I turn on the DataGrid's editing, and double-click a cell, it takes the entire array of the col dataField for that column's cell, converts that array to a string, and displays the entire string in the edit text box. If I cancel the editing, or save the editing, it sets the string to the .col property. Then the labelFunction tries reading that string as an array, and it crashes. I was able to get the typeof the col dataField and converting it to an array if it's a string, but I shouldn't have to.
    I need to have it display just the value of the cell for that particular row and column when the instance of the itemEditor is created. When that value is changed, I need it to apply back to that column's index in the .col array of the dataProvider. So, similarly to how it displays information in the labelFunction, I need to edit the information and send it back.
    I've seen lots of custom itemEditors and itemRenderers for GridColumns, but these are hard-coded in the MXML. My grid is almost entirely dynamically created, so that's unfortunately not an option for me, as I won't even know how many columns or rows there will be when the DataGrid is created. I tried using rendererIsEditor, but that only seems to be on the MXML instantiation of the GridColumn, as there's only rendererIsEditable in the ActionScript, and it doesn't seem to work (or I don't know how to use it as intended).
    If anyone knows of a way to accomplish this, even just something else I should look at, I would greatly appreciate it!

    Thanks for your response! I had seen that function before, but as there was nothing in it, I couldn't figure out if it was useful. Going back, I looked at the comments. I also found this website about item editors: The Item Editing Process
    So, according to that, the data variable will contain the .col property of the dataProvider, right? I can trace data out as an object, but when trying to reference it as an array, it doesn't work.
    Also according to that website, data is applied to value before prepare() is called, at which point data becomes a string. Doing this test in prepare(), I find that value is already a string. I can do a split() on the string or whatever to set the value how I need it (I think), but my life would be a lot easier if I could reference the cell's data directly and set value based on that.
    <?xml version="1.0" encoding="utf-8"?>
    <s:GridItemEditor xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/mx">
        <fx:Script>
            <![CDATA[
                private var valueArr:Array;
                override public function prepare():void
                    trace("prepare called");
                    valueArr = new Array(value);
                    trace("\tdata["+0+"]: "+data[0]);
                    trace("\tdata["+columnIndex+"]: "+data[columnIndex]);
                    trace("\tvalue: "+value);
                    trace("\tvalueArr.length: "+valueArr.length);
                    value = String(valueArr[columnIndex]);
                override public function discard():void
                    trace("discard called");
                    valueArr[columnIndex] = value;
                    value = valueArr;
            ]]>
        </fx:Script>
    </s:GridItemEditor>
    And once that's accomplished, I believe what I did for discard() there should work correctly. What do you think?

  • APEX - Spelling check and textarea with html editor

    I have an item on the form defines as textarea with html editor. I also need to be able to do spelling check, but the "textarea html editor" only has font features and no spelling check. Is there away to define an item to have both spelling check and font features in APEX? Any response is greately appreciated.
    Thank you,
    MT

    MT,
    No, this is not a supported region type in APEX 3.2.
    You can take a look at jQuery and the number of rich text editors available for it: http://www.queness.com/post/212/10-jquery-and-non-jquery-javascript-rich-text-editors
    Hope this helps.
    Thanks,
    - Scott -
    http://spendolini.blogspot.com
    http://www.sumneva.com

  • Changing the font size does not work with Textarea with HTML Editor

    If you change the font size in the text area of a "Textarea with HTML Editor" item it does not work. I've searched the forum and the only solution I've seen is to use an HTML editor foriegn to APEX. Does anyone have a better solution? Thanks, Elizabeth

    I'm having a similar issue except with HTML Editor Standard.
    What I'm doing is allow someone to write to an HTML Editor Standard field and then an HTML marked up text is saved to a db CLOB column. In another page, I reference this DB column and show it in an HTML Region (I do a computation Before Regions for a hidden item that writes out the html with "htp.p")
    Everything shows up fine EXCEPT the font tags and headings. I'm finding that the HTML Region sets the font size only with the < d i v s t y l e="font-size: large" >and NOT < f o n t size:6 >. When the HTML Editor renders the user's text input, any size changes are made with the < f o n t > tag, which is depreciated anyways, and not with "style". That's why the size is not showing up.
    I can't really figure out why the headings aren't showing up except maybe the css style in the region is overridding it...
    Is there another APEX item type like HTML Editor (which uses FCKEditor) that I can use, or maybe another approach to remedy this issue? Or maybe this post calls for an enhancement with the HTML Editor?{size}{size}
    </div>
    Edited by: maui26 on Mar 4, 2009 10:43 AM

  • Opening with external editor always makes new version

    i am a fine art figure photographer and portrait artist. almost every photo that i want to finish has to be round tripped to photoshop for retouching. in Aperture 1.5, i could select a photo, open in external editor (photoshop cs3), make my retouches and save the new version. if i wanted to re-visit the image and make further modifications, i could select the round-tripped photo, open with external editor, and the edited photo would be opened without creating a new version.
    now in Aperture 2.0, once an image is edited and the new version saved, if i try to re-visit the image Aperture always creates a new version. this is a behavior that i don't want. new versions of photoshop edits are expensive when it comes to disk space. and with 30,000 images in my library, i just can't afford it!
    in the preferences, i have the option "Create new versions when making adjustments" unchecked. that's the only option i can see that affects the automatic creation of new versions. any advice on how to edit the image without making a copy would be greatly appreciated!
    thanks,
    scott
    Message was edited by: scott nichol

    Hi,
    I had the same problem as the OP and was surprised to read that Ian didn't encounter that same behavior. So I started testing several options. This is what I found;
    When I open a previously-externally-edited picture from within Aperture, using the keyboard shortcut ⇧⌘ O, Aperture automatically creates a new version.
    The same thing happens when I choose 'Edit with Adobe Photoshop CS3' from the Images menu in the menu bar.
    On the other hand, when I open a previously-externally-edited picture from within Aperture by Ctrl clicking the picture and choosing 'Edit with Adobe Photoshop CS3' from the pop-up menu, the picture opens in Photoshop without Aperture creating a new version first.
    Very strange because the pop-up menu command has the same keyboard shortcut as the commands I used in the first and second attempt.
    Hope this helps.
    Cheers,
    Ivan

  • DataGrid item editor in Flash CS3

    Does anyone have a good example of how to define custom item
    editors and custom cell renderers for the DataGrid in Flash CS3
    with Action Script 3.0?
    I'm trying to put things like combo boxes and numeric
    steppers in certain columns.

    Found an example.
    Click
    Here

Maybe you are looking for