Topic
  • 8 replies
  • Latest Post - ‏2012-12-21T12:23:53Z by BayanaKrishnaPradeep
BayanaKrishnaPradeep
6 Posts

Pinned topic Multiple Links on a Page

‏2012-12-12T11:54:10Z |
Hi,

I have a requirement like displaying A to Z letter as links. My problem is using link builder for each letter is a cumbersome process which will yield 26 link builders. Can any one suggest me a solution rather than using the 26 link builders.

Thanks in Advance

Kittu
Updated on 2012-12-21T12:23:53Z at 2012-12-21T12:23:53Z by BayanaKrishnaPradeep
  • SystemAdmin
    SystemAdmin
    9029 Posts

    Re: Multiple Links on a Page

    ‏2012-12-12T12:17:18Z  
    What is the nature of your links? Are they generated dynamically?

    Offhand, one way is to get the Page Automation framework (Page/Data Page, or View and Form, etc) to render the links for you. Somehow, you need to get them into a schema-typed variable. For example, a Variable builder of type IXml or, if the links come from a back end, then you can use an integration builder such as the one for SQL. With a schema-typed variable, Page Automation can put the links on the page, and it will also make each link have the same named element. i.e. http://mylink. Since each span to hold the link will have the same named element, you can use a single Link builder to target all instance of that named element to make them a link.

    Let me know more about how you're generating your links and I can tailor the answer a little better.

    Sam
    --
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • SystemAdmin
    SystemAdmin
    9029 Posts

    Re: Multiple Links on a Page

    ‏2012-12-12T13:42:50Z  
    What is the nature of your links? Are they generated dynamically?

    Offhand, one way is to get the Page Automation framework (Page/Data Page, or View and Form, etc) to render the links for you. Somehow, you need to get them into a schema-typed variable. For example, a Variable builder of type IXml or, if the links come from a back end, then you can use an integration builder such as the one for SQL. With a schema-typed variable, Page Automation can put the links on the page, and it will also make each link have the same named element. i.e. http://mylink. Since each span to hold the link will have the same named element, you can use a single Link builder to target all instance of that named element to make them a link.

    Let me know more about how you're generating your links and I can tailor the answer a little better.

    Sam
    --
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
    Ugh. The forum software removed my code example in the span

    Let me try this again...
    and it will also make each link have the same HTML named element, like this:
    http://mylink.

    --Sam
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • SystemAdmin
    SystemAdmin
    9029 Posts

    Re: Multiple Links on a Page

    ‏2012-12-12T13:46:46Z  
    Ugh. The forum software removed my code example in the span

    Let me try this again...
    and it will also make each link have the same HTML named element, like this:
    http://mylink.

    --Sam
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
    Still didn't work. One more time:

    "<"myLink" ">" test "<"/span ">"

    Remove the double quotes above.

    --Sam
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • BayanaKrishnaPradeep
    6 Posts

    Re: Multiple Links on a Page

    ‏2012-12-12T17:08:15Z  
    Still didn't work. One more time:

    "<"myLink" ">" test "<"/span ">"

    Remove the double quotes above.

    --Sam
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
    Hi Sam,

    Thanks for you reply. Actually there are static links. Once click it should display on the textInput like if i click on letter A the letter A should be Set in the TextInput box. Once it appeared in the TextInput then i need to send this letter A with appending * like A* to the service call. I tried using data page builder it is comming vertically and the letters are not appearing as links. I need these letters displayed in Horizontal like A B C .....Z with each letter as link. I am taking a xml variable. Below is the XML structure

    <Data>
    <Item>
    <Link>A</Link>
    </Item>
    <Item>
    <Link>B</Link>
    </Item>
    <Item>
    <Link>C</Link>
    </Item>
    <Item>
    <Link>D</Link>
    </Item>
    .
    .
    .
    .
    <Item>
    <Link>Z</Link>
    </Item>
    </Data>

    Please go through the image.
    Thanks
    Kittu
  • BayanaKrishnaPradeep
    6 Posts

    Re: Multiple Links on a Page

    ‏2012-12-12T17:14:06Z  
    need some clarification
  • SystemAdmin
    SystemAdmin
    9029 Posts

    Re: Multiple Links on a Page

    ‏2012-12-12T18:18:52Z  
    Hi Sam,

    Thanks for you reply. Actually there are static links. Once click it should display on the textInput like if i click on letter A the letter A should be Set in the TextInput box. Once it appeared in the TextInput then i need to send this letter A with appending * like A* to the service call. I tried using data page builder it is comming vertically and the letters are not appearing as links. I need these letters displayed in Horizontal like A B C .....Z with each letter as link. I am taking a xml variable. Below is the XML structure

    <Data>
    <Item>
    <Link>A</Link>
    </Item>
    <Item>
    <Link>B</Link>
    </Item>
    <Item>
    <Link>C</Link>
    </Item>
    <Item>
    <Link>D</Link>
    </Item>
    .
    .
    .
    .
    <Item>
    <Link>Z</Link>
    </Item>
    </Data>

    Please go through the image.
    Thanks
    Kittu
    In the Data Page builder, select a different template in the HTML Template File input. Right now, it's probably gridtable.html. Try allSpans.html, which will basically dump them out in spans instead of a table. You might need to read a little on how page automation uses templates with WEF-specific constructs to generate pages.

    Did you view the page source with Firebug or another tool like Chrome's built-in developer tool? Page automation will create each data in named html elements with the same name, so you can use the Link builder to make a link out of all of these. You mention setting an input box on the page; the Link builder's Action Type can be set to "Run a Script" which will allow you to supply JavaScript to set the text input.
    --Sam
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • SystemAdmin
    SystemAdmin
    9029 Posts

    Re: Multiple Links on a Page

    ‏2012-12-12T18:19:57Z  
    In the Data Page builder, select a different template in the HTML Template File input. Right now, it's probably gridtable.html. Try allSpans.html, which will basically dump them out in spans instead of a table. You might need to read a little on how page automation uses templates with WEF-specific constructs to generate pages.

    Did you view the page source with Firebug or another tool like Chrome's built-in developer tool? Page automation will create each data in named html elements with the same name, so you can use the Link builder to make a link out of all of these. You mention setting an input box on the page; the Link builder's Action Type can be set to "Run a Script" which will allow you to supply JavaScript to set the text input.
    --Sam
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
    note that in the Data Page builder, you have to disable "Use Theme" in order to see the HTML Template File input.
  • BayanaKrishnaPradeep
    6 Posts

    Re: Multiple Links on a Page

    ‏2012-12-21T12:23:53Z  
    note that in the Data Page builder, you have to disable "Use Theme" in order to see the HTML Template File input.
    Hi Sam,

    Thanks for you reply. It worked fine for me.
    Thanks,
    Krishna