Hello,

I have a query about PPR Trinidad 1.2.8.

I have a form with a number of components. When I click the
tr:selectBooleanCheckbox checkbox component, I would like the tr:input
Date component not to be rendered.

Ie.

<h:form id="main">  

        <tr:inputDate id="TradeDateEnd"   value="#{beanX.tradeDateEnd}"
partialTriggers="SimpleSearch"/>


       ....


        <tr:selectBooleanCheckbox id="SimpleSearch"
label="SimpleSearch:"
                          value="#{beanX.simpleSearch}"
immediate="true" autoSubmit="true"
valueChangeListener="#{beanX.updateSimpleSearch}"/>
                        
                                        
                                        

        ...


</h:form>

The updateSimpleSearch method is called when the checkbox is clicked.

public void updateSimpleSearch (ValueChangeEvent  valueChangeEvent)
{
                
                ...
                UIComponent tradeDateEnd =
((UIComponent)valueChangeEvent.getComponent()).findComponent("TradeDateE
nd");
                tradeDateEnd.setRendered(false);
                RequestContext.getCurrentInstance
().addPartialTarget(tradeDateEnd);
        
             ...                
                
                
}

However the page is only updated when, I hit the submit button. How can
I get the page to update by only clicking the checkbox and the date
component disappear.

Please advise.

Thanks,

Reply via email to