Topic
  • 6 replies
  • Latest Post - ‏2013-12-11T15:22:34Z by Codeoline
Codeoline
Codeoline
141 Posts

Pinned topic Link to JT File

‏2013-10-03T16:48:27Z |

I have a view page similar to the attachment. I would like to link each of the part numbers to its own .jt file.

Is this possible?

Attachments

  • Codeoline
    Codeoline
    141 Posts
    ACCEPTED ANSWER

    Re: Link to JT File

    ‏2013-12-11T15:22:34Z  
    • mburati
    • ‏2013-10-16T02:59:14Z

    It's hard to say the exact implementation without knowing how the fact that a row has or does not have a JT file is represented in the data, but basically you want what has been referred to as a "Conditional Link" in a number of threads in this forum.

    Try searching for "Conditional Link" in the forum search box above and you'll see what I mean.

    Basically you add both a Link builder and a Text builder for that column, and a Visibility Setter for each where the visibility setters show/hide either the link or the text based on a lookup/evaluation they do of the data in that row (via method call that can look at the data in that row loopvar and determine whether that row should have a link based on what it sees in that row).

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

     

    Just getting back to this.

    I did just as you said and added a Link builder and a Text builder and then set visibility for each based on a table search and it works great.

    Thank You .

     

  • mburati
    mburati
    2575 Posts

    Re: Link to JT File

    ‏2013-10-03T19:39:01Z  

    It should be possible, but you'll need to provide a little more info than that for us to suggest how.

     - Where are these filenames coming from (is it part of the data or can you easily construct the URL path and filename from the data or ?...).

    Basically one option is to place a Link builder on that field in the page within the repeating rows and have the URL built up from wherever you have that URL/filename data.

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • Codeoline
    Codeoline
    141 Posts

    Re: Link to JT File

    ‏2013-10-08T20:03:11Z  
    • mburati
    • ‏2013-10-03T19:39:01Z

    It should be possible, but you'll need to provide a little more info than that for us to suggest how.

     - Where are these filenames coming from (is it part of the data or can you easily construct the URL path and filename from the data or ?...).

    Basically one option is to place a Link builder on that field in the page within the repeating rows and have the URL built up from wherever you have that URL/filename data.

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

    This example is 1 serialized parts list. Unit 101373158 is made up of 4 parts 100619-33, 010224-15, 126425-B3 and 016188-48.  I would like to attach a link to a .jt file to each of these part numbers. The next search the user does may be for a different serialized part that is made up of 4 completely different part numbers.  My point in this is that each part number has its own .jt file and i would like to be able to link to each part number in the serialized parts list with its own .jt file.

    I tried to attach a link builder to the column but then each part number had the same .jt file attached to it. 

    I would like to be able to construct the URL from a combination of URL location and the part number with Java code.

  • mburati
    mburati
    2575 Posts

    Re: Link to JT File

    ‏2013-10-08T20:16:30Z  
    • Codeoline
    • ‏2013-10-08T20:03:11Z

    This example is 1 serialized parts list. Unit 101373158 is made up of 4 parts 100619-33, 010224-15, 126425-B3 and 016188-48.  I would like to attach a link to a .jt file to each of these part numbers. The next search the user does may be for a different serialized part that is made up of 4 completely different part numbers.  My point in this is that each part number has its own .jt file and i would like to be able to link to each part number in the serialized parts list with its own .jt file.

    I tried to attach a link builder to the column but then each part number had the same .jt file attached to it. 

    I would like to be able to construct the URL from a combination of URL location and the part number with Java code.

    Here's an updated/tweaked copy of your consumer:

     - Added a Link builder

     - specified "Link to URL" as the action type

     - Picked the page location where the V&F view is putting the "part" number

     - For Action Type chose "Link to a URL"

     - For URL used the picker to pick the "part" in the loop variable that page automation uses to render each row  ${Variables/RowLoopVar/Row/part}

     - Manually entered a base url  "http://partserver.codeoline.com/'partdocuments/"  before that picked indirect ref and added ".jt" after the indirect ref

     - Set Target to _blank at the bottom (so that it would open the jt doc in a new browser tab/window)

     - Ran it and got what I think you're looking for.

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • Codeoline
    Codeoline
    141 Posts

    Re: Link to JT File

    ‏2013-10-14T18:11:37Z  
    • mburati
    • ‏2013-10-08T20:16:30Z

    Here's an updated/tweaked copy of your consumer:

     - Added a Link builder

     - specified "Link to URL" as the action type

     - Picked the page location where the V&F view is putting the "part" number

     - For Action Type chose "Link to a URL"

     - For URL used the picker to pick the "part" in the loop variable that page automation uses to render each row  ${Variables/RowLoopVar/Row/part}

     - Manually entered a base url  "http://partserver.codeoline.com/'partdocuments/"  before that picked indirect ref and added ".jt" after the indirect ref

     - Set Target to _blank at the bottom (so that it would open the jt doc in a new browser tab/window)

     - Ran it and got what I think you're looking for.

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

    This is working just as i had hoped.  Thank You. 

    The second part of the problem is :

    I would like to now know how to handle those part numbers that do not have a .jt file.

    I do know what part numbers have .jt files and what part numbers do not have .jt files.

    I would like those that do not have files available to be not underlined or linked to anything.

    How would i accomplish this?

    Thank You

  • mburati
    mburati
    2575 Posts

    Re: Link to JT File

    ‏2013-10-16T02:59:14Z  
    • Codeoline
    • ‏2013-10-14T18:11:37Z

    This is working just as i had hoped.  Thank You. 

    The second part of the problem is :

    I would like to now know how to handle those part numbers that do not have a .jt file.

    I do know what part numbers have .jt files and what part numbers do not have .jt files.

    I would like those that do not have files available to be not underlined or linked to anything.

    How would i accomplish this?

    Thank You

    It's hard to say the exact implementation without knowing how the fact that a row has or does not have a JT file is represented in the data, but basically you want what has been referred to as a "Conditional Link" in a number of threads in this forum.

    Try searching for "Conditional Link" in the forum search box above and you'll see what I mean.

    Basically you add both a Link builder and a Text builder for that column, and a Visibility Setter for each where the visibility setters show/hide either the link or the text based on a lookup/evaluation they do of the data in that row (via method call that can look at the data in that row loopvar and determine whether that row should have a link based on what it sees in that row).

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

     

  • Codeoline
    Codeoline
    141 Posts

    Re: Link to JT File

    ‏2013-12-11T15:22:34Z  
    • mburati
    • ‏2013-10-16T02:59:14Z

    It's hard to say the exact implementation without knowing how the fact that a row has or does not have a JT file is represented in the data, but basically you want what has been referred to as a "Conditional Link" in a number of threads in this forum.

    Try searching for "Conditional Link" in the forum search box above and you'll see what I mean.

    Basically you add both a Link builder and a Text builder for that column, and a Visibility Setter for each where the visibility setters show/hide either the link or the text based on a lookup/evaluation they do of the data in that row (via method call that can look at the data in that row loopvar and determine whether that row should have a link based on what it sees in that row).

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

     

    Just getting back to this.

    I did just as you said and added a Link builder and a Text builder and then set visibility for each based on a table search and it works great.

    Thank You .