Skip to main content

Maximo Bean Class Methods

Methods of Bean Classes of Maximo


Reset Method

 This method is called when a new filter is applied for the dialog's MboSet. 

@see psdi.webclient.system.beans.DataBean#reset()

    @Override

    public void reset() throws MXException

    {   

        try

        {   

            saveCurrentSelection();

        }

        catch (RemoteException e)

        {

            handleRemoteException(e);

        }



        super.reset();

    }
Initialize
It is used to initialize values on a dialog

@Override
    protected void initialize() throws MXException, RemoteException
    {
        uids = new ArrayList<Long>();
        super.initialize();
    }
Call Method
This method is called whenever an event is generated in the dialog (e.g. OK button is pressed). It is
     overridden to merge all previously saved selections and reset the resulting MboSet accordingly.
     *@see psdi.webclient.system.beans.MultiselectDataBean#callMethod(psdi.webclient.system.controller.WebClientEvent)

@Override
    public int callMethod(WebClientEvent event) throws MXException {
        mergeAllSelections();
        return super.callMethod(event);
    }


            Setting a value of Appbean Mbo from dialog 


DataBean appbean=app.getAppBean();


AssetRemote asm=(AssetRemote) appbean.getMbo();
                        
asm.setValue("DESCRIPTION", "Created from Bean");

              Since there is not save method on mbo so we used appbean.save
appbean.save();
              Finding dialog details from its id
String userValue=ci.getId();
              To Close a dialog to close a dialog method utility.sendevent(webclientevent we)
Utility.sendEvent(new WebClientEvent("dialogclose", app.getCurrentPageId(), null, sessionContext));
(Refer this tutorial for dialog values 
              To get Datasource from XML
DataBean databean = this.app.getDataBean("TEST_ds1");
        To get default value control of the property
ControlInstance ctr1 = this.clientSession.findControl("testmail_emailsubject");  

String subjecttemplate = ctr1.getProperty("value");
              To get data from Appbean
app.getAppBean().getString("wonum")
              To Run a Birt remote from java class
steps: 1. Take BirtRemote from Mxserver lookup method
                2. Run Birt Report by passing folloing param -  reportservice. runReport(ui,reportname,this.appName,para,outputFile.getName(),"pdf"
                                                ReportAdminServiceRemote  reportservice = (ReportAdminServiceRemote)MXServer.getMXServer().lookup("BIRTREPORT");
                                                                byte[] reportOutput = reportservice.runReport(ui, reportname, this.appName, para, outputFile.getName(), "pdf");

              To send report in a email
public static void sendEMail(String to, String cc, String bcc, String from, String subject, String message, String ReplyTo, String[] fileName, String[] urlName)

MXServer.sendEMail(emailto, emailcc, null, emailfrom, emailsubject, emailbody, null,  new String[] {outputFile.getAbsolutePath()}, (String[])null);

              To add where clause to Report

ReportParameterData para = new ReportParameterData();
para.addParameter("where", mbo.getUniqueIDName() + " = " + mbo.getUniqueIDValue());



              Showing msg box to user


Declation


  public void showMessageBox(WebClientEvent srcEvent, String messageFile, String key, String[] params)




this. clientSession.showMessageBox(this.clientSession.getCurrentEvent(), "messagebox", "CustomMessage", params);


              To apply QBE when dialog load



  protected void initialize()

  throws MXException, RemoteException

 {



 MXSession mxSession = sessionContext.getMXSession();



 setQbe("historyflag", MXFormat.getDisplayNoValue(mxSession.getLocale()));





 super.initialize();



 }


              To Display a dialog from bean class

if(woRemote.isNull())

        {

            RequestHandler.showDialog(sessionContext, "myDialog");

            return 1;

        }


              To get Mboset from databean

Databean dbBean=app.getDataBean(“1”)

MboSetRemote ms=dbBean.getMboSet();








Comments

  1. Excellent article and this helps to enhance your knowledge regarding new things. Waiting for more updates.
    Advantages of Angular JS
    Benefits of Angularjs

    ReplyDelete
  2. Thanks for this blog keep sharing your thoughts like this...
    What is Sales
    Importance Of Sales

    ReplyDelete

Post a Comment

Popular posts from this blog

Maximo Interview Questions - Maximo Technical and Functional Questions

Technical Questions How do you rate your self in :- 1. PL/SQL 2. Java 3. Automation Script 4. Mbo Customization 5. Admininstration Jobs 6. Funtional Concepts 7. Maximo Configuration Do not rate anything less than 7 unless you don't want interview to skip the topic Deployment / Administration  1. Explain LDAP integration? 2. Explain SSO and LTPA token? 3. What is global security? 4. How session is managed in Websphere or Maximo? 16. How to insert attributes from Backend? 5. How request is passed in Maximo? 6. How to do horizontal and vertical clustering? 7. Explain how you confire websphere for maximo manually? 8. What are Websphere MQ? 9. What is JMS, Connection Factory and Queues? 10. What is difference between vmm and ldap sync integration ? 11. What is Standalone and federated repository? 12. How to install a new language in Maximo? 13. What are the steps to apply a Fix pack in Maximo, Websphere or DB2? 14. Have you worked on any performance checking tools? 15