5 Replies Latest reply on Jan 11, 2007 9:30 PM by ojk007

    Popup edit window from Datagrid

    ojk007
      Hey all,

      I have a news system, and i want to be able to edit stories, so i have a datagrid with the title, author, date and time along with a button. I want to popup a custom component from it. Thing is i want to pass a story id from it so i can call the php file with the data.

      sorry its vague dunno how to word it.

      thanks
        • 1. Re: Popup edit window from Datagrid
          ntsiii Level 3
          How far have you gotten? What is not working?
          Tracy
          • 2. Re: Popup edit window from Datagrid
            ojk007 Level 1
            well i have the button in the datagrid and i have created the mxml component, the the php backend is done. the frontend is just a httpService..

            each time i click the button i get this error (ind ebug mode)

            warning: unable to bind to property 'title' on class 'mx.rpc.xml::ComplexString' (class is not an IEventDispatcher)
            warning: unable to bind to property 'category' on class 'mx.rpc.xml::ComplexString' (class is not an IEventDispatcher)


            my mxml component is:
            ----------------
            <?xml version="1.0" encoding="utf-8"?>
            <mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml" width="500" height="600" borderStyle="solid" borderThickness="1" borderColor="#1e1e1e" backgroundColor="#101010" color="#FFFFFF" fontFamily="Verdana">
            <mx:Style source="inc/style.css" />
            <mx:VBox verticalAlign="top" horizontalAlign="center" horizontalCenter="1" width="450" top="20">
            <mx:Form>
            <mx:FormHeading label="Edit a News Story" fontSize="19"/>
            <mx:FormItem label="Title" required="true" horizontalAlign="left" width="100%" id="Editformitem1">
            <mx:TextArea id="frmEditNewsTitle" wordWrap="true" editable="true" enabled="true" styleName="segoe" color="#FFFFFF" borderStyle="solid" borderThickness="1" borderColor="#1e1e1e" backgroundColor="#161616" width="500" height="30" minHeight="200"/>
            </mx:FormItem>
            <mx:FormItem label="Category" required="true" horizontalAlign="left" width="100%" id="Editformitem0">
            <mx:TextArea id="frmEditNewsCategory" wordWrap="true" editable="true" enabled="true" styleName="segoe" color="#FFFFFF" borderStyle="solid" borderThickness="1" borderColor="#1e1e1e" backgroundColor="#161616" width="500" height="30" minHeight="200"/>
            </mx:FormItem>
            <mx:FormItem label="Body" required="true" horizontalAlign="left" width="100%" height="100%" id="Editformitem3" borderStyle="solid" borderThickness="1" borderColor="#1e1e1e" backgroundColor="#101010">
            <mx:TextArea id="frmEditNewsBody" wordWrap="true" editable="true" enabled="true" styleName="segoe" color="#FFFFFF" borderStyle="solid" borderThickness="1" borderColor="#1e1e1e" backgroundColor="#161616" width="100%" height="100%" minHeight="200"/>
            <mx:Label text="Submit" id="btnSubmit" rollOverEffect="{btnOver}" rollOutEffect="{btnOut}" mouseDownEffect="{btnDown}" mouseUpEffect="{btnUp}" color="#e4e4e4" themeColor="#FFFFFF" styleName="segoe" fontSize="30" enabled="true" click="editNewsStory();"/>
            </mx:FormItem>
            </mx:Form>
            </mx:VBox>
            </mx:Canvas>

            ----------------
            and the code to pop it up is
            ----------------
            public function popupEditNews():void
            {
            // Create a non-modal TitleWindow container.
            var helpWindow:IFlexDisplayObject =
            PopUpManager.createPopUp(this, editNews, true);
            }
            ----------------
            • 3. Re: Popup edit window from Datagrid
              ntsiii Level 3
              Where is the error comming from? You'll need to fix that first.
              Tracy
              • 4. Re: Popup edit window from Datagrid
                FlightGuy Level 1
                Also, please show us your HTTPService definition and the event handler that's handling the response.

                The warnings you are getting are the result of bindings (attempted bindings) on properties that are not Bindable. Somewhere you have, in your xml, a reference to "{something.title}" and "{something.category}".

                Are you actually getting a response from the HTTPService?

                Tim
                • 5. Re: Popup edit window from Datagrid
                  ojk007 Level 1
                  thanks anyway i found my problem. kinda hard to explain but yeah, it was just little things that couldnt bind