can I return a string in a custom dialog box created with app.execDialog ()?

Adobe LiveCycle Designer Cookbooks by BR001: using app.execDialog () in a form in Adobe Designer

I am the above post and try to do the following:

Capture.PNG

I want to write the output of one of the selection of list to PDF dialog box, what I'm going to script?

Something like document. Write() in Javascript (see: http://www.tutorialspoint.com/javascript/javascript_dialog_boxes.htm ). I tried to use document. Write() in the script dialog box, but it doesn't seem to work.

Or can the dialog box return a string value?

According to the PDF example in the first link, this dialogObject is what is returned when you see a dialog box:

var dialogObject = {}

DS1: ({}),

execDialog: function() {}

Return app.execDialog (dialogDescriptor);

},

selectedItem: {function (control)}

If (typeof (control) = "string") {}

control = this [control];

}

for (var control element) {}

If (typeof (control [item]) = 'object') {}

var r = this.selectedItem (control [item]);

If (r! == undefined) {}

Return r;

}

} else {}

If (control [point] > 0) {}

Returns [dot] control;

}

}

}

},

};

Return dialogObject;

Hello

Yes it is possible, by removing the execDialog() function and call the just before execDialog the dialogObject return, you call the dialog box to be executed directly in the service, so if you start a string on the top of the function and the validation value you set the string value of the item found in the list box then you will be able to return the value of the string instead of the dialogObject...

Here is a short example:

dialog() {} function

var strValue = "";

var dialogDescriptor =

{

Description:

{

align_children: "align_row."

items:]

{

type: "display."

align_children: 'align_left,

items:]

{

type: 'edit_text. "

item_id: "txt1"

Width: 300

},

]

},

{

type: "ok_cancel."

}

]

},

validate: function (dialog)

{

No validation required

Returns true;

},

commit: function (dialog)

{

elements var = dialog.store ();

strValue = items ["txt1"];

},

};

var dialogObject =

{

execDialog: function() {return app.execDialog (dialogDescriptor);},

//...

};

app.execDialog (dialogDescriptor);

return strValue;

}

Hope this will help you

Tags: Adobe LiveCycle

