tag:blogger.com,1999:blog-2002636098451095610.post6139173916046244672..comments2023-12-22T11:14:03.004+01:00Comments on IBM Maximo Customization and Development: How to display a YES/NO dialog and get user inputBrunohttp://www.blogger.com/profile/13748160755424198810noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-2002636098451095610.post-17227777616277950802016-08-23T13:35:17.898+02:002016-08-23T13:35:17.898+02:00For MXApplicationYesNoCancelException to work in D...For MXApplicationYesNoCancelException to work in DATABEAN you can use the following code<br />int userInput= MXApplicationYesNoCancelException.getUserInput("msgkey", MXServer.getMXServer(), getMbo().getUserInfo()); if(userInput==-1){<br /> System.out.println("Before throwing the messaged>>"+userInput);<br /> throw new MXApplicationYesNoCancelException("msgKey", "msggroup", "msgkey")<br /> //yes will give you 2 Cancel Will you give you 4 \<br /> <br /> }<br />if(userInput == 4){<br />//CancelCOde}<br />if(userInput==2){<br />//yes Code}<br /><br /><br />//For No you can check the Check box for No in Max Messages(Application Designer -> Messages dailogue box) and see what value it returns Most probably its 16Sharath Rajhttps://www.blogger.com/profile/09248858885031813210noreply@blogger.comtag:blogger.com,1999:blog-2002636098451095610.post-17542075327869202602015-11-18T21:21:18.679+01:002015-11-18T21:21:18.679+01:00Bruno first of all I want to thank you for your bl...Bruno first of all I want to thank you for your blog. It is very helpful. <br />I'm trying to show a dialog box after clicking on a button. I added the button but I do not know how should be the Java code to open the dialog. Could you please give some example? thank you very much.Pablohttps://www.blogger.com/profile/02633862445956060203noreply@blogger.comtag:blogger.com,1999:blog-2002636098451095610.post-49976722887393058282014-02-04T06:02:05.328+01:002014-02-04T06:02:05.328+01:00Hi Aparna,
I am facing almost same issue. Plus I ...Hi Aparna,<br /><br />I am facing almost same issue. Plus I am getting the error in logs as, Control XXX could not be found in order to process execute.SNEHAhttps://www.blogger.com/profile/11187459839297917345noreply@blogger.comtag:blogger.com,1999:blog-2002636098451095610.post-66766531097305736742014-02-04T06:01:48.007+01:002014-02-04T06:01:48.007+01:00Hi Aparna,
I am facing almost same issue. Plus I ...Hi Aparna,<br /><br />I am facing almost same issue. Plus I am getting the error in logs as, Control XXX could not be found in order to process execute.SNEHAhttps://www.blogger.com/profile/11187459839297917345noreply@blogger.comtag:blogger.com,1999:blog-2002636098451095610.post-75594012897378873772014-01-14T09:39:59.157+01:002014-01-14T09:39:59.157+01:00Hi Bruno,
I am using similar code to achive YES/N...Hi Bruno,<br /><br />I am using similar code to achive YES/NO dialog box functionality, but after clicking Yes or No, control is not passed to code and nothing is happened. Please help me on this, <br />Code:<br />public int load()<br />{ System.out.println("#########################File : starts#################################");<br /> {<br /> WebClientEvent event = clientSession.getCurrentEvent();<br /> int msgRet = event.getMessageReturn(); <br /> System.out.println("msgRet:"+msgRet);<br /> if (msgRet < 0)<br /> {<br /> System.out.println("--------------------------in case null-------------------------");<br /> throw new MXApplicationException("upload", "validsuccess");<br /> }<br /> else if (msgRet == WebClientRuntime.MSG_BTNYES)<br /> {<br /> System.out.println("----------------In insertion process----------------------------");<br /> System.out.println("--------------------------End: load method---------------------------");<br /> <br /> throw new MXApplicationException("upload", "success"); <br /> <br /> }<br /> return EVENT_HANDLED;<br /> }<br />}Shefalihttps://www.blogger.com/profile/05186229778786571686noreply@blogger.comtag:blogger.com,1999:blog-2002636098451095610.post-53716541850613851022013-12-23T14:10:51.792+01:002013-12-23T14:10:51.792+01:00if(getUserInfo().isInteractive()){
int userInpu...if(getUserInfo().isInteractive()){<br /><br /> int userInput = MXApplicationYesNoCancelException.getUserInput(getClass().getName(),MXServer.getMXServer(), getUserInfo());<br /> <br /> switch (userInput) {<br /> case MXApplicationYesNoCancelException.NULL :<br /> throw new MXApplicationYesNoCancelException(getClass().getName(), "workorder", "youDisplayMsg");<br /> case MXApplicationYesNoCancelException.NO :<br /> break;<br /> case MXApplicationYesNoCancelException.YES :<br /> return 2;<br /> }<br /><br />// You block of code here for workorder status to be chaged<br /><br />}Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2002636098451095610.post-7523806184791441102013-12-17T10:51:57.821+01:002013-12-17T10:51:57.821+01:00Your code is very different from the one I have po...Your code is very different from the one I have posted.<br />You have to check event.getMessageReturn() value to retrieve user's input.Brunohttps://www.blogger.com/profile/13748160755424198810noreply@blogger.comtag:blogger.com,1999:blog-2002636098451095610.post-63792264660303420612013-09-10T00:34:10.562+02:002013-09-10T00:34:10.562+02:00Hi Bruno,
I want to achieve a similar goal in MBO...Hi Bruno,<br /><br />I want to achieve a similar goal in MBO code at the click of change status of workorder(in toolbar).<br />The link above is not working, could you please help.<br />The requirement is : There are 2 button: YES,NO<br />At click of YES, status of Workorder should not be changed.<br />At click of NO, status of workorder should be changed.<br />However, i tried the following:<br /> if(getUserInfo().isInteractive())<br />{<br />int userinput = MXApplicationYesNoCancelException.getUserInput("abc", MXServer.getMXServer(),getUserInfo());<br /> <br />switch (userinput)<br />{<br />case MXApplicationYesNoCancelException.NULL:<br />if (wonums != "" ) { <br />Object[] params = {wonums};<br />throw new MXApplicationYesNoCancelException("abc", "workorder", "validateLimitPOContract",params);<br />}<br />case MXApplicationYesNoCancelException.NO:break;<br />case MXApplicationYesNoCancelException.YES: <br />}<br />} <br /><br />But ,at the click of YES,status is changing,it would be great if you can guide me.<br />And moreover,i guess it is calling changestatus twice. <br /><br />Regards,<br />Aparna SVAparnahttps://www.blogger.com/profile/14937672976145226317noreply@blogger.com