How to hide panels dynamically in the dialog. | Community
Skip to main content
Siva_Sogalapalli
Community Advisor
Community Advisor
October 16, 2015
Solved

How to hide panels dynamically in the dialog.

  • October 16, 2015
  • 1 reply
  • 821 views

Hi Team,

We've a requirement where we need to hide panels dynamically and show in some other time.  For example, we have three panels in the dialog. 

 

Dialog

    tab1 (panel)

        fields

    tab2 (panel)

        fields

    tab3 (panel)

        fields

 Now, I need to hide tab1 & tab2 when the page is equals (/content/xyz) and enable tab3. and remaining cases, show tab1 & tab2 and hide tab3.

Here is the sample dialog:

<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
    jcr:primaryType="cq:Dialog"
    title="dialog"
    xtype="dialog">
    <items
        jcr:primaryType="cq:Widget"
        xtype="tabpanel">
        <items jcr:primaryType="cq:WidgetCollection">
            <tab1
                jcr:primaryType="cq:Panel"
                title="Tab1">
                <items jcr:primaryType="cq:WidgetCollection">
                    <title
                        jcr:primaryType="cq:Widget"
                        fieldLabel="Title"
                        name="./value"
                        xtype="textfield"/>                    
                </items>               
            </tab1>
            <tab2
                jcr:primaryType="cq:Panel"
                title="Tab2">
                <items jcr:primaryType="cq:WidgetCollection">
                    <title
                        jcr:primaryType="cq:Widget"
                        fieldLabel="Title"
                        name="./value"
                        xtype="textfield"/>                    
                </items>               
            </tab2>
            <tab3
                jcr:primaryType="cq:Panel"
                title="Tab3">
                <items jcr:primaryType="cq:WidgetCollection">
                    <title
                        jcr:primaryType="cq:Widget"
                        fieldLabel="Title"
                        name="./value"
                        xtype="textfield"/>                    
                </items>               
            </tab3>
        </items>
    </items>
</jcr:root>

 

 

Quick response would be appreciated..

 

Thanks In advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015