This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Nov 7, 2014, 8:26 AM
9 Posts

SSJS does not run

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags:
  • Replies: 6

I've recently migrated some databases to a Shared hosting service (Prominic) and I have a problem with one of the apps that is driving me mad.

I've got a custom control that is used in a repeat control to show summary text from a doc and in the CC is a link to open the document using SSJS:

<xp:eventHandler event="onclick"
         submit="true" refreshMode="complete">
         <xp:this.action>
                 <xp:openPage name="/snippet.xsp"
                          target="openDocument"
                          documentId="#{javascript:project.getDocument().getUniversalID()}">
                 </xp:openPage>
         </xp:this.action>

</xp:eventHandler>

This is all pretty standard stuff but it doesn't work when the (server based) app is accessed through a browser. Clicking on the link does nothing! If I run a local http server, everthing works fine and the requested document opens as expected.

Can anyone suggest what might be going wrong here? I suspect something is missing on the server side

Thanks 

Phil Thain

Nov 7, 2014, 2:50 PM
298 Posts
Look at the html
See what url the action is building by viewing your html source or hovering over the link and looking at your status bar in your browser (if you have one...)

Howard
Nov 7, 2014, 4:12 PM
453 Posts
Do you get any error?

Can you get any values from the NotesXspDocument object "project",  is the document actually in a server based Database. I had a situation where I had a local replica copy of a database and it always opened the local replica. I would make a change then not be able to find it but awhile later it would show up. Needed to explicitly specify the server when opening the DB. Don't know if your issue is related or not. Try getting the server name and print it to the console to make sure.  

Nov 7, 2014, 4:43 PM
9 Posts
Pager for repeat control fails as well

@Bill - the 'project' variable is fine and is used elsewhere in the custom control to display information from the document.

@Howard - the link that gets displayed in the status bar looks ok to me. What I don't get is that it works when I use a browser on the app running on my local http server, and it works ok in my Notes Client (9.0.1), and it works in the Notes Client on the Server based replica, but it doesn't work when the server serves up the html for the browser.

Also, the pager for the repeat control doesn't work in exactly the same way, which makes me think it isn't something I have done which is screwing this up

thx

Nov 7, 2014, 7:38 PM
586 Posts
hmmm

I suggest you break this down to a brand new page and play with it there.  It could be there's other issues at play and you're just noticing it here.

 

You should definately use Chrome and web tools to see if there are errors on the javascript console...  see what the urls are actually rendered as..

The local http server is just not in any way I think a good test bed.  So because it works there is meaningless in my opinion.  So don't get to hung up on that.

The pager and repeat is interesting.  Does your repeat have an ID?  Pagers need that to work.  But the fact that you have 2 different problems going on which seem to be to be URL related is interesting.  So again there might be something bigger going on. 

If there's any kind of URL "masking" going on... or you're on the home page of the app rather then an internal page... that might be interesting to know.

Also in theory you could ask Prominc.  I hear they're very good at support.  They might be able to look at it and give you guidance as well.

 

Just some thoughts at the moment...

 

Dave

Nov 10, 2014, 10:30 AM
9 Posts
Thanks for the suggestions

It has not been a good weekend. My development machine has melted with some POST failure and Ive so far spent the morning ordering a replacementwhich should arrive lin a couple of days.

@David - The pager control has an id and it is really bugging me that it doesn't work. 

I will try your suggestions when I get time and post back. FWIW , here is the CC for the view:

<?xml version="1.0" encoding="UTF-8"?>

<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xc="http://www.ibm.com/xsp/custom">

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

    <xp:panel styleClass="lotusContent">

        <xc:button_newSnippet></xc:button_newSnippet>
        
        <xp:pager layout="Previous Group Next" id="pager1" for="repeat1"
            panelPosition="bottom">
        </xp:pager>
    

        <xp:panel style="margin-top:25.0px"><xp:repeat id="repeat1" var="project" rows="10" value="#{view1}">
            <div class="snippets" style="display:inline-block">

                <xc:view_row_snippetTable></xc:view_row_snippetTable>

            </div>
        </xp:repeat></xp:panel></xp:panel>
</xp:view>

Thanks

Nov 18, 2014, 10:26 AM
9 Posts
problem 'solved'?

When I returned to this problem after rebuilding my development machine, it had gone away, which is good news but I don't understand.

I did log the problem with Prominic and they looked into it but found nothing.

Thanks for the suggestions!


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal