package
{
  [Bindable]
 public class ModelLocator
 {
  private static var modelLocator : ModelLocator;

  public static function getInstance() : ModelLocator
  {
  if ( modelLocator == null )
  modelLocator = new ModelLocator();

  return modelLocator;
  }

  public function ModelLocator()
  {
  if (ModelLocator.modelLocator != null )
  throw new Error( "Only one ModelLocator instance should be instantiated"
);
  }

  public var addcontact:Object;

 }
}




On Tue, Oct 6, 2009 at 4:51 PM, agorski <[email protected]> wrote:

>
> Hi,
>
> static variable is OK but contains no cahce possibility.
> If you need more just create a Singleton (google how to create one
> when you are unexperienced).
> You have static access to singleton class from anywhere in you code.
> One disadvazage is you can access only from ActionScript.
>
> Cheers
> Albert
>
> On Oct 5, 11:27 am, gaurav rai <[email protected]> wrote:
> > Use modellocator class which is a static class and have one instance. You
> > can store ur login data in modellocator and demand for data , u'll easily
> > get it any time.
> >
> > On Mon, Oct 5, 2009 at 2:43 PM, Varun Bajaj <[email protected]> wrote:
> > > Hi
> >
> > > If you don;t want to store login information at server then you can
> create
> > > class like
> > > package{
> > >     class user{
> > >           user(){
> > >                // any business logic you want
> > >           }
> >
> > >          function setLogin(){
> > > }
> >
> > >         ... like wise you can do same thing at server side if you want
> to
> > > store data in database.
> > > }
> > > }
> >
> > > thanks
> >
> > > On Mon, Oct 5, 2009 at 2:14 PM, ganaraj p r <[email protected]>
> wrote:
> >
> > >> Are you using php as the backend for your flex application?
> >
> > >> On Mon, Oct 5, 2009 at 12:05 PM, Vivek Jain <[email protected]
> >wrote:
> >
> > >>> Hi All,
> >
> > >>> I have a scenario where i have implemented login functionality. I am
> > >>> successfully able to login when i click on one hyperlink but when i
> click on
> > >>> the second again it demands the login credentials.
> >
> > >>> Once i have logged in, it should not ask for login credentials for
> all
> > >>> other links.
> >
> > >>> I am looking for session management like thing in FLEX to do so but
> have
> > >>> no idea.
> >
> > >>> Your earliest suggestion on this issue would be highly appreciable.
> >
> > >>> Cheers,
> > >>> Vivek
> >
> > >> --
> > >> Regards,
> > >> Ganaraj P R
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to