Topic
  • 5 replies
  • Latest Post - ‏2012-02-25T12:58:42Z by KathirSelvan
KathirSelvan
KathirSelvan
5 Posts

Pinned topic Apply link to a grid value based on Condition

‏2012-02-23T17:27:30Z |
Hi,

i have a grid table with 5 columns and all these values am fetching from a webservice. Lets say am getting five rows of data from the webservice. Now what i have to do is to apply a link to the values of the last column based on a condition i.e in whichever row where the length of that value is too high say a paragraph. if the value of that column is a simple two or three words String in any of the row i should not apply link.
please help me on this to apply link based on condition.
Thanks in advance.
Updated on 2012-02-25T12:58:42Z at 2012-02-25T12:58:42Z by KathirSelvan
  • mburati
    mburati
    2576 Posts

    Re: Apply link to a grid value based on Condition

    ‏2012-02-23T17:50:30Z  
    Searching for "conditional link" and "hide table cell link" etc above shows a few forum threads on very similar topics (leveraging Visibility Setter builder(s) based on conditional logic) including the following, which should help:

    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14698541&#14698541

    and

    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14783010&#14783010

    ..mb1
  • KathirSelvan
    KathirSelvan
    5 Posts

    Re: Apply link to a grid value based on Condition

    ‏2012-02-24T11:08:48Z  
    Thanks for the info. it worked fine using visibility setters. No i have one more requirment to do which is when applying link to the value in the last column i should take only a substring of that value say 50 characters length if the value is more than 50 char length.
    when the link is clicked am opening a pop up to show the complete value not the substring. I have used loop variable argument to be passed to show in the pop up window. how do i take the substring and show it just for display alone without affecting the original loop variable.
  • mburati
    mburati
    2576 Posts

    Re: Apply link to a grid value based on Condition

    ‏2012-02-24T12:54:10Z  
    Thanks for the info. it worked fine using visibility setters. No i have one more requirment to do which is when applying link to the value in the last column i should take only a substring of that value say 50 characters length if the value is more than 50 char length.
    when the link is clicked am opening a pop up to show the complete value not the substring. I have used loop variable argument to be passed to show in the pop up window. how do i take the substring and show it just for display alone without affecting the original loop variable.
    It'll likely end up being a call to substring, but it depends on how you're passing the data and what you're passing it to for the popup (eg, is this a dojo tooltip popup or a new browser window or a JS dialog or?...).

    If you could post a small sample (with no confidential material or intellectual property) showing what you're doing for the popup, someone could likely tell you quickly how to tweak the data that you are passing.

    Note, WEF indirect references include the ability to include server side Java logic (eg, ${Java/...} ) which may help for what you're trying to do.

    ..mb1
  • KathirSelvan
    KathirSelvan
    5 Posts

    Re: Apply link to a grid value based on Condition

    ‏2012-02-24T14:28:29Z  
    Please find my model attached and help me on how to show the link with substring Text and show full text in pop up. Am using a pop up window.
    Note: I have used post action behaviour to evaluate javascript and show pop up when clicking the link.
  • KathirSelvan
    KathirSelvan
    5 Posts

    Re: Apply link to a grid value based on Condition

    ‏2012-02-25T12:58:42Z  
    Please find my model attached and help me on how to show the link with substring Text and show full text in pop up. Am using a pop up window.
    Note: I have used post action behaviour to evaluate javascript and show pop up when clicking the link.
    Hi Mb,

    I have found a solution for the above functionality by having a hidden variable. Attached the Updated Model.