dominoDocument data source returning null on open on specific XPage

122 views Asked by At

I'm having a problem where I can't Open/Create documents using a specific XPage in my application.

For simplicity sake, I have 2 XPages, one called XSP1.xsp and one called XSP2.xsp.

Each, at the top of the page, has a declared dominoDocument:

<xp:this.data>
    <xp:dominoDocument var="XSP1Doc" formName="XSP1">
    </xp:dominoDocument>
</xp:this.data>

Each page has, amongst other things on it, buttons that I'm hiding using the following code:

<xp:button styleClass="btn btn-primary" value="Label" id="myButton">
    <xp:this.rendered><![CDATA[#{javascript:XSP1Doc.getItemValueString("Status") == "myStatus"}]]></xp:this.rendered>
</xp:button>

When I open XSP1.xsp either with or without a ?documentId parameter in the querystring, it opens. When I open XSP2.xsp, it does not open, but rather tells me that:

Script interpreter error, line=1, col=9: 'XSP2Doc' is null

I cannot for the life of me determine what is different between the two pages. Even further and stranger, I can open documents created with XSP1.xsp in XSP2.xsp, and documents created in XSP2.xsp in XSP1.xsp, but I cannot open XSP2 with no document, or with a document created with the form used in XSP2.

I realize this may be confusing, please ask for clarification if necessary.

Edit:

I removed the buttons and the page loaded, and it loaded the back-end variables (assuming I had a documentId in the querystring). If I create a document using this page, then I can in fact open it. I still can't open the page if the buttons exist (which, if I have to test for null isn't a big deal, but I don't get why it would be different between two different pages.)

One thing I noticed is that the way I'm creating the XSP2 document, it doesn't have a $Revised field for some reason. Could this be causing this problem?

Edit 2: Well, I just copied XSP1, deleted everything in it, and recreated XSP2, and it works fine now. Still no idea what's different but at least I'm past it.

Interested in an answer so I'll leave this up.

Edit 3: Turns out I was doing something in a field that was recycling an object with the name XSP2 due to some shenanigans. I don't think this is a real issue. Not sure what do do here. Delete this question?

0

There are 0 answers