6dollarmillions.in

Flex Certification

1. updateComplete
  • dispatched after a component has gone through its validation process, called after commitProperties(),measure(), updateDisplayList()
2. The preinitialize event occurs too early in the component life cycle for most initialization activities. It is useful, however, in the rare situations where you must set the properties on a parent before the children are created.

3.To configure a component before Flex has determined its visual appearance, use the initialize event. For example, use this for setting properties that affect its appearance, height, or width.

4. Use the creationComplete event for actions that rely on accurate values for the component's size or position when the component is created. If you use this event to perform an action that changes the visual appearance of the component, Flex must recalculate its layout, which adds unnecessary processing overhead to your application.

5. Use the updateCompleteevent for actions that must be performed each time a component's characteristics change, not just when the component is created.

6. FileModeConstants
  • Read - read file
  • Write - write file
  • Update -
  • Append - write to the end of an existing file
7. Two methods of File class to write simpler code without setting up eventlisteners
  • copyTo()
  • getDirectoryListing()
  • both are synchronous versions
8. Some methods in file class
  • File.copyTo() and File.copyToAsync()
  • File.deleteDirectory() and File.deleteDirectoryAsync()
  • File.deleteFile() and File.deleteFileAsync()
  • File.getDirectoryListing() and File.getDirectoryListingAsync()
  • File.moveTo() and File.moveToAsync()
  • File.moveToTrash() and File.moveToTrashAsync()
9. DataService object methods
  • DataService.fill()
  • DataService.commit()
  • DataService.getItem()
  • DataService.createItem()
  • DataService.releaseItem()
  • DataService.releaseCollection()
  • DataService.disconnect()
  • DataService.setCredentials()
  • DataService.logout()
  • DataService.release()
  • DataService.merge()
  • DataService.revertChanges()
10. drag-and-drop api transfer formats
  • Bitmaps (png,jpeg,gif..)
  • Files
  • HTML-formatted text
  • Text
  • URLs
  • Serialized objects
  • Object references(only valid within the origination application)
11. Flex containers with absolute layout
  • Canvas always uses absolute positioning
  • Application and Panel controls - specify layout property "absolute"
12. once you apply transition to a component, you cannot apply an effect - False
  • transition - one or more effects grouped together to play when view state change occurs
13. Components used to connect to a REST-style service API
  • HTTPService - HTTP GET or POST
  • Webservice - soap web services
  • RemoteObject - AMF remoting services
  • HTTPService is also known as REST-style webservice
  • REST - Representational State Transfer
14. how to find the value of the last inserted row identifier from the SQLResult after an insert statement is executed
  • lastInsertRowID will contain the identifier for the last inserted row
15. NativeDragOptions class properties allow initiating and target objects to cooperate in a drag-and-drop exchange
  • allowCopy
  • allowLink
  • allowMove
16. Access Modifiers:
  • internal (default) - visible to references inside the same package
  • private - visible to references in the same class
  • protected - visible to references in the same class and derived classes
  • public - visible to references everywhere
  • static - a property belongs to the class
  • static properties not inherited (code will cause run-time error)
17. Methods for using regular expressions with strings
  • exec() - returns an array with matching substring
  • test() - returns boolean

18. String class methods
  • match()
  • replace()
  • search()
  • split()
19. Repeater (properties)
  • currentItem - to reference the currently processing data item
  • currentIndex - counter that refers to the item's order in the data set
20. Metadata tags donot compile into executable code, but provide information to control how portions of your code get compiled. (True)
  • They are used to provide information to the adobe flex compiler

21. CSS selector types
  • class selector
  • type selector
  • descendant selector
  • id selector
  • pseudo selector (viewstates)

22. Methods used to change between viewstates in your app
  • using currentState property (or)
  • by calling the setCurrentState() method of UIComponent class
Creating root menu object

var root:NativeMenu = new NativeMenu();


Setting the application menu

NativeApplication.nativeApplication.menu = root;


Setting a window menu

nativeWindowObject.menu = root;


Setting a context menu on an interactive object

interactiveObject.contextMenu = root;


setting a dock icon menu

DockIcon(NativeApplication.nativeApplication.icon).menu = root;


Setting a system tray icon menu

SystemTrayIcon(NativeApplication.nativeApplication.icon).menu = root;


Displaying a menu as a pop-up

root.display(stage,x,y)


Creating a submenu

var editorMenuItem:NativeMenuItem = root.addSubMenu(new NativeMenu(),"Edit");

(or)

var editMenuItem:NativeMenuItem = root.addItem("Edit",false);
editMenuItem.subMenu = new NativeMenu();


Create a menu command

var copy:NativeMenuItem = new NativeMenuItem("Copy",false);
copy.addEventListener(Event.SELECT,onCopyCommand);
editMenu.addItem(copy);


Creating a menu separator line

var separatorA:NativeMenuItem = new NativeMenuItem("A",true);
editMenu.addItem(separatorA);


23. In a class that implements an interface, implemented methods must do the following:
  • Use the public access control identifier.
  • Use the same name as the interface method.
  • Have the same number of parameters, each with data types that match the interface method parameter data types.
  • Use the same return type.
Note: The method declaration inside an interface definition cannot have any access control specifiers (if it contains then code will cause a compile-time error)

Problems faced to make Roo project to work using STS

  • Create new Roo Project
  • persistence setup --provider HIBERNATE --database H2_IN_MEMORY
  • flex setup
  • Add the required entities and fields
  • Now go to command prompt and run mvn eclipse:eclipse
  • ex: C:\Documents and Settings\suresh.paleti\Documents\workspace-sts-2.3.3.M2\rooexample>mvn eclipse: eclipse
  • Now open eclipse and refresh the project
  • In the src/main/webapp/ you should see the swf files if you are not able to see them then clean the project (click on Project > clean...), now you should see the swf files.
  • Once you are done go to command prompt and run mvn clean install
  • ex: C:\Documents and Settings\suresh.paleti\Documents\workspace-sts-2.3.3.M2\rooexample>mvn clean install
  • Now in the target folder you should be able to see the war file. Copy this war and deploy in tomcat webapps folder and start the server.
  • Finally go to flash builder perspective, right click on the project and run as > Web Application. That's it you should be able to see the flex application running.

Note: ctrl + R (popup to type roo command)