Revision history [back]

click to hide/show revision 1
initial version

asked 2014-01-22 22:33:08 +0800

paula gravatar image paula

Groupbox open and close

hi, I have a Groupbox, which has a checkbox, some labels and an icon in caption. I want to make the Groupbox open/close only when user clicks the icon in the cation. The icon works fine.

However, whenever I check/uncheck the checkbox, the groupbox is also open/close. I have no idea how this happens. Can somebody help?

Following is my code:

<groupbox id="testGB" open="@{data.panelOpen}" &gt;="" <br=""> <label value="test"/>
<image src="collapse_plus.png" onclick="controller.togglePanel(self);"/>

...

</groupbox>

In my controller:

public void togglePanel(final Component tbtn) {
Groupbox gb = getParentComponent(tbtn, Groupbox.class); data.setPanelOpen(!data.getPanelOpen());
gb.invalidate(); binder.loadComponent(gb); }

public void checkMember(final Component tbtn) {
//do something else }

I actually tried to remove all code from checkMember() method and the Groupbox still gets open/close when the checkbox is checked/unchecked.

Please help!!!

Thank You!

Groupbox open and close

hi, I have a Groupbox, which has a checkbox, some labels and an icon in caption. I want to make the Groupbox open/close only when user clicks the icon in the cation. The icon works fine.

However, whenever I check/uncheck the checkbox, the groupbox is also open/close. I have no idea how this happens. Can somebody help?

Following is my code:

<groupbox id="testGB" open="@{data.panelOpen}" &gt;="" <br=""> <label value="test"/>
<image src="collapse_plus.png" onclick="controller.togglePanel(self);"/>

...

</groupbox>

In my controller:

public void togglePanel(final Component tbtn) {
Groupbox gb = getParentComponent(tbtn, Groupbox.class); data.setPanelOpen(!data.getPanelOpen());
gb.invalidate(); binder.loadComponent(gb); }

public void checkMember(final Component tbtn) {
//do something else }

I actually tried to remove all code from checkMember() method and the Groupbox still gets open/close when the checkbox is checked/unchecked.

Please help!!!

Thank You!

Groupbox open and close

hi, I have a Groupbox, which has a checkbox, some labels and an icon in caption. I want to make the Groupbox open/close only when user clicks the icon in the cation. The icon works fine.

However, whenever I check/uncheck the checkbox, the groupbox is also open/close. I have no idea how this happens. Can somebody help?

Following is my code:

<groupbox id="testGB" open="@{data.panelOpen}" &gt;="" <br=""> open="@{data.panelOpen}">
<checkbox oncheck="controller.checkMember(self);" checked="@{data.selected}"/>
<label value="test"/>
<image src="collapse_plus.png" onclick="controller.togglePanel(self);"/>

...
</groupbox>

In my controller:

public void togglePanel(final Component tbtn) {
Groupbox gb = getParentComponent(tbtn, Groupbox.class); data.setPanelOpen(!data.getPanelOpen());
gb.invalidate(); binder.loadComponent(gb); }

public void checkMember(final Component tbtn) {
//do something else }

I actually tried to remove all code from checkMember() method and the Groupbox still gets open/close when the checkbox is checked/unchecked.

Please help!!!

Thank You!

Groupbox open and close

hi, I have a Groupbox, which has a checkbox, some labels and an icon in caption. I want to make the Groupbox open/close only when user clicks the icon in the cation. The icon works fine.

However, whenever I check/uncheck the checkbox, the groupbox is also open/close. I have no idea how this happens. Can somebody help?

Following is my code:

<groupbox id="testGB" open="@{data.panelOpen}">
<checkbox oncheck="controller.checkMember(self);" checked="@{data.selected}"/> <label value="test"/>
<image src="collapse_plus.png" onclick="controller.togglePanel(self);"/>

...
</groupbox>

In my controller:

public void togglePanel(final Component tbtn) {
Groupbox gb = getParentComponent(tbtn, Groupbox.class); data.setPanelOpen(!data.getPanelOpen());
gb.invalidate(); binder.loadComponent(gb); }

public void checkMember(final Component tbtn) {
//do something else }

I actually tried to remove all code from checkMember() method and the Groupbox still gets open/close when the checkbox is checked/unchecked.

Please help!!!

Thank You!

Groupbox open and close

hi, Hi, I have a Groupbox, Groupbox, which has a checkbox, checkbox, some labels and an icon in caption. I want to make the Groupbox open/close Groupbox open/close only when user clicks the icon in the cation. The icon works fine.

However, whenever I check/uncheck the checkbox, the groupbox is also open/close. I have no idea how this happens. Can somebody help?

Following is my code:

<groupbox id="testGB" open="@{data.panelOpen}"> 
<caption> <checkbox oncheck="controller.checkMember(self);" checked="@{data.selected}"/> onCheck="controller.checkMember(self);" checked="@{data.selected}" /> <label value="test"/>
value="test" /> <image src="collapse_plus.png" onclick="controller.togglePanel(self);"/>

onClick="controller.togglePanel(self);" /> </caption> <div id="gbPanel"> ...
</groupbox>

</div> </groupbox> In my controller:

controller: public void togglePanel(final Component tbtn) {
Groupbox gb = getParentComponent(tbtn, Groupbox.class); data.setPanelOpen(!data.getPanelOpen());
gb.invalidate(); binder.loadComponent(gb); }

} public void checkMember(final Component tbtn) {
//do something else }

}

I actually tried to remove all code from checkMember() checkMember() method and the Groupbox Groupbox still gets open/close open/close when the checkbox checkbox is checked/unchecked.checked/unchecked.

Please help!!!

Thank You!

Groupbox open and close

Hi, I have a Groupbox, which has a checkbox, some labels and an icon in caption. I want to make the Groupbox open/close only when user clicks the icon in the cation. The icon works fine.

However, whenever I check/uncheck the checkbox, the groupbox is also open/close. I have no idea how this happens. Can somebody help?

Following is my code:

<groupbox id="testGB" open="@{data.panelOpen}">     
   <caption>
   <checkbox onCheck="controller.checkMember(self);" checked="@{data.selected}" />
   <label value="test" />   
   <image src="collapse_plus.png" onClick="controller.togglePanel(self);" />
   </caption>
   <div id="gbPanel">
    ...
    </div>
</groupbox>

In my controller:

public void togglePanel(final Component tbtn) {     
        Groupbox gb = getParentComponent(tbtn, Groupbox.class);
        data.setPanelOpen(!data.getPanelOpen());        
        gb.invalidate();
        binder.loadComponent(gb);
    }

public void checkMember(final Component tbtn) {   
    //do something else
}

bellow my code sample:

public class Data{

private Boolean panelOpen = false;

public Boolean getPanelOpen() { return panelOpen; }

public void setPanelOpen(Boolean panelOpen) { this.panelOpen = panelOpen; } }

I actually tried to remove all code from checkMember() method and the Groupbox still gets open/close when the checkbox is checked/unchecked.

Please help!!!

Thank You!

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More