Add custom property to the MXML component without extension

Hello

I want to add a custom property to a bunch of ignition buttons.

A bit like the HTML5 data-* feature.

Is this possible without extending the Spark Button class?

I tried to use the id and the setting is a const static of a class AS public, but it does not compile the names of the time ID in MXML. (for example < s:Button id = {SomeClass.aStaticConst} / >)

I could create buttons in AS3 and it be allowed to set identifiers as described above, the way in which its configuration is to allow other people to add new items in MXML for ease of use so I prefer to keep it so.

Thank you.

Hi, crush,

You cannot bind the property id to a constant, but I think that you can bind to the name property:

Dany

Tags: Flex

Similar Questions

  • JS script to add custom text and the name of file to file info in the title of the document

    Would be very happy for any help with this one...

    JS script add custom text and the name of file to file info in the title of the document

    Thank you very much

    Super: O)

    I have a folder of say 50 images and I want to run a lot of JS script

    example in the title of the document: image Nr 81205

    custom text is 'image Nr' + '81205 file name.

    activeDocument.info.title ="Nr of pictures"+ decodeURI(activeDocument.name);

    This would be correct without seening the ext file

    Thank you very much

  • This will remove all your custom settings and the settings of many extensions.

    Hello

    I was reading this article of knowledge and he says:
    "This will delete all your custom settings and many extensions settings."
    What are the custom settings?

    for example one of these and what else
    bookmarks?
    Add - ons?
    Top toolbar - Customize the toolbar
    Add on the toolbar
    Firefox/preferences
    Authorization Manager settings
    the new page open

    Corrupted preference file
    File preferences may be corrupt, Firefox prevents writing to it. If you delete this file, Firefox will automatically create another when it comes to.

    Here's how to delete the prefs.js file.

    This will remove all your custom settings and the settings of many extensions.
    Open your profile folder:

    In the menu bar, click the Help menu and select troubleshooting information. The troubleshooting information tab will open.

    In the section the Application databases, click view in the Finder. It will open a window with the folder of your profile.
    Note: If you are unable to open or use Firefox, follow the instructions for finding your profile without having to open Firefox.

    In the menu bar, click Firefox and select Quit Firefox

    Locate the prefs.js file (and, if applicable, the prefs.js.moztmp file).
    Delete these files and files prefs - n.js where n is a number (e.g. prefs - 2.js).
    If there is, remove the Invalidprefs.js.
    Restart Firefox. You should now have reset all preferences.

    Based on information from preferences not saved (mozillaZine KB)

    See also http://kb.mozillazine.org/Profile_folder_-_Firefox

    #1: there are too many pref for all kinds of adjustment which will offer a recipe of what you lose and how to keep certain parameters.
    It is possible to copy specific lines of a prefs.js to this file in another profile or restore some settings after deleting this file in the current profile folder.

    All the prefs that show as a user defined and appear in bold on the topic: config page are stored in the prefs.js file.

    This includes the changes you make and data Firefox itself and extensions store as data/parameters in a pref.
    It's

    #2,3: the localstore.rdf file stores the toolbar configuration and other data.

    #4: the current versions of Firefox shows the menu entry "Tabs" at the top menu ' display > toolbars "and" Firefox > Options ' and in the menus toolbar pop-up if the tabs are not in the default position on the top.

    If the notches located on the top and the menu entry is not available and you want to move the tabs under the navigation toolbar, then you have to toggle the pref browser.tabs.onTop false on the subject: config page.

    A restart of Firefox is necessary for updating the menu entry to display or remove.

    Note that this pref will no longer effect when the code Australis lands on the output channel (code Australis will probably land in Firefox 29).

    #5: see https://support.mozilla.org/kb/Clear+Recent+History

    Compensation of the "Site Preferences" clears all exceptions for cookies, images, pop-ups, installing the software, stored passwords in permissions.sqlite and other site specific data stored in content - prefs.sqlite (including zoom on the page).

    Deletion of cookies will delete all specified (selected) cookies, including cookies with an exception allowing you want to keep.

    #6,7: history of search bar is the story of the search bar (Google) on the Navigation toolbar.

    All recorded data to a form on a web page is included in the data in the form, but you can not separate and distinguish the two.

    Browsing history is the history of the web pages you have visited.

    #8: session cookies are always kept in memory and never stored on the disc in cookies.sqlite

    You can only delete specific cookies manually in the Cookie Manager or leave cookies expire when you close Firefox to make them behave like session cookies.

    Cookies of other compensation will include all cookies and don't obey the exceptions that you have made.

    #9
    Data stored in storage DOM is not stored in cookies.sqlite, but it is generally stored in the webappsstore.sqlite file or possibly in the form of data in IndexedDB.

  • Add custom controls in the Rich text editor

    Hi all

    Request help where I am doing wrong,

    I try to add a new control in the rich text editor toolbar. What I realized is this can be done by creating a new side with the name 'customXYX' and include it in the toolboxLayout = "customXYX historical fonts ', which now displays the facet of customXYZ on the toolbar.

    Here is my code:_

    RTE. JSFF

    + <? XML version = "1.0" encoding = "UTF - 8"? > +.
    + < jsp:root xmlns:jsp = "http://java.sun.com/JSP/Page" version = "2.1 +.
    xmlns:af = "http://xmlns.oracle.com/adf/faces/rich".
    xmlns:f = "http://java.sun.com/jsf/core".
    xmlns:h = "http://java.sun.com/jsf/html" >
    + < f: facet name = "customXYZ" > +.
    + < h:panelGroup id = "pg1" > +.
    + < af:outputText value = "outputText1" id = "ot1" / > +.
    + < / h:panelGroup > +.
    + < / f: facet > +.
    + < af:richTextEditor toolboxLayout = "customXYZ history of fonts" label = "Label 1" id = 'rte1 ' +.
    + value = "#{rteBean.rteText}" / > +.
    + < / jsp:root > +.




    * RTE. JSPX * (here I added my taskflow which consist of my fragment above is added as a region)

    + < jsp:root xmlns:jsp = "http://java.sun.com/JSP/Page" version = "2.1 +.
    + xmlns:f = "http://java.sun.com/jsf/core" +.
    + xmlns:h = "http://java.sun.com/jsf/html" +.
    + xmlns:af = "http://xmlns.oracle.com/adf/faces/rich" > +.
    + < jsp:directive.page contentType = text/html"; Charset = UTF - 8 "/ > +.
    + < f: view > +.

    + < af:document title = 'RTE Image View' id = 'd1' > +.
    + < af:form id = "f1" > +.
    + < af:region value = "#{bindings.rtetf1.regionModel}" id = "r1" / > + "
    + < / af:form > +.
    + < / af:document > +.
    + < / f: view > +.
    + < / jsp:root > +.


    When I try to run it, I get an error saying:
    * < SimpleRichTextEditorRenderer > < _encodeToolboxLayoutToolbar > cannot find the part corresponding to the custom calendar toolboxLayout value customXYZ.*


    Please let me know what I'm doing wrong.

    Thank you
    Ashwin

    Hello

    try to create the facet as a child of the RichText component and not a child fo the page fragment

    Frank

  • Simple collection of the months component (without corresponding calendar?)

    I feel that it can be ridiculously easy to answer...

    I am looking for a component of the months picking it is simply an extension of something that already exists.

    My first instinct was to look at the JXMonthView that is included inside SwingX. Basically, my ideal component would be one that includes only the month part up to the selection page of the JXMonthView component with "traversable' set to true. In other words, a control that allows you to choose a month in the year using a schema of forward/reverse. Unfortunately, I can't find a good way to replace the functionality of the class such that only the top header is included.

    I tried to get into the guts of the code, but it was like the best thing to do was to replace the layoutContainer inside BasicMonthViewUI function. Then I realized that this feature is part of a private class. I missed a great way to hide just that little of the Panel? I also considered replacing the functions of the painting, but my fear is that the component request too much space because it's just not 'paint' the month but still allocates space for this.

    I think that, perhaps, a self-made simple control may be the best solution? I'm just trying to stay away from possible much custom work I hope to make the control as portable as possible between platforms.

    Thank you!

    aardvarkk wrote:
    I'm looking for what you might call a "horizontal spinner" or scroll bar, in which you have a front and back button on each side of months he throws back a month and back. Also it should technically go back into previous years and to enter in the new.

    Here is something of a JSlider in months and JButtons in the years. Because I'm not that familiar with Date/calendar, there is probably a better way to extract the necessary information (exercise for the OP), but this comes from the Swing stuff demos:

    import java.awt.*;
    import java.awt.event.*;
    import java.text.*;
    import java.util.*;
    
    import javax.swing.*;
    import javax.swing.event.*;
    
    public class MonthScroller extends JPanel
    {
      String[] months;
      JSlider slider;
      JButton btnPrevious, btnNext;
      JLabel displayMonth, displayYear;
      int month, year;
    
      public MonthScroller()
      {
        months = Arrays.copyOf(
            DateFormatSymbols.getInstance().getShortMonths(), 12);
        month = Calendar.getInstance().get(Calendar.MONTH);
        year = Calendar.getInstance().get(Calendar.YEAR);
    
        displayMonth = new JLabel(months[month]);
        displayYear = new JLabel(String.valueOf(year));
    
        slider = new JSlider(0, 11, month);
        slider.setMinorTickSpacing(1);
        slider.setPaintTicks(true);
        slider.setPaintLabels(true);
        slider.addChangeListener(new ChangeListener(){
          public void stateChanged(ChangeEvent e)
          {
            month = slider.getValue();
            displayMonth.setText(months[month]);
          }
        });
    
        btnPrevious = new JButton("<");
        btnPrevious.addActionListener(new YearIncrementer(-1));
        btnNext = new JButton(">");
        btnNext.addActionListener(new YearIncrementer(1));
    
        add(btnPrevious);
        add(slider);
        add(btnNext);
        add(displayMonth);
        add(displayYear);
      }
    
      private static void createAndShowUI()
      {
        JFrame frame = new JFrame("Month Scroller");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.add(new MonthScroller());
        frame.pack();
        frame.setLocationRelativeTo( null );
        frame.setVisible( true );
      }
    
      public static void main(String[] args)
      {
        EventQueue.invokeLater(new Runnable()
        {
          public void run()
          {
            createAndShowUI();
          }
        });
      }
    
      class YearIncrementer implements ActionListener
      {
        int increment;
        YearIncrementer(int increment)
        {
          this.increment = increment;
        }
    
        public void actionPerformed(ActionEvent e)
        {
          year += increment;
          displayYear.setText(String.valueOf(year));
        }
      }
    }
    
  • How can I 'Add a property' in the Panel CSS Styles in CS6?

    This screenshot on the web displays the option 'Add a property' blue in the CSS Styles Panel in current version of DW.

    http://www.photoshopcafe.com/cs6/images/dw16.png

    In my CS6 (screengrab below), this button is apparently not found. I don't want to create a new rule, I would like to add a new property to the property table. Is it still an option in CS6? I simply don't see the option?

    Screen shot 2013-07-18 at 12.53.55 PM.png

    Hi Lee,.

    You must click the view property value. As shown in the screenshot below.

    Displays only the properties that have been created. Set properties view is the default view.

    Thank you

    VIANEY

  • How to use the declarative component without deployed as JAR

    Hi all
    I want to create a reusable component (declarative component) for PanelHeader with default features packed in I want to use in my application. Because this component will be used only in my project, I don't see a use to go through the process of creating a jar and deploying it before using it. Is it possible to use this component without creating a JAR.

    Thank you
    -Srini.

    User 895137,

    your welcome to ignore the best practices in the development of the ADF. The declarative elements are deployed in the libraries of the ADF. If you keep the declarative component in the application then project you will have a chance to deploy independent of the application (which means that your ADF library contain more than just the source of the component (which is where your nightmare begins)). Therefore, best practices

    1. create the declarative component in a new project in JDeveloper. Follow

    http://download.Oracle.com/docs/CD/E21764_01/Web.1111/b31973/af_reuse.htm#BABJBFDD

    2. If you don't ant to deploy components in a tag library, use declarative dynamic components (will not deploy-able in many applications, as you mentioned your future plan is), as shown here

    http://download.Oracle.com/docs/CD/E21764_01/apirefs.1111/e12419/tagdoc/af_declarativeComponent.html
    http://download.Oracle.com/docs/CD/E21764_01/apirefs.1111/e12419/tagdoc/af_componentDef.html
    http://download.Oracle.com/docs/CD/E21764_01/apirefs.1111/e12419/tagdoc/af_xmlContent.html

    Frank

  • How to access a custom property for the attribute and command in .vm file?

    Hello

    I have created custom in OPM for attribute properties and also apply only to assign properties.

    But if this value in the .vm file access?

    I've accessed the help

    $attribute.getProperty ("ScreenProp", "default")

    but it is not functional but is even worked for the custom property screen

    It already is the answer in my first answer in the thread How to access custom in the .vm file properties :

    $control.getProperties () .get ("PropertyName")

  • Help to create the MXML component

    I can't understand how to create a simple component in FB4:

    I create a folder in the src folder, called "components".

    I click with the right button on components and select new > MXML component

    In the resulting dialog box, in front of the light, when I pess the search button, all I get is a choice, "spark.components.Group.

    I don't know where to go from there.

    So how, exactly, I created a component based on, say, ComboBox?

    Just type "Combo" in the text field to the light and select ComboBox spark or MX ComboBox control from the drop-down.

    Peter

  • How to add a string to the end TLFTextField without losing the current text format!

    • I have a TLFTextField which loads the text of the external text file.
    • Then a function changes the format of certain parts.
    • Then, as soon as I add a string to the end my TLFTextField, all previous formatting is lost!

    I use this code to add the string:

    • myTLF.text += ".";

    or

    • myTLFText.text = myTLFText.text.concat(".");

    Should I use another method?

    Sample.png


    pass again the text through your function put shaped, or try appendText:

    • myTLF.appendText(".");
  • Add custom button to the right of SEARCH in the interactive report

    Is it possible to add a custom to the right of the search bar button

    ApEx 3.2.1 < == do not laugh

    S.Bovin wrote:

    Is it possible to add a custom to the right of the search bar button

    ApEx 3.2.1<== dont="">

    Create the button as a button in the region in the region of the infrared, with the Position of the button the value to the right of the Interactive Search Bar report.

  • Rectangle custom property on the lower right corner

    Is it possible in the class Rectangle to create a similar to xProperty() top left DoubleProperty doubleproperty, but who sets the coordinates of X of the angle at the bottom right?

    Same problem for the coordinate Y.

    These new properties must be passed as a parameter to the bindDirectional method.

    Thank you
    import javafx.beans.property.DoubleProperty;
    import javafx.beans.property.SimpleDoubleProperty;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.shape.Shape;
    
    public class BottomRightRectangle {
      private final Rectangle rectangle ;
      private final DoubleProperty maxXProperty ;
      private final DoubleProperty maxYProperty ;
      private final DoubleProperty minXProperty ;
      private final DoubleProperty minYProperty ;
    
      public BottomRightRectangle(double minX, double minY, double maxX, double maxY) {
        this.rectangle = new Rectangle(minX, minY, maxX-minX, maxY-minY);
        this.maxXProperty = new SimpleDoubleProperty(maxX);
        this.maxYProperty = new SimpleDoubleProperty(maxY);
        this.minXProperty = new SimpleDoubleProperty(minX);
        this.minYProperty = new SimpleDoubleProperty(minY);
        rectangle.widthProperty().bind(maxXProperty.subtract(minXProperty));
        rectangle.heightProperty().bind(maxYProperty.subtract(minYProperty));
        rectangle.xProperty().bind(this.minXProperty);
        rectangle.yProperty().bind(this.minYProperty);
      }
    
      public BottomRightRectangle() {
        this(0, 0, 0, 0);
      }
    
      public Shape rectangle() { return rectangle ; }
    
      public DoubleProperty minXProperty() { return minXProperty ; }
      public DoubleProperty minYProperty() { return minYProperty ; }
      public DoubleProperty maxXProperty() { return maxXProperty ; }
      public DoubleProperty maxYProperty() { return maxYProperty ; }
      public double getMaxX() { return maxXProperty.get(); }
      public double getMaxY() { return maxYProperty.get(); }
      public double getMinX() { return minXProperty.get(); }
      public double getMinY() { return minYProperty.get(); }
      public void setMaxX(double x) { maxXProperty.set(x); }
      public void setMaxY(double y) { maxYProperty.set(y); }
      public void setMinX(double minX) { minXProperty.set(minX); }
      public void setminY(double minY) { minYProperty.set(minY); }
    
    }
    

    And the test:

    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.BorderPane;
    import javafx.scene.layout.Pane;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.Circle;
    import javafx.scene.shape.Shape;
    import javafx.stage.Stage;
    
    public class BottomRightRectangleTest extends Application {
    
      @Override
      public void start(Stage primaryStage) {
        final Pane pane = new Pane();
        final BottomRightRectangle brr = new BottomRightRectangle(200, 200, 400, 400);
        final Shape shape = brr.rectangle();
        shape.setFill(Color.CORNFLOWERBLUE);
        shape.setStroke(Color.BLUE);
        final Circle bottomRightHandle = new Circle(10, Color.BLUE);
        bottomRightHandle.centerXProperty().bindBidirectional(brr.maxXProperty());
        bottomRightHandle.centerYProperty().bindBidirectional(brr.maxYProperty());
    
        final Circle topLeftHandle = new Circle(10, Color.BLUE);
        topLeftHandle.centerXProperty().bindBidirectional(brr.minXProperty());
        topLeftHandle.centerYProperty().bindBidirectional(brr.minYProperty());
    
        bottomRightHandle.setOnMouseDragged(new EventHandler() {
          @Override
          public void handle(MouseEvent event) {
            if (event.getX() >= topLeftHandle.getCenterX()) {
              bottomRightHandle.setCenterX(event.getX());
            }
            if (event.getY() >= topLeftHandle.getCenterY()) {
              bottomRightHandle.setCenterY(event.getY());
            }
          }
        });
    
        topLeftHandle.setOnMouseDragged(new EventHandler() {
          @Override
          public void handle(MouseEvent event) {
            if (event.getX() <= bottomRightHandle.getCenterX()) {
              topLeftHandle.setCenterX(event.getX());
            }
            if (event.getY() <= bottomRightHandle.getCenterY()) {
              topLeftHandle.setCenterY(event.getY());
            }
          }
        });
    
        pane.getChildren().addAll(shape, bottomRightHandle, topLeftHandle);
        BorderPane root = new BorderPane();
        root.setCenter(pane);
        Button resetButton = new Button("Reset");
        resetButton.setOnAction(new EventHandler() {
          @Override
          public void handle(ActionEvent event) {
            brr.setMinX(200);
            brr.setminY(200);
            brr.setMaxX(400);
            brr.setMaxY(400);
          }
        });
        root.setBottom(resetButton);
        Scene scene = new Scene(root, 600, 620);
        primaryStage.setScene(scene);
        primaryStage.show();
      }
    
      public static void main(String[] args) {
        launch(args);
      }
    }
    
  • Publish error - creates the empty file without extension

    Hello world

    I have trouble publishing a project. Basically, what happens is that when I publish to SWF, I have 3 files: a Javascript file, a SWF file, then an empty file with file extensions. I use Captivate 5 on XP and I update yesterday, so I don't know that I have installed the latest patch. I deleted my Captivate cache and deleted the Captivate Preferences folder, but that did not help.

    Everyone knows this? Can I publish earlier versions of this project, which leads me to believe that the file has become corrupt when I added audio. Any ideas? Should I just cut my losses and go back to an earlier version?

    Any suggestion would be appreciated.

    Thank you.

    Just in case someone else has a similar problem, here is what Adobe has done to resolve the issue:

    Remove the custom skin

    Use the default Skin

    Remove the Table of contents

    Change file name

    Problem solved.

  • A custom, shipped event from custom mxml component isn't triggering the eventListener parent App

    I have a problem trying to fix now... Here's what happens:

    (1) I have a custom, event that is just CustomEvent.as that extends event.

    (2) when I close a TitleWindow, calling dispatchEvent (myEvent), where myEvent is an instance of the CustomEvent.

    (3) I checked the event get sent, because the Boolean that returns the dispatchEvent method is set to 'true '.

    (4) the eventListeners on the application parent never called.

    I use this process on another custom event and eventListener and it works.  It does not for this one.  Here is my code:

    / * The custom event class

    **/

    package me.events.Events

    {

    import flash.events.Event;


    /public class CustomEvent extends Event

    {

    Public static const WINDOW_CLOSED:String = "windowClosed";

    public void CustomEvent (type: String, bubbles: Boolean = true, cancelable: Boolean = false)

    {

    super (type, bubbles, cancelable);


    }

    }

    }


    / * The MXML component

    **/

    <? XML version = "1.0" encoding = "utf-8"? >

    " < = xmlns:mx mx:TitleWindow ' http://www.Adobe.com/2006/MXML "layout ="absolute"width ="400"height ="300"title ="replaced"showCloseButton ="true"borderStyle ="solid"cornerRadius ="0"creationComplete ="init (); "close ="windowCloser (); » >

    < mx:Label x = "10" y = "10" text = "" project name: "fontWeight ="bold"/ > "

    < mx:Label x = "10" y = "50" text = "' Description of the project:" fontWeight = "bold" / > "

    < mx:Script >

    <![ CDATA [ ]

    import me.events.CustomEvent;

    Public static const WINDOW_CLOSED:String = "windowClosed";

    public void init (): void {}

    private function windowCloser (): void { }

    var myEvent:CustomEvent = new CustomEvent();

    dispatchEvent (myEvent);

    PopUpManager.removePopUp (this);

    }

    ]]>

    < / mx:Script >

    < / mx:TitleWindow >


    / * The parent application

    **/

    " < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "layout ="absolute"creationPolicy ="all"creationComplete ="init (); » >


    < mx:Script >

    <![ CDATA [ ]


    private function init (): void { }

    this.addEventListener (CustomEvent.WINDOW_CLOSED, myHandler);

    intro = model.getIntro ();

    PopUpManager.addPopUp (intro, this, true);

    PopUpManager.centerPopUp (intro);

    }


    private void myHandler(e:CustomEvent):void { }


    //THIS IS NEVER CALLED!

    }


    ]]>

    < / mx:Script >


    < / mx:Application >


    If you display the TitleWindow as a popup, which is probably the problem, because the pop - up is not in the same display as the application list below systemManager. You may need to add the event listener to the systemManager.

    See my Flex 3 post recipe book where I use custom events and add event listeners to the systemManager:

    http://www.Adobe.com/cfusion/CommunityEngine/index.cfm?event=ShowDetails&ProductID=2&postI d = 11246

    If this post has answered your question or helped, please mark it as such.

  • To access the dataprovider of mxml component.

    Hello

    I have a dataprovider and want to access the data of mxml component.

    Basically, I

    ActionScript:

    [

    Bindable ]

    private

    var dp : Collection ArrayCollection;

    private

    function dp_handler(e:ResultEvent):Sub

    {

    DP = e.result

    as Collection ArrayCollection;

    }

    I wanted to access RFP since using the mxml component

    < mx:script >

    <! [CDATA]

    mx.core.Application;

    LBL. Text = Application.application.dp.getItemAt (0) .fieldname;

    []] >

    < mx:Label

    id=" LBL " x=" 51 " y=" 136 " />

    He continues to tell me dp is unknown property.  No idea what I am doing wrong?

    RFP to make public, not private.

Maybe you are looking for