Inspecting the current selection using the HTML5 SDK

I have been banging my head against the wall trying to get what I thought would be something very simple working.
What I want to do is have an InDesign panel, the contents of which changes based on the current selection on the page.
Now, I can access the event "afterSelectionChanged" in the native scripting environment, but there appears to be no way for the native environment to trigger an event in the HTML5 panel unless I use a C++ hybrid extension and call the PlugPlugDispatchEvent() method.
The events available in the HTML5 API are incredibly limited and don't seem to include any selection-based events.
This makes it nigh-on impossible to use an HTML5 panel as an inspector of any kind without making an overly complex hybrid extension, which I want to avoid.
Is this correct? If so, it seems amazingly short-sighted. If there is a way to do this, can someone please show me the way?

Hi Samuel,
I didnt clearly understood  your problem. When you are selecting a particular row in a table you are executing a web service named Get Mail. Are you passing any input parameter(any selected row data)  while executing a web service. And when you get the response node where you have a attribute in the node getmail. Am I right.
If this is the case, then first check if the GetMail node is present or not by comparing it will null or checking its size. If the node is null then you will not get attribute as the element itself is null as nothing is retrieved in response. And if the node is not null then the element at 0th position is selected by default. you can retreieve the attribute by directly using the following code
if(wdContext.nodeGetMail() !=null)
    String profileId= wdContext.currentGetMailElement().getProfileID();
Check if this works for you.
Regards,
Ardhendu Sarkar

