Topic
  • 3 replies
  • Latest Post - ‏2013-05-11T14:20:16Z by amir_samir
black_unicorn
black_unicorn
2 Posts

Pinned topic gotoapp with filtering parameters, ¿is possible?

‏2011-09-05T12:54:20Z |
Greetings from Montevideo, Uruguay (Latin America)

I am currently developing in Maximo 7.1.18.
I've been trying the following:

**************************************************************************************************************************
EventType = new WebClientEvent WebClientEvent ("gotoapp", null, "labrep" SessionContext);

eventType.addParameter ("additionalevent", "useqbe");
eventType.addParameter ("additionaleventvalue", "laborcode =" + this.laborCode);

WebClientEvent WebClientEvent eventExec = new ("execevent" sessionContext.getCurrentAppId (), eventType, SessionContext);

//Define the object created event in SessionContext
sessionContext.setCurrentEvent (eventExec);

//Send event from The Utility
Utility.sendEvent (eventExec);

sessionContext.queueRefreshEvent ();
**************************************************************************************************************************

My intention is when a user pressing a button his/her will redirected to a page with RETURN filtering for the laborcode but de filtering don´t work:

If instead of using:
**************************************************************************************************************************
EventType = new WebClientEvent WebClientEvent ("gotoapp", null, "labrep" SessionContext);
**************************************************************************************************************************

use:
**************************************************************************************************************************
EventType = new WebClientEvent WebClientEvent ("loadapp", null, "labrep" SessionContext);
**************************************************************************************************************************

I filtered through the parameter, but not a return header page appear.

¿Any idea?
Thank you very much.
  • amir_samir
    amir_samir
    158 Posts

    Re: gotoapp with filtering parameters, ¿is possible?

    ‏2013-04-30T20:33:48Z  

    Hi ,

     

    any Updates about that , i;m stuck  in the same position

     

    BR,

  • scottsd
    scottsd
    121 Posts

    Re: gotoapp with filtering parameters, ¿is possible?

    ‏2013-05-07T15:21:49Z  

    Hi ,

     

    any Updates about that , i;m stuck  in the same position

     

    BR,

    Here's some code from our Launch to Scheduler button in the Change application that sounds like what you need:

     

                  
            WebClientSession wcs = clientSession.getCurrentApp().getWebClientSession();
            StringBuffer newUrl = new StringBuffer(wcs.getMaximoRequestURL());
            newUrl.append("?event=gotoapp&value=");
            newUrl.append(appName);
            if ( uniqueId > -1 )
            {
                newUrl.append("&uniqueid=");
                newUrl.append(uniqueId);
            }
            ComponentInstance compInst=creatingEvent.getSourceComponentInstance();
            if (compInst == null) {
                // this likely means the event came from a wf, do not change the textbox ID
                // in the presentation xml file
                String linkedComponentId = "main_PMCHGSKDPRG-textbox_detailbutton";
                compInst = getCreator().getComponent(linkedComponentId);            
            }

            String compId=compInst.getId();
            String returnAttribute = "PMCHGSKDPRG";
            clientSession.getCurrentApp().getAppBean().setReturnAttribute(returnAttribute);
            clientSession.getCurrentApp().getAppBean().setReturnComponent(compInst);
            clientSession.getCurrentApp().getAppBean().setReturnComponentId(compId);
            
            
            clientSession.getCurrentApp().put("returninputR/O", "false");
            clientSession.getCurrentApp().setAppLinkBean(app.getAppBean());
            clientSession.getCurrentApp().put("applinked","true");
            clientSession.gotoApplink(newUrl.toString());

  • amir_samir
    amir_samir
    158 Posts

    Re: gotoapp with filtering parameters, ¿is possible?

    ‏2013-05-11T14:20:16Z  
    • scottsd
    • ‏2013-05-07T15:21:49Z

    Here's some code from our Launch to Scheduler button in the Change application that sounds like what you need:

     

                  
            WebClientSession wcs = clientSession.getCurrentApp().getWebClientSession();
            StringBuffer newUrl = new StringBuffer(wcs.getMaximoRequestURL());
            newUrl.append("?event=gotoapp&value=");
            newUrl.append(appName);
            if ( uniqueId > -1 )
            {
                newUrl.append("&uniqueid=");
                newUrl.append(uniqueId);
            }
            ComponentInstance compInst=creatingEvent.getSourceComponentInstance();
            if (compInst == null) {
                // this likely means the event came from a wf, do not change the textbox ID
                // in the presentation xml file
                String linkedComponentId = "main_PMCHGSKDPRG-textbox_detailbutton";
                compInst = getCreator().getComponent(linkedComponentId);            
            }

            String compId=compInst.getId();
            String returnAttribute = "PMCHGSKDPRG";
            clientSession.getCurrentApp().getAppBean().setReturnAttribute(returnAttribute);
            clientSession.getCurrentApp().getAppBean().setReturnComponent(compInst);
            clientSession.getCurrentApp().getAppBean().setReturnComponentId(compId);
            
            
            clientSession.getCurrentApp().put("returninputR/O", "false");
            clientSession.getCurrentApp().setAppLinkBean(app.getAppBean());
            clientSession.getCurrentApp().put("applinked","true");
            clientSession.gotoApplink(newUrl.toString());

    Hi , thanks for the replay ..

    the code is working now , the event is fired when a button is pressed , how can i achieve the same with a table column control  that is configured as a link and assigned to the same event - as the button.

    I have tried but not working .

     

    BR,

    Amir