Search Results

Search found 17 results on 1 pages for 'uicomponents'.

Page 1/1 | 1 

  • Flex Custom UIComponents

    - by user164142
    I have created a graph component in AS3 which extends UIComponent. I created an mxml component which is just a Label. The idea is to use the label component to show the values on the graph when you hover over points. I have tried two approaches. Create the Label component using ClassFactory inside the graph so it gets created in the graph component and addChild is called there. The problem is it is always 0 in size. Create in main mxml file and pass in to graph using a setter, the sizing is perfect but the x an y dont relate to my graph :( I suppose its similar to flex and itemrenderers, but in my case i have a graph and another component which can be changed, at the moment it is just a Label. Thanks Neil

    Read the article

  • cleanup all UIComponents inside mx:Application

    - by user267530
    Hi I create some elements( UIComponents, mainly Panels) inside the “mx:Application name=”tst” “. I need to cleanup all those UIComponent’s on MouseClick event , using Actionscript. Is there any way I access the children elements of mx:Application ( I used var totalChildren:Number = this[‘tst’].numChildren ; but looks like it fails to access the children list). Thanks Palash

    Read the article

  • How to get a collection of UIComponents based on a stylename in Adobe Flex

    - by Mark Barton
    Does anyone know an Actionscript equivalent of the javascript getElementsByClassName. What I would like to do is add a custom 'stylename' to various components which I can then use to get a collection of these objects and therefore process their visibility property. The idea is I want to hide various components based on what roles a logged in user has - I just want to make this flexible by adding an array of rolenames to a custom property or use the stylename property on a Canvas or Panel etc. Thanks

    Read the article

  • Clear validation on textInput when validation is not enabled

    - by Jon
    Hi, I've created a custom textInput componenet that handles it's own validation using a private validator. The validation is enabled depending on the state of the component i.e. validation is enable when the components state is "edit". However, when the state changes from edit the internal validator is set to not enabled but the validation errors on the textbox do not clear - the textInput still has the red border and on mouseover the validation errors come up. What I want to happen is that when a validator is disabled the error formatting and error messages clear from the text input control. Does anyone have any idea how to do this I tried setting the internal validator instance to enabled = false and dispatching a new focusOutEvent as below but the validation error formatting is still applied to the textInput contrl. _validatorInstance.enabled = false; //clear the validation errors if any dispatchEvent(new FocusEvent(FocusEvent.FOCUS_OUT)); Any ideas? Thanks Jon

    Read the article

  • Flex: How to resize DisplayObject to fit panel in Flex application

    - by ohm
    I am trying to attach some of my actionscript class, inherited from Sprite, to my Flex application by attaching it to a UIComponent, then add UIComponent to a panel. However, the size of my Sprite class appears to be larger than the panel. So, I try to resize it using DisplayObject.scale property, but I need to know the size of my container. Since I try to make my code reusable, I figure that I should let my Sprite class handle the resize by getting it via its parent property (let's say, I can resize it by set this.scaleX = this.parent.Width/this.width or something like this) However, my Sprite class's parent, which is the UIComponent, has width/height of 0. So, my question is: 1) Is there any better way to resize DisplayObject class to fit its container when attached to Flex object? 2) If you know, why my UIComponent's size remain 0 and my DisplayObject still appears at its full size? Here's my code, using Flash Builder 4: private var loader:Loader = new Loader(); private function testLoader():void { var urlRequest:URLRequest = new URLRequest("http://localhost/welcome.png"); loader.load(urlRequest); loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onLoaderLoadComplete); } private function onLoaderLoadComplete(e:Event):void { loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,onLoaderLoadComplete); var ui : UIComponent = new UIComponent(); ui.addChild(loader); panelTest.addElement(ui); trace("ui.width = " + ui.width); trace("ui.height = " + ui.height); trace("loader.width = " + loader.width); trace("loader.height = " + loader.height); trace("panelTest.width = " + panelTest.width); trace("panelTest.height = " + panelTest.height); } And this is the result when run: ui.width = 0 ui.height = 0 loader.width = 571 loader.height = 411 panelTest.width = 480 panelTest.height = 320

    Read the article

  • Adding LegendItems in Flex places horizontally not vertically (as it's supposed to)

    - by David
    I'm dynamically inserting LegendItems into a Legend using the following code: signalLegend.removeAllChildren(); signalLegend.direction = "vertical"; for (var i:int = 0; i < numItems - 1; i++) { signalLegend.addChild(new LegendItem()); legendItem = signalLegend.getChildAt(i) as LegendItem; legendItem.label = "Title here"; legendItem.setStyle("fill", theColour); } While the Legend direction is set as vertical, all the items are appearing horizontally. Very annoying.

    Read the article

  • Adding UIComponent to both Canvas and Tree in Flex 3

    - by Chris M
    I currently am trying to add a custom class which subclasses UIComponent to both a tree and a canvas, but when I try to re-order the tree by dragging I get this error: TypeError: Error #1010: A term is undefined and has no properties. at mx.controls::Tree/get firstVisibleItem()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\Tree.as:764] at flash.utils::ByteArray/writeObject() at flash.desktop::Clipboard/putSerialization() at flash.desktop::Clipboard/convertFlashFormat() at flash.desktop::Clipboard/setData() at mx.managers::NativeDragManagerImpl/doDrag()[C:\autobuild\3.2.0\frameworks\projects\airframework\src\mx\managers\NativeDragManagerImpl.as:282] at mx.managers::DragManager$/doDrag()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\DragManager.as:243] at mx.controls.listClasses::ListBase/dragStartHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:9085] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298] at mx.controls.listClasses::ListBase/mouseMoveHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:8822] When I do not add the UIComponent to the canvas, this error does not occur, anyone have any knowledge as to why this happens?

    Read the article

  • Flex AdvancedDatagrid inline commentary functionality required

    - by Forkrul Assail
    I'm using Flex's Advanced Datagrid for a project and need inline comments, in a similar style to Excel spreadsheet comments. A little visual indicator should indicate if a field is associated with a comment, and on clicking on the element should open or trigger an action for displaying that particular comment. Any suggestions on how I would go about implementing this?

    Read the article

  • Java Framework Choice Question.

    - by Sarang
    We do have many frameworks available in Java. Struts, Swing, JSF 2.0, Spring etc are used as per their priority. Actually, I don't know how many they are as well! But, as I am fresher to Java, even learning after their architecture, I cannot decide which framework can be used with what type of Projects ! Also, I am confused with mixed use of framework like Spring + JSF. What is the benefit to it ? Another thing making me confusing is about the UI components available in market. Like, we do have Primefaces, Ice-faces, MyFaces, Rich-faces. They may or may not have been supporting AJAX in-built. They may contains some bugs as well. What is best choice for Framework + UI component that can directly provide a best feet solution for any project ?

    Read the article

  • Setting the Panel Owner

    - by babyangel86
    Hi, I've got an application that allows a panel to popup to allow the user to edit some properties. How do I set the panel owner so that it is on top of all the other components on the page without actually disabling them like you do with an alert box?

    Read the article

  • .NET user interface components recommendations

    - by Parakus
    I'm looking for advice on what .NET user interface components are out there on the market. I have been developing asp.net websites and have mainly been using the Visual studio toolbox build in controls supported by the AjaxcontrolToolkit and the applications have been mainly used inhouse running on our company intranet. But now a new client wants a much more professional looking, commercial web application and they have a budget for some user components for use in the application. Any recommendations where value for money will be realised. Interested in components that will integrate well with ASP.NET 3.5 SP1 or even .NET 4.

    Read the article

  • How to add/get Sprite to/from UIComponent

    - by user955399
    How to add Sprite to BorderContainer (UIComponent)? var sprite:Sprite = new Sprite(); sprite.graphics.lineStyle(10,0); sprite.graphics.moveTo(40,40); sprite.graphics.lineTo(60,60); mybordercontainer.addChild(sprite); //mybrodercontainer is id of BorderContainer created in mxml This code doesnt work. I cant see Sprite on my BorderContainer. How can I add Sprites on UIComponents, so I can see them? I tried this and it kinda worked: var comp:UIComponent = new UIComponent(); comp.addChild(sprite); myborderconteiner.addElement(comp); But I dont think, that this is a right way to add Sprites to UIComponents. Is there another method to do that? Second problem: When I have few Sprites added to my UIComponent (lines/circles/images or others) how can I receive an object Sprite from that UIComponent, which is containing all Sprites added before to that UIComponent? I need to create Bitmap from that Sprite and do some things. I hope I make myself clear

    Read the article

  • JSF 2 - clearing component attributes on page load?

    - by jamiebarrow
    Hi, The real question: Is there a way to clear certain attributes for all components on an initial page load? Background info: In my application, I have a JSF 2.0 frontend layer that speaks to a service layer (the service layer is made up of Spring beans that get injected to the managed beans). The service layer does its own validation, and I do the same validation in the frontend layer using my own validator classes to try and avoid code duplication somehow. These validator classes aren't JSF validators, they're just POJOs. I'm only doing validation on an action, so in the action method, I perform validation, and only if it's valid do I call through to the service layer. When I do my validation, I set the styleClass and title on the UIComponents using reflection (so if the UIComponent has the setStyleClass(:String) or setTitle(:String) methods, then I use them). This works nicely, and on a validation error I see a nicely styled text box with a popup containing the error message if I hover over it. However, since the component is bound to a Session Scoped Managed Bean, it seems that these attributes stick. So if I navigate away and come back to the same page, the styleClass and title are still in the error state. Is there a way to clear the styleClass and title attributes on each initial page load? Thanks, James P.S. I'm using the action method to validate because of some issues I had before with JSF 1.2 and it's validation methods, but can't remember why... so that's why I'm using the action method to validate.

    Read the article

  • Where is the taglib definition of PrimeFaces 4?

    - by Michael Wölm
    I am looking around how to define custom components in JSF. According to the Java EE tutorial, any custom component needs to be described in a taglib. When I take a look into the PrimeFaces source, I cannot find any taglib file or any hint where the namespace is bound and the available components are defined. I am adding primefaces jar to my dependencies, adding xmlns:p="http://primefaces.org/ui to the xml namespace, defining some primfaces components on my page and it works... Ok, but neither I can find the related taglib in the source or binary package nor my IDE (IntelliJ) is able to find where "xmlns:p="http://primefaces.org/ui" is pointing to. Therefore, code completion is also not possible. (all other mojarra taglibs are found.) Is it possible that PrimeFaces is defining the taglib via annotations directly in Java classes or is it generating it during runtime? I can easily find the UIComponents, primefaces defines in its source, but the configuration of the taglib seems to be missing. I am sure I just don't know how PrimeFaces is doing it, but the javaeetutorial is not describing any other opportunity than defining a ...-taglib.xml

    Read the article

  • whats a sure shot way to make sure objects appear correctly positioned on stage

    - by dubbeat
    Hi, I've being having a lot of trouble recently getting objects (UIComponents containing movieclips) to appear correctly in the right positions. For example, my current dilema is I have a container that is 3 layers deep. outer layer inner layer display layer This hiearachy was built in CS4 as a movieclip. In the display layer in CS4 I figured out where I want to place 16 different "box" movieclips. I dont want to create these boxes maunually at design time, instead I want to add them at run time. So I know what container I want to add my boxes to. I know what positions they "would" be at in CS4 environment. Whats the best way to add them in the correct locations with code? The "box" I'm trying to add in a movieclip held inside of a UIComponent. Is there a "rule of thumb" to do this type of thing? I'm sure I'm going to encounter this problem again and again and I'd like to just blow the problem out of the water once and for all with the "right way" to do this.

    Read the article

  • XSLT, JSTL e JSF

    - by Paulo S.
    I have a xml file which I want to transform in a jsf code page. To do that I've created a xsl file. xml: <?xml version='1.0' encoding='ISO-8859-1'?> <questionario xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='Schema2.xsd'> <componente nome='input'> <id>input1</id> </componente> <componente nome='input'> <id>input2</id> </componente> </questionario> code: <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %> <c:set var="xml" value="${questionarioXSLBean.xml}"/> <c:set var="xsl"> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" exclude-result-prefixes="f h"> <xsl:template match="/"> <xsl:for-each select="questionario/componente"> <xsl:if test="attribute::nome = 'input'"> <xsl:variable name="id"> <xsl:value-of select="id" /> </xsl:variable> <h:inputText id="{$id}"/> </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet> </c:set> <x:transform xml="${xml}" xslt="${xsl}" /> The problem is that nothing is shown in my screen because the generated code for <h:inputText id="input1"/> is <h:inputText id="input_1" xmlns:h="http://java.sun.com/jsf/html"/> how can I replace the xmlns:h="http://java.sun.com/jsf/html" or suppress it. Thanks! Update: Let me clarify what I want to do. I want to generate a jsf page dynamically depending on the attributes of a xml file, for instance, 2 input texts, 3 check boxes, etc. To make the transformation to jsf I thought in two approaches, one using jstl and another using xslt. The problem with the former is that I couldn't integrate jstl with jsf code (to set jsf components attributes using jstl variables) and with the last approach, I'm facing the problem described above.I wouldn't like to create components in java (UIComponents). Any suggestions?

    Read the article

1