Showing links conditionally

Hi
I am trying to show a link based on certain condition. If condition fails I wish to show it as a label if not show it using h:command_link.
I am using <c:choose jstl tags right now, which shows up fine. Is there a JSF way to do this?
<c:choose>
<c:when test="${MyBean.canGoPrev}">
<h:command_link actionListener="#{MyBean.gotoPrev}">
     <h:output_text value="Previous"/>
</h:command_link>
</c:when>
<c:otherwise> <h:output_text value="Previous"/> </c:otherwise>
</c:choose>
The links display as desired. But the problem is ... I have my actionListener method as below:
public void gotoPrev(ActionEvent event)
data.Prev();
UIComponent comp = event.getComponent().findComponent ("DataList");
((ValueHolder)comp).setValue(objSet.getDataList());
And when I select the link, I get .... ERROR : Duplicate id _089 found...
Any suggestions...?
Thanks

Assign a unique ID to each component when you use conditional tags... You can do something as such:
<c:choose>
<c:when test="${MyBean.canGoPrev}">
<h:command_link id="uniqueID1" actionListener="#{MyBean.gotoPrev}">
<h:output_text id="uniqueID2" value="Previous"/>
</h:command_link>
</c:when>
<c:otherwise> <h:output_text id="uniqueID3" value="Previous"/> </c:otherwise>
</c:choose>

