Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8501745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:17:38+00:00 2026-06-11T01:17:38+00:00

Some services in my Robotlegs app require parameters. I’m wondering which solution is better:

  • 0

Some services in my Robotlegs app require parameters. I’m wondering which solution is better:

  1. Mediators pass parameters to services
  2. Services aquire parameters from injected models
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:17:39+00:00Added an answer on June 11, 2026 at 1:17 am

    As Creynders suggested, it depends on the scope of these variables, if they are const, model, or user input.

    A great resource for me has been the ActionScript Developer’s Guide to RobotLegs: http://books.google.ca/books/about/ActionScript_Developer_s_Guide_to_Robotl.html?id=PFA2TWqZdSMC&redir_esc=y

    This is my usual workflow:

    1. View dispatches a custom event and passes parameters to the event.
    2. Mediator listens to the Event and re-dispatches it.
    3. Context maps the event to a command.
    4. Command injects the event, any necessary models, and the service.
    5. Command calls the service, passing any necessary parameters. In the example below, I am passing a variable from the LoadLicenseEvent and from the ITokenModel to the service call. I use commandMap.detain() and commandMap.release() to keep the command alive until the service call is complete. The base class ServiceModuleCommand handles the fault event.

      public class LoadLicenseCommand extends ServiceModuleCommand
      {
          [Inject]
          public var event:LoadLicenseEvent;
      
          [Inject]
          public var service:ILicenseService;
      
          [Inject]
          public var tokenModel:ITokenModel;
      
          [Inject]
          public var licenseModel:ILicenseModel;
      
          public override function execute():void
          {
              commandMap.detain(this);
      
              var token:TokenVO = tokenModel.getToken();
      
              var asyncToken:AsyncToken = service.getLicense(token.Id, event.id);
              asyncToken.addResponder(new mx.rpc.Responder(resultHandler, faultHandler));
          }
      
          private function resultHandler(e:ResultEvent):void
          {
              var license:LicenseWebViewVO = e.result as LicenseWebViewVO;
              if (license)
              {
                  licenseModel.license = license;
                  dispatchToModules(new RunWidgetEvent(WidgetType.getWidgetId(WidgetType.LICENSE)));
              }
      
              commandMap.release(this);
          }
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on an app in which I want to run some services when
I'm converting some services from Apache SOAP to Axis2, so the Java service classes
I am working with rails 3.2 and want to request some services from http://api.de-captcher.com/
I have some external services. My Django app is built on top of my
Trying to figure out a way where I can pass some data/fields from a
One desktop application needs to get some services from server. For example sending some
Basically i have a enterprise jsf application which shows some services to the user.
I try to move some services from my Tomcat Server to Jetty, just to
I have war app that uses reasteasy to expose some services. I want to
I have some services which i want to be able to publish and subscribe

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.