1 Reply Latest reply on Jul 8, 2011 3:11 PM by zearys

    Disabled modalpanel controls from status

    zearys Newbie

      Hi, I wish to make a modalPanel to indicate to the user the status of his request and I would also like to display an exit control, disabled when waiting and enabled when the status is stop.

       

      So I would like to know if someone would have any idea on how disabled/ enabled the <f:facet name="controls"> depending of the <a:status>

       

      Here’s a solution I’ve tried, but don't work :

       

       

      <rich:modalPanel id="traitementEnCoursPanel" autosized="true" width="250">

       

      <f:facet name="header">

      <h:panelGroup>

      <h:outputText value="titre"></h:outputText>

      </h:panelGroup>

      </f:facet>

       

      <f:facet name="controls">

      <h:panelGroup>

            <h:graphicImage value="/img/false.png" styleClass="hidelink" id="hidelink"/>

                  <rich:componentControl for="traitementEnCoursPanel" attachTo="hidelink" operation="hide" event="onclick"/>

            </h:panelGroup>

      </f:facet>

       

      <a:status id="commonstatus"

                startText="#{messages['txtTraitementEnCoursOption1']}" startStyle="color:red"

                onstart="#{rich:component('promptRetraiter')}.disable(); return false;"

                stopText="#{messages['txtTraitementEnCoursOption2']}" stopStyle="color:green"

                onstop="#{rich:component('promptRetraiter')}.disable(); return true;"/>

      </rich:modalPanel>

        • 1. Re: Disabled modalpanel controls from status
          zearys Newbie

          Actually, in the <a:status I just post, the rich:component(‘ID’) was wrong from the modalpanel I wish to disabled. But even with the good id nothing change.

           

           

          <a:status id="commonstatus"

                    startText="#{messages['txtTraitementEnCoursOption1']}" startStyle="color:red"

                    onstart="#{rich:component('traitementEnCoursPanel')}.disable(); return false;"

                    stopText="#{messages['txtTraitementEnCoursOption2']}" stopStyle="color:green"

                    onstop="#{rich:component('traitementEnCoursPanel')}.disable(); return false;"/>