Actionscript 3 :: List Size Validation In Flex

Apr 26, 2011

is it possible to check if there is any item in a list?

View 3 Replies


Similar Posts:


Flex :: Clear Validation On TextInput When Validation Is Not Enabled?

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

Flex :: ArrayCollection - List With Texts Of Different Size

May 14, 2011

I have an ArrayCollection named authors with lot of texts of different size. I would like to list all info about authors in a way that each item has a size according to the text.
Here is the code:
<mx:List dataProvider="{authors}">
<mx:itemRenderer><mx:Component>
<mx:VBox width="100%">
<mx:Text text="{data.name}"/>
<mx:Text text="{data.about}" width="100%"/>
</mx:VBox></mx:Component>
</mx:itemRenderer></mx:List>

View 2 Replies

Flex :: How To Set Variable Size For List Control Item

Jun 17, 2010

The following code display a list of comments using List control. The item height set to a fixed value (150), so it seems working: if the content is too long, the scrollbar shows. However, what I really want is not to set the height but let it to change according to the content size. Is there any way to accomplish this?

<mx:List id="commentList" width="100%" dataProvider="{commentSet.commentArrayColl}" rowCount="{commentSet.commentArrayColl.length}" >
<mx:itemRenderer> <mx:Component>
<mx:VBox width="100%" height="150" >
<mx:Text text="{data.commentContent}" />
<mx:Text text="{data.username} ({data.modified})"/>
</mx:VBox> </mx:Component>
</mx:itemRenderer> </mx:List>

To be more clear, I don't want to set the itemRenderer's VBox height to "150" or any other fixed value - but it'll only show one line of the text if I don't do it. So I'm looking for a way out of this. (If the VBox is not inside the itemRenderer, it'll auto adjust height as Text field string length grows - that's what I want.)

View 2 Replies

Actionscript 3 :: Validation And Invalidation In Flex

Jun 23, 2010

I am new in flex and recently read about Validation and Invalidation in components.

View 2 Replies

Flex :: Username And Password Validation?

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

Flex :: Validation - See If A Variable Exists?

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

Flex :: DateFormat Validation In Java

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

Flex :: Force Validation When A Container Is Displayed

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

Regex :: Give Password Validation In Flex?

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

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

Flex :: ErrorSkin On Spark TextInput Validation?

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

Flex :: Validation - Using Error Tooltips As Normal Ones?

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

Css :: Changing The Default Color On Flex Validation Errors?

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

Flex :: Text Input Validation For Numeric Check?

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

Flash :: Handle Client And Server Validation With Flex 3?

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

Css :: Tweak CSS Validation In Adobe Flex Builder (Eclipse)?

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

Actionscript 3 :: Enter Multiple Mail Ids And Separated By ';' And Validation In Flex?

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

Flex :: Text Input Error / Validation And Restore Previous Correct Value

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

Flex :: 4.1: <mx:List> Had RowCount Properly For The Limit The Displayed Items. <s:List> Doesn't

Aug 11, 2010

I'm using flex 4.1 to write an application. i read in the documents that has the rowCount property to set how many items to display. the does not have that property. how can I limit the list to display 3 items ?

View 3 Replies

Flex :: MX List ItemRollOver Event Equivalent On A Spark List Control?

May 26, 2011

Flex 3 List control had a itemRollOver event. Flex 4 List doesn't have it. Is there an equivalent or a workaround for this issue?

View 2 Replies

Flex :: 3 - Force Display Of Control's ErrorTip (error ToolTip) On Validation Failure

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

Actionscript 3 :: Flex - Number Validation, Wont Remove Red Glow If Click Focus?

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

Flex :: Form Validation - Delete Error Icon Of Validated Text Input

Feb 29, 2012

I have a form with a horizontal layout and with this TextInput:
<s:TextInput id="platformNameTI" showErrorSkin="true" showErrorTip="true"/>
I have a simple validator that just checks if there is something entered (required field). My problem is as the layout is horizontal, when an error occurred (required file missing), all form items are shifted because of the error icon. Is there a way to delete that annoying icon or force the component to not display it?

View 1 Replies

Flex :: 3: Scrolling Of List Items With In A List Via Scroll Wheel

Dec 31, 2009

Here is a snip from within my code:

[Code]...

The 'recommendations' dataProvider is an ArrayCollection of String, which are generally sentences about as long as this one. By setting the variableRowHeight and wordWrap properties as shown, if a sentence is too long to fit on a single line, everything works fine- the row expands and the messages show on two lines, or occasionally three.

The space allocated for this panel within the entire canvas means if the total text size of 'recommendations' exceeds six lines, I need for the entire list scroll. This is also working just fine. The trouble is when using the mouse wheel to do the scrolling- Flex scrolls both the entire list and the single item where the mouse is hovering. Often this results in only the second half of a sentence being visible. Non-programmer friends I have asked to look at this noticed this, and tell me it as a problem. If a user does not notice the dual scrolling, and sees only a fragment of a sentence, it will be perceived as an error in the application.

[Code]....

View 1 Replies

Flex :: Make List Content Dependant On Selection In Another List?

Jul 6, 2011

When a user selects a category from the first drop down box then i want the 2nd drop down to be updated based on the selection of the first drop down. I have created multiple ArrayCollections whose names are set to the "data" values of the first drop down, for instance:

[Bindable]
public var countries:ArrayCollection = new ArrayCollection([
{label:"USA",data:"USA"},

[code].....

View 2 Replies

Actionscript 3 :: Flex - List Selected Entire List By Default?

Aug 31, 2011

I am currently working on a project in Flex and I am having a hard time having a list's contents ALL be selected by default. Wondering how to do this.

<mx:List id="list" dataProvider="{dp}" allowMultipleSelection="true"/>

I'm just trying to have the list all selected.

View 2 Replies

ActionScript 3.0 :: Change Text Size For List Component?

Feb 26, 2011

I tried this but doesnt works: var tf:TextFormat = new TextFormat(); tf.font = "Arial"; tf.size = 25; tf.bold = true; list.setStyle("textFormat", tf);

View 3 Replies

Flex :: Spark List Have Something Similar To ItemsChangeEffect In Mx List?

Jun 28, 2010

I'm trying to animate a list as I delete the top row. All the examples I can find use itemsChangeEffect to bind to the effect, but this property exists only in MX lists, not spark lists.

Any idea how I can get the same effect done in Spark Lists?

I'm trying to remove the top most item in the list with a slight fade out effect before the rest of the items move up to replace the gap.

View 2 Replies

Flash :: Flex Relative Size Component, Fixed Size Border?

Mar 3, 2011

I want to create a panel (or any other component) inside a component that has a 5 pixel border on all sides, but scales fully when the window is resized. I know I can set width to "100%" to make it resize, but that gives me no borders. If I put it to "95%",I have borders, but they scale annoyingly. Also, that only works for borders on the right or lower bounds, and not to the left or upper sides.Is there a convenient way to do this without having to write tons of resize-code (in which case I will not bother and just accept bad rescale behaviour, as it is for a private pet project).

EDIT: I know that I can just overwrite the display handling and set the positions manually every frame. I wondered if there is a cheap way to do it in the mxml-structure, along these lines:

<mx:Panel>
width="100%" height="100%"
</mx:Panel>

Coming from C++ and Java, I am intrigued by the option of setting something to "95%" and let the library work out the details, instead of having to write many lines of code, just so my text-area always keeps a 5 pixel distance from the border, but scales with window width.If there is no easier way to do it than figuring out pixel sizes by hand and setting the coordinates.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved