0

I have a view panel. In my column's click event I have the following code:

var unid = rowData.getUniversalID();
var doc:NotesDocument = database.getDocumentByUNID(unid);
getComponent("inputTextContractorName").setValue(doc.getItemValueString("Form"));
getComponent("inputTextContractorSiteSuperName").setValue(unid);

The var property of my viewPanel's data property is set to rowData.

I have the UNID being displayed in the view. The UNID listed in the view does not seem to match what is being returned in the code. In fact I made a list of all of my documents and their UNID and none seem to match what is returned.

The Form value is blank so I am guessing I am not returning a document at all.

Any idea what I am doing wrong?

1

1 Answer 1

0

I tried to reproduce the issue, but was not able to. Here is the code, I used. viewColumn5 displays the FORM item value for each document, calculated from rowData.getUniversalID()

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">

    <xp:inputText id="inputTextContractorName"></xp:inputText>
    <xp:br></xp:br>
    <xp:inputText id="inputTextContractorSiteSuperName"></xp:inputText>
    <xp:br></xp:br>
    <xp:viewPanel rows="30" id="viewPanel1" var="rowData">

        <xp:this.data>
            <xp:dominoView var="view1" viewName="AllContacts" />
        </xp:this.data>

        <xp:viewColumn columnName="LastName" id="viewColumn3">
            <xp:viewColumnHeader value="Last Name" id="viewColumnHeader3" />

            <xp:eventHandler event="onclick" submit="true"
                refreshMode="complete">
                <xp:this.action><![CDATA[#{javascript:var unid = rowData.getUniversalID();
var doc:NotesDocument = database.getDocumentByUNID(unid);
getComponent("inputTextContractorName").setValue(doc.getItemValueString("Form"));
getComponent("inputTextContractorSiteSuperName").setValue(unid);}]]></xp:this.action>
            </xp:eventHandler></xp:viewColumn>
        <xp:viewColumn id="viewColumn4"
            value="#{javascript:rowData.getUniversalID()}">
            <xp:this.facets>
                <xp:viewColumnHeader xp:key="header" id="viewColumnHeader4" />

            </xp:this.facets>
        </xp:viewColumn>
        <xp:viewColumn id="viewColumn5">
            <xp:this.facets>
                <xp:viewColumnHeader xp:key="header" id="viewColumnHeader5" />

            </xp:this.facets>
            <xp:this.value><![CDATA[#{javascript:var unid = rowData.getUniversalID();
var doc:NotesDocument = database.getDocumentByUNID(unid);
doc.getItemValueString("Form");}]]></xp:this.value>
        </xp:viewColumn>
    </xp:viewPanel>
</xp:view>Column>
        </xp:viewPanel>
    </xp:view>
1
  • Thanks. I as setting the var property of the panel's document property and not the direct var property of the view panel. Oct 12, 2012 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.