IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Radio button default value on refresh

    Posted 02/02/16 05:44 AM

    Hi All,

    I have a view with a radio button group.

    Every time the view is refreshed, I want the first radio button to be selected by default.

    Do you have an idea how this can be achieved?


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


  • 2.  RE: Radio button default value on refresh

    Posted 02/02/16 05:17 PM

    You can just change the field the the radio button group control’s value property is bound to right before the view is rendered.

    For example, override the preRenderResponse method of your page bean with something like this:

    
    //some field bound to the radio button group controls value property
    private String radioGroupValue = "one";
    
    /* (non-Javadoc)
    * @see com.webmethods.caf.faces.bean.BaseViewBean#preRenderResponse(javax.faces.event.PreRenderViewEvent)
    */
    @Override
    public void preRenderResponse(PreRenderViewEvent e) {
    //TODO: set the field bound to your radio button group here
    radioGroupValue = "two";
    
    super.preRenderResponse(e);
    }

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