Orkut Gmail Calendar Documents Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Can we dynamically create menu bar.
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
CartmanLee  
View profile  
 More options Nov 1 2009, 5:21 pm
From: CartmanLee <ivan.ilija...@gmail.com>
Date: Sun, 1 Nov 2009 03:51:56 -0800 (PST)
Local: Sun, Nov 1 2009 5:21 pm
Subject: Re: Can we dynamically create menu bar.
I wanted to ask you similar question. I was working on similar
funcionality, generating XML with PHP to get menubar structure
depending which role and permissions user has. Now, for me that is not
a problem, but I'm having some thoughts how to use menu event handling
and how to display some other components.

Let's make an example. I'm working on administration application for
my website. I have several panels with forms for handling articles,
user data, geographic data (countries, cities, regions, currency,...).
Currently my main.mxml contains members activePanel and boolean type
dataChanged. Every time when I handle menuBar event I check is there
an activePanel. An activePanel will change boolean member dataChanged
so that you can be sure if you can put another panel instance in
member.

Now, since I'm currenlty only developer on this project and others
will be joining me soon, I was wondering what do you think about this
kind of code organization.

Example
main.mxml
-----------------
<fx:application>
....
<fx:declarations>
  <script>
    activePanel:Panel;
    dataChanged:boolean
.... implementation of activePanelListener, dataChangedListener....
  </script>
</fx:declarations>
<myComps:menuBar>

...
</fx: application>

myComps.menuBar
-----------------------------
contains: username, password:String
remoteObject for getting XML Collection from PHP server
contains logic for menu events

How to add new menu component:
1. create new Panel/form
2. add new form in PHP XML and define which role can work with this
form.
3. that's it :)

Do you think there is a better solution for this kind of
functionality?

On 31 Oct, 08:46, Sunny Tambi <sunnyta...@gmail.com> wrote:

> you can create a dynamic xml based upon your needs and then pass it in the
> dataprovider of menu bar.
> See this:http://livedocs.adobe.com/flex/3/html/help.html?content=menucontrols_...

> On Sat, Oct 31, 2009 at 11:14 AM, Gerald Anto <flex.gerald.a...@gmail.com>wrote:

> > Can we dynamically create menu bar.

> > actually my requirment is, i have 3 buttons

> > admin
> > user
> > client

> > i need separete menuitems in menu bar
> > for ex
> > if i enter admin

> > MenuItemA,menuItemB,menuItemC(with sub menu) are only available

> > if i click user

> > MenuItemA,menuItemB(with sub menu)  are only available

> > if i click user

> > MenuItemA,menuItemB,menuItemC,menuItemD(with sub menu)  are only
> > available

> > is it possible?
> > if so help how to create it

> > Thanks&Regards,
> > Gerald A

> --
> st


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google