Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiboxes - How to show the selected ones ?

 
Renata Santos
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a team form and a member form, team contains members.
In my members jsp, I want to show checkboxes with the possible members and I want to show the already members as checked checkbox.

I am doing something wrong , because its not working… Can someone help me ?

I have in my form two ArrayList with getters and setters
private List possiveisMembros = new ArrayList(); //possible member
private List membrosSelecionados = new ArrayList(); // selected member

in my action i populate them with value from my database.
//each member have a id(codigoFuncionario) and a name (nomeMembro).
//mef is my membersForm
ArrayList possiveisMembros = getListaPossiveisMembrosEquipe(); //method that get the values from DB for possible members
ArrayList membrosSelecionados = getListaMembrosEquipeSelecionados(mef); //method that get the values from DB for my selected members

mef.setPossiveisMembros(possiveisMembros); // setting value in my form – possible members
mef.setMembrosSelecionados(membrosSelecionados); // setting value in my form – selected members

in my JSP :

<logic:iterate id="possiveisMembros" name="membrosEquipeForm" property="possiveisMembros" scope="request">
<html:multibox name="membrosEquipeForm" property="membrosSelecionados" >
<bean:write name="possiveisMembros" property="codigoFuncionario"/>
</html:multibox>
<bean:write name="possiveisMembros" property="nomeMembro"/>
<br>
</logic:iterate>


when i execute thr members jsp , the page show all my possible members, but it doest bring the already members checked . WHY? What am doing wrong?

TKS, in advance !!!

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic