Custom components & help Webservice

I built two custom, components based on a button and the other on a graph.

The Web service has been defined with the following tag in the button component:

" < mx:WebService id ="ws"wsdl =" http://localhost/Service1.asmx?WSDL « >
< name mx:operation = "GetData" / >
< / mx:WebService >

I want to be able to add a listener for the chart (not the button) component that listens to the webservice result event and refresh the list. It will be a lot of buttons and many rankings for each graph must subscribe to result event of a particular call.

The structure of my test application is something like this:

< application >

< button (call webservice here) >

< chart (listener event result here) >

< / application >

I think it should be pretty simple, but I can't understand it. Any help would be greatly appreciated!

Ivan

you would have an arraycollection collection as the dataprovider for the chart component, just update that.

Tags: Flex

Similar Questions

  • Custom components in FXML

    Hello

    I want to set in the FXML a custom component, something like MyTreeItem, which extends from TreeItem. To do this, I created a MyJavaFXBuilderFactory to return the correct constructor (MyTreeItemBuilder). MyTreeItemBuilder returns instances of MyTreeItem.

    Note: Below, I send my courses and my tree.fxml.


    Is it possible to include in the custom components of fxml?



    When I run my application, I got this error:

    com.sun.javafx.fxml.PropertyNotFoundException: "myvalue" property does not exist or is read-only.

    at com.sun.javafx.fxml.BeanAdapter.put (unknown Source)

    at com.sun.javafx.fxml.BeanAdapter.put (unknown Source)

    to javafx.fxml.FXMLLoader$ Element.applyProperty (unknown Source)

    to javafx.fxml.FXMLLoader$ Element.processPropertyAttribute (unknown Source)

    to javafx.fxml.FXMLLoader$ Element.processEndElement (unknown Source)

    to javafx.fxml.FXMLLoader$ ValueElement.processEndElement (unknown Source)

    at javafx.fxml.FXMLLoader.processEndElement (unknown Source)

    at javafx.fxml.FXMLLoader.load (unknown Source)

    at MainWindowTree.start (MainWindowTree.java:33)

    to com.sun.javafx.application.LauncherImpl$ 5.run (unknown Source)

    to com.sun.javafx.application.PlatformImpl$ 4.run (unknown Source)

    to com.sun.javafx.application.PlatformImpl$ 3.run (unknown Source)

    at com.sun.glass.ui.win.WinApplication._runLoop (Native Method)

    in com.sun.glass.ui.win.WinApplication.access$ 100 (unknown Source)

    to com.sun.glass.ui.win.WinApplication$ $2 1.run (unknown Source)

    at java.lang.Thread.run(Thread.java:722)



    Tree.fxml



    <? XML version = "1.0"; Encoding = "UTF-8"? >



    <? import javafx.scene.layout. *? >

    <? import javafx.scene.control. *? >

    <? import javafx.scene. *? >

    <? import javafx.geometry.Side? >;

    <? importdummy.tree.MyTreeItem? >;



    < xmlns:fx VBox = "http://javafx.com/fxml" >

    < children >

    < showRoot TreeView = "false" fx:id = "treeView" >

    < root >

    < TreeItem value = 'Root' >

    < children >

    < MyTreeItem myvalue = "Node1" fx:id = "treeItemNode1" >

    < children >

    < TreeItem value = "none" / >

    < / children >

    < / MyTreeItem >

    < children >

    < / TreeItem >

    < / root >

    < / TreeView >

    < / children >

    < / VBox >



    Classes:



    package package dummy.tree;



    Import javafx.scene.control.TreeItem;



    SerializableAttribute public class MyTreeItem extends TreeItem {}



    public Object getMyvalue() {}

    Return super.getValue ();

    }

    public void setMyvalue (Object value) {}

    super.setValue (value);

    }



    }



    package dummy.tree;



    Import javafx.fxml.JavaFXBuilderFactory;

    Import javafx.util.Builder;

    Import javafx.util.BuilderFactory;



    Import dummy.tree.MyTreeItem;





    / public class MyJavaFXBuilderFactory implements BuilderFactory {}



    private JavaFXBuilderFactory javaFXBuilderFactory = new JavaFXBuilderFactory();



    class MyTreeItemBuilder implements {Builder < MyTreeItem >



    @Override

    public MyTreeItem build() {}

    return new MyTreeItem();

    }



    }



    @Override

    public Builder <>? getBuilder (class <>? clazz) {}

    If (clazz.equals (MyTreeItem.class)) {}

    return new MyTreeItemBuilder();

    }

    Return javaFXBuilderFactory.getBuilder (clazz);

    }



    }



    package dummy.tree;



    import java.io.InputStream;

    import java.net.URL;



    Import javafx.application.Application;

    Import javafx.fxml.FXMLLoader;

    Import javafx.fxml.JavaFXBuilderFactory;

    Import javafx.scene.Scene;

    Import javafx.scene.layout.Pane;

    Import javafx.scene.paint.Color;

    Import javafx.stage.Stage;



    SerializableAttribute public class MainWindowTree extends Application {}



    Public Shared Sub main (String [] args) {}

    Application.Launch (null);

    }



    @Override

    public void start (s phase) {}

    Location of the URL = getClass().getResource("/com/dbn/ui/theme/default/tree.fxml";);

    FXMLLoader fxmlLoader = new FXMLLoader();

    fxmlLoader.setLocation (rental);



    MyJavaFXBuilderFactory fxBuilderFactory = new MyJavaFXBuilderFactory();



    fxmlLoader.setBuilderFactory (fxBuilderFactory);

    InputStream inputStream = null;

    try {}

    inputStream = location.openStream ();

    Root = fxmlLoader.load (inputStream) (component) component;

    Scene = new scene (root, 800, 600, Color.TRANSPARENT);

    s.setScene (scene);

    s.Show ();

    } catch (Exception ex) {}

    ex.printStackTrace ();

    }

    }



    }

    Hello

    When you include the code (and the stack traces) in your forum messages, please include in a tag {code} as shown: https://forums.oracle.com/forums/ann.jspa?annID=1622 this makes it more easy for us all to read.

    Your code is sort of ok, but you have a lot of typos in your FXML and your Java code. Try searching for the code below instead. You don't actually have a constructor or by the way, it will work only without it.

    Try this FXML:

    
    
    
    
    
    
    
    
    
        
            
                
                    
                        
                            
                                
                                    
                                
                            
                        
                    
                
            
        
    
    

    With that for your item custom:

    package dummy.tree;
    
    import javafx.scene.control.TreeItem;
    
    public class MyTreeItem extends TreeItem
    {
        public Object getMyvalue()
        {
            return super.getValue();
        }
    
        public void setMyvalue(Object value)
        {
            super.setValue(value);
        }
    }
    

    And for launch:

    package dummy.tree;
    
    import javafx.application.Application;
    import javafx.fxml.FXMLLoader;
    import javafx.scene.Parent;
    import javafx.scene.Scene;
    import javafx.stage.Stage;
    
    public class TestApp extends Application
    {
        public static void main(String[] args) throws Exception
        {
            launch(args);
        }
    
        public void start(Stage stage) throws Exception
        {
            Parent rootNode = FXMLLoader.load(getClass().getResource("/tree.fxml"));
            Scene scene = new Scene(rootNode, 800, 600);
            stage.setScene(scene);
            stage.show();
        }
    }
    

    Also, I guess it is just a test case, but you don't need to provide your own "myvalue" getters/setters when this is delegated to super. Just use the 'value' property directly in your FXML.

    A view Naming Convention, it should be myValue with getMyValue and setMyValue (e.g. capital 'V'). FXML is case-sensitive too, so if you change, you need to change your FXML for use myValue instead.

    Hope that helps,
    zonski

    Did you find this answer useful? If so, please mark it as 'Correct' or 'useful '.

  • Communication between two custom components

    Hello

    I have a problem to get action in a custom component to cause a refresh of another custom component?

    My configuration is:

    < application >

    < component includeIn custom 1 "View1" >

    < component custom 2 id = "custom2" level = "{level}" "view2" includeIn >

    < component custom an includeIn 'View1' >

    < component includeIn custom B "view2" >

    < / application >

    I have a number of custom components load in my main application window.

    In the custom component 1, I have a drop down menu which determines levels 1 to 10.

    When the user chooses a new level, change an event is triggered and the dispathed to the main application that receives it in the UpdateDisplayHandler.

    Component event dispatcher custom 1:

    protected function level_changeHandler(event:IndexChangeEvent):Sub

    {

    var newDisplay:UpdateDisplay = new UpdateDisplay ("UpdateDisplay", level.selectedItem.value);

    dispatchEvent (newDisplay);

    }

    Main application manager:

    protected function updateDisplayHandler(event:UpdateDisplay):Sub

    {

    Level = event.level

    }

    Level information comes to the manager who updates the "level" variable correctly. So far so good.

    The variable "level" is can be linked and analyzed for the custom component 2.

    < components: custom2 id = level "custom2" = "{level}" / >

    The question is how to make my component custom 2 refresh(), reload() then it makes again based on new information of level?

    I will be grateful for any help on this matter.

    Karsten

    Is probably not the cleanest way, but he's going to move you quickly.

    public var levelNumber:int = new int;

    implement

    private var _levelNumber:int;

    public function get levelNumber (): int

    {

    Return _levelNumber;

    }

    public function set levelNumber(value:int):void

    {

    If (value! = _levelNumber)

    {

    _levelNumber = value;

    call the custom here update refresh method

    }

    }

    I don't know your usecase or your architecture so there are probably better ways.

    Maybe like this:

    The main application event handler:

    protectedfunction updateDisplayHandler(event:UpdateDisplay):void

    {//check if there is a change in level and exposes a public service on the part 2}

    If (level! = event.level)

    {

    Level = event.level;

    COMPONENT2.updateOrRefreshBasedOnNewLevelValue (Level);

    }

    }

    HTH,

    Claudiu

  • custom - components

    Hello
    I hope that it isn't something obvious... but I searched high and low for a benchmark decent to implement custom components.
    It is not critical, but I would like to place a set of codes < mx: states > in a custom component.
    Can anyone suggest it please if or how this is possible?

    It is important that I'm calling the new State of a VBox inside a TabNavigator?

    Also, while I'm here...
    I'm States okay - kind of... I get the new State (a form) to spend in the upper region of my VBox tab.
    BUT I want the form actually replace the datagrid control, which is the normal display mode when you click the tab.

    Thanks in advance...
    Chris

    Hello again...

    Eureka!
    I went to pages of search help 'parentApplication' in the discovery of the hierarchy.
    .. .came between Flex Applications > uses the container of the Application > object on the Application
    where I found the refernce to mx.core.UIComponent.parentDocument, then
    "You can use parentDocument.parentDocument to back up the tree of multiple documents.

    So, I replaced 'parentApplication' with 'parentDocument' in the file states_TaskMgr_addNew.mxml...

    ... and it worked.

    Thanks again for your help... it was a great experience.
    See you soon,.
    Chris

  • Any request for a list of the custom components in system

    Hello

    Is there any question to find the list of the custom components in the system.

    Concerning

    Jagadish

    What is the purpose of a list of custom components?

  • Using custom components will break my site if the framework is updated?

    Using custom components will break my site if the framework is updated?

    For example if I use the tink browser which is a version of the spark of the viewstack: http://www.tink.ws/blog/flex-4-navigator/

    In the case of update of the framework, it is possible that my sites Web stops working due to changes in the basic components used?

    I would like to know how can I design my components to ensure that they stop working?

    Thanks in advance.

    Any updates to the SDK that you recompile against could potentially break the desired site behavior. Could be with the SDK components or ones you've written yourself. It's just the nature of software development. Testing is the key.

  • Disappeared from custom components

    I have some custom components in my app and when I opened Eclipse with the Flex SDK kit it shows red boxes with X inside. I'm going to fashion, the design pane Explorer and it shows the empty custom folder. I have my custom in this namespace. I restarted Eclipse, deleted and recreated the project and nothing. Any ideas?

    turns, I got back my components to another folder. Remove the component in Eclipse, create a new component of the same name in Eclipse. Copy and replace the new file with the backup file. I suppose that Eclipse was not save files for some reason any.

  • Possible bug in custom components

    I think I found a bug when you use custom components. I have a customized TabNavigator which children containers are also custom components. To do this, I can not set properties on custom containers, it fails.
    Here is an example of how do:

    1. create a TabNavigator custom like this: (in this example I'll call her TabN)
    <? XML version = "1.0" encoding = "utf-8"? >
    "< mx:TabNavigator xmlns:mx = ' http://www.adobe.com/2006/mxml" > "
    < / mx:TabNavigator >

    As you can see, there nothing wrong with it, just a custom bar

    2 create a custom like this: (in this example, named reportGrid)
    "" < mx:HBox xmlns:mx = ' http://www.adobe.com/2006/mxml '
    < mx:DataGrid id = "telefonosDG" dataProvider = "{dataGridList}" width="100%"/ >
    < mx:Script >
    <! [CDATA]
    Import mx.collections.ArrayCollection;

    [Bindable]
    public var dataGridList: ArrayCollection collection;
    []] >
    < / mx:Script >
    < / mx:HBox >

    As you can see there's only a dataGrid whose dataProvider is an arrayCollection collection-related.

    3. in your application follow these steps:
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml '
    xmlns:custom = "custom.*".
    creationComplete = "initialize ()" width = "100%" height = "100%" layout = "absolute" > "

    < mx:ArrayCollection id = "testList" / >
    < custom: TabN width = "100%" >
    < custom: reportGrid id = "marketing" dataGridList = "{testList}" width = "100%" height="100%"/ >
    < / custom: TabN >

    < mx:Script >
    <! [CDATA]
    private void inicializar(): void
    {
    var prod1:Object = {};
    var prod2:Object = {};
    prod1. Qty = 1;
    prod1. Index = 1;
    prod2. Qty = 2;
    prod2. Index = 2;
    testList.addItem (prod1);
    testList.addItem (prod2);
    }
    []] >
    < / mx:Script >
    < / mx:Application >


    In theory, when you change the testList these changes should appear in the DataGrid control, but he fails, the DataGrid stays empty.

    Now instead of using the customized TabNavigator (TabN) using a normal component < mx:TabNavigator > and see what is happening, it works perfectly fine, the DataGrid control is populated with the two elements that I added.

    SO, what's the problem here? Is this a bug?

    My friend uses the 2.0.154976 version and on that one, the bug has been fixed

  • To access the elements of a call from the custom components page

    I'm sure that it's simple, but I have searched for hours and find nothing.

    I have my main mxml page various controls and a HTTPService. From this main page to include a component custom.

    Everything what I'm trying to access the main page in custom components gives me "access undefined property error."

    What Miss me?

    Should be a little bit more about your custom component and what you are trying to access. Normally, when you access objects outside the scope of the current element it is advisable to raise events.

    However, if you simply 'dot' your way to scope enforcement check out
    http://livedocs.Adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=live Docs_Book_Parts & file = app_container_064_11.html

    parentDocument and enforcement will probobly you get what you are looking for.

    If this does not address your situation, your zip code and will bring a more detailed solution.

  • Create custom components: lack of problem MovieClip

    Hi guys,.

    I've been creating reusable components customized for a while now, but have noticed a problem with one of my components.

    I have two Clips that represent the status of a phone operator, I want to be able to be styled individually; unavailable, available. The two video clips are found in component assets/_private folder in the library, as well as a container that I use for positioning and swapping/addChild/removeChild every two clips. The bin is emptied when the component is loaded, and then depending on the update settings, the relevant clip is loaded in it, using the AS3 class file.

    Now on the real state of the component I have positioned available clip, and one not available does not exist on the stage.

    When I create the hold and run the MXI to package the component in a distributable ZXP file unavailable clip seems to disappear from the packaging.

    Each video clip in the library needs to exist on the stage so that it can be included in the package? Or I can specify which elements should be included.

    Would be great for this answer! Because it is a very confusing subject!

    I have all of the CBC can send on request, cannot appear to download here.

    Concerning

    Charlie

    OK, I found how to fix this.

    All clips must be placed on the stage in one way or another, either inside the container movieclip (should be deleted on common language runtime) or you can simply place all movieclips on the 2nd picture of a layer on the component, as it is disabled when the component is run.

    Hope this helps anyone else having this problem

  • Can I import custom components in Flash 8?

    I creates a customized Flash Video Playback in Flash 8 using AS2. I understand that I can't import to Flex as shown in Livedocs: 'you can use CFC files created in Flash 8 for the counting, and not as components. Until the next version of Flash is released, you can only use the SWC file in Flex 2 as components. »

    But now that Flash 8 is supported with the new add-in Adobe Labs AS3, if I create the custom using AS3 in Flash 8 component, and then import it and use in Flex 2.0.1?

    Any help is appreciated,

    Thank you!

    It is pretty lame may have reasons of backward compatibility.

    However, I think maybe you can import a swf file when running and it can be done in Flash 8. I'm not sure. Someone in the AS 3.0 group should know.

  • Display States and custom components

    Hello

    I use a stack view for this application and once the user is logged on to the application that they see this "Home Page" that contains essentially two components as follows:

    It is in my file "AppMain.mxml".

    < mx:ViewStack id = "appView" height = "100%" width = "100%" >
    < mx:Canvas id = "Home" >
    < view: TeacherList id = "teacherList" / >
    < view: StudentList id = "studentList" / >
    < mx: / canvas >
    < / mx:ViewState >

    So in my TeachList.mxml file I have this < mx:ButtonBar > and one of the buttons is 'Add teachers', when this button is clicked, I want to hide the component StudentList using view States and finally display a form for the user on the same screen, so they can add a teacher. If all the code is in a single file, I think I could do it myself.

    I tried to put the tag < mx: states > in the file AppMain.mxml, but given that the < mx:ButtonBar > mxml code was inside a different file, that he did not see the block < mx: states > I added in the file 'AppMain.mxml '. So I then tried to put the block < mx: states > in the same file as < mx:ButtonBar > reality but then how do I access the id of the component (studentList) so I can hide

    Any help much appreciated.

    -Westside

    Yes - you have to control the use of custom events.

    Let me to pseudo code it for you - you'll have to maybe a little research yourself

    (1) create a State which removes the student list and displays the component that you want to display (I'll call it 'state2' for now).

    (2) in your teacherlist component, create the event, something like this:

    [Event (name = "customEventNameHere" type = "flash.events.Event")]

    (3) in your teacherList component dispatches the event:
    public function buttonClickHandler (): void {}
    var eventObj:Event = new Event ("customEventNameHere");
    dispatchEvent (eventObj);
    }

    Call this function when the user presses the special touch in your teacherList component.

    (4) manage the result. Using Flex Builder? If Yes, when you press the space bar on your call to the teacherList component, you will see the "customEventNameHere" event available.

    (5) change of State:
    public void changeTheState(eventObj:Event):void {}
    currentState = 'state2 ';
    }

    I hope that the work - please post back with your results (or mark replied if you get)

    See you soon,.

    David

  • ADF faces: the challenge of creating custom components

    Hi all

    My name is Juan Manuel Tamayo, and I start a project in which we will use ADF 11 g as part of our development, unless we find significant reasons not to do so. I don't have much experience with JSF or ADF, so please accept my apology for any obvious question.

    I would like to know your opinion about the declarative elements in ADF Faces. Are they easy to use? are they flexible enough to build all the components required for a large application? In case the declarative elements are not sufficient, what other options do I have for building new, complex visual components?

    I sincerely appreciate your help.

    Kind regards

    Juan Manuel Tamayo

    Published by: juanmtamayo on January 19, 2009 20:48

    Juan,

    If the component can be built out of existing components, so if it's a component of composite, then declarative components is a good and reusable approach. If you can't find what you are looking for your next step would be the Internet to see if you find a component JSF 1.2 compatible UI that you need and that co-exists with the set of components in ADF Faces. In any last resort, you can always write your own custom JSF component.

    Frank

  • Focus / Unfocus spoils the fields when using custom fields - help

    Hello

    I hope someone can help me with a problem I see with a screen that contains a VerticalScreenManager that contains a number of custom HorizontalFieldManagers, which each contain a LabelField and an EditField.

    Note: I use a HorizontalFieldManager customer so that I can use sublayout to field possible as I need.

    The purpose of the screen is to allow the user to scroll through the fields and on the focus on the areas of editing.

    However, as the user rolls and fields in bulk and get focus, 'development emphasizing' is not 'cleaned' of previous field and so he is spoiling: several fields have the "update highlighting.

    I saw several other similar topics in the forum but nothing quite the same thing.

    Screen

    -Vertical area Manager (standard)

    -(Custom) HorizontalFieldManager - LabelField - EditField

    -(Custom) HorizontalFieldManager - LabelField - EditField

    -(Custom) HorizontalFieldManager - LabelField - EditField

    It seems that when the scrolling HorizontalFieldManager becomes and lose focus, but do not repaint itself? Is this possible?

    I use OS 5.0.

    Thank you very much

    David

    It seems that the problem was the VerticalFieldManager had not the color of the sae background as areas that are part of it and so when the focus and unfocus painted the background color VerticalFieldManager was painted, I don't know why this has been, and if it's a bug in the OS 5.0, but when I set the background color in the VerticalFieldManager I don't see the problem.

  • Ringtones using custom. Help, please.

    Hi all.  I am new to this forum and Palm.  A week ago I bought a Palm Pre Plus from Verizon.  I have version 1.4 update installed as well.

    My question is this: I've set up ringtones for specific calls.  I also put a song for "incoming calls" (i.e. calling strangers who are not personalized).  How to use custom ringtones I have for individuals?  I looked and looked for a week (since I bought the phone) for an answer to this question, nothing helps.

    Any help would be appreciated.  Thank you.

    Lauren

    Which plays for a contact that you have defined a specific song in your folder/Sounds/Ringtones ?

    How about a caller without a specific set of the song? Or an unknown number, which then plays?

    When you set individual ringtones and global, are you able to preview them by clicking on the button play to the right of the file name? After you have previewed, you tap on the name of the ringtone to change setting?

    There is no further action to take to assign a ringtone outside either overall or individually or both. The individual parameters replace the world for contacts where it is set. If it is not set, the global setting will remain.

    You can also consult the article Palm wrote for more in-depth coverage here.

    Life moves fast. Don't miss a thing.

    TreoAide

Maybe you are looking for