How can i use RemoteObject without mxml?

  hi:
   in my flex project , i use blazeds + puremvc , so i want to put my business code in actionscript as proxy to communicate with java code, the proxy code like :
public function requestServer(page:PageInfo):void{
   userServiceRM = new RemoteObject();
   userServiceRM.destination="userService";
   userServiceRM.getsimpleList();
   var pageResult :Object= userServiceRM.getsimpleList.lastResult;
   sendNotification(UserStartupCommond.USERLIST_GOT,pageResult );
but i have a problem that pageResult is a  null value .(the Configuring and the server side have no problem .)
how can i use RemoteObject without mxml?
 thanks.

Hi. Remote object calls are asynchronous so you can't access the result immediately after making the call. You need to wait until the server returns the result. There are a couple ways to set this up. Probably the easiest thing to do is to add an event listener that will be called when the result comes back from the server. Here is what that would look like.
public function requestServer(page:PageInfo):void {
userServiceRM = new RemoteObject();
userServiceRM.destination="userService";
userServiceRM.addEventListener("result", resultHandler);
userServiceRM.addEventListener("fault", faultHandler);
userServiceRM.getsimpleList();
public function resultHandler(event:ResultEvent) {
var pageResult :Object= userServiceRM.getsimpleList.lastResult;
sendNotification(UserStartupCommond.USERLIST_GOT,pageResult);
public function faultHandler(event:FaultEvent) {
//handle remote object fault
Look at the RPC Components section of the BlazeDS Developers guide for more information about using the RPC components. Hope that helps.
-Alex

Similar Messages

  • I lost my Apple TV remote how can I use it without my remote

    I lost my Apple TV remote how can I use it without my remote

    If you have home sharing enabled on the Apple TV and an IOS running on the same network you can use the remote app. Otherwise, you will need to purchase a new remote.

  • Using Recovery Disk (Windows 8) - How can I use it without partitioning?

    Whenever I install windows I add new partitions with lots of data added to them. But when I need to fresh install Lenovo Windows 8 OEM, it deletes all partitions because they are resized and formats everything and reverts to its designed partition structure. I do not want that. In normal (non-OEM) Windows I can install it to the system partition and it does not touch other partitions sizes or data inside it. Is there any way to do this with Windows 8 Lenovo OEM? I downloaded Windows 8 (non-OEM) from Microsoft - but it did not let my Lenovo OEM serial - it says it is for OEM version, not retail. How can I accomplish what I am trying to do?

    Hi Dweata,
    Welcome to Lenovo Community Forums!
    I’m sorry to inform you that re-installing the Windows 8 OS (Operating System) using the created Recovery Media will take back the computer to factory settings and which same with the partitions. Hence a separate OS drive cannot be created as Non-OEM OS, to perform this a new Windows 8 should be purchased as the recovery media when created will be in encoded format and changes cannot be made.
    Do post us back for further queries.
    Best Regards
    Shiva Kumar
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • How can I use Firefox WITHOUT updating it? I do not have the "authority" on my work computer to do this, so I can't use firefox.

    I do not have the "authority" on my work computer to do this, so I can't use firefox at work. Also, some of our programs do not work with the latest version of firefox..

    Welcome to the Apple community.
    AirPlay Mirroring requires a second-generation Apple TV or later, OS X 10.8 or better and is supported on the following Mac models: iMac (Mid 2011 or newer), Mac mini (Mid 2011 or newer), MacBook Air (Mid 2011 or newer), and MacBook Pro (Early 2011 or newer). It also requires the computer to be using wi-fi.

  • How can I uses JScrollPane without use the constructor?

    This code:
    JPanel pn = new JPanel();
    pn.setPreferredSize(new Dimension(5000, 5000));
    JScrollPane jsp = new JScrollPane(pn);
    Draw a Panel with Scroll Bars.
    But if I write:
    JPanel pn = new JPanel();
    pn.setPreferredSize(new Dimension(5000, 5000));
    JScrollPane jsp = new JScrollPane();
    jsp.add(pn);
    Don�t show the scrollbars. Why? How can I do this code function?
    Thanks for any help.
    Renato

    jsp.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
    jsp.setHorizontalScrollBarPolicy(...

  • How can I use iTunes without connecting the external drive that has all my music on it?

    I have all my music on an external drive.  Sometimes I would like to access iTunes, for purchases and other, without having that drive plugged in.  I used to be able to do this, but something has changed and I can no longer figure out how.  There must be a way.
    Thanks

    Well, you can always ignore the fact it will automatically direct anything to a new blank library it will create on the internal drive.  Just let it do it (as long as you keep track of any purchases that download, or maybe you can turn off automatic downloading )  The next time you need to use it with the external drive hold down the option/alt key while starting iTunes and select the library file on the external drive.
    iTunes Store: How to enable Automatic Downloads - http://support.apple.com/kb/HT4539

  • How can I use Mnemonics without Alt key?

    Hello all,
    I am developing an application using swing. it is required that the button mnemonics should work without 'Alt' key. Does any one know how to do this?
    Thanks in advance.
    Ghaznavi

    Use AbstractButton to create a button as
    AbstractButton btn_submit;
    btn_submit = new JButton("Shiva");
    btn_submit..setMnemonic('S');
    Any How i am posting the code for this
    /*  @(#) LoginScreen.java 1.82 2003/08/18
    *  Copyright (c) 2003
    *  All rights reserved.
    *  This software is the confidential and proprietary information of The
    *   Hyderabad, India
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Graphics;
    import javax.swing.*;
    * This class displays the Login Screen providing the Admin or General
    * User to get into the DataForm where he can update or view the employee
    * details. Here users are authenticated using the user id and password.
    * @author Shiva Shankar Reddy .K
    * @version 1.0 18 August 2003
    public class LoginForm extends JFrame implements ActionListener {
         JTextField tuserid;   // text boxes start with t...
         JPasswordField password;   // password field
         JLabel lwel,llogin,luserid,lpassword;  //  Labels stsrt with l...
         AbstractButton bsubmit,bclear,bexit;      // buttons start with b...
         public LoginForm() {
              super ("Welcome To Login");
              Container comContainer = getContentPane(); // Container to hold components
                                  // setting layout to null so that we can adjust
              comContainer.setLayout(null);
              comContainer.setBackground(new Color(69,186,128));
              tuserid = new JTextField(10);
                                   //Adding the text boxes to container
              comContainer.add(tuserid);
                            // Setting the color of Font
              llogin = new JLabel("WelCome");
                              // Creating the Labels
              luserid = new JLabel("User-Id : ");
              lpassword = new JLabel("Pwd :  ");
                             //  Creating the buttons
              bsubmit = new JButton(" Submit ");
              bclear = new JButton(" Clear ");
              bexit = new JButton(" Exit ");
                                  // Adding components to container
              comContainer.add(lpassword);
              comContainer.add(llogin);
              comContainer.add(luserid);
              comContainer.add(bsubmit);
              comContainer.add(bclear);
              comContainer.add(bexit);
              comContainer.add(tuserid);
              password = new JPasswordField(10);
              comContainer.add(password);
                        // adding ACTION LISTENERS
              bsubmit.addActionListener(this);
              bclear.addActionListener(this);
              bexit.addActionListener(this);
                    // layout adjustment started
                      // xpos,ypos, width,height  Setting the bounds
              lwel.setBounds(15,25,500,75);
                llogin.setBounds(150,95,350,35);
                       // xpos,ypos, width,height
              luserid.setFont(new Font("Tahoma",Font.BOLD,14));
              luserid.setBounds(50,160,90,30);
              tuserid.setFont(new Font("Tahoma",Font.BOLD,14));
              tuserid.setBounds(130,165,90,25);
              lpassword.setFont(new Font("Tahoma",Font.BOLD,14));
              lpassword.setBounds(50,190,90,30);
              password.setFont(new Font("Tahoma",Font.PLAIN,14));
              password.setBounds(130,195,90,25);
              bsubmit.setFont(new Font("Tahoma",Font.BOLD,15));
              bsubmit.setBounds(125,275,95,30);
              bsubmit.setMnemonic('S');
              bclear.setFont(new Font("Tahoma",Font.BOLD,15));
              bclear.setBounds(225,275,95,30);
              bexit.setFont(new Font("Tahoma",Font.BOLD,15));
              bexit.setBounds(325,275,95,30);
                   // layout adjustment completed
              setBounds(100,50,550,450);
              setVisible(true);
         public void actionPerformed(ActionEvent ae) {
                if (ae.getSource() == bsubmit) {
                    // function call to check the user id and password
                     userpwdcheck();
               if (ae.getSource() == bclear) {
                   // To clear the fields
                  tuserid.setText("");
                password.setText("");
                if (ae.getSource() == bexit) {
                             //  to exit
                   System.exit(0);
                   removeNotify();
         public static void main(String args[]) {
                 final JFrame f=new LoginForm();
                f.addWindowListener(new WindowAdapter() {
                      public void windowClosing(WindowEvent e)
                           System.exit(0);
                f.setVisible(true);
                         // function to check the userid and password
         public void userpwdcheck()     {
              // storing userid and password for temperorary usage
              String userid = new String (tuserid.getText());
              String pwd = new String (password.getPassword());
              if ((userid.equals("shiva")) && (pwd.equals("shiva"))) {
                    JOptionPane.showMessageDialog(null," Login Sucessfull");
                   final JFrame p=new DataForm("Admin");
               else
                    JOptionPane.showMessageDialog(null,"Login Failed");
    }

  • How can i use safari without it crashing on me everytime i open it?

    when i open the safari browser it only stays up for a few minutes until a window pops up and says "safari has stopped working" and "windows is checking for a solution to the problem" and then the browser completely closes. this happens everytime i open safari. How do i get this to stop so i can use safari again?

    Fingers crossed, your Windows 7 will have been recording some additional information about those.
    First, open your Action Center and expand "Maintenance". Click "View reliability history":
    Once the reliability report has been generated, look for Critical events for Safari generated at the time of the "Safari has stopped working" messages. Doubleclick the name Safari in the critical events. (Don't click View solution.) Here's a screenshot showing what to doubleclick:
    You should see something that looks like the following screenshot:
    Copy and paste the contents of the problem report into a reply here. For example:
    Description
    Faulting Application Path: C:\Program Files (x86)\Safari\Safari.exe
    Problem signature
    Problem Event Name: BEX
    Application Name: Safari.exe
    Application Version: 5.34.55.3
    Application Timestamp: 4f6ba239
    Fault Module Name: StackHash_7100
    Fault Module Version: 0.0.0.0
    Fault Module Timestamp: 00000000
    Exception Offset: 7d3a1240
    Exception Code: c0000005
    Exception Data: 00000008
    OS Version: 6.1.7601.2.1.0.256.1
    Locale ID: 2057
    Additional Information 1: 7100
    Additional Information 2: 710027e7a8d30022e5e0ee529f40121f
    Additional Information 3: 5158
    Additional Information 4: 5158ee4164428f7b514a5e7ee9654f7c
    Extra information about the problem
    Bucket ID: 2871481836

  • HT2534 How Can I Use Itunes Without A Credit Card?

    This problem is really starting to annoy me.
    At first, I tried to make my Apple ID in Itunes, I wasn't able to make it though because I did not have a credit card. I had a look at the support and found out that there should be a 'None' option next to Visa, Mastercard, Paypal etc. I go through the process again in Itunes, expecting to find this 'None' button, but it does not exist. All there is is Visa and Mastercard. And option for Paypal isn't even there, even though the article I checked showed an image with it being there (Article: http://support.apple.com/kb/HT2534).
    So, I try to make my account via the apple.com website. I complete this with no question of billing, and I think the problem is solved. However, when I try to log in on Itunes, it is, once again, requesting my billing information which I cannot provide because I do not have a credit card.
    Maybe Apple needs to make it possible for people who do not have credit cards to use this service that I have 'been told' is very good. Or maybe they should stop providing us with article with obviously outdated images.
    If anyone has a solution to this problem, please let me know.

    You can create a new account without credit card but you cannot change your exisiting account into NONE payment account.
    Follow the instruction and create an account without credit card in iTunes on your computer.
    Or on your iPod Touch, Purchase a free App then create a new appleID.

  • How can i use Siri without Internet connectivity?

    Siri doesn't work without Internet.
    I was in a situation yesterday, when i was driving and have to call my Dad.
    Due to the bad weather, data services were down and when i used Siri to call my Dad's number, its just said "Siri not available, please connect to Internet"
    I can understand, that for Weather details, Web search etc, Internet is required, but at least Siri should handle in-phone features like "calling, Texting etc", without Internet connectivity.

    Even though it seems like Siri should be able to handle things such as dialing a number or dictating a text, an internet connection is required for Siri to function. There is currently not a way to get Siri to do otherwise.

  • How can i use puppet without anti aliasing ?

    Hello,
    Could you tell be how to use Puppet Warp without anti aliasing ?
    Because the outline is blured.
    Regards

    Thank you very much
    In fact i want to animate sprite for smartphone game, that s why i don t want antialiasing
    Best regards
    Envoyé depuis un mobile Samsung

  • How can I use Skype without downloading it??

    Frustrated at the god dang Skype :/

    Hi, woodrowwilson, and welcome to the Community,
    The software or app must be installed.  Sorry.  To download from Skype for a computer or laptop:
    Download Skype
    The app can be downloaded from your mobile store:
    https://itunes.apple.com/us/app/skype-for-iphone/id304878510?mt=8  or http://www.skype.com/en/download-skype/skype-for-iphone/
    Regards,
    Elaine
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

  • How can i use my account without the billing info, as i do not have a credit card. and my shipping and billing info is under US. i'm in singapore. how do i change this?

    how can i use my account without the billing info, as i do not have a credit card. and my shipping and billing info is under US. i'm in singapore. how do i change this?

    If you are just visiting Singapore, then leave the account as it is. If you have moved there, then view your account using the iTunes app on a Mac or PC and change the country/region to your current location and address. If you do not have a bank card, you can fund your account using iTunes gift cards if available in Singapore.

  • How can i use my ipod on 2 computers without deleting my music

    how can i use my ipod on 2 computers without deleting my music on ipod?

    See here: Using iPhone, iPad, or iPod with multiple computers
    B-rock

  • I have an Apple MacBook Pro with 2 USB ports and a MiniDisplay Port. I also have an HDTV with a HDMI port. How can I use the TV as a display without any tethering wires between my computer and the TV?

    I have an Apple MacBook Pro with 2 USB ports and a MiniDisplay Port. I also have an HDTV with a HDMI port. How can I use the TV as a display without any tethering wires between my computer and the TV? I have a MiniDisplay Port to VGA adapter, but there are two issues with it: The new display doesn't have a VGA port, and even if it did, I wouldn't want to have my mac constantly attached to the display by a cable. I was looking for a way to use the TV as a display without any wires. Is there some type of bluetooth setup I could use? Please let me know if you have any suggestions.

    As I wrote above, I think you should look into the Apple TV yourself. The best place to find information about what it can and can't do and to ask your own specific questions is probably in the Apple TV forum, here:
    https://discussions.apple.com/community/appletv/appletv

Maybe you are looking for

  • Canu00B4t Drag and drop a service over the model Workspace

    Hi guys, I´m trying to consume an Eservice published in the ServiceRegistry. I can see all the services in the result list when i search them, but when i try to drag and drop any of those service over the model workplace nothing happens. I hope someo

  • Firefox will not go to mail after log in to hotmail.co.uk

    Message Internal server error - read followed by long reference. I have uninstallled and reinstalled Firefox without clearing problem. Had worked for 2+years without a problem. == URL of affected sites == http://hotmail.co.uk == User Agent == Mozilla

  • Computer won't turn on and the power cord doesn't light up

    My problem with the computer is that it will not turn on. The battery is fully charged, power cord is plugged into a working outlet. I have held down the power button for 10 second or even longer. Nothing turns it on and the power cord doesn't light

  • 1 asm disk got deleted by SA, now restored standby db, but got error

    I have to restore our standby db from last fullbackup, and startup mount and now when I try to open read only ,it keep saying the the database is for read and write. and when I do following query, it shows: select process,status,sequence# from v$mana

  • Imac randomly shuts down while idle

    I have a new imac 27". Purchased early Sept. about three times in that space I have come to use it finding it shut off. I leave it on sleep all the time. Could I need a new UPS.? It is about three years old. The console report shows it is looking for