0
votes

The scoped variable is used to pass the selected rowdata id to a panel which displays more detail. This works when the link column is in a view control, but not a Data Table. The example below uses a requestScope but I have also tried sessionScope and viewScope for a dialogToolTip version of the details panel. In each case, full or partial refresh will occur, but the scoped variable is always null. Note: the data table is normally nested within a tabbed panel, but I have also tested it on a clean XPage with no table nesting, with the same result. Domino release 8.5.3 w/ extension lib.

<xp:column id="column11">
    <xp:this.facets>
        <xp:label value="INVOICE NBR" id="label7" xp:key="header"
            style="font-weight:bold">
        </xp:label>
    </xp:this.facets>
    <xp:link escape="true" id="link1" value="#{id:column11}">
        <xp:this.text><![CDATA[#{javascript:return rowdoc.getItemValueString("StorInvID");}]]>
        </xp:this.text>
        <xp:eventHandler event="onclick" submit="true"
            refreshMode="complete">
            <xp:this.action><![CDATA[#{javascript:requestScope.invCompare = rowdoc.getItemValueString("StorInvID");}]]></xp:this.action>
        </xp:eventHandler>
    </xp:link>
</xp:column>
1
A couple things, I have found generally you have the best results with SessionScope. You also might want to go to OpenNTF and get the xpDebugToolbar. It allows you to see the current state of your scoped variables. You could also use print() and write the value to your notes log.Steve Zavocki
In addition, double check your "var" in the data table is set to "rowdoc". Make sure you didn't use "rowDoc" as it is case sensitive.Steve Zavocki
Thanks Steve. I am using the same code for the scoped variable as the link label, but I did check the data var and there are no typos. I have tried sessionScope and had the same result with the DataTable. I also tried placing a button in the (repeat ctrl) middle row of datatable, and tried to populate a sessionScope with a hard-coded string, to no avail. So something is definitely amiss here! It is high time I installed the debug toolbar, so thanks for that suggestion.Steve Ormsby
What is your notes version?Ramkumar

1 Answers

1
votes

Repeat after me: Client-side always takes precedence over server-side :-)

The value attribute for the xp:link control causes the server side event not to be executed at all. When clicking the link it just performs a HTTP GET to the resource in question.

So if you remove the value attribute, your onclick serverside event should be triggered. You can then do a serverside redirect using context.redirectToPage("pagename").