Similar Questions

  • Problem with custom dialog box

    I have a custom dialog box. The code goes here

    import net.rim.device.api.system.Bitmap;
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    import net.rim.device.api.ui.decor.BackgroundFactory;
    
    public class CustomDialog extends Dialog{
    
        public CustomDialog(int command,String msg,int color,int alpha){
             super(command, msg, command,Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION), VerticalFieldManager.FOCUSABLE);
             setBackground (BackgroundFactory.createSolidTransparentBackground (color, alpha));
        }
    
    }
    

    I'm the caller to another class as follows

    CustomDialog d = new CustomDialog(Utils.D_YES_NO,"Do you want to exit",Color.BLUE,140);
    d.show();
    

    Its display very well and as I intended it to be. But the problem is that I'm not able to get the index of the choice to perform certain actions, such as

        int i=d.getSelectedValue();
    
                        if(i==Dialog.D_YES){
                            Dialog.alert("hi");
                        }
    
                        }
    

    Its do not call the dialog box, can anyone suggest me how to get the index of the choice that I chose to say YES or NO and to perform tasks accordingly

    Plese try suite

    CustomDialog d = new CustomDialog(Dialog.D_YES_NO,"Do you want to exit",Color.BLUE,140);
                    d.show();
                    d.setDialogClosedListener(new DialogClosedListener() {
    
                        public void dialogClosed(Dialog dialog, int choice) {
                            /*
                             *   // Field descriptor #211 I
                                  public static final int YES = 4;
    
                                  // Field descriptor #211 I
                                  public static final int NO = -1;
                             */
                            int i=choice;
                            System.out.print("Selected Value :"+choice);
                            if(Dialog.YES==choice){
                                System.out.println("Selected Value : YES");
                            }else if(Dialog.NO==choice){
                                System.out.println("Selected Value: NO");
                            }
    
                        }
                    });
    

    If it is useful, please make as response and do not hesitate on LIKE button thanks

  • Create a custom dialog box

    I want to do a custom dialog box that triggers the box when a specific menuitem is clicked?

    Where can I design my dialog box and fill in the specific data in it? Is there a guide available to create custom dialog boxes? I looked in the guides provided with the sdk of illustrator CS6, but found nothing relevant

    From CS6, Illustrator offers no SDK for dialog boxes and an SDK for signs limited. In both cases, you will need to use a third-party solution (we use Qt) or platform (WIN32 or cocoa)-specific code.

  • Custom dialog box

    Hi all

    I need to have custom dialog boxes. I whent through http://developer.blackberry.com/native/documentation/cascades/ui/dialogs_toasts/tutorial_create_a_cu... this tutorial.

    But I need to build in the PRC.

    is this possible?

    I tried everything done porting the UTU in QML to CPP, by extending the Dialog class and all, the dialog box appears, but it is not black as when we show SystemDialog.

    isn't this possible in the PRC?

    Help, please!

    Kind regards.

    Found the solution! Make a custom control that looks like a dialog box, I need and behind the same added a container with blackish transparency to give it a feel of a system dialog box. and also, the user will not be able to interact with the screen as long as the dialog box appears on the screen.

    Kind regards.

  • Action button on the custom dialog box

    I am very new to this, but learning. The task that I got is the following:

    • Have a button on a page when you press will open a dialog box personalized with 4 buttons.
    • Each button should open a different external pdf file in a new window.

    I feel like it gets closer, but just can't get there. Any help will be greatly appreciated!

    var Dlg =

    {

    Description:

    {

    name: "select file to open."

    elements:

    [

    {

    type: "display."

    elements:

    [

    {

    item_id: "Header1",.

    name: "select Document to open.

    type: 'static_text. "

    },

    {

    item_id: "Button1"

    name: 'IOM ',.

    type: 'button ',.

    Button1:function (Dialog)

    {

    app.openDoc ("/IOM/IOM.pdf", this);

    },

    },

    {

    item_id: "Button2"

    name: "Presentation."

    type: 'button ',.

    },

    {

    item_id: "Button3"

    name: "Owner's manual"

    type: 'button ',.

    },

    {

    item_id: "Button4,"

    name: "& balance Test.

    type: 'button ',.

    }

    ]

    },

    {

    type: "ok."

    ok_name: "close".

    },

    ]

    }

    };

    app.execDialog (Dlg);

    You can use check boxes in your dialog box where the user can select the files to be opened, and after they have closed the dialog box you can open the selected files.

  • Name to appear first in the custom dialog box pop-up list

    Hi Forum.

    Thanks for the support so far.  I'm creating a simple custom dialog box which will be "popup", few names in the drop-down list.

    I read an external txt file bearing the name corresponding to the drop-down list. I try to display the name "Stephen" in the txt file as the first and then others follow one by one. Please help on this.

    name listed in the pop-up window

    Dialog.Load ({}

    names of:

    {

    'The King':-1.

    'Queen':-2,.

    'Jack':-3,.

    "Stephen":-4,.

    "Robert":-5,.

    }

    })

    He tried as below but found that the myList3 variable is directly instead of its value ("Stephen").

    Dialog.Load ({}

    names of:

    {

    myList3 : + 1, / / the variable myList3 will be known as "Stephen" stored inside.

    'The King':-1.

    'Queen':-2,.

    'Jack':-3,.

    "Stephen":-4,.

    "Robert":-5,.

    }

    })

    Appreciated your timely help on that. Thank you.

    See examples 3 and 4 in the execDialog API reference.

  • How can I open the "Convert to indexed colors" dialog box with custom presets?

    Hello

    I need to automatically open the "Convert to indexed colors" dialog box in Photoshop. Before and after that I have a few scripts that are running, so it is not possible to open the dialog manually. Also, I want to put some custom presets (like the number of colors, etc.).

    Find something similar to what I want for the color range selection (opens the dialog with the presets you put in that):

    function colorrange(enabled, withDialog, fuzziness) {
        if (enabled != undefined && !enabled)
          return;
        var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
        var desc1 = new ActionDescriptor();
        desc1.putInteger(app.charIDToTypeID('Fzns'),fuzziness);
        var desc2 = new ActionDescriptor();
        desc2.putDouble(app.charIDToTypeID('Lmnc'), 31.22);
        desc2.putDouble(app.stringIDToTypeID("a"), 0.86);
        desc2.putDouble(app.stringIDToTypeID("b"), 0.31);
        desc1.putObject(app.charIDToTypeID('Mnm '), app.charIDToTypeID('LbCl'), desc2);
        var desc3 = new ActionDescriptor();
        desc3.putDouble(app.charIDToTypeID('Lmnc'), 95.34);
        desc3.putDouble(app.stringIDToTypeID("a"), 54.59);
        desc3.putDouble(app.stringIDToTypeID("b"), 49.85);
        desc1.putObject(app.charIDToTypeID('Mxm '), app.charIDToTypeID('LbCl'), desc3);
        desc1.putInteger(app.stringIDToTypeID("colorModel"), 0);
        var desc4 = new ActionDescriptor();
        var desc4 = executeAction(app.stringIDToTypeID('colorRange'), desc1, dialogMode);
      };
    

    How can I get the same thing for the indexed color conversion dialog box? Apart from doing a lot of guessing about the stringIDs.

    Is there some kind of "table of choice" for char and string ID?

    Guys thank you very much in advance! This forum has been a great help on several occasions.

    OK never mind I got it, stupid me.

    He has recorded with Listener Script and changed the "DialogMode" parameter of the function of executeAction "DialogModes.No" at "DialogModes.All".

    var idCnvM = charIDToTypeID( "CnvM" );
                var desc249 = new ActionDescriptor();
                var idT = charIDToTypeID( "T  " );
                    var desc250 = new ActionDescriptor();
                    var idPlt = charIDToTypeID( "Plt " );
                    var idClrP = charIDToTypeID( "ClrP" );
                    var idSele = charIDToTypeID( "Sele" );
                    desc250.putEnumerated( idPlt, idClrP, idSele );
                    var idClrs = charIDToTypeID( "Clrs" );
                    desc250.putInteger( idClrs, 4 );
                    var idFrcC = charIDToTypeID( "FrcC" );
                    var idFrcC = charIDToTypeID( "FrcC" );
                    var idNone = charIDToTypeID( "None" );
                    desc250.putEnumerated( idFrcC, idFrcC, idNone );
                    var idTrns = charIDToTypeID( "Trns" );
                    desc250.putBoolean( idTrns, false );
                    var idDthr = charIDToTypeID( "Dthr" );
                    var idDthr = charIDToTypeID( "Dthr" );
                    var idDfsn = charIDToTypeID( "Dfsn" );
                    desc250.putEnumerated( idDthr, idDthr, idDfsn );
                    var idDthA = charIDToTypeID( "DthA" );
                    desc250.putInteger( idDthA, 75 );
                var idIndC = charIDToTypeID( "IndC" );
                desc249.putObject( idT, idIndC, desc250 );
            executeAction( idCnvM, desc249, DialogModes.ALL ); //Change from NO to ALL
    
  • Need help with custom dialog box

    I created a custom help dialog box. The problem is that 5 buttons do not properly fit in my manager of horizontal field on some blackberry devices. How can I make own? I tried to use my own custom buttons that allow me to specify their width and height, but I'm unable to get the width of the dialog box, so I can't determine how wide should be buttons.

    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.container.HorizontalFieldManager;
    
    public class HelpDialog extends Dialog
    {
        static int ButtonPressed;
        HorizontalFieldManager hfmChoices = new HorizontalFieldManager();
        ButtonField cmdFirst = new ButtonField("|<")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 0;
                close();
                return true;
            }
        };
        ButtonField cmdPrev = new ButtonField("<")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 1;
                close();
                return true;
            }
        };
        ButtonField cmdNext = new ButtonField(">")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 2;
                close();
                return true;
            }
        };
        ButtonField cmdLast = new ButtonField(">|")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 3;
                close();
                return true;
            }
        };
        ButtonField cmdClose = new ButtonField("Close")
        {
            protected boolean navigationClick(int status, int time)
            {
                close();
                return true;
            }
        };
    
        public HelpDialog(String message, int page, int maxPages)
        {
            super("Help (Page: " + page + " of " + maxPages + ")\n\n" + message + "\n", null, null, -1, null, 0);
            ButtonPressed = -1;
            if (page <= 1)
            {
                cmdFirst.setEnabled(false);
                cmdPrev.setEnabled(false);
            }
            if (page >= maxPages)
            {
                cmdNext.setEnabled(false);
                cmdLast.setEnabled(false);
            }
            hfmChoices.add(cmdFirst);
            hfmChoices.add(cmdPrev);
            hfmChoices.add(cmdNext);
            hfmChoices.add(cmdLast);
            hfmChoices.add(cmdClose);
            add(hfmChoices);
        }
    }
    

    Thank you

    Most people have no need a close button, they expect the ESC to do it for them.

    That said, I disagree with this statement:

    "I think that the only good way to use managers other than the AbsoluteFieldManager, is to use them at all."

    Designing a user experience that works well on multiple devices is difficult, and I don't think that has a size fits all approach work.  In addition, I don't have the time to create formats for specific screens for each device type, and although this will not happen now, I didn't have to rework screen designs every time that a new device came out.  I think that it is possible to create a common user interface experience given the size of the screen, and whether it is touch.  If you want to read my thoughts on this, have a look at the tutorial of the user interface you will find here:

    http://supportforums.BlackBerry.com/T5/Java-development/tutorials-for-new-developers-part-1/m-p/1621...

  • Get lists in cascade with a different combination in custom dialog boxes

    Adobe LiveCycle Designer Cookbooks by BR001: using app.execDialog () in a form in Adobe Designer

    1.PNG

    I am the above post and try to do this:

    1.

    When I select "Åland", he must show the cities of this island in a new list box that is added to the first. When I select a city ranked, it shows the district as a result to a third list box, like this:

    Capture.jpg

    (The dialog box above is created with excel visual basic.)

    The combination of the above selection is random. When you select point 110-> article 1103, it may or may not show 11031, according to data provided by the document of the requirement.

    I studied the code in the sample PDF file. Now, I can only reach this step: select the item 110-> article 1103, it shows 11031.

    But I see no better way to add additional selection (for example workflow It can also browse the 120-> 1204-> 12043).

    My code

    function customDialogBox() {}

    var dialogDescriptor = {}

    "DS1": function (dialog) {/ / the first list}

    DS1 var = dialog.store (['DS1']);

    for (var DS1 item) {}

    If (DS1 [point] > 0) {}

    var selectedValue1 = item;

    break;

    }

    }

    If (dialogObject.selectedItem (DS1) == '110') {//when "110" in the first list is enabled, it allows the display of list2

    Dialog.visible ({}

    LST2: true

    });

    } else {}

    Dialog.visible ({}

    LST2: false

    });

    Dialog.Load ({}

    "txt1": selectedValue1

    });

    }

    },

    'LST2': function (dialog) {/ / the second list}

    When "1103" in the second list is selected, it envisibles list3

    },

    'LST3': function (dialog) {/ / the third list}

    concatenate and return the string selected in List1, List2, List3

    }

    };

    var dialogObject = {}

    DS1: data.list1, map / / a, storing the data in the first level

    LST2: data.list110,//a card, storing the data in the second level, when the parent code is 110

    LST3: data.list1103 //a card, storing the data in the third level, when the parent code is 1103

    }

    }

    Basically it is to hardcode the selection flow. I want to dynamically generate lists.

    I think store all lists and identify them by ID, perhaps, in this way:

    Header 1

    var dialogObject = {}

    DS1: data.list1,

    LST110: data.list110,

    LST1103: data.list1103,

    LST120: data.list120,

    ......

    }

    But how can I correctly identify, in order to show/hide the lists and finally out of the string that is concatenated in function customDialogBox()?

    Or maybe is there a better way to retrieve the list when execution, please enlighten me!

    2. Moreover, it is possible to do research (find the code and highlight the result element) as shown in the picture above? Can you give me a few keywords that I need google with?

    A big thank you!

    It is possible to dynamically create objects and dialogue, as well as of the data within the json object...

    What I mean by item ID is the ID of the element in your dialog box, such as DS1, LST2, LST3... but it cannot be LST10, is too long, the dialog box will not interpret the ID because of its length

    What I want to say to the good conditions in the initialize event, is when the event initialize when the user selects an item in the first list, you call, you will have to do if statements with variables in behind to guide the behavior of the dialog box to display the lists and data you want exactly want to display.

  • Custom dialog box could not be shown during the event of 'onCreationCompleted '.

    My application has a 'Warning' dialog box which must be indicated when the application is launched. There are two options in this regard. If users do not accept the warning, the app will be closed. I put it in the onCreationCompleted event handler in the first screen, but it could not be shown there. But I tried to click on a button to open it, it can be displayed correctly.

    I also tried with the dialog system, it can be shown correctly in the event of onCreationCompleted. But I couldn't use it cause my warning dialog box has a complex user interface design.

    attachedObjects: [
        CDialogDisclaimer {
            id: cddisclaimer
        }
    ]
    
    onCreationCompleted: {      try {
            cddisclaimer.open();  //Checked the log, no error, just could not show    } catch (error){        console.log("custom dialog error:"+error.message);    }
    }
    

    Does anyone knows how to fix this?

    Thank you.

    Hello

    It's very strange. Could you try to open it from Manager QTimer onTimer?

    Try to set a large interval first, then, if it works set to 0 msec.

    This page contains a snippet of code to start the timer in QML (search for "QTimer"):

    https://developer.BlackBerry.com/Cascades/documentation/dev/integrating_cpp_qml/index.html

  • Can not enter wildcard (*) in the file selection dialog box when opening a file

    It's something I've not seen before. I posted this question in the forum Autodesk AutoCad LT five days ago, but I got no answer at all. Because I'm not sure whether it is a Windows or a problem with Autocad, I thought I'll try to post here, too.

    On one of our AutoCad workstations, when you open a drawing, we cannot enter a wildcard character (*) in the file selection dialog box to help unravel the drawings.

    In other words, say there are 10 versions of a drawing with the number 5008. I should be able to enter the 5008 * and just see these ten designs. On this computer, when I try to type an asterisk (*), I get this error message: invalid character. The following characters are not allowed in file names: \ /: *? "<>

    Now, I know that they are not allowed... but I don't mean to create a file name. I'm just trying to classify them. On our other RTE Autocad workstations, the wildcard character works fine.  What's up with this one? Y at - it a setting or a variable that controls this?

    Thanks - Kevin

    Hello

    ·         The problem occurs with any other application?

    It may be some setting in Auto CAD, which raises the question, and its best you seek help from experts in DAO automatic.

    Diana
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • How can I get rid of all these unwanted dialog boxes? !

    Help! Whenever I go to the internet/btmail, I can't do what I want because all of these flashing dialog boxes reappear, try to sell me things I don't want or take me to Web sites, I'm not interested. Are these "pop-ups"? And how do I get rid of them / stop them appearing in the first place because they are driving me crazy. I'm a techno full thickie, if someone can help me? Please?

    Please download the free version of Malwarebytes.
    Update immediately.
    Do a full scan of the system
    Let us know the results at the end.

    http://www.Malwarebytes.org/products

  • How to continue rendering of the transition with the custom dialog box open

    Hello

    I'm working on a plugin for some transitions custom (currently for CS6/CC on Windows).

    I use a custom dialog (hasCustomDialog in PiPL) during the esSetup box to define the transition parameters. While the dialog box is open, first execution is suspended until the dialog box is closed.

    The problem is, if I'm fiddling with the settings I do not see the changes in the program monitor and I don't get any comment first.

    I tried to make the dialog non-blocking, but then first did not executives when I changed something in the dialog box.

    Anyone know if it is possible to maintain the dialogue and still have first actively updating the display?

    Kind regards

    Philipp Stelzer

    But I want to keep the dialog box open to see the changes directly without opening the dialog box whenever I want to change a value. Is this possible with a custom dialog?

    It is not the case.  But using the AE API with extensions of the transition, you should be able to achieve the same thing, with the effect controls panel, containing all your effects settings.

  • How to return a string when a Yes / No box is checked?

    I have a yes / no checkbox not named "a1".

    When activated, I would go back to "the customer approval is required." to a pre-established (using app.mailMsg and GMMC) e-mail.

    I tried a few script with .value to see if the box is filled, but had no luck.

    Post what you have and can anyone suggest changes. Generally speaking, the script should get the value of the checkbox, and if it is not equal to 'Off', then she is checked.

  • How can I return to a version of Firefox that is compatible with the Norton Toolbar?

    After that I have updated to the latest version of Firefox, the Norton toolbar is disabled. I would go back to a previous version that is compatible with the Norton toolbar. Can I do this?

    For security reasons, it is preferable not to decline to 40 Firefox. I could refer you to this thread for a more in-depth review and suggestions: screwed up why Firefox NEW Norton Internet Security?

Maybe you are looking for

  • Block a web site

    I want to stop a particular website to contact me by email.

  • Satellite M60-164, sticking the numeric keypad

    Hello I wonder if anyone has experienced any sticky keys on the numeric keypad. I mean only to feel the resistance when you press the keys and they take the time to return to its normal position.No.... One looks like it might be food or drink has fal

  • HP spectrum 360: recovery disk limit

    I created a recovery disc for my new PC spectrum on a map more than necessary (128 GB) SSD because I read in the HP Recovery Manager that I could always use the remaining space. The card became limited to 32 GB, so a lot of (expensive) space is lost.

  • Touch event

    Someone there to work on the Playbook?  Is there a setting I need to turn it on so that it?  I tried to listen to (on the label of a button and on "cela"), but nothing seems to be cooking for me.  I've been tesitng on the device, so it * should * wor

  • Problem of restart of blackBerry Smartphones

    I was asked to restart after an upgrade of the application (screengrabber). I did but the problem is LED continues to blink and my phone is still dead. It's like that for nearly half an hour. What should I do? will I continue to wait?