Question

I'm trying to generate a grid layout from a repeat control. Inside the repeat control i'm using a xp:text control to control my compute the output. When I use the tagName property with the predefined tags the tags are generated correctly.

When i'm using other tags such as tr or td the tag is not rendered at all. Is this a bug or a feature ?

<xp:repeat id="rptViewCategory"
                            var="PublicationCategory" indexVar="i" disableTheme="true"
                            repeatControls="false" disableOutputTag="false">

                            <xp:this.value><![CDATA[#{javascript:return getCategories(pubNav);}]]></xp:this.value>


                            <xp:text tagName="tr" id="txtHeader">
                                <xp:this.value><![CDATA[#{javascript:var category:NotesViewEntry = PublicationCategory;
    if(category.isCategory()){
        var c:NotesViewColumn =     vwPublications.getColumn(1);
        var nav:NotesViewNavigator = pubNav;
        var firstChild = nav.getChild(category);

        var values:java.util.Vector = firstChild.getColumnValues();


            return values.get(0);


    }
    }]]></xp:this.value>
                            </xp:text>
<datatable></datable>
                            <tr>
                                <td colspan="4">
                                    <xp:link>
                                        <xp:this.text><![CDATA[#{javascript:return getComponent("txtHeader").value;}]]></xp:this.text>
                                    </xp:link>
                                </td>
                            </tr>



                        </xp:repeat>
Was it helpful?

Solution

The tagName options are "div", "span", "h1", "h2", and "h3". The renderer will ignore anything that is not one of the options on the list (including "h4" which would seem to be an over site.) Since "tr" is not a valid option it ignores it

So your only choice is to do this with an HTML pass through computed text field.

/Newbs

OTHER TIPS

How about set the text to display as html, disable the output tag, and just add the inside it

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top