Flex ::remove Validation Programmatically From Component?
Feb 11, 2010
How to remove validation programmatically from flex componentThis is my method
public static function validateRequired(txt:TextInput, errorMessage:String="This field is required"):Boolean
{
[code]....
View 3 Replies
Similar Posts:
Dec 30, 2010
Reproduce problem:
run code
click checkbox
click on the first input box
enter: 100
The red glowing error box should have disappeared, but it will disappear when you focus on another component e.g. the second input box. If you refersh the screen, click the checkbox, and TAB onto the first input box, type 100, the error glow will disappear as I expected. This is what I want for click also.
[code]...
View 2 Replies
Oct 24, 2011
I am experimenting with e4x. I could programmatically add an attribute to an Xml by doing something like this :
[Code]...
now i have added a name attribute to it programmatically because even though the xml had no attribute called name, after the statement above, it automatically has one now. My difficulty now is how do i , as well, remove the name attribute i have inserted programmatically again?
View 1 Replies
Oct 17, 2010
I'm using a dateField component (with editable = true) as an itemEditor in a dataGrid. Interestingly, when editing the textInput part of the dateField it doesn't seem to react to an ESC keydown as I would expect, i.e. reload old dateField value and give up focus. This seems to be standard for most other components, but not for as most other components do.
How would you go about implementing such behavior? I can listen to keydown == escape on the TextInput portion, but just realized that I don't know how to tell dateField to give up focus and politely close - in fact I'm not even sure that's the right strategy (maybe I should work at the DataGrid level?
View 1 Replies
Jul 14, 2010
Does anybody know how to add custom rolloveridicatorskins to a flex 3 list component?it doesn't have the rolloveridicatorskin in the css.
View 2 Replies
Jul 13, 2009
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));
[code].....
View 2 Replies
Feb 11, 2010
In Flex I've got a component, which is based on a Canvas.It looks like this (I removed the <mx:Script> for better reading):
<mx:Canvas verticalScrollPolicy="off" showEffect="showFX" hideEffect="hideFX" horizontalScrollPolicy="off" creationComplete="doComplete()" xmlns:mx="http://www.adobe.com/2006/mxml" width="63" height="63">[code]....
If I set customComponent.Visible to false, the component gets hidden (as expected). But doesn't trigger the hideFX at all. Am I doing something wrong? Or isn't this the correct way to use hideEffect and showEffect?
View 1 Replies
Dec 24, 2009
I can change the color of the label in Flex Builder, I can even BIND the color to a variable and that works, but I can't find the Color PROPERTY in order to change or reference it programatically! What is the ActionScript 3.0 code to change the font or color of a piece of text in a Flex RIA - or is caring in what color your text appears too bizzarre a request for a RIA? I wrote whole applications after just minutes of "learning" flex, how come it's taken me three days and I still can't change the color of my stupid label?
View 1 Replies
Sep 29, 2010
I'd like to use a button within a component to remove it. So, you click it and the component is gone. But, I haven't figured out how you reference the component from within the component. What should I put in click=""?
My component: popCanvas
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Panel width="200" height="200" title="hello"
click="remove=">
[Code].....
View 1 Replies
Jun 25, 2009
With the Flex 3 SDK you simply needed to set the borderThickness style to 0, or set borderStyle to none. With the Flex 4 SDK ad the Spark theme, this has no effect.
View 5 Replies
Apr 10, 2012
I realize this is a total newbie question, but it is driving me crazy. In Flash Professional I have a movie clip, say 1000px high and 50px wide. I have it contained within (under) a mask layer where the mask is 100px high and 50px wide. In my program I move the movie clip vertically and as expected it is masked such that I only see 100px vertically.
My question is: how do I remove the mask from my movie clip? When I debug inspect the movie clip in Flash Builder, its .mask property is null. But it is masked..
View 2 Replies
Jun 23, 2010
I am new in flex and recently read about Validation and Invalidation in components.
View 2 Replies
Feb 23, 2011
i have a problem while username and password validation.i retrieved data (username and password)from an xml doc using http service but the problem is that i have to verify the username and password entered by he user with the username and password of the xml doc...
my xml doc is as follows:
<employees>
<employee>[code]....
View 1 Replies
Jul 15, 2011
I'm getting the "Error #1009: Cannot access a property or method of a null object reference." error on my application. Is there a function I can use to detect this before it causes an error... maybe something like:
isValid(variableName);
I know there's one, because i've used it before, but i can't remember what it is right now.
View 4 Replies
Dec 12, 2011
I have a XLSX file which contain 2 columns 1 being a formatted date, time or datetime field and other being the relavant format string of type FLEX. So this file contains Flex date format string with formatted value. This files can be contain more than one thousand such combination records. [code]What i need to know is, is there anyway that i can validate this given date , time or date time values at right side are formmated according to given FLEX format in the left side.
View 2 Replies
Sep 14, 2009
How can I Create an animated Bar Chart or Line Chart type of component in flash programmatically, which should depends upon an incoming XML data, the chart should have the basic criteria like, Chart Label, Item Tooltips, background grids (without using any image). There also needs an ability to change the data which should reflect the chart as well.
View 1 Replies
Jul 29, 2009
I have a Flex 3 app with a view in a viewstack, and that view must only be created when requested. I have declared validators for each of the controls on the view and I have created a method called checkAllValid() which runs Validator.validateAll(). This works great when I'm actually using the controls (using the change or focusOut events), but how can I get checkAllValid() to run when the view is first displayed to the user, so that they are immediately shown what is invalid once the data is populated in the controls?
I have tried putting the call in various events on the view itself (e.g. creationComplete, updateComplete, show, activate, etc.) but it always shows the following error when I start the application:
'The source attribute must be specified when the property attribute is specified.'
I have also tried setting the creationPolicy on the view to "all" but this does not help.
Some of the validators are only enabled when the form is in a certain state, but I have eliminated that as being the potential problem by commenting out all of my validators except for this most simple one:
[Code]....
I have also tried calling the single validator directly rather than using validateAll and the result is the same.
There must be a way I can force the view to validate when it is shown....
(by the way it's in the Cairngorm MVC framework and I have data bound to the controls)
View 2 Replies
Oct 12, 2009
I want the validator for password text input.
At least one Upper case letter
At least one numeric character
At least one special character such as @, #, $, etc.
should be there in password how can i give it in action script or mxml.
View 1 Replies
Mar 14, 2011
I might be taking crazy pills but has anyone actually gotten the errorSkin feature to work? I am not doing anything crazy, just extending TextInput (spark) and setting the errorSkin property.I have tried creating a skin using SparkSkin, did nothing.I have tried creating a skin using ProgrammaticSkin, did nothing.TextInput is always a red border. I know you can set errorColor and errorString but I am obviously looking to do more than just change the color of the border. I am compiling using Flex 4.1.
Implimentation:
<components:PromptedTextInput id="txt"
width="200"
[code].....
View 2 Replies
Apr 26, 2011
is it possible to check if there is any item in a list?
View 3 Replies
Nov 7, 2011
I'd like to use tooltips with the same design as the error/validation tooltips (rounded box with a tip pointing to the mouse's position).Given the name "error/validation tooltips", it bothers me to use them as normal tooltips.I haven't found people having the same "principles" issue as myself..So, is it that bad to use the error/validation tooltips as normal tooltips? And, if yes, what would be the easiest way to re-use its design without rewriting much code?
View 2 Replies
Jun 23, 2011
I have a component "child" which has a cancel button. Now this component is placed in a state called "newChildComp" I also have another component called "parent". In the parent component, i have a button that dispatches an event. Here is the event code:
[Code].....
so, basically,i am checking to see if the cancel button component in the Child component, while i am still in the parent Compoent, was clicked, if it was clicked, call the cancelButtonHandler. The problem is by the time the addNewChild handles the event, that cancel button was still null. My question is how do i solve this without using the itemCreationPolicy on the cancel button?
View 1 Replies
Jun 4, 2010
The examples I've seen seem to show how to change the color that shows when the user actually hovers over the textinput field.
However when the validation fails, a generic textInput border qill have a red line over it. My CSS file uses a border skin for the textInput, so I can't see this line.
I was hoping there was a way to highlight the text box when it failed validation, or re-enable the red line feature. I don't want to get rid of my CSS cos it'll totally blow my color-scheme, but any tweak allowing the error line
This is the CSS:
TextInput, TextArea
{
border-skin: Embed(source='/../assets/images/input_bg.png', scaleGridLeft=8, scaleGridRight=20, scaleGridTop=8,scaleGridBottom=9);
[Code]....
View 2 Replies
Apr 30, 2011
I am seeing a strange issue in flex. I need to reset all text input fields to 0 once the
user submits the values to be calculated. In the method
private function calculate():void {
resetToZero();
var num:Number = parseFloat(s21.text);
[code].....
View 1 Replies
May 5, 2011
I'm a new grad, so please be kind. I'm working on validating input in a Flex DataGrid cell that the user can edit. The rows in the DataGrid are backed by an mx.collections.ArrayCollection that includes a [Bindable]Model that I wrote. I want to validate against a custom client-side Validator, if-and-only-if that passes I want to validate the input on the server. If client-side validation fails, I want to display the normal validation error (see image below). If server-side validation fails, I want to use the same sort of UI components to notify the user. The solution should not include any external framework (Cairngorm or PureMVC).
[Code]...
How do Flex programmers validate on the server, immediately after the valid client-side validation passes?
I realize it seems silly to search out this "synchronous" design and I hope someone has an answer to solve my problem with best practices. In my defense, the reason I want to validate on the server immediately following client-side validation is so that I'm using Flex's validation framework. If I get an invalid response from the server, I want to leverage the built-in UI components that Flex has to tell the user something is incorrect about his/her input.
View 3 Replies
Sep 13, 2011
I am getting a number of spurious warnings in my CSS files within my Flex project. Any way to tweak which warnings are displayed in Eclipse like I do with Java?
View 1 Replies
Jul 6, 2011
I have a spark skinnable component which contains a datagroup with images. The datagroup is scrolled by hovering the mouse over it. Everything works fine except one thing: after I change the datagroup provider, I need to scroll down automatically. The problem is the images are not loaded immediately after I set the provider so (contentHeight - height) does not yet represent the actual maximum scrolling position. Is there an easy way of telling the datagroup to scroll down as its content loads? Because the workaround seems to be not so straightforward. This is the code for scrolling(thumbnailStrip is my datagroup):
[Code]...
View 1 Replies
Oct 3, 2011
I was creating a form. Certian fields of the form store all of those IDs to a single field separated by a comma or semicolon. how to send the mail id's for email validation which is providing by flex by default.
View 1 Replies
Jul 2, 2009
I have text input boxes. There is validation for each of the boxes using numberValidator. Now, the thing is that am using alert box to show if any error occurs.
Flowchart ::
1> Insert value in textBox.
2> NumberValidator validates the input on "trigger=change".
3> If error, alert message is displayed. The user clicks OK to go back to form.
4> Focus set back to the TextBox.
5> But, alert box makes the text input value blank / null. i.e. Both the previous error value entered by user and the default correct value will not be displayed now.
Display the most recent correct value that was entered in the text box. Not the default of any other, but the most recent correct value entered by the user.
View 3 Replies
Nov 18, 2009
When a Validator (i.e. StringValidator, NumberValidator, etc) dispatches an invalid event due to validation failure, the errorString property of the source control (i.e. TextInput) is set to a non-empty string which creates a red border around the control and shows an toolTip (errorTip) ONLY when the mouse hovers over the control. Question: Can you force immediate display of the toolTip (errorTip) rather than waiting for the user to hover over the control? If so, how?
View 2 Replies