on 09-25-2008 2:12 PM
Hello experts,
on my test JSP-site, I have following groupedCheckbox:
<hbj:checkboxGroup
id="cgIndexes"
columnCount="2"
>
<hbj:checkbox
id="CheckCPUStat"
text="CPU status"
key="chk_Stat"
tooltip="Check CPU status"
disabled="false"
checked="true"
/>
<hbj:checkbox
id="CheckCPUUsuage"
text="CPU usuage"
key="chk_Use"
tooltip="Actual CPU usuage"
disabled="false"
checked="false"
/>
<hbj:checkbox
id="CheckProc"
text="Processes"
key="chk_Process"
tooltip="Show active processes"
disabled="false"
checked="false"
/>
<hbj:checkbox
id="CheckProc"
text="Resources"
key="chk_Res"
tooltip="Available resources"
disabled="false"
checked="true"
/>
</hbj:checkboxGroup>
Now I want to access the GroupedCheckbox using the "getComponentByName"-function
CheckboxGroup cgIndexes = (CheckboxGroup) this.getComponentByName("cgIndexes");
cgIndexes is not null when I use "cgIndexes" as parameter but will turn into null, when I use any other parameter (foobar). So I guess, that the function is returing the "right" data..
Now I was trying to access cgIndex, but without success:
Iterator cbgIndexIterator = cgIndexes.iterator();
Iterator has no elements.....
Checkbox cbIndexes =(Checkbox) cgIndexes.getComponentForKey("chk_Stat");
cbIndexes.isChecked();
Exception in PortalRequestManager.dispatchRequest without timeout
[EXCEPTION]
java.lang.NullPointerException
Any hints for me ?
Thank you in advance
Edited by: Khaled el Taki on Sep 25, 2008 3:14 PM
Edited by: Khaled el Taki on Sep 25, 2008 3:15 PM
Edited by: Khaled el Taki on Sep 25, 2008 4:10 PM
I've tested now single checkboxes
<hbj:checkbox
id="CheckCPU"
text="CPU status"
key="chk_k1"
tooltip="Check CPU status"
disabled="false"
checked="true"
/>
I am able to check the checkbox, If it is checked or not.
Checkbox cbTest = (Checkbox) this.getComponentByName("chk_k1");
boolean isChecked = cbTest.isChecked();
I'm getting a "true"...
Any suggestions for CheckboxGroup ?
Would appreciate your help
Edited by: Khaloud on Sep 26, 2008 1:54 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.