Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8943723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:51:04+00:00 2026-06-15T11:51:04+00:00

I have an xpage in which I added a button. The button has an

  • 0

I have an xpage in which I added a button. The button has an Action Group and other actions following.

For some reason, the event is firing on page load. I do not have any page load events. The button is a core control, not the dojo button.

<xp:button id="button1" value="Approve Receiving Sheet"
    style="font-family:Arial;font-size:9pt;font-style:italic;width:180.0px"
    styleClass="button1">
<xp:eventHandler event="onclick" submit="true"  refreshMode="complete"     
     immediate="false" save="true"><xp:this.action><xp:actionGroup> 
<xp:this.condition>
 <![CDATA[#{javascript:var lookup = document1.getDocument().getUniversalID()
 var checkInvoices:string
 checkInvoices = @DbLookup("", "(Invoices by RS UNID)", lookup, 2)
 var returnValue = @If(@Implode(checkInvoices) == "", false, true)
 if(returnValue == false)
 {
    var x="alert('msg to user');"
    view.postScript(x)  
    return false
 }

 return true}]]></xp:this.condition><xp:confirm>

Other actions follow conditional action. Changing button from button to submit doesn’t do anything. The postscript message was showing up for true or false, which is why I moved it into an if statement. Thanks in advance, Steve

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:51:05+00:00Added an answer on June 15, 2026 at 11:51 am

    EDIT: My first answer was not correct! Here is the second one:

    The condition will be calculated as soon as one of the actions in the actionGroup are invoked. This means that as long as there is “nothing to do”, your condition will not be executed.

    But you have added a confirmation action: This type of action generates a CSJS code block, and checks the condition of the action group before it gets rendered (aka send to the browser). That’s why your CSJS alert is executed.

    P.S.
    If you are clicking the action multiple times and set the condition to false, the confirmation message will apear anyway. This seems to be a bug.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an XPage which has just broken due to (what should have been)
I have a xPage application which shows list of emails of the currently logged
I have a xPage with following content: <xe:restService id=restService preventDojoStore=false> <xe:this.service> <xe:viewJsonService viewName=vwChartData contentType=text/json>
I have a small problem with an Xpage Application and hope that someone has
I am struggling with the following. On my XPage I have a viewpanel component,
I have a radio button group that gets it's values using an @Dblookup. In
I have a quite large xpages project and now I have added some jars
I have a group of 6 radio groups on an xPage, each with a
I have an xPage which I have built with 3 combo boxes and 1
I have an XPage to display document data. To display RichText data I added

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.