[flexcoders] Flex Architecture Question
I am struggling to get the Best Architecture. Can anyone suggest me some direction . Its a very simple Web App , which needs some data grid and filters on the page . Front End Flex This has to be used : EJB 3.0 , JPA Back End - Oracle . Having just worked with Struts and Beehive technologies I am used to having a Controller and My Flex Front End would talk to a controller . Now that if I dont have a Front End Controller(Struts Action) , if do have user input page how can i pass values to the EJB 3.0 from flex . Some other Questions 1. I am not sure how to do basic Session Handling of the App directly on the Flex Page . 2. Load App Related Properties : Here even , if I have an initialize Servlet and Load all app properties into my Stateful Session Bean inside my Servlet . How to access the bean directly from inside Flex and change the properties of Stateful Session bean 3. User Input Page values : How to pass them back and Forth
[flexcoders] Comma Seperator , Advanced Data Grid
I have a XML which has nodes . Nodes has lot of values which has comma separated values 123,345 457,98 99,1232 When i Do a grouping in my advanced Data Grid i noticed that if data has comma in the values , the display does not show up . But if i remove the comma , it works perfectly fine . Can anyone explain . I use advanced Data Grid .
Re: [flexcoders] Re: Creating Link inisde a Data Grid Collumn
Thank you so so much. --- On Fri, 6/5/09, valdhor wrote: From: valdhor Subject: [flexcoders] Re: Creating Link inisde a Data Grid Collumn To: flexcoders@yahoogroups.com Date: Friday, June 5, 2009, 7:59 AM Oh, forgot to add the code for a cell clicked event: myDataGrid.addEvent Listener( ListEvent. ITEM_CLICK, cellClicked) ; private function cellClicked( event:ListEvent) :void { if(event.columnInde x == 0) // Or whatever column you want { navigateToURL( new URLRequest(' rediff.com' )); // Or whatever } } --- In flexcod...@yahoogro ups.com, "valdhor" wrote: > > This is one of my itemrenderers: > > package Renderers > { > import mx.controls. *; > import mx.controls. dataGridClasses. DataGridListData ; > import mx.core.IFactory; > > public class LinkCellField extends LinkButton implements IFactory > { > public function LinkCellField () > { > super(); > } > > public function newInstance( ):* > { > return new LinkCellField (); > } > > override public function set data(value:Object) :void > { > if(value != null) > { > super.data = value; > label = value[DataGridListD ata(listData) .dataField] ; > enabled = true; > useHandCursor = true; > setStyle("color" , "#FF"); > setStyle("textDecor ation", "underline") ; > setStyle("textRollO verColor: ", "#CC"); > } > } > } > } > > And to use it: > > var newColumn:DataGridC olumn = new DataGridColumn( ); > newColumn.itemRende rer = new LinkCellField( ); > > > HTH > > > > Steve > > --- In flexcod...@yahoogro ups.com, guess what myworld100us@ wrote: > > > > eeks , I did that , the links dont appear . > > This is my Code . > > > > for (var i:int=0;i > xmlColumn = xlColumns[i] ; > > oColumnDef = new Object(); > > oColumnDef.dataFiel d = xmlColumn.localName (); > > var urlItemRenderer: ClassFactory = new ClassFactory( urlRenderer) ; > > oColumnDef.width = 100; > > oColumnDef.itemRend erer = urlItemRenderer; > > oColumnDef.sortable = true; > > oColumnDef.visible = true; > > oColumnDef.editable = false; > > oColumnDef.wordWrap = false; > > break; > > > > > > urlRenderer. mxml > > > > http://www.adobe. com/2006/ mxml" > > label="Click On Me" > > click="navigateToUR L(new URLRequest(' rediff.com' ))"/> > > > > > > > > > > > > --- On Thu, 6/4/09, Tim Hoff TimHoff@ wrote: > > > > > > From: Tim Hoff TimHoff@ > > Subject: [flexcoders] Re: Creating Link inisde a Data Grid Collumn > > To: flexcod...@yahoogro ups.com > > Date: Thursday, June 4, 2009, 1:05 PM > > > > > > > > > > > > > > > > > > > > If you're creating the column in AS, you'll need to use ClassFactory > for the itemRenderer: > > var urlItemRenderer: ClassFactory = new ClassFactory( com.myPath. > urlRenderer) ; > > urlItemRenderer. properties = { myItemRendererPubli cProperty: > myProperty }; > > myColumnID.itemRend erer = urlItemRenderer; > > -TH > > > > --- In flexcod...@yahoogro ups.com, guess what > wrote: > > > > > > > > > I want to show link inisde of my Data Grid Columnm . I know i could > use item renderer . if I try to use it directly in flex file it works > fine, meaning if i have static columns ,Since my collumns are beeing > built dynamicaly . I use action Script . I think I am doing soemthing > wrong with the script . Can anyone help me . > > > > > > I assume this should be as simple as this . Should urlRenderer be > Action script file or can anyone explain how do i do this . > > > column.itemRenderer = urlRenderer > > > > > >
Re: [flexcoders] Re: Creating Link inisde a Data Grid Collumn
eeks , I did that , the links dont appear . This is my Code . for (var i:int=0;i http://www.adobe.com/2006/mxml"; label="Click On Me" click="navigateToURL(new URLRequest('rediff.com'))"/> --- On Thu, 6/4/09, Tim Hoff wrote: From: Tim Hoff Subject: [flexcoders] Re: Creating Link inisde a Data Grid Collumn To: flexcoders@yahoogroups.com Date: Thursday, June 4, 2009, 1:05 PM If you're creating the column in AS, you'll need to use ClassFactory for the itemRenderer: var urlItemRenderer: ClassFactory = new ClassFactory( com.myPath. urlRenderer) ; urlItemRenderer. properties = { myItemRendererPubli cProperty: myProperty }; myColumnID.itemRend erer = urlItemRenderer; -TH --- In flexcod...@yahoogro ups.com, guess what wrote: > > > I want to show link inisde of my Data Grid Columnm . I know i could use item > renderer . if I try to use it directly in flex file it works fine, meaning if > i have static columns ,Since my collumns are beeing built dynamicaly . I use > action Script . I think I am doing soemthing wrong with the script . Can > anyone help me . > > I assume this should be as simple as this . Should urlRenderer be Action > script file or can anyone explain how do i do this . > column.itemRenderer = urlRenderer >
[flexcoders] Creating Link inisde a Data Grid Collumn
I want to show link inisde of my Data Grid Columnm . I know i could use item renderer . if I try to use it directly in flex file it works fine, meaning if i have static columns ,Since my collumns are beeing built dynamicaly . I use action Script . I think I am doing soemthing wrong with the script . Can anyone help me . I assume this should be as simple as this . Should urlRenderer be Action script file or can anyone explain how do i do this . column.itemRenderer = urlRenderer
[flexcoders] Advanced Data grid Sorting Question
I have implemented a Data grid from Action Script . I have enabled sorting on the collumn headers . Now there is a requirement that on certian rows I have custom values say XXX something. 2 Questions 1. Is it possible that I tell the datagrid to ingore those rows while sorting . 2. if yes , then when i have sort ordrer done , the custom row should be in the same row position as it was before sorting .
[flexcoders] Advanced Data grid Row Color using Action Script .
I am building an advancedDataGrid from Action script completely. I have the Data grid up and running . There is a requirement which says I need to Show Summary rows within the data grid in a differemt Color . What I am doing is based on the data of the xml I want to draw it in different colors or say make it bold . Can anyone help me in this regard . Since i am building it from Action Script completely . I dont know how to set the bg color . This is my Code . Kindly help me folks . var dg:AdvancedDataGrid = new AdvancedDataGrid ; //instantiate a new DataGrid var dgc:AdvancedDataGridColumn; var aColumnsNew:Array = dg.columns var iTotalDGWidth:int = 0; for (var i:int=0;i
Re: [flexcoders] Mx:Http Service Refresh Issue
No that does not work . --- On Mon, 6/1/09, Manish Jethani wrote: From: Manish Jethani Subject: Re: [flexcoders] Mx:Http Service Refresh Issue To: flexcoders@yahoogroups.com Date: Monday, June 1, 2009, 8:01 PM On Tue, Jun 2, 2009 at 6:12 AM, guess what wrote: > I have a Flex Data grid Constructed from mx:HttpService > > mx:HTTpService url="somethin. do" > > The result is an xml file . I am calling the HttpService on the mxmls > creationComplete . > the First time I call the html file [ the actual flex html ] it works fine . > The next time I call it actually does not hit my Controller method. It just > populates the data grid from the cache or shows the same Data . > > if I close the browser and open again it works fine . You're hitting the browser cache. How about this: mx:HTTpService url="somethin. do?" Manish
[flexcoders] Mx:Http Service Refresh Issue
I am running into a stupid Problem . I have a Flex Data grid Constructed from mx:HttpService mx:HTTpService url="somethin.do" The result is an xml file . I am calling the HttpService on the mxmls creationComplete . the First time I call the html file [ the actual flex html ] it works fine . The next time I call it actually does not hit my Controller method. It just populates the data grid from the cache or shows the same Data . if I close the browser and open again it works fine . Can anyone let me know the solution for this . Thanks
[flexcoders] Flex Path Issue
I am linking Page Flows and Flex together . I am running into path issues. This is my Structure /Test/ /WebContent/ MyController.do /flex a.jsp[ This does a jsp include to flex.html ] flex.html [ .js and .swf file also] When I access Flex.html from url /Test/flex/flex.html - it works fine /Test/a.jsp - This also works fine . But If i access showTest.do the flex file does not get loaded .but rest of the code inside a.jsp gets printed code for my controller . @Jpf.Action(forwards = { @Jpf.Forward(name = "success", path = "/flex/a.jsp") }) public Forward showTest() { return new Forward("success"); } Can anyone help me with regards to this .
[flexcoders] Links in Flex Data Grid Collumns
I have a Flex Data Grid Populated from XML .In of the collumns I want to have the collumn as a href with some parameters .Is it possible . It would be helpful if someone has an actual example . --- On Fri, 5/29/09, mark.jonk...@comcast.net wrote: From: mark.jonk...@comcast.net Subject: Re: [flexcoders] Re: Need Alternative for enterFrame event (Causing Memory leak ) To: flexcoders@yahoogroups.com Date: Friday, May 29, 2009, 2:23 PM Hi Dharmendra While you don't have access to JavaScript, would the old school methods still work such as setting a Flash variable on the active x control. Back in older versions of Flash the only way to communicate between the browser and the ActiveX was to use things like setVariable then inside Flash you would have a watch expression that watched for changes to that variable, and reacted. The variable value could only be a string (I think). Back then we would change the value of the variable from outside, have Flash react to the change, reset the value of the variable to its "non-set" state. Assuming this would still work, when the .NET application regained focus you would tell the ActiveX instance to setVariable( "focusReceived" , "true"); and in Flash it would see that, reset the listeners. One word of warning, if your resetting your listeners constantly, are you doing anything to remove the old listeners first - if not that may well be the source of your memory leak. I used the setVariable method in VB with the old Flash active x controls a number of years ago and it worked flawlessly, you just have to set it up right to begin with and it was obviously "messier" then the ExternalInterface method. Sincerely Mark R. Jonkman - Original Message - From: "Dharmendra Chauhan" To: flexcod...@yahoogro ups.com Sent: Friday, May 29, 2009 3:00:46 PM GMT -05:00 US/Canada Eastern Subject: [flexcoders] Re: Need Alternative for enterFrame event (Causing Memory leak ) Hi Manish, Thanks for the suggestion. I wish , I could use java script to set the Focus but I do not have luxury of Java Script as My application is running as ActiveX control inside dot net based application. Once the callback broken , communication from Ashokwave lib to swf is not possible. This is really a serious issue, I need some work around to fix it as I could not wait till the adobe fix it. Regards, Dharmendra --- In flexcod...@yahoogro ups.com, Manish Jethani wrote: > > On Fri, May 29, 2009 at 12:40 AM, Dharmendra Chauhan > wrote: > > > The issue is with callBack ,what is happening is as soon you hide Flex > > application by opening another application( any app) and then again you > > come back to your flex app , call back does not work , they are broken.I > > found following related jira for this. > > > > http://bugs. adobe.com/ jira/browse/ FP-143 > > > > To solve this issue , I am re-registering all callBacks on ENTER_FRAME > > event and issue appears to be solved but this is leading to memory leak. > > > > Neither Activate nor FocusEvent.FOCUS_ IN does serve my purpose , both > > required a mouse Clk before they dispached. > > I thought you'd get 'activate' when the player got focus. You could > try setting the focus back to Flash through JavaScript (I don't > remember how to do this now). You should be getting a focus event on > the HTML/JS side at least. > > Manish > - - -- -- Flexcoders Mailing List FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder sFAQ.txt Alternative FAQ location: https://share. acrobat.com/ adc/document. do?docid= 942dbdc8- e469-446f- b4cf-1e62079f684 7 Search Archives: http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo! Groups Links
Re: [flexcoders] Re: Flex Data Grid Question
Thanks That was useful. But now since my collumns are also dynamic , How do i do Summary Fields and Grouping using Action Script . I did a search by in Google . But I coudnt find any example . I have got the advanced Data grid working on Action Script . But i dont know how to add summary fields and grouping using Action Script . if you folks can link me to some example I would appreciate Thanks --- On Thu, 5/28/09, Tim Hoff wrote: From: Tim Hoff Subject: [flexcoders] Re: Flex Data Grid Question To: flexcoders@yahoogroups.com Date: Thursday, May 28, 2009, 2:00 PM A quick Google search: http://www.forta. com/blog/ index.cfm/ 2008/1/29/ Summarizing- Grouped-Data- With-Flex- 3-AdvancedDataGr id -TH --- In flexcod...@yahoogro ups.com, guess what wrote: > > > I did , but I am not sure how to do with row and value on it for the example > asked . Can you provide me with a sample . > The problem is I can group rows using Advanced Data grid , but if i wanted to > display something like footer rows in betwen Data grid . I can not able to do > it . > --- On Thu, 5/28/09, Tim Hoff timh...@... wrote: > > > From: Tim Hoff timh...@... > > Subject: [flexcoders] Re: Flex Data Grid Question > > To: flexcod...@yahoogro ups.com > > Date: Thursday, May 28, 2009, 1:37 PM > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Check out the AdvancedDataGrid control and documentation. > > > > > > > > -TH > > > > > > > > --- In flexcod...@yahoogro > > ups.com, guess what wrote: > > > > > > > > > > > > > > > I need to draw a data grid where I need to do paint > > subtotals and and > > > > page total and group by some category . Can anyone provide > > me witha same > > > > xml for this kind of table > > > > > > > > > > Item ID Name Qty Price > > > > > > > > > > Milk - -- This is how it > > should be milk should > > > > be first row [Just a blank row with Milk in it ] > > > > > > > > > > 1. Soy Milk l 5USD > > > > > 2. Choclate 2 15USD > > > > > > > > > > SubTotal 20 USD [ Again Blank row ] > > > > > > > > > > Water - ---[ Again Blank Row ] > > > > > > > > > > 1. Aqua 1 10USD > > > > > 2. Calistoga 1 10USD > > > > > > > > > > SubTotal 20 USD [ Again Blank row ] > > > > > > > > > > PurchaseTotal 40 USD [ Again Blank row ] > > > > > > > > > > > > > > > Can someone provide with an xml for this type of table > > in flex . Is it > > > > possible . > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Re: [flexcoders] Re: Flex Data Grid Question
I did , but I am not sure how to do with row and value on it for the example asked . Can you provide me with a sample . The problem is I can group rows using Advanced Data grid , but if i wanted to display something like footer rows in betwen Data grid . I can not able to do it . --- On Thu, 5/28/09, Tim Hoff wrote: > From: Tim Hoff > Subject: [flexcoders] Re: Flex Data Grid Question > To: flexcoders@yahoogroups.com > Date: Thursday, May 28, 2009, 1:37 PM > > > > > > > > > > > > > > > > > > > > > > > > > > Check out the AdvancedDataGrid control and documentation. > > > > -TH > > > > --- In flexcod...@yahoogro > ups.com, guess what wrote: > > > > > > > > > I need to draw a data grid where I need to do paint > subtotals and and > > page total and group by some category . Can anyone provide > me witha same > > xml for this kind of table > > > > > > Item ID Name Qty Price > > > > > > Milk - -- This is how it > should be milk should > > be first row [Just a blank row with Milk in it ] > > > > > > 1. Soy Milk l 5USD > > > 2. Choclate 2 15USD > > > > > > SubTotal 20 USD [ Again Blank row ] > > > > > > Water - ---[ Again Blank Row ] > > > > > > 1. Aqua 1 10USD > > > 2. Calistoga 1 10USD > > > > > > SubTotal 20 USD [ Again Blank row ] > > > > > > PurchaseTotal 40 USD [ Again Blank row ] > > > > > > > > > Can someone provide with an xml for this type of table > in flex . Is it > > possible . > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
[flexcoders] Flex Data Grid Question
I need to draw a data grid where I need to do paint subtotals and and page total and group by some category . Can anyone provide me witha same xml for this kind of table Item IDName Qty Price Milk --- This is how it should be milk should be first row [Just a blank row with Milk in it ] 1. Soy Milk l5USD 2. Choclate 215USD SubTotal 20 USD [ Again Blank row ] Water [ Again Blank Row ] 1. Aqua 1 10USD 2. Calistoga 1 10USD SubTotal 20 USD [ Again Blank row ] PurchaseTotal 40 USD [ Again Blank row ] Can someone provide with an xml for this type of table in flex . Is it possible .
Re: [flexcoders] Re: Flex Menu Basic Question
At last I got it working . I used a combination of help from Vaidhor and Tracy . This is what I used. I basically built a Menu .mxml where all the Menus are defined , and Item Click Handler function provided to link to other . In the other MXML files (I dont think I can call it pages ) and included the Menu view in the rest of the files From: valdhor To: flexcoders@yahoogroups.com Sent: Sunday, April 26, 2009 9:49:16 AM Subject: [flexcoders] Re: Flex Menu Basic Question In my case menu items are pulled from a database and put into custom objects that are returned to Flex. Each custom object has a label field and a link field (Amongst others). When the result is returned I put all these objects into an arrayCollection. .. menuBarCollection = new ArrayCollection( ArrayUtil. toArray(event. result)); The menuBar is created with this arrayCollection and an itemClick handler is set... The itemClick handler is... private function menuHandler( event:MenuEvent) :void { var currentMenuItem: MenuItem = event.item as MenuItem; navigateToURL( new URLRequest(currentMenuItem.Link), '_self'); } HTH Steve --- In flexcod...@yahoogro ups.com, guess what wrote: > > Maybe I am confusing you . This is what is my understanding of Menu . > In genral we builld Menus and Their Childern we want users to be taken to the > page on which the item is clicked . it similar to View Stack (in terms of > Flex) > Say Suppose I have Menu > Menu1 - When User Clicks on Menu I want the user to be taken to a diiferent > page for which Menu 1 is linked to . > Menu2 -Similarly on Menu 2 . > > I am not even sure this is possible in Flex . > Something similar to this http://developer. yahoo.com/ yui/examples/ > menu/example07. html > This is the Yahoo UI menu , when user clicks on Communication- Alerts - it > takes to alerts.yahoo. com > Similar;ly Shopping it takes to shopping.yahoo. com > > > > > > > > > > > _ _ __ > From: Tracy Spratt tr...@... > To: flexcod...@yahoogro ups.com > Sent: Saturday, April 25, 2009 10:01:05 PM > Subject: RE: [flexcoders] Flex Menu Basic Question > > > > > > So you question has nothing to do with > menu, is that correct? > > What exactly do you mean by “redirect to > test.swf”? What is you application architecture? Is test.swf an application, > a component, a module, or what? > > Tracy Spratt, > Lariat Services, development services > available > > _ _ __ > > From:flexcoders@ yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On > Behalf Of guess what > Sent: Saturday, April 25, 2009 > 11:26 PM > To: flexcod...@yahoogro ups.com > Subject: Re: [flexcoders] Flex > Menu Basic Question > > > > > > To be precise what do i do on the click event . I got the value of > Action set on the menu item . Can you kindly explain how do i recdirect to > test.swf. > > > > > data="1B"/> > > // Event handler for the MenuBar control's itemClick > event. > private function > menuHandler( event:MenuEvent) :void { > >Alert.show(event. it...@action) ; > > > > } > > _ _ __ > > From:Tracy > Spratt tr...@nts3rd. com> > To: flexcod...@yahoogro ups.com > Sent: Saturday, April 25, 2009 > 8:10:58 PM > Subject: RE: [flexcoders] Flex > Menu Basic Question > On your menu, specify a handler for the itemClick event. That > event will have a reference to the item clicked, fro mwhich you can determine > what action to take. I typically include a “command” or “action” or > “index” attribute in the menu data, then get that value in the handler, and > use > a switch() statement to define the processing. > > A side note, the top-level menu items do not dispatch itemClick > events. If you want to take action from a top-level menu item, you also > need to listen to the plain click event, and conditionally process only the > correct > clicks. > > Tracy Spratt, > Lariat Services, development services available > > _ _ __ > > From:flexcoders@ yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On > Behalf Of myworld100us > Sent: Saturday, April 25, 2009 11:02 > PM > To: flexcod...@yahoogro ups.com > Subject: [flexcoders] Flex Menu > Basic Question > > > > > I am > posting a very basic question . I am trying to use Flex menus on my web page . > I have built the menu but I am not sure how to do navigation . All i could do > is > if set Data for menu item i could do an alert to get Data . > What I want is if user click on Menu A it should redirect or load a SWF file , > similarly if user clicks on Menu B it should redirect or load a separate file. > It similar to something link View Stack . But problem with View Stack is I > cant > define children for MX: View Stack . >
Re: [flexcoders] Flex Menu Basic Question
I know I am going on and on . I seriously coudnt get Children Working . Can anyone link me to a basic example which has Naviagtors for View Stack with Children. From: Pedro Sena To: flexcoders@yahoogroups.com Sent: Sunday, April 26, 2009 3:29:00 PM Subject: Re: [flexcoders] Flex Menu Basic Question If HomeView is some kind of container, yes, you can have it.(Containers examples: Canvas, Box(VBox, HBox), and so on) But for organization purpouses, I suggest you to put the homeView's child inside your HomeView mxml component. HTH On Sun, Apr 26, 2009 at 6:35 PM, guess what wrote: Thanks That was useful . I did realize I had to use View Stack . But the problem in using View Stack was , (maybe again its my lack of knowledge ) Can I be able to have Children for View Stack . if so how . In Example this ok . But Can Home View have Childern say . HomeView 2 under Home View ? From: Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Sunday, April 26, 2009 9:42:53 AM Subject: RE: [flexcoders] Flex Menu Basic Question Menu is more generic(flexible) than that. Its only function is to display the options to the user and respond to their gesture. You have the ability to act on the users choice however you choose. So your issue is more basic than that. You need to think about and decide on your applications architecture. Look in the developers guide under the sections dealing with designing applications. It will not serve you well to continue thinking in terms of “pages” when developing in Flex. “Page” is a term from html development (like Yahoo) and Flex application architecture is very different. Typically you begin with a navigation component. Popular ones are TabNavigator, Tree, and ViewStack. ViewStack is particularly useful with a menu. You have your click handler set the ViewStack.selectedI ndex according to some value in the menu data item. Setting a ViewStack index causes the “view” (kinda like a “page”) at that index to be displayed. So before you build your navigation interface(like menu), you at least need to identify your navigation architecture. Tracy Spratt, Lariat Services, development services available From:flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On Behalf Of guess what Sent: Sunday, April 26, 2009 4:30 AM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] Flex Menu Basic Question Maybe I am confusing you . This is what is my understanding of Menu . In genral we builld Menus and Their Childern we want users to be taken to the page on which the item is clicked . it similar to View Stack (in terms of Flex) Say Suppose I have Menu Menu1 - When User Clicks on Menu I want the user to be taken to a diiferent page for which Menu 1 is linked to . Menu2 -Similarly on Menu 2 . I am not even sure this is possible in Flex . Something similar to this http://developer. yahoo.com/ yui/examples/ menu/example07. html This is the Yahoo UI menu , when user clicks on Communication- Alerts - it takes to alerts.yahoo. com Similar;ly Shopping it takes to shopping.yahoo. com From:Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Saturday, April 25, 2009 10:01:05 PM Subject: RE: [flexcoders] Flex Menu Basic Question So you question has nothing to do with menu, is that correct? What exactly do you mean by “redirect to test.swf”? What is you application architecture? Is test.swf an application, a component, a module, or what? Tracy Spratt, Lariat Services, development services available From:flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On Behalf Of guess what Sent: Saturday, April 25, 2009 11:26 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] Flex Menu Basic Question To be precise what do i do on the click event . I got the value of Action set on the menu item . Can you kindly explain how do i recdirect to test.swf. // Event handler for the MenuBar control's itemClick event. private function menuHandler( event:MenuEvent) :void { Alert.show(event. it...@action) ; } From:Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Saturday, April 25, 2009 8:10:58 PM Subject: RE: [flexcoders] Flex Menu Basic Question On your menu, specify a handler for the itemClick event. That event will have a reference to the item clicked, fro mwhich you can determine what action to take. I typically include a “command” or “action” or “index” attribute in the menu data, then get that value in the handler, and use a switch() statement to define the processing. A side note, the top-level menu items do no
Re: [flexcoders] Flex Menu Basic Question
Thanks That was useful . I did realize I had to use View Stack . But the problem in using View Stack was , (maybe again its my lack of knowledge ) Can I be able to have Children for View Stack . if so how . In Example this ok . But Can Home View have Childern say . HomeView 2 under Home View ? From: Tracy Spratt To: flexcoders@yahoogroups.com Sent: Sunday, April 26, 2009 9:42:53 AM Subject: RE: [flexcoders] Flex Menu Basic Question Menu is more generic(flexible) than that. Its only function is to display the options to the user and respond to their gesture. You have the ability to act on the users choice however you choose. So your issue is more basic than that. You need to think about and decide on your applications architecture. Look in the developers guide under the sections dealing with designing applications. It will not serve you well to continue thinking in terms of “pages” when developing in Flex. “Page” is a term from html development (like Yahoo) and Flex application architecture is very different. Typically you begin with a navigation component. Popular ones are TabNavigator, Tree, and ViewStack. ViewStack is particularly useful with a menu. You have your click handler set the ViewStack.selectedI ndex according to some value in the menu data item. Setting a ViewStack index causes the “view” (kinda like a “page”) at that index to be displayed. So before you build your navigation interface(like menu), you at least need to identify your navigation architecture. Tracy Spratt, Lariat Services, development services available From:flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On Behalf Of guess what Sent: Sunday, April 26, 2009 4:30 AM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] Flex Menu Basic Question Maybe I am confusing you . This is what is my understanding of Menu . In genral we builld Menus and Their Childern we want users to be taken to the page on which the item is clicked . it similar to View Stack (in terms of Flex) Say Suppose I have Menu Menu1 - When User Clicks on Menu I want the user to be taken to a diiferent page for which Menu 1 is linked to . Menu2 -Similarly on Menu 2 . I am not even sure this is possible in Flex . Something similar to this http://developer. yahoo.com/ yui/examples/ menu/example07. html This is the Yahoo UI menu , when user clicks on Communication- Alerts - it takes to alerts.yahoo. com Similar;ly Shopping it takes to shopping.yahoo. com From:Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Saturday, April 25, 2009 10:01:05 PM Subject: RE: [flexcoders] Flex Menu Basic Question So you question has nothing to do with menu, is that correct? What exactly do you mean by “redirect to test.swf”? What is you application architecture? Is test.swf an application, a component, a module, or what? Tracy Spratt, Lariat Services, development services available From:flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On Behalf Of guess what Sent: Saturday, April 25, 2009 11:26 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] Flex Menu Basic Question To be precise what do i do on the click event . I got the value of Action set on the menu item . Can you kindly explain how do i recdirect to test.swf. // Event handler for the MenuBar control's itemClick event. private function menuHandler( event:MenuEvent) :void { Alert.show(event. it...@action) ; } From:Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Saturday, April 25, 2009 8:10:58 PM Subject: RE: [flexcoders] Flex Menu Basic Question On your menu, specify a handler for the itemClick event. That event will have a reference to the item clicked, fro mwhich you can determine what action to take. I typically include a “command” or “action” or “index” attribute in the menu data, then get that value in the handler, and use a switch() statement to define the processing. A side note, the top-level menu items do not dispatch itemClick events. If you want to take action from a top-level menu item, you also need to listen to the plain click event, and conditionally process only the correct clicks. Tracy Spratt, Lariat Services, development services available From:flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On Behalf Of myworld100us Sent: Saturday, April 25, 2009 11:02 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] Flex Menu Basic Question I am posting a very basic question . I am trying to use Flex menus on my web page . I have built the menu but I am not sure how to do navigation
Re: [flexcoders] Flex Menu Basic Question
Maybe I am confusing you . This is what is my understanding of Menu . In genral we builld Menus and Their Childern we want users to be taken to the page on which the item is clicked . it similar to View Stack (in terms of Flex) Say Suppose I have Menu Menu1 - When User Clicks on Menu I want the user to be taken to a diiferent page for which Menu 1 is linked to . Menu2 -Similarly on Menu 2 . I am not even sure this is possible in Flex . Something similar to this http://developer.yahoo.com/yui/examples/menu/example07.html This is the Yahoo UI menu , when user clicks on Communication- Alerts - it takes to alerts.yahoo.com Similar;ly Shopping it takes to shopping.yahoo.com From: Tracy Spratt To: flexcoders@yahoogroups.com Sent: Saturday, April 25, 2009 10:01:05 PM Subject: RE: [flexcoders] Flex Menu Basic Question So you question has nothing to do with menu, is that correct? What exactly do you mean by “redirect to test.swf”? What is you application architecture? Is test.swf an application, a component, a module, or what? Tracy Spratt, Lariat Services, development services available From:flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On Behalf Of guess what Sent: Saturday, April 25, 2009 11:26 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] Flex Menu Basic Question To be precise what do i do on the click event . I got the value of Action set on the menu item . Can you kindly explain how do i recdirect to test.swf. // Event handler for the MenuBar control's itemClick event. private function menuHandler( event:MenuEvent) :void { Alert.show(event. it...@action) ; } From:Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Saturday, April 25, 2009 8:10:58 PM Subject: RE: [flexcoders] Flex Menu Basic Question On your menu, specify a handler for the itemClick event. That event will have a reference to the item clicked, fro mwhich you can determine what action to take. I typically include a “command” or “action” or “index” attribute in the menu data, then get that value in the handler, and use a switch() statement to define the processing. A side note, the top-level menu items do not dispatch itemClick events. If you want to take action from a top-level menu item, you also need to listen to the plain click event, and conditionally process only the correct clicks. Tracy Spratt, Lariat Services, development services available From:flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On Behalf Of myworld100us Sent: Saturday, April 25, 2009 11:02 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] Flex Menu Basic Question I am posting a very basic question . I am trying to use Flex menus on my web page . I have built the menu but I am not sure how to do navigation . All i could do is if set Data for menu item i could do an alert to get Data . What I want is if user click on Menu A it should redirect or load a SWF file , similarly if user clicks on Menu B it should redirect or load a separate file. It similar to something link View Stack . But problem with View Stack is I cant define children for MX: View Stack .
Re: [flexcoders] Flex Menu Basic Question
To be precise what do i do on the click event . I got the value of Action set on the menu item . Can you kindly explain how do i recdirect to test.swf. // Event handler for the MenuBar control's itemClick event. private function menuHandler(event:MenuEvent):void { Alert.show(event.it...@action); } From: Tracy Spratt To: flexcoders@yahoogroups.com Sent: Saturday, April 25, 2009 8:10:58 PM Subject: RE: [flexcoders] Flex Menu Basic Question On your menu, specify a handler for the itemClick event. That event will have a reference to the item clicked, fro mwhich you can determine what action to take. I typically include a “command” or “action” or “index” attribute in the menu data, then get that value in the handler, and use a switch() statement to define the processing. A side note, the top-level menu items do not dispatch itemClick events. If you want to take action from a top-level menu item, you also need to listen to the plain click event, and conditionally process only the correct clicks. Tracy Spratt, Lariat Services, development services available From:flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On Behalf Of myworld100us Sent: Saturday, April 25, 2009 11:02 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] Flex Menu Basic Question I am posting a very basic question . I am trying to use Flex menus on my web page . I have built the menu but I am not sure how to do navigation . All i could do is if set Data for menu item i could do an alert to get Data . What I want is if user click on Menu A it should redirect or load a SWF file , similarly if user clicks on Menu B it should redirect or load a separate file. It similar to something link View Stack . But problem with View Stack is I cant define children for MX: View Stack .
Re: [flexcoders] Flex Menu Basic Question
Thanks . I am so newbie. Can you provide me a sample example . From: Tracy Spratt To: flexcoders@yahoogroups.com Sent: Saturday, April 25, 2009 8:10:58 PM Subject: RE: [flexcoders] Flex Menu Basic Question On your menu, specify a handler for the itemClick event. That event will have a reference to the item clicked, fro mwhich you can determine what action to take. I typically include a “command” or “action” or “index” attribute in the menu data, then get that value in the handler, and use a switch() statement to define the processing. A side note, the top-level menu items do not dispatch itemClick events. If you want to take action from a top-level menu item, you also need to listen to the plain click event, and conditionally process only the correct clicks. Tracy Spratt, Lariat Services, development services available From:flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On Behalf Of myworld100us Sent: Saturday, April 25, 2009 11:02 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] Flex Menu Basic Question I am posting a very basic question . I am trying to use Flex menus on my web page . I have built the menu but I am not sure how to do navigation . All i could do is if set Data for menu item i could do an alert to get Data . What I want is if user click on Menu A it should redirect or load a SWF file , similarly if user clicks on Menu B it should redirect or load a separate file. It similar to something link View Stack . But problem with View Stack is I cant define children for MX: View Stack .