webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Change position of buttons from SearchBar control

    Posted Thu December 06, 2012 09:37 AM

    Hi,

    In our application we need to change the buttons “Save”, “Update”, “Clear” from the SearchBar control from right-down to left-down.

    Is there a way to handle the position of the buttons from the SearchBar control?

    Thank you!

    Br,
    Diana Z.


    #MWS-CAF-Task-Engine
    #webMethods
    #webMethods-BPMS


  • 2.  RE: Change position of buttons from SearchBar control

    Posted Thu December 06, 2012 11:57 AM

    Diana:

    Try to get a reference to that buttons to make the changes.

    For example, I’m using this code to hide the help button and insert a text in a search bar:

    
    UIComponent helpBtn = findComponentInRoot("keywordsHelpIcon"); 
    UIOutput keywordInput = (UIOutput) findComponentInRoot("keywordsTextInput");
    
    documentoEnSesion =  (String)reqsession.getAttribute("nroDoc");
    
    f (documentoEnSesion != null)
    keywordInput.setValue(documentoEnSesion);
    
    helpBtn.setRendered(false);

    Hope this help.

    Regards.


    #MWS-CAF-Task-Engine
    #webMethods-BPMS
    #webMethods


  • 3.  RE: Change position of buttons from SearchBar control

    Posted Mon December 10, 2012 05:40 AM

    Hi,

    Since the buttons are part of the component SearchBar I have only the id of the search bar so I cannot set a property for the buttons since I don’t have the ids of the buttons.

    Is there any other way to put the buttons on the left side?

    Thank you!
    Diana Z.


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods


  • 4.  RE: Change position of buttons from SearchBar control

    Posted Mon December 10, 2012 02:15 PM

    Norberto is on the right track, the search bar implementation behind the scenes is a composition of other controls, so you can lookup a control inside the searchbar and modify it.

    For example,

    
    //lookup the searchbar control, TODO: use the real id of the searchbar control
    UIComponent searchBar = findComponentInRoot("searchBar");
    
    //lookup the footer inside the searchbar by it's id
    UIComponent searchBarRefinePanelFooter = findComponent(searchBar, "refinePanelFooter");
    
    //Clear the 'cssClass' of the footer panel remove the right-justification
    searchBarRefinePanelFooter.getAttributes().put("styleClass", null);

    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS


  • 5.  RE: Change position of buttons from SearchBar control

    Posted Wed December 12, 2012 09:21 AM

    Thank you for the support!

    The solution that you have suggested works form me.

    Best regards,
    Diana Zoicas


    #MWS-CAF-Task-Engine
    #webMethods-BPMS
    #webMethods