4 Replies Latest reply on Nov 6, 2009 8:23 PM by halynn

    Custom UI or editor for input-parameter

    halynn

      I think I need to implement a custom UI editor for an input-paramenter.  My input parameter is really a HashTable. I'd like to present a dialog that allows the user to enter any number of key value pairs.  The optional "editor" element  looks promising because it allows you to specify a ui-component.  I have searched and searched for sample code, but haven't found any.  Would some kind soul please point me to a resource that shows how to implement such as custom UI (whether it involves the "editor" element or not)?

       

      Here's a link to the ui-component element in the reference:

       

      http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/wwhelp/wwhimpl/js/html/w whelp.htm?href=000959.html#1548965&accessible=true

       

       

      Thanks,

       

      Halynn

        • 1. Re: Custom UI or editor for input-parameter
          Scott Brodersen Adobe Employee

          That documentation is for creating a custom dialg box in Workbench for configuring an operation property. Is that what you want? If so, you could simply use a map of strings, and use the set value service to populate it.

          • 2. Re: Custom UI or editor for input-parameter
            halynn Level 1

            I appreciate the reply.

             

            I was actually trying to point to another page, although that page may be applicable.  Apparently the URL in my browser window was not sufficient to recreate my state in livedocs.  I was looking at the reference for component.xml, specifically where it describes an optional <editor> element of <input-parameter>.  This <editor> component also has a child called <ui-component>.  I haven't found any sample code that uses these two elements.

             

            I need to call my component with a Map or Hashtable (an arbitrary set of Key/Value String pairs).  This Map needs to be easily configurable in LiveCycle Workbench.  I've seen numerous operations that popup dialogs for input-parameters and serialize their data.  I was thinking that I will have to implement my own dialog.

             

            It sounds like you are suggesting I can achieve this with a variable and the set value service.  I don't quite understand.  How would I insert the string pairs?

             

            Thanks,

             

            Halynn

            • 3. Re: Custom UI or editor for input-parameter
              Scott Brodersen Adobe Employee

              Let's say you create a map variable that contians string values. Say the variable is named mapVar. To add a key/value pair such as keystring/valueString, in the Set Value, you would add the mapping

               

              /process_data/mapVar[@id='keystring'] = 'valueString'

               

              The string values could also be XPath expressions that evaluate to other variables as well, if they are passed in as input values for example.

              1 person found this helpful
              • 4. Re: Custom UI or editor for input-parameter
                halynn Level 1

                Thank you very much for the pointer.  I got it working using a map.  It was a great exercise because it gave me a better idea what I can do with variables. I am  hoping to do something a little more intuitive.  I'm still interested in adding a UI that makes entering the key-value pairs obvious and easy.  I'm pretty sure this possible.   See the Attachments field in "Send with Map of Attachments" (Foundation).  Notice the dialog that pops up when you click the "..." button.  It lets you enter an arbitrary number of named attachments.  That's essentially what I'm hoping to achieve.  Any ideas (or pointers to sample code) that show you how to do that?

                 

                Thanks,

                 

                Halynn