Topic
  • 4 replies
  • Latest Post - ‏2012-02-29T11:41:24Z by shelter3
shelter3
shelter3
69 Posts

Pinned topic repeated region of variable builders

‏2012-02-27T13:56:35Z |
Hi!
I have a repeated region builder
and here it is the html

span name="RepeatSection" span name="elemContent" span

Now, I have to show the list of elementContent but it can be a linkBuilder or a textBuilder depending on a condition
how can I do this?

Thank you
Updated on 2012-02-29T11:41:24Z at 2012-02-29T11:41:24Z by shelter3
  • mburati
    mburati
    2561 Posts

    Re: repeated region of variable builders

    ‏2012-02-27T15:48:57Z  
    Is there a reason you need to use Repeated Region instead of a higher level page automation builder like Data page (or View and Form or DSUI)?
    Typically you should use the highest level builder available for the use case and then modify the results if you need to.

    The following recent thread gives pointers on how to conditionally show a link vs text (along with pointers to previous threads on that topic in this forum).

    ..mb1
  • shelter3
    shelter3
    69 Posts

    Re: repeated region of variable builders

    ‏2012-02-27T16:22:09Z  
    • mburati
    • ‏2012-02-27T15:48:57Z
    Is there a reason you need to use Repeated Region instead of a higher level page automation builder like Data page (or View and Form or DSUI)?
    Typically you should use the highest level builder available for the use case and then modify the results if you need to.

    The following recent thread gives pointers on how to conditionally show a link vs text (along with pointers to previous threads on that topic in this forum).

    ..mb1
    Hi!
    Thank you for the answer.
    My goal is to have a breadcrumb, but I can't use the breadcrumb builder because the logic behind is different from that of the builder:

    I have a child element and in my breacrumb I have to write the parents elements:
    parent_parent_child > parent_child > child

    So you said I can use a Data Page instead of a repeated region. How can I do?

    Thank you
  • mburati
    mburati
    2561 Posts

    Re: repeated region of variable builders

    ‏2012-02-27T18:21:46Z  
    • shelter3
    • ‏2012-02-27T16:22:09Z
    Hi!
    Thank you for the answer.
    My goal is to have a breadcrumb, but I can't use the breadcrumb builder because the logic behind is different from that of the builder:

    I have a child element and in my breacrumb I have to write the parents elements:
    parent_parent_child > parent_child > child

    So you said I can use a Data Page instead of a repeated region. How can I do?

    Thank you
    Ok, that use case (breadcrumbs) is actually one where Repeated Region probably makes sense over Data Page.

    In that case, the Link and Text builders should point into the Repeated Region's row loop variable for the data they need (text plus URL).

    And Visibility Setters on each (to determine which should be shown and which should not) calling a method passing something from the row loop var that the method will use to determine whether it should be visible or not, would make sense.

    The URL I meant to post above was: http://www.ibm.com/developerworks/forums/thread.jspa?threadID=419174&tstart=0

    ..mb1
  • shelter3
    shelter3
    69 Posts

    Re: repeated region of variable builders

    ‏2012-02-29T11:41:24Z  
    • mburati
    • ‏2012-02-27T18:21:46Z
    Ok, that use case (breadcrumbs) is actually one where Repeated Region probably makes sense over Data Page.

    In that case, the Link and Text builders should point into the Repeated Region's row loop variable for the data they need (text plus URL).

    And Visibility Setters on each (to determine which should be shown and which should not) calling a method passing something from the row loop var that the method will use to determine whether it should be visible or not, would make sense.

    The URL I meant to post above was: http://www.ibm.com/developerworks/forums/thread.jspa?threadID=419174&tstart=0

    ..mb1
    Tank you, I've risolved!