Similar Messages

  • Highlight the current word using the keyboard

    How do you highlight the current word using the keyboard
    eg lets say the cursor is after the letter d in AddComments would like to highlight the AddComments using the keyboard
                mediatorMap.mapView(AddComments, LoginFormMediator);

    Hi
    I dont think its possible. In Java you have something like Select Enclosing Element, which mimicks selecting a word (Alt-Shift-Up). However, FB does not have this feature, AFAIK.
    There is an Eclipse enhancement request for this behaviour, which should address this in some future release. Given the fact that its still not implemented in core Eclipse, and the lame speed at which FB develops, I wouldn't expect anything before 2012.
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=23080

  • Create Row Next to the current row using the enter or tab key

    hi
    May my needs is not correct with web development, so in some pages like Journal Voucher Entery, the user need to add about more than 200 row, if there is any soluation to handle such status please send to me. the user ask not to press add or create button each time.
    thanks

    Hi,
    Excel has no direct feature or option to achieve your goal. We'd better try the macro via VBA code to test. Please see the thread:
    http://excel.tips.net/T003923_Automatically_Moving_from_Cell_to_Cell_when_Entering_Data.html
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    If you have further question about code, I recommend you follow with thread which you posted in MSDN forum:
    http://social.technet.microsoft.com/Forums/en-US/6f5344cf-c1b5-485d-982a-eeec45294f9b/ms-excel-move-automatically-without-pressing-enter-or-tab?forum=exceldev
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Get Parent Community from Current Comm using the G6 PRC

    Can anyone provide or point me to a sample of code that gets the Parent Community ID from the current community using the G6 PRC? I can find samples of doing this in this discussion, but they appear to reference older versions of the EDK. Ideally, given the current community ID, I would like to walk backwards through the hierarchy until I find the root community (the community with no parent ID).
    Thanks in advance,Jeff

    Have you thought about using pt:standard.tree instead of rolling your own?
    Chris Bucchere | bdg | [email protected] | www.bdg-online.com

  • How to interpret the current day of the month

    I am a rookie in java and am trying to play with the Calendar class.
    The DATE static field of this class says it returns "Field number for get and set indicating the day of the month."
    So, Calendar.DATE has to return the current day of the month.
    Today is 7th of january. So, it should return 7. But, I am getting a value of 5.
    I am very much confused. I fell that my interpretation os wrong.
    Please help.............
    Thanks in advance.

    You must NOT confuse the value of the constant Calendar.DATE (5) and how you can use that constant to retrieve the current day of the month.
            Calendar cal = Calendar.getInstance(); // Gets the current date
            int dayOfMonth = cal.get(Calendar.DATE); // Gets he current day of the month from the current date
                                                     // (Using the Calendar.DATE constant as method parameter).
            System.out.println("Calendar.DATE = " + Calendar.DATE); // Prints the constant
            System.out.println("dayOfMonth = " + dayOfMonth); // Prints the current day of month

  • File Selection using the SDK

    Hello
    Is their a way that the SBO SDK UI exposes the file selection like the one use for add bit maps etc? I tried doing this by using writing code but cannot get this to display on the screen it is called from. The code is:
    Public Function Open_FileView()
       Dim OpenFileDialog1 As New OpenFileDialog
       OpenFileDialog1.InitialDirectory = "C:\"
       OpenFileDialog1.Filter = "txt files (.txt)|.txt|All Files (.)|."
       OpenFileDialog1.FilterIndex = 2
       OpenFileDialog1.RestoreDirectory = True
       If OpenFileDialog1.ShowDialog = DialogResult.OK Then
          Dim sr As New System.IO.StreamReader(OpenFileDialog1.FileName)
          MessageBox.Show(sr.ReadToEnd)
          sr.Close()
       End If
    End Function
    Thanks
    John

    Try something like this:
    System.Windows.Forms.Form winForm = new System.Windows.Forms.Form();
    winForm.TopMost = true;
    System.Windows.Forms.SaveFileDialog sfd = new System.Windows.Forms.SaveFileDialog();
    sfd.Filter = "XML (*.xml)|*.xml";
    if(sfd.ShowDialog(winForm)==System.Windows.Forms.DialogResult.OK) {
    //Do stuff
    This work for me (Save dialog, but openfiledialog works the same way)

  • Need help on how to specify the current select row in a View Object

    Hi,
    I have a ADF table on my page, when I was selecting the rows in this table, I want the set and get methods in the ViewRowImpl class to do some customized actions. I found out that each time regardless the row I select in the table, the viewrowimpl class will always return the data in the first row, I tried to use getCurrentRow in VO row impl. but still, gets the first row.
    Does anyone know how to get the selected row value in the View Object, or View Row Impl rather???
    Thanks!

    Hi,
    you can call a method exposed by the AM and pass teh rowKey of the selected row as an argument. When you configure the exposed AM method in the pageDef (creating a method binding) the argument is shown in a dialog from where you can use EL like #{bindings.iteratorName.currentRow.rowKey} to access the current selected row.
    Frank

  • How to get the specific name of the workset which is currently selected by the user in sap portal 7.0

    Dear Expert,
    I have one requirement like to read the selected workset name in portal by the current user.I have read two documents regarding how to retrieve the PCD contents (iViews, Pages, Worksets and Roles) and its properties like Created by, Changed by, Last changed by and others using PCD API.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6112ecb7-0a01-0010-ef90-941c70c9e401?overridelayout=true
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/508baf88-9335-2d10-efa6-c6ad61e5fc4b?quicklink=index&overridelayout=true
    But I am not able to understand how to get the specific name of the workset which is currently selected by the user.Can you please help me.
    I am using portal 7.0.
    Thanks & Regards,
    Patralekha

    Hi Expert,
    I found that we can use Interface INavigationHelperService to read Portal Role selected by user at runtime from http://scn.sap.com/thread/52194
    But this class is available in SAP NetWeaver 7.30 Enterprise Portal .
    But in SAP NetWeaver 7.0 Enterprise Portal that interface is not available.
    INavigationService is available there.
    But didn't get any proper discussion on this interface for the same requirement.
    Can you please help me.
    Thanks & Regards,
    Patralekha

  • (JS) Locating the current parentTextFrame from the selection?

    Hi Everyone,
    In my xml workflow, I will find the xml element (<fig></fig>) through xpath (using glue code.jsx) and placing the figures with calculated bounds.
    First I'm selecting the text(xml element) and placing first image & and moving the xml element perfectly, problem occurs while the placing the second
    image and caption. I cannot locate the current parentTextFrame, previous parentTextFrame is acting as the current parentTextFrame.
    Help me to acheive this....
    Here is my full code and see bottom of this message i have pointed out where i need help ......
    #include "D:/Program Files/Adobe/Adobe InDesign CS4/Scripts/XML Rules/glue code.jsx"
    //==================================================================
    //For placement of Figures
    //==================================================================
    myDoc = app.activeDocument;
    var myCount = 0;
    var myFolder = Folder.selectDialog("Select image folder");
    var figcapdis=prompt("Enter the space between Figure and Figure Caption (pts)", 8, "Figure Caption");
    var figcap=parseInt(figcapdis);
              var myRuleSet = new Array (new FindByAttribute("//fig"));
              with(myDoc){
              var elements = xmlElements;
              __processRuleSet(elements.item(0), myRuleSet);
                   if(myCount > 0){
                        myCount = 0;
                        }//end if
                   }//end with
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    function FindByAttribute(myXPath){
         this.name = "FindByAttribute";
         //XPath will match on every description in the XML structure.
         this.xpath = myXPath;
         this.apply = function(myElement, myRuleProcessor){
              var selectPoint = myElement.texts.item(0).select(SelectionOptions.replaceWith);         
              var tFs = app.selection[0].parentTextFrames[0];
              var myFrameBounds = tFs.geometricBounds;
              var myWidth = (myFrameBounds[3]-myFrameBounds[1]);
              var myHeight = (myFrameBounds[2]-myFrameBounds[0]);
              var mySelectionHOffset = myDoc.selection[0].lines[0].horizontalOffset;
              var mySelectionBaseline = myDoc.selection[0].lines[0].baseline;
              var myCurrentPage=tFs.parent;
              app.activeWindow.activePage = myCurrentPage;
              var figName = myElement.xmlElements.item('graphic').xmlAttributes.item('xlink:href').value;
              var figType = myElement.xmlElements.item('graphic').xmlAttributes.item('mime-subtype').value;
              var myFigPath = myFolder+"/"+figName+"."+figType;
              if (File(myFigPath).exists)
                   alert("Image exists");
                   var myFig = myCurrentPage.place(new File(myFigPath));
                   var myFigBounds = myFig[0].geometricBounds;
                   var figHeight = (myFigBounds[2]-myFigBounds[0]);
                   var figwidth = (myFigBounds[3]-myFigBounds[1]);
                   var myParent = myFig[0].parent;
                   var myFreeSpace = myHeight-mySelectionBaseline;
                   var myBounds = [myFigBounds[2]+figcap,0,myFigBounds[2]+25,myWidth];
                   var myCaptionFrame = myCurrentPage.textFrames.add({geometricBounds:myBounds});
                   myCaptionFrame.placeXML(myElement);
                   myCaptionFrame.fit(FitOptions.frameToContent);
                   var item1 = myParent;
                   var item2 = myCaptionFrame;
                   var myGroup = myCurrentPage.groups.add([item1, item2]);
                   myGroup.label = figName;
                   var myGroupBound = myGroup.geometricBounds;
                   var myGroupHeight = (myGroupBound[2]-myGroupBound[0]);
                        if(figHeight<myFreeSpace)
                             var movePoint = [mySelectionHOffset, mySelectionBaseline+12];
                             //var movePoint = [mySelectionBaseline+24,mySelectionHOffset, mySelectionBaseline+16+figHeight,mySelectionHOffset+figwidth];
                             myGroup.move(movePoint);
                             //myFig[0].geometricBounds = setFigBounds;
                             }//end of figHegiht  less than Free space
                        else
                             if (myCurrentPage == myDoc.pages[-1]){
                                  myDoc.pages.add();
                                  myCurrentPage = myDoc.pages.nextItem(myCurrentPage);
                             myCurrentPage = myDoc.pages.nextItem(myCurrentPage);
                             var nextTF = tFs.nextTextFrame;
                             var nextTFBounds = nextTF.geometricBounds;
                             myGroup.move(myCurrentPage, [nextTFBounds[1], nextTFBounds[0]]);
                             }//end of else
                   myGroup.textWrapPreferences.textWrapMode=TextWrapModes.BOUNDING_BOX_TEXT_WRAP;
                   myGroup.textWrapPreferences.textWrapOffset=[24, 6, 24, 6];
                   }//end of if -->file exists check
              else
                   alert(figName+"."+figType+" doest not exists");
              //var myFigGroup =
            //var myParaStyle = app.documents.item(0).paragraphStyles.item(newStyle);
            //myElement.texts.item(0).applyParagraphStyle(myParaStyle, true);
            myCount++;
            }//end of this.apply
         return true;
    I am having problem in the below line
    var tFs = app.selection[0].parentTextFrames[0];
    I want the parent text frame of the current selection, but it takes the first selection's parent text Frame.
    Note: The text frames are in continuous thread...
    Looking forward your replies....    
    Message was edited by: Green4ever

    Hi All,
    I am having problem in the below line
    var tFs = app.selection[0].parentTextFrames[0];
    I want the parent text frame of the current selection, but it takes the first selection's parent text Frame.
    Note: The text frames are in continuous thread...
    Looking forward your replies....    
    Is there any other way to locate the current parent text frame.
    Thanks
    Green4ever

  • JTree: How to get the currently selected node

    How do I get the currently selected node in JTree?
    getLastSelectedPathComponent() this method always return the last selected node and not the current one.
    Thanks in advance
    Sachin

    Use
    TreePath selectedPath = tree.getSelectionPath()If your tree allows multiple selections, use
    TreePath [] selectedPaths = tree.getSelectionPaths() this will return an array of all selected tree paths.
    Once you get the tree path, call the treePath.getLastPathComponent(). this should tell you the currently selected node.
    Hope this helps
    Sai Pullabhotla

  • Re: Getting the current selected Row & column in adf table

    Hi,
    Our requirement is we have to retrieve both the current row and column in adf table.
    We can retrieve the current row in the backing bean like
    ViewObject view = getViewObject();
    view.getCurrentRow();
    Is it possible to retrieve selected column id or column header text as we are getting for row?
    please give some sample.
    Thanks,
    Vijay.
    Edited by: Vijayakumar Palanisamy on Jun 23, 2011 2:23 AM

    Hi John
    My exact requirement,
    1.     We have collection of records in adf table
    2.     Each cell in the row has commandImageLink (Like adding approver, edit approver, delete etc)
    Currently it’s working fine for me in the commandImageLink listener, but the problem is table is refreshed 2 time,
    while selecting a record and commandImageLink is clicked, I have to avoid 2 times refreshing,
    If it’s possible to identify a particular cell in the row selection, I can avoid the image link listener.
    we are using Jdeveloper11.1.1.4.0
    Please suggest.
    Thanks,
    Vijay

  • Revealing the current selection.

    One thing thats always annoyed me is how the current selection disappears when you change the images viewed in the Browser window.
    As an example, you are in the Photos view of the library. All your images are displayed. You then create a filter which narrows down the images displayed to say 5. You select one of those images then remove the filter. All you images are displayed again but the image you had selected is buried. It still has the selection but there is no easy way to find it.
    This service could also be used to return to the selection if you scroll away from it.
    This workflow is installed in Apertures Service menu as showSelection. Any time you invoke it it will reveal the current selection.
    To install it, download it. Uncompress it and move the showSelection.workflow to your Home/Library/Services folder. (Home stands for your home folder on you Mac).
    Once installed it should show up in Apertures Services menu.
    Download [showSelection here|http://cms.crystal-objects.com/blogs/frank/revealselection_aperture_workflowservice021011]
    Message was edited by: Frank Caggiano
    Good idea to add the script!
    .

    Frank Caggiano wrote:
    Sorry won't work for the projects. The 'selection' around a project isn't the same selection for an image. However it is possible to have a project 'reveal' itself so if you described what it is your looking for project wise it may be possible to come up with something.
    First I want to confirm that:
    - the arrow keys do not change the selected Project in Project view. If your mouse cursor is over a project, the arrow keys change the image shown as the Project thumbnail. This is by design -- the arrow keys give you keyboard control of "skimming" the Project. (NB: This behavior is doubly buggy -- sometimes it acts on the currently selected Project, sometimes on the hovered-over Project, and sometimes on another Project neither selected nor hovered over, and sometimes you skim full thumbnails, and sometimes you skim thumbnails cropped as they would be were the "current" image selected as the key photo.)
    - there is no way I can find to change the selection in Projects view with the keyboard, other than "Edit→Select All" and "Edit→Deselect All".
    DLS has brought up a couple of instances of "losing" the selection (not shown on screen) or having the selection change unexpectedly (collapse Stacks w. a non-pick selected). The one I mentioned is exactly analogous (in Project view) to the situation you addressed (in Browser view): filter Projects view using the search field (it searches the Project name and Project description fields), select a Project, and then clear the search field. The selected Project remains selected -- but if it is not shown on your screen, there is no way to find it other than scrolling the entire roll/list/table/sheet of Projects until you notice the one with the selection highlight. As mentioned, the arrow-key trick doesn't work in Projects view. The functionality I'd like to see added to Aperture is the ability to automatically scroll to the currently selected Project in Project view. (And apologies in advance if this functionality already exists.)

  • Does the current WebKit version in Air SDK 3.5 support Uint8Array or any bufferArray stuffs?

    Does the current WebKit version in Air SDK 3.5 support Uint8Array or any bufferArray stuffs?  If not, is there an alternative or workaround solution so I can reuse some javascript routines that requires bufferArray like Uint8Array...?   Thanks in advance.

    You needed to use SDK 5.1 or later. AIR uses 6.0 or 6.1 now, so Retina is ok without any special tricks.

  • A filter cannot be applied to the currently selected field. Select a different field

    Hi,
    I am using an InfoPath form to submit the data. In my form I am using one dropdown and one textbox in a repeating table, and the data is fetching from the SharePoint list.
    Scenario: In my SharePoint list there is a column of Company name and other is of Focal Point name. In dropdown contains the company name column.
    I want the functionality that when i select the Company name the associated focal point name should appear in the textbox.
    To achieve this I am using the filter for dropdown but it is showing me error "A filter cannot be applied to the currently selected field. Select a different field."
    Can anyone please tell me how can I do this.
    Thanks in Advanced,

    Hi,
    Please update me any solution for this as I am not able to resolve this.....
    Thanks,

  • Get the currently selected entry point

    Hello,
    I developed an content iview, where i have to find out which entry point is currently selected in the navigation.
    Anyone an idea how to do this?
    Thanks and Regards
    Robert

    Hi Robert,
    Using the breadcrumb you can get the navigation of the current selection...
    Try out this blog
    EFP: Working with the New Taglibs - Part 2
    -Aarthi

Maybe you are looking for

  • Problem in printing Work Request Notification = IW29

    Hi All, PM module. When i try to print notification, t-code = IW29, the ' Work Request Details' , the " Subject Long Text " is missing, instead of which i get some default data getting Populated automatically. Please let me know if this is the printe

  • Nokia E66 three finger reset

    hey, i just bought a used nokia e66 from someone. my phone service provider is a different provider than this phone is programmed to work with. ive tried doing the 3 finger deep reset, and even the *# whatever numbers it was reset. and the phone isnt

  • Airport Utility telling me to use new version to set up Time Capsule

    I just purchased a 2 TB Time Capsule. I started to set it up with Airport Utility 5.4.2, but AU tells me that I need to use a newer version of AU to set up this Time Capsule. Any help?

  • BUSINESS LAYER VIEW DISAPPEAR WHEN CREATED

    I've created a new Business Layer View but it doesn't exist

  • Lens Profiles - Search Online greyed out

    Hello, I was looking for more lens profiles within Photoshop CS5 and I noticed that within the "Lens Correction" window under "Lens Profiles" the "Search Online" button is greyed out.  I am looking for more Canon lenses. 1. Why would this option be g