Programatically creating Hyperlinks  (c2ea2)

Hi,
I'm trying to add a set of links to a Breadcrumb on my jsf page, but I want the links that appear in the Breadcrumb to be dynamically generated, based on the user's navigation.
The documentation in Creator says that the links in the breadcrumb can be added by an array of Hyperlink objects. I can create the Hyperlink array and assign it to the Breadcrumb just fine, but I'm having problems trying to set the action of the Hyperlink.
Ideally, each link should return a differnet value, so the content of the page can change, but I'm not sure how to get this to work.
So far, I have something like this:
        Hyperlink[] crumbsTest = new Hyperlink[5];
        for (int i = 0; i < 5; i++) {
            Hyperlink hyperTmp = new Hyperlink();
            hyperTmp.setText("Link " + i);
            hyperTmp.setToolTip("Link " + i + " tooltip");
            //create the methodbind
            FacesContext context = FacesContext.getCurrentInstance();
            MethodBinding mb = (MethodBinding) context.getApplication().createMethodBinding("#{Home.breadcrumbLinkTest_action}", null);
            hyperTmp.setAction(mb);
            crumbsTest[i] = hyperTmp;
        folderCrumbs.setPages(crumbsTest);Home is the backing bean of the page that this breadcrumb is on. When I run the application, and click on the links, nothing happens. The method I named there to be called will display a message in a static text field on the form.
Any help on getting this working will be greatly appreciated.
David

A workaround has been found for this issue.
The workaround is to replace the setPages call with folderCrumbs.getChildren().add(hyperTmp) to add the hyperlink as a child of BreadCrumbs. This will make the action handler to get invoked.
Hyperlink[] crumbsTest = new Hyperlink[5];
        for (int i = 0; i < 5; i++) {
            Hyperlink hyperTmp = new Hyperlink();
            hyperTmp.setText("Link " + i);
            hyperTmp.setToolTip("Link " + i + " tooltip");
            // Note, action does not work in Cerator 2
            //create the methodbind
            MethodBinding mb = (MethodBinding) this.getApplication().createMethodBinding("#{Page1.breadcrumbLinkTest_action}", null);
            hyperTmp.setAction(mb);
            crumbsTest[i] = hyperTmp;
            folderCrumbs.getChildren().add(hyperTmp);
        }Lark

Similar Messages

  • Report navigation after creating hyperlink

    Hi,
    I am using Webi rich clinet XI R3.1. I have one main report with six dashboards and associated detailed reports. I created hyperlink for each of the dashboard and linked to detailed report in infoview.
    If i need to see main report i've to close this detailed report.Now how can i make the detailed report open in same window and navigate forward and backward to the main report instead of closing.
    I would appreciate if some one could provide any work around available if possible atleast.
    Thanks,
    Eswar

    Hi
    Create two links one Back and one Next in each report.
    Drag two free standing cells in the report and use opendocument syntax to create the links.
    The thread Re: Hyperlink Back functionality may give an idea.
    Regards

  • How to create hyperlinked text in F1 help of a particular Data Element.

    Dear Guru
    I have encountered an issuse regarding to create hyperlinked text in F1 help of a particular Data Element.
    For Example what i am trying to do is ---
    If you open a particular data element say "ATNAM" in se11 you will found the below documentation available for ATNAM -->>
    DE ATNAM
    Text
    Characteristic Name
    Definition
    Name that uniquely identifies a *characteristic*.
    >> The "characteristics" comes in hyperlinked bluecolor and if we press this it linked to below --- >>
    Definition: characteristic
    Classification (CA-CL)
    Property for describing and distinguishing between objects, such as length, color, or weight.
    Profitability Analysis (CO-PA)
    I am able to make 1st part of the documentation using SE61.
    But I am not able to make Hyperlinked part of that documentaion .
    please show me some way to develop this
    Thanks & regards
    Saifur Rahaman

    HI,
    you can give the hyperlink in the documentation by going to the path below
    MENUBAR ----> INSERT -----> TEXT -----> HYPERTEXT.
    this will solve the issue
    have a good day
    regards
    sarves

  • How to create hyperlinks in Acrobat 9 Pro?

    Hi everyone,
    Is there a way to create hyperlinks from within Acrobat 9 Pro? If so, can you let me know how? I am having a hard time finding out how to do so.
    Thank you in advance for your help:)
    Christine

    I did this from the advanced menu to make all hyperlinks work. All I got were boxes around my links that are not clikcable to the web page.
    Now I cannot undo this.

  • How to automatically create hyperlink destinations based on numbered list?

    I am very new to InDesign and am creating a template for an academic journal. Each article contains a list of references at the end and the references are cited in the main text (like what you see in Wikipedia if you are not familiar with scientfic journal articles). In exported HTML, the citation in the main text should be hyperlinked to the coressponding reference in the reference list. I have two questions:
    1) It is possible to ask paragraphy style to assign each numbered item a hyperlink destination? If this is possible, I can then manually inserted hyperlinks in the main text.
    2) one step further, is there any way (e.g. script) which can then insert hyperlink to those destinations based on pattern match? For example, in main text, the citation to reference #1 appear in the text as [1] which should be hyperlinked to reference #1.
    One more question, is there anyone who knows how academic journals handle the flow from InDesign to html? Certainly, the exported html cannot go directly online without further editing.
    Thank you.

    Hi Eric,
    I posted the script here. But it should be adjusted to your particular document. (Anyone with basic scripting knowledge can do this). I am sure it won’t work as it is. I assume that “comments” and “references” are in two different stories.
    Can I have the scripts from you (for a fee or free)?
    I don't sell my scripts: they're free.
    Can the scripts handle the pattens like these [3], [1-5], [3,4], [6, 8, 11-13]?
    This script can't, but another handles both single page numbers and page ranges like so:
    I can post it as well.
    Now I’d like to make one thing clear:
    I made a set of scripts for creating hyperlinks in InDesign documents for further exporting them to ePub/HTML. I can’t make a script that would work for everyone because all books are very different. I simply adjusted scripts for every book I had to work with (mainly changing GREP expressions and names of styles) and I have numerous variations of scripts. I can post them if someone is interested but you should be aware that they have to be reworked.

  • How to create hyperlink using form

    if a user click on button then
    oulook express open for sending mail but i want to create hyperlink on it automatically.
    actually when user click then a word file created on server i want to hyperlink this file the file name is my form serial_no

    when i click on button outlook express is opening know and i can send text on body through forms
    i need it to send hyperlink on outlook express so i can open document through this link which is on outlook express file

  • My customer wants to create hyperlinks in the editor - surely this is possible?  And, if so, how?

    My customer simply wants to create hyperlinks when adding content to her site; this doesn't seem possible within the Muse editing interface.  It must be, surely?  That's the most basic thing to do with a web page. 

    At current stage In browser editing does not includes hyperlinks , but that’s definitely a request we hear often. Unfortunately we can’t comment on what features are coming to Adobe Muse, but please know the team is listening!
    Thanks,
    Sanjit

  • Problem in create Hyperlink

    Hi All,
    I create hyperlink by finding http and www in my active document.                //Works well
    But the problem is, if the url or websites contents coming twice or above then I found error   //not able to create hyperlink source with the same name
    i.e., www.gmail.com (comes 2 or more time in the document, then the below code is not working fine)
    var myDoc = app.activeDocument;
    app.findGrepPreferences = app.changeGrepPreferences = null;
    //Find http and www
    app.findGrepPreferences.findWhat = "(?i)(http|www)\\S+[\\l\\u|\\d]"
    var myFound1 = myDoc.findGrep();
    count = 0
    for(k=0; k<myFound1.length; k++)
        var myFind = myFound1[k];
        var myHyperlinkSource = app.activeDocument.hyperlinkTextSources.add(myFind)
        var myHyperlinkURLDestination = app.activeDocument.hyperlinkURLDestinations.add(myFind.contents)
        var myHyperlink = app.activeDocument.hyperlinks.add(myHyperlinkSource, myHyperlinkURLDestination, {name: myFind.contents})
    //    var myHyperlink = app.activeDocument.hyperlinks.add(myHyperlinkSource, myHyperlinkURLDestination, {name: myFind.contents+count++})
    Please find the screenshot for your more references.
    Please help to find the solution.
    Thanks in advance
    Beginner_X

    I solved this problem by adding an incrementing number in round brackets if a hyperlink name is already taken.
    Another (simpler) solution is to put "add hyperlink" line into try-catch block, but in this case you'll have a default name if the error occurs.
    Here's the function:
    function MakeHyperlink(text, url) {
        if (url.match(/https?:\/\//) == null) {
            url = "http://" + url;
        url = url.replace(/\.$/, "");
        var name = text.contents;
        var oriName = name;
        if (doc.hyperlinks.itemByName(name) != null) {
            var increment = 1;
            while (doc.hyperlinks.itemByName(name) != null) {
                name = oriName + " (" + increment++ + ")";
        try {
            var dest = doc.hyperlinkURLDestinations.itemByName(name);
            if (!dest.isValid) {
                dest = doc.hyperlinkURLDestinations.add(url , {hidden: true});
            var source = doc.hyperlinkTextSources.add(text);
            var hyperlink = doc.hyperlinks.add(source, dest, {highlight: HyperlinkAppearanceHighlight.NONE, visible: false});
            try {
                hyperlink.name = name;
            catch(err) {
                //$.writeln(err.message + ", line: " + err.line);
            if (hyperlink.isValid) {
                hypCount++;
                if (set.tempColors) source.sourceText.fillColor = swatchOK;
                if (set.charStyle) source.appliedCharacterStyle = charStyle;
        catch(err) {
            errorsCount++;
            var swatchProblem = MakeSwatch("===== PROBLEM =====", {
                model : ColorModel.PROCESS,
                space : ColorSpace.RGB,
                colorValue : [255, 0, 0]
            text.fillColor = swatchProblem;
            //$.writeln("Error message: " + err.message + ", Line: " + err.line + ", URL: " + url);
            arr.push("Error message: " + err.message + ", Line: " + err.line + ", URL: " + url);       

  • Creating hyperlinks to pdf docs on a CD. Anyone experienced in doing this?

    Need to create hyperlinks to pdf documents in a CD. The pdf docs were created using an older version of Adobe and I am trying to follow a YOuTube instructing me how to create hyperlinks in the Table of Contents on the CD. The instructions on the YoTube do not match what is in the document for creating a hyperlink. Do I need to send and save all documents as NEW adobe pdf.s??? Thanks!!!

    [discussion moved to Creating, Editing & Exporting PDFs forum]

  • Programatically create objects in library which can be imported to stage

    I need to create an object in code which can then be imported to the stage. 
    Specifically it's a circle with an ellipse cut out of it.  The size and position of the ellipse masked out need to be parameterized by sliders, and the size of the circle as a whole is also a parameter which might be dragged out on the stage.
    Does anyone have an example of how to programatically create an object in action script which can be imported to the library which can take parameters (or rather expose some methods) which can be wired to other things in the project like a knob or slider?
    Thanks in advance!
    Michael Grant

    you can use the function below.  call it passing parameters for the circle's absolute x, y, radius and color and passing the ellipses (relative to the circle) x,y,radius x, radius y.  a sprite is returned with the graphics, i think, you want:
    ////////////  sample function call: ///////////////////////////////////////////////
    var c:Sprite = circleMinusEllipse(100,200,50,0xaa0000,-40,-20,40,20);
    addChild(c);
    //////////// nothing below needs to be changed ////////////////////////
    function circleMinusEllipse(cX:Number,cY:Number,r:Number,col:Number,eX:Number,eY:Number,rX:Number, rY:Number):Sprite{
        var c:Sprite = new Sprite();
        c.x = cX;
        c.y = cY;
        with(c.graphics){
            beginFill(col);
            drawCircle(0,0,r);
            drawEllipse(eX,eY,2*rX,2*rY);
            endFill();
        return c;

  • Garbled text when creating hyperlinks

    I have a user who is creating hyperlinks in the Table of Contents of a 500 page PDF to pages within the PDF. After 10-15 hyperlinks, she gets strange characters and garbled text on some of the pages. If she saves and closes the document and reopens, she can go back to working but it will reoccur soon again. She is using Acrobat 9 Professional on Windows 7 Enterprise. She has the latest updates for Acrobat. Any thoughts?
    thanks

    Most of the document was converted from Microsoft Excel 2007 documents. The Table of Contents was converted from Microsoft Word 2007 document.

  • Already create hyperlink in MSWord file. same link how can i import in indesign?

    Dear All,
    Already create hyperlink in MSWord file. same link how can i import in indesign?

    I'm not having an issue as shown below:

  • Creating hyperlinks in form region

    How can I create hyperlinks in the form region.when clicked on hyperlink it should take to a different page.Thanks in advance.

    Jari,Thanks for your help.
    The form is not a tabular one. For exapmle I have couple of items say username and password. Below the username I would like to place a hyperlink.Similerly I would like to place another hyperlink below the password. how can I do that?
    I tried to create a text below the username filed using the display item.How can I hyperlink the text so that it can take to another page?

  • How to create hyperlink for the messages in oneorder documents

    Hi ,
    I want to create hyperlink for the error messages that are raised for a payment request, so that i can navigate to that particular object ID mentioned in the message.

    Hi Paparao,
    But we can find the same functionality for trade promotions overlap, the messages raised when two or more tradepromotions overlap, provide us with hyperlink through which we can navigate to that particular object id.
    Regards
    Tejarshi
    Edited by: tejarshi vadduri on Apr 17, 2009 6:55 AM

  • Robohelp 11 - Creating hyperlinks within a topic

    Hi community,
    Just a quick question, tried to figure it out but can't seem to see how.
    I'd like to create hyperlinks in a specific topic that the user will be able to click on and it will jump the user to a specific place in the same topic (Ex: in section 2.1, in the middle of some explanation, refer to the heading of section 2.2).
    I looked it up, but can only seem to be able to configure hyperlinks to other topics or something outside of RoboHelp.
    Could someone help me with that ?
    Tks in advance

    You first need to create a bookmark in the topic you want to jump to. Place your text cursor at the jump location (don't select any text) and select Insert > Bookmark. Enter a name without spaces. On the topic you want to jump from, create a hyperlink like you are used to. Instead of choosing the topic, choose the topic with the text #bookmarkname attached. (Bookmarkname will be the text you inserted on creating a bookmark.)
    Kind regards,
    Willam

Maybe you are looking for

  • Customer service and knowledge

    I called customer service to inquire about a cable that may connect a card reader or flash drive and was told there are no cables for sale at Apple for a mini ipad 2.  I'm pretty sure there are

  • Covers won't display on Ipod

    The covers that Itunes downloaded won't display on my Ipod.. The covers that added manually will display.. There was a button which I should check to sync the cover.. But I cant find it in the new Itunes.. With the older Itunes I had all the covers o

  • Whr to find modulepool program of aTransaction

    Hi all, I find main program for a transaction code as report in some entries of TSTC table but when i run a transaction i find the program as modulepool program from system status option. In which table can i find the respective modulepool program of

  • Display Currency tab during General ledger view in T-Code F-53

    Hi When Iam making a payment in foreign currency using T-Code F-53, then on simulation of the document in the General Ledger View (Ctr+F12), Iam trying to press the tab 'Currency' (F9), however, it shows blank, there is no currency visible in it.  Ho

  • TS2537 Mac OS X v10.7.3 latest version. Can't use Mail

    I'm having the same problem with Mail but with the latest Lion version (OS X v.10.7.3). Can't quit Mail, can't read messages, can't shut down. I just moved to an Apple computer with the hope to live in the "promise land" of no more crashes. Never hap