チェックボックスから復習したい項目をチェックして、項目を取得するためにリストを反復するときに命令をチェックして無限ループ これは私のコードです:selectManyCheckboxからチェックされたItemを取得しようとするとループが無限にループする
JSF:
<h:selectManyCheckbox value="#{TestAjax.selectedItemscheckbox}">
<f:selectItem itemValue="priority.pname" itemLabel="By priority" />
<f:selectItem itemValue="project.pname" itemLabel="By project" />
</h:selectManyCheckbox>
コード:
public Class TestAjax {
private ArrayList<String> selectedItemscheckbox; //list of checkbox used for grouping
public ArrayList<String> getSelectedItemscheckbox() {
return selectedItemscheckbox;
}
public void setSelectedItemscheckbox(ArrayList<String> selectedItemscheckbox) {
this.selectedItemscheckbox = selectedItemscheckbox;
}
public void CreateQueryNumber()
{
Iterator it= selectedItemscheckbox.iterator();
System.out.println("checkeddddddddddd"+selectedItemscheckbox);
while(it.hasNext()) ===>loop to the infinity
{
System.out.println("one"+ it.toString());
select ="select count(jiraissue.id) as nb";
from ="jiraissue j ,priority pr ,project proj";
where="j.project=proj.id";
jointure="j.priority =pr.id";
groupBy="group by "+it.toString();
}
、)私は(代わりにit.nextのit.toStringを()putedているあなたに感謝、この私はまだ私のコーヒーを飲んでいないため:) – rym
それは毎朝起きます! = P – Fido