PureMVC
Home
About
Code
Docs
FAQ
Forums
News
Showcase
Contact
Jobs
Welcome,
Guest
. Please
login
or
register
.
May 25, 2013, 11:12:33 AM
News:
ATTENTION: Spambots must die! Humans must visit
http://contact.futurescale.com
to request forum access.
PureMVC Architects Lounge
Announcements and General Discussion
Architecture
How to use resourceManager in Mediators
Pages: [
1
]
« previous
next »
Author
Topic: How to use resourceManager in Mediators (Read 2758 times)
akmansoor
Newbie
Posts: 9
How to use resourceManager in Mediators
«
on:
November 10, 2008, 03:35:06 PM »
I am using resourceManager in my views using resourceManager.getString("myResource","myLabel")
How do I use the same in my mediators.
Thanks,
Mansoor Achire
Logged
puremvc
Global Moderator
Hero Member
Posts: 2790
Re: How to use resourceManager in Mediators
«
Reply #1 on:
November 10, 2008, 05:11:25 PM »
The exact same way. Its just a question of what you do with the resource string afterwards. in the mediator you'd make the call and set the result on a public property of the view component.
Its best not to have the mediator set somedeeply nested implementation specific property like "myComp.mainPanel.tititle" but instead to expose a bindable public top level property in MyComp like instanceTitle and have the mediator set that property. Thin inside MyComp, have mainPanel's title property bind to instanceTitle. This encapsulates the component implementation specifics and exposes a clear API for its client (the mediator) to deliver the required resources.
Later, if the component is refactored to use some other implementation and mainPanel goes away, the mediator will not fail or have to be modified beyond changes you may make to the actual resource property names.
-=Cliff>
Logged
akmansoor
Newbie
Posts: 9
Re: How to use resourceManager in Mediators
«
Reply #2 on:
November 11, 2008, 07:57:20 AM »
I am not able to use resourceManager in mediators, it is giving compilation error undefined property. In view I am able to use it.
Logged
akmansoor
Newbie
Posts: 9
Re: How to use resourceManager in Mediators
«
Reply #3 on:
November 11, 2008, 09:02:52 AM »
I understood that resourceManager is part of UIcomponent. This is why i am not able to access it in my mediator.
It works when I try
ResourceManager.getInstance().getString("resources", "myKey");
Thanks,
Mansoor Achire
Logged
Pages: [
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Announcements and General Discussion
-----------------------------
=> General Discussion
=> Getting Started
=> Architecture
=> Public Demos, Tools and Applications
===> Fabrication
-----------------------------
PureMVC Manifold
-----------------------------
=> Port Authority
===> Contributor Central
===> Client Side
===> Server Side
=> Port to AS2
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to AS3
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to ColdFusion
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to C++
===> MultiCore Version
=====> Demos and Utils
=====> Bug Report
=> Port to CSharp
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to Dart
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Haxe
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Java
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to JavaScript
===> Demos and Utils
===> Native JS Branch
=====> Bug Report
===> PrototypeJS Branch
=====> Bug Report
===> Objs Branch
=====> Bug Report
===> MooTools Branch
=====> Bug Report
===> ExtJS Branch
=====> Bug Report
=> Port to Objective C
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to Perl
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to PHP
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Python
===> Standard Version
=====> Bug Report
=====> Demos and Utils
===> MultiCore Version
=====> Bug Report
=====> Demos and Utils
=> Port to Ruby
===> Standard Version
=====> Bug Report
=====> Demos and Utils
=> Port to TypeScript
===> Standard Version
=====> Bug Report
=====> Demos and Utilities
===> MultiCore Version
=====> Bug Report
=====> Demos and Utilities
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Powered by SMF 1.1.11
|
SMF © 2006-2007, Simple Machines LLC
Loading...
Copyright © 2006-2008 Futurescale, Inc.