Similar Messages

  • Action links show link conditionally using simple filter

    Hello Gurus,
    When I set up an interaction with action link, every thing works fine. But when I try to use the 'show link conditionally' using a simple condition, I get an error such as:
    "State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 16001] ODBC error state: 37000 code: 8180 message: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.. [nQSError: 16001] ODBC error state: 37000 code: 8120 message: [Microsoft][ODBC SQL Server Driver][SQL Server]Column 'SAWITH3.c6' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.. [nQSError: 16002] Cannot obtain number of columns for the query result. (HY000)"
    Can anyone help with this?
    Thanks

    Try to apply that condition to the report and see how it works
    Btw: check this
    sql - Reason for Column is invalid in the select list because it is not contained in either an aggregate function or the…

  • RoboHelp10 - If we click on 'Show' link(button), blank page get displayed

    I am using,
    RoboHelp10
    IE9
    MSVS2010
    Win7
    Tried with below option,
    Flash Help -> we are working with it and has problem for our desktop/standalone wcf application.
    Flash Help Pro - > We know that RH server is req. for this option
    Web Help Pro- > We know that RH server is req. for this option
    Trouble in (Flash Help),
    1. When we invoke Flash Help with respective topic ID, it will not show requested topic page along with TOC, it will show default topic/page, which we set at the time creating help. Also it will display "Allow Blocked Content" button at the bottom. If we click on "Allow Blocked Content" it will display the above requested topic page correctly, but without TOC pane. This time we can see 'Show' button(link) on the browser. If we click on 'Show', blank page get displayed.
    2. When we are displaying content with option 'OptionConstants.CSH_DISPLAY_CONTEXT' it only show topic and it won't show me the TOC along with current selected topic page.
    3. When we are displaying content with option 'OptionConstants.CSH_DISPLAY_CONTEXT' it only show topic with 'Show' link. When we click on 'Show' link, blank page get display.
    4. Tool gives us facitlity to publish the Flash help, where we can choose the folder. This means that it publishes folder structure. We are using this folder structure (the published one) and on the top of that we are not getting expected(blank page get display) result.
    5. Published content does not contain any mapid/mapfile, if so whow it works correctly with RH development studio.
    6. Skin we were using 'beautiful_vista_flash.fhs'
    7. We build RH after setting Mozilla as the statup browser. We tried with Mozilla and IE but still our application opens help in IE. So not able to test in Mozilla.
    Please assist to resolve it.
    Thanks in advance.

    Thank you for your input.
    Working with "FlashHelp"
    Our req is files pages are deployed along with desktop(WPF) application locally and not on webserver.
    Referred following link,
    http://blogs.msdn.com/b/ieinternals/archive/2012/06/20/loading-local-files-in-enhanced-pro tected-mode-in-internet-explorer-10.aspx
    http://msdn.microsoft.com/en-us/library/ms537628%28v=vs.85%29.aspx
    and added below one liner code,
    <?xml version="1.0" encoding="utf-8" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <!-- saved from url=(0014)about:internet -->
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    in each pages in the 'ProjectManager''s Project Files. And published the content of "FlashHelp".
    Again the same problem("Allow Blocked Content" button apprears and blank page get displayed, as explained in option #1 of the first post) persist.
    If i choose page and do viewsource then it will show blank line in place of <!-- saved from url=(0014)about:internet -->
    Code is as given below,
    <?xml version="1.0" encoding="utf-8" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    We need to know that how to implement 'Mark of the Web' using RH development studio?
    Your input are appreciated.

  • Show/Hide conditional text at a book level

    I am using TCS2 on Windows XP.
    FM 9.0 p250
    I have several files as part of a large FM book. Each file has the same text conditional tags. Can I, at a book level, set my conditions to show/hide, etc. and then update the book? So far, I only know how to open each file, set the SHOW/HIDE CONDITIONAL TEXT as I need it (not to show conditiona indicators and according to my built expression) and then save and close each file.
    Is there a way to do all my files at once? Note- I want them all set the same way... so that might make it easier..
    Thanks,
    Adriana

    adrianaharper wrote:
    I am using TCS2 on Windows XP.
    FM 9.0 p250
    I have several files as part of a large FM book. Each file has the same text conditional tags. Can I, at a book level, set my conditions to show/hide, etc. and then update the book? So far, I only know how to open each file, set the SHOW/HIDE CONDITIONAL TEXT as I need it (not to show conditiona indicators and according to my built expression) and then save and close each file.
    Is there a way to do all my files at once? Note- I want them all set the same way... so that might make it easier..
    Thanks,
    Adriana
    I don't have FrameMaker available right now, so I'm working from memory, using the traditional FrameMaker menus, rather than the FM 9 tools.
    Select all the files in the book window. With the book window active, open the View menu and look for Conditional Text. Your settings here apply to all selected files in the book window, so it's possible to set conditions on all or some files files. Ctrl+Click to select non-contiguous files; Shift+Click to select a range of contiguous files.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Missing "Show Links to the Itunes Store" in Preferences Tab

    Mornin! After installing the new itunes 10 i noticed that the link next to any Podcasts title in my library to go to it`s itunes homepage is no longer there.The "Show Links in the Itunes Store" command and check box is missing in the Preferences-Edit-Window in itunes.How do i get it back? I have uninstalled and reinstalled itunes with no effect-still missing! Help!!!

    Have you had any luck with Apple Support? All i get is the canned email message with links to information not about my problem.

  • Showing linked files in Adobe Bridge not available for files on AD Volume?

    In Bridge: when right clicking on a local InDesign Document that has external links, the context menu will have an action "show linked files" (in german "Verknüpfte Dateien anzeigen").
    But, when doing the same on an InDesign Document located on an Adobe Drive Volume, this context menu action is missing.
    1. Can this action be enabled for documents on Adobe Drive Volumes at all?
    2. If so, are there any special things to do in the connector plugin (e.g. special properties, a special mime type for the doc, ...)?
    3. If not so, when will you enable this functionality?

    Really, no answer?
    This issue is obvious. And it seems to be the case, that only Adobe can rectify the issue at all, probably in an updated Adobe Drive version.
    Or maybe, someone already dealt with this issue and invented special properties for exposing linked files to Bridge? Though unlikely... Right?
    Any answer is welcome!

  • Hyperion Analyzer "show linked reporting object error"

    I try to add a "cell note" on an Analyzer Report thruogh choose "Related Content" option. Then I select "Data Display"-->"Show Linked Reporting Opject Indicator" to indicate report reader the data cell has a cell note. After doing that, suddently, my whole spread sheet showed "No data availiable" and there is an essbase error on the screen:
    "nested exception is com.hyperion.ap.APException:[] 1033 Native:2001 Essbase Error" . Could any expert help me to solve the problem.
    my server and client info. are as below.
    <<Server info.>>
    Version: 7.2.5.4.28
    Class Version: Java HotSpot(TM) Client VM
    VM Version: Java HotSpot(TM) Client VM
    VM Vendor: Sun Microsystems Inc.
    Java Vendor: Sun Microsystems Inc.
    Java Version: 1.4.2_08
    OS Name: Windows 2000
    OS Version: 5.0
    Total Memory: 133300224
    Free Memory: 25754256
    Locale: Chanese (Taiwan)
    <<Client Info.>>
    Version: 7.2.5.4.28
    Class Version: Java HotSpot(TM) Client VM
    VM Version: Java HotSpot(TM) Client VM
    VM Vendor: Sun Microsystems Inc.
    Java Vendor: Sun Microsystems Inc.
    Java Version: 1.4.2_12
    OS Name: Windows 2003
    OS Version: 5.2
    Total Memory: 35405824
    Free Memory: 13854632
    Locale: Chanese (Taiwan)
    Report Information
    Number of Rows: 1
    Number of Columns: 2

    Hi,I also got this error, as well as others, with one of my client. I couldn't find a stable way out of it in VB. I did a C DLL that is declared in VB, just for that AddLRO function. As well as with the LRO lists.If you need it, just drop me a mail.CheersEric Partake [email protected]

  • Can we hide the arrow icon in the hide/show link ?

    well
    i need to hide the arrow icon in the hide/show link because this icon makes the printer prints many page for only one page print request
    so if anybody have any idea about this please inform ...
    thanks in advance

    i alreay use printable page and when i print the page prints many pages the first one with the page itself while the others blank white papers but have only the arrow of hide and show links
    ???

  • Frame 8 crashes when showing all conditional text

    When I try to Show ALL conditions in my Frame 8 file, Frame crashes. I just recently installed CS4 on my system, but other than that, nothing has changed. I have had no problems with conditional text and this file before. Wondering if anyone has had this issue and knows a workaround or fix. Thanks, sandra

    Good, then you're all patched up, that's great.
    I don't use conditional text at all, but several folks around here do and will be along to offer some help.
    Can you identify whether this crash is a result of adding a new condition recently? Had showing all conditions had previously worked?

  • Custom Metadata panel to show linked graphics from InDesign files?

    Hello all,
    I'm looking to create a custom Metadata panel to show linked graphics from InDesign files. I'm not even sure if this is possible. Can someone please point me in the right direction? I figure if you can see the fonts used in an InDesign file, you should probably be able to pull the links, right?
    Thanks for any and all help!

    Have you tried trashing the prefs? See Replace Your Preferences
    And of course it's essential that the links be up to date.

  • FM12: Show/Hide condition does not apply to entire book

    FM12: From the Show/Hide Conditional Text pod, Show as per Condition applied to entire book does not consistently update book with correct condition. Now to get the desired condition, I have to apply the condition per section in the book. Has the workflow for this feature changed with FM12? Or is it a bug? Thanks, Patti

    > ... I have to apply the condition per section in the book.
    No, you don't. You can apply it to all component files in one operation. In the Book menu, select all component files.
    View > Show/Hide Conditional Text
    {edit}
    [ Set ]
    As Arnis pointed out, you do need to Update the book for complete re-application of Conditions.
    Edit > Update Book
    {select all possibly excluding Apply Master Page}
    In particular, any Cross-References to conditionalized text will still be as they were until xrefs are updated.
    We exclude AMP from Update because it is unstable in FM7, and run it as a separate operation, and re-Update book after that because pagination may have changed.

  • Build a blank/other type of page which can show links to other pages

    Can someone please tell me how to build a blank/other type of page which can show links to other pages? I mainly want a page to show 3 links, once someone clicks on it, then it will go to a specified page. I tried using URL, but that did not work. Any advice is greatly appreciated. Thank you very much for your help in advance.
    -Grace

    Do a region (probably a HTML-based one is fine), enter in the HTML for your links, and that should be it. What didn't work about this?
    Your links probably should appear like this in your coding (use substitution variables):
    f?p=&APP_ID.:3:&APP_SESSION.
    In the above example, "&APP_ID." will resolve dynamically to the application ID that you are in, "3" is page 3 (change this to whatever page you want the link to be), and "&APP_SESSION." is the existing session number (if you don't include this, the user will receive a new session ID if the destination page is public or will be intercepted annoyingly to log in and get a new session ID which you probably don't want).
    Do not include the full http path. Just start with f?p... and everything is assumed to be relative to Apex on the current environment.
    Those are effectively the minimum requirements for a URL in Apex to go from one page to another in an app. You can add to that the additional URL parameters for Request value, Set items with values, clear cache, reset pagination, etc. if you need to. Check the Apex online help under "understanding URL syntax" for details on these.

  • Show link in ALV with blue background

    I have an ALV with three columns. The first shown an input field, the second a dropdown, and the third a link (linkToUrl).
    The first to columns are either editble or not, depending on a display/edit mode that the user can set. The third column  shall always be not editable.
    This all works fine, now my problem:
    The column with the links has a white background, but I want it to have the same background than the not-editable columns (light blue).
    I tried SET_CELL_DESIGN, but none of the colors there seems to fit. I also tried link->set_editable( false ), which shows the right color, but then, the link is not clickable anymore.
    How can I display a link in an ALV column that has the same background than a non-editable, disabled input field?

    Hi,
    Having concatenatedvalue into once column and showing link to part of cell is not possible. Try to have salesorder and lineitem in 2 columns, and provide the link for salesorder.
    Let your cleint know that the above case(original post) is not possible.
    One more thing, POPINS are  not possible for ALV. Youcan use TABLE UI element for popins.
    Regards,
    Lekha.

  • In the Table Overflow can we change show link to + sign?

    In the Table Overflow can we change show link to + sign?

    I asked about this awhile ago on this form,
    Removing the words 'Show'/'Hide' from table detail disclosure
    Changing this is a ADF Faces skinning issue, so the JDeveloper forum would be your best best. I've always wanted to implement this, but I have never got around to it

  • Need to show the Condition amount or percentage(KBETR) in display mode.

    Hi,
    i need to show the Condition amount or percentage(KBETR) in display mode for VA02 transaction based on the condition type. the KBETR in the table control. so how it will become in display mode?
    already i tried with this code.
    in MV45AFZZ form userexit_field_modification.
    case screen.
    when screen-name = 'KOMV-KBETR'.
    read table xkomv with key kschl = c_xr1(XR1).
    if sy-subrc = '0'.
    SCREEN-INPUT = '0'.
      endif.
    in debugging mode the condition is satisfying but not modifying the screen.
    can anyone help me . please it is urgent.

    Hi Praveen,
      See in Exit 'LV69AFZZ' and subroutine 'USEREXIT_FIELD_MODIFICATION',
    code should be like this
      if komv-kschl eq 'your condition type'.
        case screen-name.
          when 'KOMV-KBETR'.
              screen-input = 0.
        endcase.
      endif.
    For header level conditions you need to use "form userexit_field_modific_kopf"
    try it.
    i hope it will solve your problem.
    ENJOY SAP.

Maybe you are looking for

  • PCI-e Graphics in Advanced Dock isn't worth the loss of the Undock Button !!

    Greetings, After using ATI Radeon X1300 in the advanced Dock with my W500 (4061-38U) for over a year, I'm in clear position to conclude, it isn't worth it. Here are the reasons why you should not have this setup :  - the complete loss of one of the T

  • Product Category Deletion in SRM (not with Hierarchy)

    Hello All, Certain Product categories are to be deleted in SRM which belong to different R3 Back end systems I tried the COMM_HIERARCHY Tx in SRM and did the following:    Select the Product assigned to the relebvant Back end system and delete manual

  • TORCH 9800 " How to stop the DATA Wiping due to Problems with Password Input "

    PHONE  TYPE:     Torch 9800 (1256) PROBLEM:  On Friday, April 5th ... after several attempts of inputting my screen password I was constantly told by the 9800  that the wrong password was being attempted; which I know I did input the right PW . [ I b

  • Julian date generation

    I'd like to be able to use an IF statement in my TDF that will make a comparison of two dates and if the one date is equal to or earlier than the second it runs a specific job. Since the comparison needs to be arithmetic, I'm thinking I'll need to co

  • Vista bf 2142 teamspeak quits work

    This has happened with both the Beta and official drivers. When playing 242 I start playing and everything is fine, I can hear all teamspeak conversations and I can talk to people. It works both in game and when using the Xfire voice chat. After a pe