How to Conditionally Render Command link within af:forEach

Hi,
We have a requirement to conditionally Display/Hide CommandLink item in af:forEach Loop.And this customization is on the Fusion Compensation applications
<af:forEach items="#{bindings.RegionalAreaPVO.rangeSet}" var="parent">
<af:spacer height="10" id="s1"/>
<af:commandLink inlineStyle="font-weight:bold;" text="#{parent.ItemName}" partialSubmit="true" actionListener="#{backingBeanScope.RegionalAreaBean.launchTaskflow}" id="cl1" rendered="#{backingBeanScope.XXWFCRegionalAreaBean.modelEligibleflag eq true}">
<af:setActionListener from="#{parent.Code}" to="#{parentNode}"/>
</af:commandLink>
</af:forEach>
I have added a Cutom Managed Bean Class and Returning boolean value to Control Render property which is working. But now i want to add business Logic based on 'parent.ItemName' or 'parentNode' Values in the bean method to return proper Boolean value.
But i am unable to get the Current Iteration values in the bean method.
I am using below EL expressions to get the values. But no luck.
String nameel = (String)ADFUtil.evaluateEL("#{bindings.parent.ItemName}");
String codeel = (String)ADFUtil.evaluateEL("#{parent.Code}");
String nodeEl = (String)ADFUtil.evaluateEL("#{parentNode}");
Also, i have tried getting the Row object like below but i am getting the First row details always. My intention is to get Current row values and use them for Business logic.
ViewRowImpl row =
(ViewRowImpl)ADFUtil.evaluateEL("#{bindings." + VoName +
"Iterator.currentRow}");
String code = (String)row.getAttribute("Code");
Third option i have tried is to add a dummy Outputtext and have assigned #parent.Code as Value. Idea is to find Component of OutPut text in managed Bean and get the value of it. If Value is say "Model" i want to add more Logic and return true/false accordingly. In this also, i am getting all occurences of Output text in Managed bean and i a unable to identify Current Iterator Index.
Any help is highly appreciated on how can i render Command link Conditionally based on forEach Loop values and Index.
Thanks
Kaja

I have used Condition expression in Render Property to resolve this.

