Ordering widgets in a dialog?

How can I selectively change the order of the widgets in a dialog? The default layout is alphabetical order. Is there a property and value I can add to selectively order them?
Thanks,
Gio

You could use the Sling POST Servlet (see http://bit.ly/nh4z7M). For example:
$ curl -u admin:admin -F":order=before link" http://localhost:4502/apps/geometrixx/components/title/dialog/items/type
Would make the type field on the Geometrixx title component go before the link field.
You could use the JCR API. The above is more or less just doing:
session.getNode("/apps/geometrixx/components/title/dialog/items").orderBefore("type", "link");

Similar Messages

  • Disable widgets in a dialog when checkbox is clicked...

    Hi,
    I m using InDesign CS3 on MAC OS.
    I have created a dialog with 2 textfields and a checkbox. I want only one of the textfields to be visible at a time...
    That is, depending on the value of the checkbox(1 or 0), i have to disable the textfileds. Initially only textfield1 is active, and on checking the checkbox, textfield2 becomes active and textfield1 gets disabled.
    Where should i give my code? For disabling operations we use SuppressedUI.h.
    I tried this:
    bool16    BscDlgSuppressedUI::IsWidgetDisabled( const IControlView* widget ) const
       InterfacePtr<IWidgetParent> widgetParent(this, UseDefaultIID());
        ASSERT(widgetParent);
        InterfacePtr<IPanelControlData> panelControlData((IPanelControlData*)(widgetParent->QueryParentFor(IPanelControlData::kDe faultIID)));
        ASSERT(panelControlData);
        IControlView* iControlView = panelControlData->FindWidget(kBscDlgVisibleCheckBoxWidgetID);
        InterfacePtr<ITriStateControlData> TriStateControlData(iControlView, UseDefaultIID());
        bool16 y = TriStateControlData->IsSelected();
        if(y)
            WidgetID widgetID = GetWidgetID(widget);
            switch (widgetID.Get())
                case kBscDlgTextEditBoxWidgetID:
                    return kTrue;
    But this leads to application crash on launching it itself. I think it may be becausu of trying to get the values of widgets in a diallog when the dialog is not visible. Donno if i m right...
    Where should i give the code? can i call this BscDlgSuppressedUI::IsWidgetDisabled() method from the dialog controller?How?
    Can someone pls help with code snippet..
    Pls guide me..
    Thank You.

    Thanks for ur reply Schneider..
    I already have an observer for my dialog..
    Should i give my code in  BscDlgDialogObserver::Update() method?
    How to turn on/off the texteditfields????

  • Work Order printer selection through dialog still picking default printer

    Hi,
      When i'm printing Work Order (trx: IW32) programs picks up default printer assigned to the user.
    in my case this also happening when user selects different printer though dilog.
    was trying to get it from NAST-LDEST but in my case NAST is empty and ITCPO pointing to LP01(Local Printer of user).
    can anyone please help how to get printer name which is selected by user.
    Thanks in advance,
    Kian

    Hi,
    Below code show you the way to assign any printer to form. (Pls find the code in you print prog )
    DATA: output_options        TYPE ssfcompop.
    DATA: control_parameters TYPE ssfctrlop.
      output_options-tdimmed       = 'X'.
      output_options-tddest         =  'PR01'. --- > here we can hard code the printer name and pass to FM
      control_parameters-no_dialog = 'X'. 
    CALL FUNCTION fm_name
        EXPORTING
          control_parameters = control_parameters
          output_options       = output_options
          user_settings        = ''
          nota_fiscal            = i_nota_fis
        EXCEPTIONS
          formatting_error   = 1
          internal_error       = 2
          send_error           = 3
          user_canceled     = 4
          OTHERS               = 5.
      IF sy-subrc <> 0.
      ENDIF.
    As you need to know form where the value of output_options-tddest is coming then you can debug the flow and try to find the value of output_options-tddest ...
    Pls tell me if you need to know anything else.
    Regs,
    Lokesh.

  • Widget tab order

    Hi,
    How i can fix the tab order of widgets on a dialog ?
    Thanks

    I have not because he states on there that it does not work for captivate 6.  I have been in conversation with Adobe regarding this issue, and they have basically said "sorry, but there's no way around it in captivate 6"...therefore this product is WORTHLESS to me.  I'm glad my company wasted money on this product.  To anyone out there who is having trouble with tabbing in Captivate 6, you wasted  your money too.  There is NO solution for this version, and I've been told they don't think there is even a widget that can work around it due to the flash restrictions.  I am beyond irritated.... My only saving grace would be that there is someone smarter out there who can figure it out other than the jokes that work for Adobe Product Support. 

  • Dialog/Widget to behave like a parsys component

    Hello All:
    I have a client requirement to basically develop a custom component which will allow the authors to drag & drop any component (which is available from sidekick) on to the wizard and configure it. In a way, essentially they would like to mimic the parsys component behavior on the page to the dialog/widget. Ideally dialog should have something like parsys and which should allow drag & drop of other components into this dialog/widget. I was just wondering whether is it technically possible to have something like this? I know ideal usage component is not like this - but unfortunately this is what my client wants - please throw some ideas/ approach... Appreciate your time!!!
    - Kc

    This forum is for C# code related issues, please move your question to MVC forums for a better assistance on your issue:
    http://forums.asp.net/1146.aspx
    Fouad Roumieh

  • Goods issue for plant maintenance order

    Goods issue with ref to plant maintenance order( Componenets of the order) is not possible in transaction code MIGO. Error message " MIGO is not possible for the refurbishment order".
    Goods issue for the same order can be posted with transaction MB!A.

    hi santhosh
    kindly check the order type .i think you are using MB1A for refurbishment process.but it is not possible.only maintenance order can be posted via MB1A
    follow the procedure for goods issue in refurbishment order.
    Choose Logistics ® Plant maintenance ® Maintenance processing ® Completion confirmation ® Goods movement ® Goods movement.
    The entry screen for a goods issue appears.
    Choose the pushbutton For order.
    Enter the relevant order number in the dialog box and choose Continue.
    An entry screen appears.
    Choose Copy.
    The Maintain Serial Numbers dialog box appears.
    Choose Reference document.
    Enter the order number in the Refurbishment order group box and choose Execute.
    A list appears with the planned serial numbers for the refurbishment order.
    Check the selections of serial numbers, for whose material you want to post a goods issue, and choose Copy.
    The serial numbers are copied into the Maintain Serial Numbers dialog box.
    Choose Exit window.
    The goods issue is posted.
    regards
    thyagarajan

  • I pre-ordered an album, but its not showing up in my purchase history but it says I have it in my acount info. Thanks in advanced.

    I pre-ordered George Ezra's new album (the dulxe version), but and it says I have it in my accout info but it wont download.

    Hi GroveMaster,
    The article below explains how the pre-order process works.  If the item does not automatically downlowd to your iTunes Music library, and you are unable to download the purchased content, I've included a link to contact the iTunes Store Support team as well.
    iTunes Store: About pre-orders - Apple Support
    http://support.apple.com/en-us/HT202723
    You can pre-order music and movies from the iTunes Store prior to their public release date. Pre-ordered items will download when they become available.
    If an item isn't yet available, you may be able to pre-order it and download it when it becomes available. Items available for pre-order will have an orange pre-order button that displays the pre-order price. Most pre-orders will show an expected release date near or below the pre-order button. When the pre-order item becomes available, your account will be billed for the pre-order, and the item will appear in the Purchased section of your account. If there is a billing issue that prevents us from billing your account when the item is released, you'll receive an email notifying you that the item is available. You need to click the link within the email, using a computer and the latest version of iTunes, to fulfill the pre-order. You may also receive one or more emails if the status of your pre-order changes.
    Some pre-orders include songs that are available for download immediately. When you pre-order, you will be charged only for these songs and you will receive them immediately.To pre-order an item
    Click or tap the Pre-order button.
    Click or tap Pre-order on the confirmation dialog.
    When you've successfully completed a pre-order, a thank-you page will appear.
     Download a pre-ordered item
    When a pre-ordered item becomes available, you will receive an email letting you know that you can download your pre-order.
    If you enabled the option to automatically download prepurchased content in iTunes, then your pre-ordered content may already be in your library. If not, click the download link provided in your email notification, and your pre-ordered content will begin to download. You can also use the Check for Available Downloads feature in iTunes on your computer (choose Store > Check for Available Downloads) to begin downloading your pre-order.
     To view, cancel, or see the expected release dates for your pending pre-orders
    Choose Store > View My Apple ID and click Manage Pre-Orders, which is located in the Settings section at the bottom of the Account Information screen in iTunes on your computer.
    From the Manage Pre-Orders screen, click the Cancel button to the right of the pre-order you want to cancel. You'll be asked to confirm your pre-order cancellation.
    Note: You can't manage pre-orders on iPhone, iPod touch, or iPad.
    Last Modified: Nov 8, 2014
    Download past purchases - Apple Support
    http://support.apple.com/en-us/HT2519
    iTunes Store - Contact Us - Apple Support
    Have a great day!
    - Judy

  • Toolbar buttons in wrong order on the server

    Time to call for backup.
    I have a couple of CSH FlashHelp projects where I specify the
    following toolbar button order in the SSL dialog:
    Contents (default)
    Search
    Index
    Glossary
    Print
    However, after the generated help goes to the various
    application builds, the buttons show in this order: Contents,
    Index, Glossary, Search. (Wrong order and no Print button.)
    I got a developer's help when we first found this problem,
    and he tracked the button order to the whcshdata.htm file. After I
    generate, it contains the following line, after all the CSH/topic
    associations:
    addWindow("[window
    name]",false,30,"10%","3%","60%","75%","[window title
    here]",2,0,"toc|ndx|gls|nls","toc");
    Note the wrong button order. It looks on the surface like
    it's ignoring my specifications. The funny thing is that even with
    this wrong order, the toolbar buttons show up correctly when I open
    the help from my hard drive by double-clicking the start page. The
    malfunction is when the help files are on a server.
    To fix this, I have to manually change "toc|ndx|gls|nls" to
    "toc|nls|ndx|gls|prt" and check that file in to the repository in
    order to get the right order and the Print button. (It's not a
    problem if I haven't introduced any changes to my map file, because
    then I just don't check whcshdata.htm in to source control. But if
    I have made changes, then I have to tweak the file again.)
    Anyone know what the problem could be? I've just rolled with
    it for months, ever since the problem popped up in one of the
    production systems and we fixed it with the manual tweak. But I'd
    like to get to the root of this if possible.
    Thanks all,
    Ben

    The thing to check would be to look on your iTunes at home on your desktop and check that the songs are ordered correctly there. One thing with renaming double cd sets (as I also do) is that sometimes the track numbers get jumbled.
    If you select the offending album in iTunes, click on the header bar where it says 'name' (above the song titles), you'll see that part of the bar turn blue and iTunes will jumble the tracks into a random order.
    Click on track# to reorder them 1,2,3 etc. Sync these changes back to the iPod.
    Incidentally, there can be problems associated with iPods and network drives. See this.
    Strange iPod behavior.

  • IDOC for purchase order

    Hi,
      I created an IDOC using the basic type orders04 , i populated all the required fields and tried to run the idoc through WE20 .The idoc got generated but with an error saying "Purchasing document & does not exist"..I am not able to see which part of the segment this error is getting popped up.Please help me.
    Thanks & Regards
    Abhishek

    Hi Abhishek,
    In your header you suggest that you want to create a purchase order using ORDERS04; however this message can't be used to create purchase orders. You should use message PORDCR instead.
    In case you do want to create a sales order, you could set a break point in function module IDOC_INPUT_ORDERS at the call of transaction VA01, switch MODE to 'A' and the sales order is created in dialog mode. Perhaps you might then find out what the cause of the error is.
    Hope this is of any help.
    Regards,
    John.

  • Picklist printing from Sales Order screen with Crystal Report

    When attempting to print a Sales Order, we get a dialog box that allows us to choose either Sales Order or Picklist.  Prior to moving to a Crystal Report based report, this dialog box would appear each and every time we tried to print the Sales Order. (Our process requires that we print the Sales Order to our Document Warehouse and then separately print the Picklist to a physical printer.)  Now that we are using Cyrstal, the dialog box to select the form appears for the first print job, but when we try to print the other form,  we no longer get the option to choose which form to print.  The second attempt at printing then defaults to which form we printed first.
    Under Print Preferences, it appears the box to "Print Picking Sheet" only applies to PLD.  Other than closing out of the Sales Order Form and opening it back up again, is there a way to force SAP to allow me to choose which form to print each time I click Print?
    And since we're on the topic, Is it possible to set up a print sequence to print the Sales Order to one printer and the Picklist to another one?

    Are you on SBO 8.8 yet? If so which patch level?
    There is a Print Sequence functionality built into this version (although we don't use it at our company at the moment). 8.8 will also allow you to attach Crystal Reports to any document (with a little work) and they will print just like a PLD document (albeit in a Crystal Viewer).
    If you are not on 8.8 yet, how are you pulling up the Crystal Report for the the Sales Order? I'm guessing you are using some add-on to do this since the 2007 Crystal add-on didn't really handle document layouts very well.
    I can expand on all of this if you want. But I'll need to know what version/patch level of SBO you are on. My company is on 8.8 PL15.
    Brent

  • Setting Z Order of measurement studio controls in Visual C++

    How can I set the Z Order of a measurement studio control (such as a button, numeric edit, etc.) from within a VC 6.0 application? I have several overlapping controls in which the first control is on top and the controls I apply later are below. I must go through all kinds of gyrations to control the Z Order.

    Tab order in Visual C++ dialogs controls Z-plane order. You can set the tab order under Layout->Tab Order. The lower the number in the tab order, the higher on the Z-plane.
    Best Regards,
    Chris Matthews
    National Instruments

  • Signing applets and a dialog box.

    What's the procedure to follow when you want an applet to ask the user to grant access to file reading/writing and similar?
    I have signed the .jar, we have a nice .x509 certification at my company etc., but when I was following the tutorials it seemed really complicated. I mean we need the user to just press a "grant permissions" button or similar and then the applet would run.
    Reading the tutorials I got the impression that you need to go through a lot of trouble with exporting the keystore entries and then importing them again (the client that is).
    So, what would I do in order to have a dialog pop up and ask for the granting of permissions? Preferably never to pop up again (if possible).
    Any urls would also be helpful.
    Thanks

    Your system will be much easier to maintain if you place the certificate and policy file on the intranet server. Just follow the 10 steps. Supose your certificate is called MySoftware and you signed your JAR file with this certificate. The certificate is stored in a file called certs.store.
    Inside the policy file you can specify the keystore location:
    keystore "http://intranet.mysoft.com/admin/certs.store", "JKS";
    grant signedBy "MySoftware"
    { permission java.io.FilePermission "<<ALL FILES>>", "read" };
    The advantage of this way of working is everything can be managed remotely. As you can see, the applets that are sigend by the MySoftware certificate have permission for file IO. You can specify different security settings for each certificate in the policy file.
    Every visiter can now access your applet without needing the certificate installed because it can be found on the server.

  • "DEADLOCK" when showing dialog from RMI-callback.

    Hi!
    Today is the 10th day (full time) that I've been searching for a solution in Java Forums and Internet, but I couldn't find anything that helps me. Help is extremely appreciated, otherwise I'll go crazy! :-)
    The problem is that RMI-callback thread "somehow blocks" the Event Dispatch Thread.
    I want to do following:
    1) I push the button in the client (btDoSomething)
    (MOUSE_RELEASED,(39,14),button=1,modifiers=Button1,clickCount=1 is automatically pushed onto EventQueue)
    2) btDoSomethingActionPerformed is invoked
    3) inside of it I make a call to RMI-server (server.doSomething())
    4) from this server method I invoke RMI-callback back to the client (client.askUser())
    5) in the callback I want to display a question to the user (JOptionPane.showConfirmDialog)
    6) user should answers the question
    7) callback returns to server
    8) client call to the server returns
    9) btDoSomethingActionPerformed returns and everybody is happy :-)
    This works normally in normal Client, that means, while a button is pushed, you can show Dialogs, but with RMI callback I get problems.
    I just made a small client-server sample to simulate real project. What I want to achieve is that client invokes server method, server method does something, but if server method doesn't have enough information to make the decision it needs to do call back to the client and wait for input, so the user gets an JOptionPane.
    Here is my callback method:
        /** this is the remote callback method, which is invoked from the sevrer */
        public synchronized String askUser() throws java.rmi.RemoteException {
            System.out.println("askUser() thread group: " + Thread.currentThread().getThreadGroup());
            System.out.println("callback started...");
            try {
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        System.out.println("My event started...");
                        JOptionPane.showConfirmDialog(parentFrame, "Are you OK?", "Question", JOptionPane.YES_NO_OPTION);
                        System.out.println("My event finished.");
            }catch (Exception e) {
                e.printStackTrace();
            try {
                Thread.currentThread().sleep(10000);
            }catch (Exception e) {
                e.printStackTrace();
            System.out.println("callback finished.");
            return "Yo!"; // just return anything
        }Here in this sample I let the callback thread sleep for 10 seconds, but in real project I let it sleep infinitely and I want to wake it up after the user has answered JOptionPane. But I have the DEADLOCK, because event queue is waiting for callback to finish and doesn't schedule the "showing dialog" event which contains the command for waking up the callback thread.
    I looked very precisely when the event queue starts again to process events: it is precisely then when btDoSomethingActionPerformed is finished.
    When I'm not accessing GUI inside of the callback, this callback mechanism works perfectly, but as soon as I want to show the dialog from inside of the RMI-callback method, the "AWT Event Dispatch Queue" is somehow frozen until RMI-callback thread is finished (and in turn btDoSomethingActionPerformed terminates) . I cannot explain this weird behaviour!!!
    If I don't use SwingUtilities.invokeLater (I know this shoudn't be done outside of Event Dispatch Thread), but access the GUI directy, my JOptionPane is shown, but is not painted (it is blank gray) until callback thread returns.
    Why showing (or painting) of dialog is not done until btDoSomethingActionPerformed is finished?
    I also tried to spawn a new Thread inside of main RMI-callback thread, but nothing changed.
    I also tried the workaround from some older posting to use myInvokeLater:
        private final static ThreadGroup _applicationThreadGroup = Thread.currentThread().getThreadGroup();
        public void myInvokeLater(final Runnable code) {
            (new Thread(_applicationThreadGroup, new Runnable() {
                public void run() { SwingUtilities.invokeLater(code); }
            ).start();
        }but this didn't help either.
    Then I tried to spawn a new Thread directly from the Client's constructor, so that I'm sure that it belongs to the main appplication thread group. I even started that thread there in the constructor and made it wait for the callback. When callback came in, it would wake up that sleeping thread which should then show the dialog. But this did't help either.
    Now I think that it is IMPOSSIBLE to solve this problem this way.
    Spawning a new Process could work I think, but I'm not really sure if I want do to that.
    I know I could make a solution where server method is invoked and if some information is missing I can raise custom exception, provide the input on client side and call the same server mathod again with this additional data, but for that I need to change server RMI interfaces, etc... to fit in this concept. I thought callback would much easier, but after almost 10 days of trying the callback...I almost regreted it :-(
    Is anyone able to help?
    Thank you very much!
    Please scroll down for the complete sample (with build and run batch files), in case someone wants to try it. Or for the time being for your convenience you can download the whole sample from
    http://www.onlineloop.com/~tornado/download/rmi_callback_blocks_gui.zip
    ######### BEGIN CODE ####################################
    package callbackdialog;
    public interface ICallback extends java.rmi.Remote {
        public String askUser() throws java.rmi.RemoteException;
    package callbackdialog;
    public interface IServer extends java.rmi.Remote {
        public void doSomething() throws java.rmi.RemoteException;
    package callbackdialog;
    import java.rmi.Naming;
    public class Server {
        public Server() {
            try {
                IServer s = new ServerImpl();
                Naming.rebind("rmi://localhost:1099/ServerService", s);
            } catch (Exception e) {
                System.out.println("Trouble: " + e);
        public static void main(String args[]) {
            new Server();
    package callbackdialog;
    import java.rmi.Naming;
    public class ServerImpl extends java.rmi.server.UnicastRemoteObject implements IServer {
        // Implementations must have an explicit constructor
        // in order to declare the RemoteException exception
        public ServerImpl() throws java.rmi.RemoteException {
            super();
        public void doSomething() throws java.rmi.RemoteException {
            System.out.println("doSomething started...");
            try {
                // ask the client for the "missing" value via RMI callback
                ICallback client = (ICallback)Naming.lookup("rmi://localhost/ICallback");
                String clientValue = client.askUser();
                System.out.println("Got value from callback: " + clientValue);
            }catch (Exception e) {
                e.printStackTrace();
            System.out.println("doSomething finished.");
    package callbackdialog;
    import java.rmi.server.RemoteStub;
    import java.rmi.server.UnicastRemoteObject;
    import java.rmi.registry.Registry;
    import java.rmi.registry.LocateRegistry;
    import java.rmi.Naming;
    import javax.swing.JOptionPane;
    import javax.swing.SwingUtilities;
    import javax.swing.JFrame;
    public class Client extends javax.swing.JFrame implements ICallback {
        private final JFrame parentFrame = this;
        private Registry mRegistry = null;
        private RemoteStub remoteStub = null;
        private IServer server = null;
        private final static ThreadGroup _applicationThreadGroup = Thread.currentThread().getThreadGroup();
        /** Creates new form Client */
        public Client() {
            initComponents();
            System.out.println("Client constructor thread group: " + Thread.currentThread().getThreadGroup());
            try {
                server = (IServer)Naming.lookup("rmi://localhost/ServerService");
                // register client to the registry, so the server can invoke callback on it
                mRegistry = LocateRegistry.getRegistry("localhost", 1099);
                remoteStub = (RemoteStub)UnicastRemoteObject.exportObject((ICallback)this);
                Registry mRegistry = LocateRegistry.getRegistry("localhost", 1099);
                mRegistry.bind("ICallback", remoteStub);
            }catch (java.rmi.AlreadyBoundException e) {
                try {
                    mRegistry.unbind("ICallback");
                    mRegistry.bind("ICallback", remoteStub);
                }catch (Exception ex) {
                    // ignore it
            }catch (Exception e) {
                e.printStackTrace();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            java.awt.GridBagConstraints gridBagConstraints;
            secondTestPanel = new javax.swing.JPanel();
            btDoSomething = new javax.swing.JButton();
            getContentPane().setLayout(new java.awt.GridBagLayout());
            setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
            setTitle("RMI-Callback-GUI-problem sample");
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    formWindowClosing(evt);
            secondTestPanel.setLayout(new java.awt.GridBagLayout());
            btDoSomething.setText("show dialog");
            btDoSomething.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    btDoSomethingActionPerformed(evt);
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 0;
            gridBagConstraints.gridy = 3;
            gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
            secondTestPanel.add(btDoSomething, gridBagConstraints);
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 0;
            gridBagConstraints.gridy = 1;
            gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
            gridBagConstraints.weightx = 1.0;
            gridBagConstraints.weighty = 1.0;
            getContentPane().add(secondTestPanel, gridBagConstraints);
            pack();
        private void btDoSomethingActionPerformed(java.awt.event.ActionEvent evt) {                                             
            System.out.println(java.awt.EventQueue.getCurrentEvent().paramString());
            try {
                server.doSomething(); // invoke server RMI method, which will do the client RMI-Callback
                                      // in order to show the dialog
            }catch (Exception e) {
                e.printStackTrace();
        private void formWindowClosing(java.awt.event.WindowEvent evt) {                                  
            try {
                mRegistry.unbind("ICallback");
            }catch (Exception e) {
                e.printStackTrace();
            setVisible(false);
            dispose();
            System.exit(0);
        /** this is the remote callback method, which is invoked from the sevrer */
        public synchronized String askUser() throws java.rmi.RemoteException {
            System.out.println("askUser() thread group: " + Thread.currentThread().getThreadGroup());
            System.out.println("callback started...");
            try {
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        System.out.println("My event started...");
                        JOptionPane.showConfirmDialog(parentFrame, "Are you OK?", "Question", JOptionPane.YES_NO_OPTION);
                        System.out.println("My event finished.");
            }catch (Exception e) {
                e.printStackTrace();
            try {
                Thread.currentThread().sleep(10000);
            }catch (Exception e) {
                e.printStackTrace();
            System.out.println("callback finished.");
            return "Yo!"; // just return anything
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    Client client = new Client();
                    client.setSize(500,300);
                    client.setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JButton btDoSomething;
        private javax.swing.JPanel secondTestPanel;
        // End of variables declaration
    1_build.bat
    javac -cp . -d . *.java
    rmic callbackdialog.ServerImpl
    rmic callbackdialog.Client
    pause
    2_RunRmiRegistry.bat
    rmiregistry
    pause
    3_RunServer.bat
    rem java -classpath .\ Server
    java callbackdialog.Server
    pause
    4_RunClient.bat
    java callbackdialog.Client
    pause
    ######### END CODE ####################################

    I can understand that only partially, because SwingUtilities.invokeLater puts(redirects) my runnable object directly into AWT thread. The only conclusion I can draw from all things that I have tried until now , is that SwingUtilities.invokeLater(<showing the dialog>) invoked from a RMI thread somehow have lower "priority" than events coming directly from the AWT-thread and therefore it is held back until normal awt event completes (in this case BUTTON_RELEASED).
    But what I don't understand is the fact that the dialog is not shown even If I create and start a new thread from the client's constructor. This thread has nothing to do with RMI as it is in the main thread group:
        private BlockingObject dialogBlocker = new BlockingObject();
        private BlockingObject blocker = new BlockingObject();
        public Client() {
            initComponents();
            (new Thread() {
                public void run() {
                    try {
                        dialogBlocker.sleep(0);
                        System.out.println("My event started...");
                        JOptionPane.showConfirmDialog(parentFrame, "Are you OK?", "Question", JOptionPane.YES_NO_OPTION);
                        blocker.wake();
                        System.out.println("My event finished.");
                    }catch (Exception e) {
                        e.printStackTrace();
            }).start();
            ...Callback is then only used to wake up this thread which should display the dialog:
        public Object askUser() throws java.rmi.RemoteException {
            System.out.println("callback started...");
            dialogBlocker.wake();
            blocker.sleep(0);
            System.out.println("callback finished.");
            return userChoice; // return anything I don't care for now
    class BlockingObject {
        public void sleep(long timeout) {
            synchronized(this){
                try {
                    wait(timeout);
                }catch (InterruptedException e) {}
        public void wake() {
            synchronized(this){
                notifyAll();
        }In this case the dialog is shown, but it is NOT painted, so I have deadlock again. Why it is not painted?!?
    Haven't I uncouple it from RMI-Thread?
    But perhaps I'm looking at the wrong side of the whole thing.
    If I invoke server.doSomething (as ejp proposed) in a separate thread, then everything is fine (except that I cannot use this solution in my project :-( ).
    It seems that the whole problem is NOT AT ALL related to callback itself, but rather to the fact that if client invokes remote call, even dialogs can't be shown until the rmi call returns to the client.
    Thank you, Drindilica

  • FileNameGet function load order

    I am using the function FileNameGet to load selected files into DIAdem.  However, the files are loaded in a different sequence from what I selected and more importantly the order windows displays them. 
    For example, when the FileNameGet function is called I select the following files in the following order
    Mod1-7-25-07.dat
    Mod1-7-27-07.dat
    Mod1-8-06-07.dat
    and they are also sequentially shown in the same order in the windows dialog box when selecting the files.  However, when I look at the list file and the order they are loaded into diadem, they are not loaded in the same order.  They are loaded as shown below:
    Mod1-8-06-07.dat
    Mod1-7-25-07.dat
    Mod1-7-27-07.dat
    Is there some way to load the files in the order I select them from as each dataset is based on a day and I would like them to be placed in the report from earliest date to most recent?

    I created a workaround for you. This function is reordering the content of the LST file alphabetically:
    Option Explicit  'Forces the explicit declaration of all the variables in a script.
      '  Sorts a listfile alphabetically
    function sort(Listfile)
      dim line, file, files()
      '   Read LST file into files() variable, remove header comments
      dim buffer
      line = 0
      file = TextFileOpen(Listfile,tfRead)
      Do While Not TextFileEOF(file)
        buffer = TextFileReadLn(file)
        if left(buffer,1) <> "{" then
          line=line+1
          redim preserve files(line)
          files(line) = buffer
        end if
      Loop
      textfileclose file
      '   Bubblesort
      dim done, tmp, i, j
      For i = 1 To ubound(files)
      do
       done = True
       For j = 1 To 6
        If files(i) < files(j) Then
         done = False
         tmp = files(i)
         files(i) = files(j)
         files(j) = tmp
        End If 
       Next
       loop until done
      Next
      '  Rewrite LST file
      file = TextFileOpen(Listfile,tfCreate OR tfWrite OR tfANSI)
      For line = 1 to ubound(files)
        TextfileWriteLn file, files(line)
      Next
      textfileclose file
    end function
      ' MAIN
    sort autoactpath&"list.lst"
    Ingo Schumacher
    Systems Engineer Sound&VibrationNational Instruments Germany

  • IBA - change last page of review widget

    I've created a quiz, but it isn't a "review". However, when the reader finishes the last question the screen says "You've successfully completed this review". I'm just using the built-in quiz/review widget. I'm wondering if there is any way I can change (or remove) this text?
    Thanks
    Rebecca

    I do not use this widget.. which I  find too restrictive - but this "You've successfully completed this review".
    is built into the widget and cannot ( as far as I can  work out) be edited.
    Bookry  and iBooks-Widgets.com both sell and create to order widgets - mayb one has a widget more suited to your needs...
    BTW I get no gain from these suppliers or have  any involvement.... they  just meet  people needs for iBooks.
    iBooks-Widgets.com also has a brilliant iBA tutorial book free from the iBooks store.

Maybe you are looking for

  • Data Quality Report Error

    In DS 12.1.1.0, when I try to open a Data Quality Report in the Management Console I get a new Windows with the following error message: Fehler Fehler bei der Seitenformatierung: FormulaFunction hat eine unerwartete Ausnahme von der 'evaluate'-Method

  • Forte and Crystal OCX

    Using Crystal Reports 6.0 ActiveX control on Win 95 clients or Win 95 development machines I cannot insert the object into the ActiveX widget. In distributed mode the Control cannot be 'Realized' and in development, the Win 95 machine hangs up. Compl

  • McAfee Antivirus and skype freezing

    Just for the possible benefit of anyone having Skype freezing issues, check if you have McAfee Antivirus installed and if so configure it to allow Skype full access. I kept having Skype freezing and as it turns out McAfee thought it was a virus and k

  • File reader application

    what are the cellphones compatible with an application with: - an MIDP 2.0 profile - CLDC 1.0 configuration - Mobile Media API (JSR 135) Wireless Messaging API 1.1 (JSR 120)? and also with PDA profile for J2ME? how can i make an application that disp

  • I phone sending to ipad after update

    so i updated my ipad finly after it made me and now when i try to send text messages to my mom it sends it to the ipad. I have deleted all messaging tools from the ipad and now when i send a message to mom mom it goes no where . no one gets it. This