Maximo Open Forum

 View Only
  • 1.  Starter in Application Dev/Design- Request help in trying to add a Action(Button) to trap checkbox event in list view

    Posted 03-24-2021 09:56
    I made a custom AppBean class based on Bruno Portaluri's example here https://bportaluri.com/2011/08/call-java-method-on-action-menu-or.html.I have a custom MBO and my application shows Records from it.  When I execute the "RunJava", the one in the  More Actions menu command, and turn on the debugger I get it to break on my RunJava method and I can see certain variables coming in. My intent is when a user clicks the "Select Records" Check box and says click one or two rows I want to control or some method to be implemented in my AppBean class. I am stuck at the point where I click one or two rows and then I click Run Java on the left apparently I don't know if the system is actually sending me the two rows I clicked. Secondly, I created a button again called RUNJAVA
    that associated the Signature Option s correctly and put the event RUNJAVA as I had done in the presentation layer they don't work as if I can click on the button but nothing gets sent to the server and doesn't print my debug lines. My guess is my button needs to be part of a DataBean class for Maximo to understand it but I am not sure where exactly in my button or application XML I would specify that. In any case, my first question is what is the minimal amount of code or a method that I should override or create that would accomplish that. You will also notice that the trashcan icon is what I changed appropriately by looking at other applications . At the outset when I click the trash can it puts the two for delete, but I do not know do I have to write anything explicit for that MBO to be deleted as in would I have to write code in the Delete method in my app bean?

    Thanks guys for any help you can give mey way or if there is a starter example somewhere I can look and re purpose that will be most appreciated as well.




    #Customizations

    ------------------------------
    Appu nair
    APPECM
    ------------------------------


  • 2.  RE: Starter in Application Dev/Design- Request help in trying to add a Action(Button) to trap checkbox event in list view

    Posted 03-24-2021 10:08
    Further to my post : these lines of code sends me the selected rows
    ResultsBean rsb = getResultsBean();
    MboSetRemote rsbMboSet = rsb.getMboSet();
    Vector<MboRemote> selectedMbos = rsbMboSet.getSelection();
    WebClientEvent event = this.clientSession.getCurrentEvent();  //This will show RunJava as the event coming through...

    However, I still don't register anything for Delete, AddRow, my RUNJAVA button, etc(as you can see I am just overriding methods in the debugger and putting loglines as part of my learning)

    ------------------------------
    Appu nair
    APPECM
    ------------------------------



  • 3.  RE: Starter in Application Dev/Design- Request help in trying to add a Action(Button) to trap checkbox event in list view
    Best Answer

    Posted 03-26-2021 08:53
    You're on the right path.

    One thing to consider is that the Delete and AddRow methods were not meant to be executed on the List view of a standard application. Those options are typically for table controls inside of a single record within the application. The exception is single-page applications such as the Chart of Accounts application. You might consider looking at that one for guidance depending on the purpose of your custom application.

    Hope this helps,
    Alex

    ------------------------------
    Alex Walter
    A3J Group, LLC
    ------------------------------



  • 4.  RE: Starter in Application Dev/Design- Request help in trying to add a Action(Button) to trap checkbox event in list view

    Posted 03-26-2021 10:14
    Thanks, Alex for your time off I go....

    ------------------------------
    Appu nair
    APPECM
    ------------------------------



Newest Episode
Ep. 4 | System Properties in IBM Maximo

Watch Steven Shull walk through practical IBM Maximo system properties that can improve usability, query behavior, attachment handling, and the overall Maximo user experience.

MORE by Naviam Episode 4 cover
Watch Episode 4
Also available: Ep. 3 | Work Order Role-Based Application