Similar Messages

  • How do I get a link within a PDF to open a new tab in a web browser?

    How do I get a link within a PDF to open a new tab in a web browser? Previous forums (for earlier versions of InDesign and Acrobat) mention something about JavaScript, but I'm using InDesign CC and Adobe Acrobat Pro CC
    Thanks.

    When you're looking at the PDF that's on your site, is it opened in the browser or directly i Acrobat/Reader? If in the borwser, do you know if it's being viewed in the browser's default PDF viewer or Acrobat/Reader? It probably won't work in non-Adobe PDF viewers.
    Are you saying that when you click the link that two new browser tabs are opened with the same URL, instead of just one as you'd expect, or something else?

  • How to Conditionally Rende the Images in af:treeTable...

    Hi,
    I need to conditionally render the Images in af:treeTable.
    First let me explain my requirement clearly...
    I need to display Dept --> Emp in a tree View format... Some thing like
    Dallas
    --> Smith
    --> Scott
    --> Tiger
    New York
    --> XXXX
    --> YYYY
    --> ZZZZz
    Along with these i need to display Add and Delete Command links in second column.
    But Delete Operation should not available for Departments...
    So how to conditionally stop delete image from rendering for departments...
    Waiting for your response...
    Thanks in Advance...

    You don't need disabled though rendered property. Sorry.
    You'll find it in property inspector for image component. There you will enter the binding to the method that you should write in backing bean (method name must start with "get"). You can also use binding editor for entering correct binding string while working in property inspector.
    Method in backing bean, for example:
    public Boolean getRenderedImage(){  
    Object obj = FacesContext.getCurrentInstance().getApplication().
    createValueBinding("#{row.row.currentRow.dataProvider}").
    getValue(FacesContext.getCurrentInstance());
    /* next ushould cast this object to whatever it is and se if it should be rendered or not and return true or false. To see what is the cast object you could put break point after getting obj and see Class name.
    One thing. You should see what is the binding name for row elements in your table. By default it is "row" if you did drag&drop. If it is "row1" you should change the string above to: "#{row1.row.currentRow.dataProvider}".

  • How do you open a link within a PDF in a new window?

    I created a PDF that will be viewed in a browser. Is there a way to set the links within the PDF to open in a new window?

    Did you get an answer to this?   I am having the exact same issue.  My source html document has a link which specifies a target of _blank, but when I generate a pdf from that html doc, view the PDF in my browswer, and click the link, it overlays the PDF instead of opening a new window with the linked URL.  I've seen this posted as an issue a number of times, but have yet to see a solution.

  • I am running 3.6.12 and my new tab and/or window actions are the same. How can i open new links within apps into new tabs?

    I used to be able to control new tab actions such as opening on top of current tab or in a new tab. This is frustrating as i always cover up where I am or was! How can this be corrected so I can open a new tab in a new tab? I am enrolled in an on-line class and can not open tabs in a new tab as needed as it always places the new tab on top of teh current or old tab.
    Funny as i use to complain about opening in new windows!
    I am missing how to control new tabs and new window actions?
    THanks,
    William

    Do you have any tab related extensions (Tools > Add-ons > Extensions) that allow to divert links?<br />
    See [[Troubleshooting extensions and themes]]
    Did you ever made changes to the prefs browser.link.open_newwindow and browser.link.open_newwindow.restriction yourself on the about:config page?
    See:
    * http://kb.mozillazine.org/browser.link.open_newwindow
    * http://kb.mozillazine.org/browser.link.open_newwindow.restriction
    See also http://kb.mozillazine.org/about%3Aconfig

  • HT2506 How can I insert a link within a PDF document with preview.app in Mavericks

    Would like to create a selfmade table of contents that links to the right place in the pdf document
    Thanks for the support!

    Preview is not really a PDF editor. You can do basic stuff such as add annotations, insert pages, but you cannot add hyperlinks.

  • How do I create navigation links within a page?

    Hi,
    I would like to create navigation links to go directly to a certain topic on the page, similar to the one I found on Robohelp's help (screenshot).
    Thank you for your help,

    Hello etvaaa,
    Welcome to Robohelp Forums.
    You can use the Hyperlink Feature and link a bookmark, please follow these instructions :
    1) Place your cursor at the Destination Point and insert a Bookmark :
    2) Give a name to that Bookmark :
    3) Select that Text on which the user will click (Right Click -> Insert Hyperlink)
    4) Select that Bookmark which you inserted a while ago
    Hope it helps !!
    Thanks,
    Vikram

  • How to conditionally render LOV/Output text?

    We have following requirement:
    From task_flow1, user can navigate to task_flow2 on a button click.
    If product_id parameter is not passed by task_flow1, in task_flow2 page we want to show a LOV allowing the user to enter the product.
    If product_id parameter is passed, we want to show product as output text.
    Can we do this using EL in rendered properties for LOV/output text attributes?
    TIA

    Thanks Frank/Raghu!
    Frank, how to pass parameter to memory scope of the target task flow? where exactly should I check if the parameter exists? In EL for rendered property of LOV/Output text?
    Raghu, I could not find "Dynamic user interface" in jdev guide. Can you please point me to specific section.
    Thanks again!

  • HTML component wont open link within component

    I have a HTML component in my AIR app. When the page opens a youtube video feed that has copyright restrictions, a link to view the content on the youtube site itself, like the one shown here: http://www.youtube.com/v/WwoM5fLITfk?f=videos&app=youtube_gdata. When you try clicking this link nothing happens?
    Can anyone tell me how i can open this link within my html component?
    Many thanks
    Adam
    Flexchief

    Hi,
    I have this problem as well.
    I posted a question here few days before you and still haven't got an answer for it.
    My assumption is this issue started at the last SDK update. I don't see it if I work with flex 3.5.
    Hope someone will give full answer to it soon... I am stock with my project because of it.
    Avier

  • How to get Current Row values in Af:ForEach

    Hi,
    We have a requirement to conditionally Display/Hide CommandLink item in af:forEach Loop.
    <af:forEach items="#{bindings.RegionalAreaPVO.rangeSet}" var="parent">
    <af:spacer height="10" id="s1"/>
    <af:commandLink inlineStyle="font-weight:bold;" text="#{parent.ItemName}" partialSubmit="true" actionListener="#{backingBeanScope.RegionalAreaBean.launchTaskflow}" id="cl1" rendered="*#{backingBeanScope.XXWFCRegionalAreaBean.modelEligibleflag eq true}*">
    <af:setActionListener from="#{parent.Code}" to="#{parentNode}"/>
    </af:commandLink>
    </af:forEach>
    I have added a Cutom Managed Bean Class and Returning boolean value to Control Render property which is working. But now i want to add business Logic based on 'parent.ItemName' or 'parentNode' Values in the bean method to return proper Boolean value.
    But i am unable to get the Current Iteration values in the bean method.
    I am using below EL expressions to get the values. But no luck.
    String nameel = (String)ADFUtil.evaluateEL("#{bindings.parent.ItemName}");
    String codeel = (String)ADFUtil.evaluateEL("#{parent.Code}");
    String nodeEl = (String)ADFUtil.evaluateEL("#{parentNode}");
    Also, i have tried getting the Row object like below but i am getting the First row details always. My intention is to get Current row values and use them for Business logic.
    ViewRowImpl row =
    (ViewRowImpl)ADFUtil.evaluateEL("#{bindings." + VoName +
    "Iterator.currentRow}");
    String code = (String)row.getAttribute("Code");
    Any help is highly appreciated.
    Thanks
    Kaja

    Hi Sascha,
    I have tried that. But in my case the functional logic behind the Rendering is based on more complex logic. Hence i am trying to add a method to return a boolean in Render property of the Link.
    But the real problem for me is, in the Managed bean method i am not finding a way to get the Current Iteration index. If i can get the Current iteration index, i can get the Corresponding Component ID of Command link (In the forEach Loop Component Id's are getting generated Dynamically based on Iteration Index), i can use that and add additional logic and derive true/false to return.
    Any inputs?
    Thanks
    Kaja

  • How can I render an active link (yrl) within a UIX/XML page

    How can I render an active link (url) within a UIX/XML page.
    How can I get <jbo:ShowValue> to work in UIX/XML, or is there another way?
    Bill G...

    It may seem strange, but the <contents> of <rawText> aren't actually
    raw - it's only the "text" attribute that's raw. (It seems strange because
    it is. Ah well.) This is different from UIX JSP.
    So, try something like the following:
    <bc4j:attrScope name="Notes">
    <contents>
    <rawText text="&lt;a href=&quot;"/>
    <rawText>
    <boundAttribute name="text">
    <bc4j:attrProperty name="value"/>
    </boundAttribute>
    </rawText text="&quot;&gt;"/>
    Some text in the link.
    <rawText text="&lt;/a&gt;"/>
    </contents>
    <bc4j:attrScope>
    Thankfully, this will be much simpler in 9.0.3, when the following
    will work:
    <link text="Whatever you want">
    <boundAttribute name="destination">
    <bc4j:attrValue name="Notes"/>
    </boundAttribute>
    </link>

  • Best approach to using command link from within a custom component

    I have created a navigation component "Menu" , used as follows:
    <custom:menu />The contents of menu are stored in an xml file and the Menu component delegates the rendering to a custom renderer, which basicaly writes out html links. (Actually, the component does a lot more, but I'm simplifying to get to the point.).
    Sometimes, I need to render a command link instead of a regular html link. I don't want to re-invent the wheel here, so I want to delegate this to the standard command link components.
    Approach 1: create child components within the Menu component constructor, e.g.
    HtmlCommandLink c = new HtmlCommandLink();
              MethodExpression e = FacesContext.getCurrentInstance().getApplication().getExpressionFactory().
                   createMethodExpression(FacesContext.getCurrentInstance().getELContext(),
                   "#{registrationEditor.enterSubmission}",
                   String.class,
                   new Class[] { });
              c.setActionExpression(e);
              c.setValue("TestLink");
              c.setTransient(true);
              getChildren().add(c);Approach 2: delegate to the CommandLinkRenderer within my custom renderer, e.g.CommandLinkRenderer delegate = new CommandLinkRenderer();
                        HtmlCommandLink link = new HtmlCommandLink();
                        ExpressionFactory elFactory =
                             FacesContext.getCurrentInstance().getApplication().getExpressionFactory();
                        MethodExpression actionExpression =
                             elFactory.createMethodExpression(context.getELContext(), c.getExpression(), String.class, new Class[] {});
                        link.setActionExpression(actionExpression);
                        link.setParent(component.getParent());
                        link.setValue(c.getLabel());
                        delegate.encodeBegin(context, link);
                        delegate.encodeChildren(context, link);
                        delegate.encodeEnd(context, link);Is either of these a respectable approach - they feel a little hackish. If so, which do you prefer. If not, what do you recommend?
    Thanks
    Richard

    I think either is a fine approach and not at all hackish. I prefer the second, although I couldn't tell you why (just a gut feeling). That said, I haven't tried either so there may be hidden problems. My main concern would be what happens when the request is submitted from the page, that the Restore View phase is done correctly so that the proper event is fired.

  • In FF 34.0.5 I use to be able to click on a link within an e-mail and the link would open in a new tab; it now opens in the same tab; how can i change it back?

    I'm using FF 34.0.5 (I like it). I use to be able to right click on a link, within an e-mail, and the link would open in a new tab. Now when I click on the link it opens in the same tab replacing my e-mail.
    Example - a friend sends me an e-mail containing a link to a web site he thinks I'd like. I click on the link and go to the web site and then go back to the e-mail tab and reply to him. Now, when clicking that link, my e-mail disappears and is replaced by the new site.
    How can I fix this? When this happened once before I was told to change the 'value' for a specific 'preference name' through the about:config page.
    Can anyone help jog my memory?
    Thanks!

    Is this about clicking a link in an external program?
    You can check this pref on the about:config page for external links.
    * browser.link.open_newwindow.override.external (-1)
    If this pref has the default value -1 then browser.link.open_newwindow is used.
    * http://kb.mozillazine.org/browser.link.open_newwindow
    *1: current tab; 2:new window; 3:new tab;
    You can open the <b>about:config</b> page via the location/address bar.
    You can accept the warning and click "I'll be careful" to continue.
    *http://kb.mozillazine.org/about:config

  • How can I add a link to an item within a workflow email - which will always find the item - even if it's status has changed?

    I've used the method within the SharePoint designer to add a link to the workflow context current item URL, but when the current item status changes then obviously this link will no longer work.
    How can I change this link so that it will always open the item, even if someone has changed it within the list, before I clink on the link?
    This is an important one as over 300 people will use the list and many of these will be emails about items on the list will be in different time zones.  I don't want to have lots of mails from people saying "this list doesn't work" as it's
    critical they keep using it.
    Please help.
    P.S.  I don't know if the <href> method will work, so if someone can confirm to me then that would be great.

    Hi,
    According to your post, my understanding is that add a link to an item within a workflow email.
    I’ m not very clear about the status you said. Please descript more detail which URL do you want to display.
    Per my knowedge, you can display the following url in your email body:
    [%Workflow Context: Current Item URL%]
    [%Workflow Context: Current Site URL%]
    [%Workflow Context: Workflow Status URL%]
    [%Current Item: Encoded Absolute URL%]
    Please start the workflow automatically when an item is changed and changed.
    No matter how you  edit the item or update the approve status, the URLs remains the same.
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Links - How to reorder links within a folder. Also, how to make folders open in a tree view?

    I'm working on a portal in Sharepoint 2007. It appears that I can only have one set of "Links" on a page, so I am grouping my related links into folders. I'm having two issues with this...
    #1. I need to change the order of the links within a folder. When I try to Change Order under the Actions menu, I only get the main list of links, not those within the folder. How can I reorder links within a folder?
    #2. When I click a Links folder, all links go away, except for the links within that folder. Is there any way to make the Links list work in a Tree view?
    Sorry for the newbie questions, but I've not worked much in Sharepoint and I had this project dropped on me.  :(

    Hi,
    For Question #1,
    refer this link.
    Hope it helps!
    Thanks,
    Avni Bhatt
    If this helped you resolve your issue, please mark it Answered

Maybe you are looking for

  • ITunes password won't work

    Aplle TV keeps telling me to put in my password but when I do it won't work. But I checked it on iTunes and it worked there, as well as online. Then I went online and changed it but Apple TV still won't accept it. What gives? Edit: Nevermind it's wor

  • Major help needed! Saving iPhoto book as a working file

    I am a student teacher and I am teaching a lesson on Friday that uses iPhoto book. My cooperating teacher has asked me to create an iPhoto book template for the students to use to make the activity easier for them. I have created the template book bu

  • I bought iPhone 5 restored and photos were deleted that were taken before i had time to load my old info

    I bought my iphone 5 and had it for a week before I had time to restore an old backup and get my music and photos all back to normal. I took a bunch of important pictures I needed before I did my restore and once it was complete those photos were gon

  • API to change PO Authorization_Status

    Hi All Please let me know if there is an API to change the Authorization_Status of a PO. We do not want to use the update statement i.e. Update apps.PO_HEADERS_ALL Set wf_item_type=NULL,wf_item_key=NULL,Authorization_Status = 'INCOMPLETE' Where apps.

  • Older MacBook Pro as a Wireless Backup Drive?

    I just got a new MacBook Pro and want to use my old one as a wireless backup drive. Is this possible? I'd backup only user files and skip the music and photos. If so, how do I set it up and what are my options for wireless backup software?