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



Apr 10, 2013, 3:44 PM
37 Posts
topic has been resolvedResolved

Clicking an SSJS button to click another SSJS button

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 4
 Hello!

   I have one button that needs to do a full update ("button1"), and another button that needs to do a partial refresh ("button2").

   In button1, I tried the following, based on a post on StackOverflow

var eventHandler:com.ibm.xsp.component.xp.XspEventHandler = getComponent("button2");
eventHandler.getAction().invoke(facesContext, null); 

   Someone there seems to got it working, but I can't.  I get "eventHandler.getAction() is null", and I can't seem to find any documentation on this person's solution (which seems to be normal).

Any ideas? 

Thanks, in advance! 

Steve in NYC 

    
Apr 10, 2013, 5:29 PM
54 Posts
Re: Clicking an SSJS button to click another SSJS button
What´s about to trigger the click-event with CSJS??
Apr 10, 2013, 5:29 PM
37 Posts
Re: Clicking an SSJS button to click another SSJS button
 Hello!

   I tried to use CSJS in the onComplete event after the SSJS script is finished in button1.  However, onComplete only works if the button is a partial refresh.  Button1 needs to have a full update. 

Any other ideas? 

Thanks! 

Steve in NYC 
Apr 10, 2013, 11:21 PM
586 Posts
Re: Clicking an SSJS button to click another SSJS button
 Must it be a FULL refresh?  I often have one 1 panel that contains everything for the page.  At least the content area.  A partial refresh on that is often, though not always, pretty much the same as a full refresh.


 
Apr 11, 2013, 2:06 PM
37 Posts
Re: Clicking an SSJS button to click another SSJS button
 Thanks!

   I tried adding everything in the panel, so it could be a partial refresh, but the TinyMCE controls and Dr. Marky's Table Of Contents don't appear. 

   I've tried view.postScript with document.getElementById.click and dojo.byID.click.  No good.  =8( 

   Perhaps, there isn't a way to click on another button in SSJS or using view.postScript to click on a button in XPages.

   I think I'll just redo what I've been trying to do.  I find that this complex form, with all the partial refreshes, is still too slow for users with all the hide/when's and validation scripts.  I'll change it all to CSJS, which will make this issue obsolete. 

Take care! 

Steve in NYC 

"It hurts to be on the cutting edge." 

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