Hi Hubert,
u are almost there..I missed on onething, I thought u would have guessed it.
Anyways now one thing u have to do..
Scenario:
Say Accession Code 123 has 3 records.Now when u are setting the values in ur Collection u have to make sure that for the first Record the Count field has a value 3 and for all the rest 2 rows it has a value 0.
So the individual rows in the pair should have values in the Counter as Follows:
/-- Pair 1
pair.setName_of_protein(tuple[1].toString());
pair.setPeptide_seq(tuple[2].toString());
pair.setLength_of_peptideseq((Integer)tuple[3]); pair.setStartpos_in_proteinseq((Integer)tuple[4]);
pair.setLength_of_protein((Integer)tuple[5]);
pair.setCounter(3);
/-- Pair 2
pair.setName_of_protein(tuple[1].toString());
pair.setPeptide_seq(tuple[2].toString());
pair.setLength_of_peptideseq((Integer)tuple[3]); pair.setStartpos_in_proteinseq((Integer)tuple[4]);
pair.setLength_of_protein((Integer)tuple[5]);
pair.setCounter(0);
/-- Pair 3
pair.setName_of_protein(tuple[1].toString());
pair.setPeptide_seq(tuple[2].toString());
pair.setLength_of_peptideseq((Integer)tuple[3]); pair.setStartpos_in_proteinseq((Integer)tuple[4]);
pair.setLength_of_protein((Integer)tuple[5]);
pair.setCounter(0);
In
JSP Only one CHange
<logic:iterate name="proteinPeptideForm" property="protPeptSet" id="proPep">
<tr><%-- peptide informations --%>
<logic:notEqual name="proPep" property="counter" value="0"><td nowrap rowspan= '<bean:write name="proPep" property="counter"/>' align="center" valign="top"><bean:write name="proPep" property="accession_code" />
</td>
<td nowrap rowspan= '<bean:write name="proPep" property="counter"/>' align="center" valign="top"><bean:write name="proPep" property="name_of_protein" />
</td>
</logic:notEqual> <td><bean:write name="proPep" property="peptide_seq" /></td>
<td><bean:write name="proPep" property="length_of_peptideseq" /></td>
<td><bean:write name="proPep" property="startpos_in_proteinseq" /></td>
<td><bean:write name="proPep" property="length_of_protein" /></td>
</tr>
</logic:iterate>
U can automate the updation of the counter by holding the first element of the Iterator for Accession Code 123 and then updating its counter field for each iteration of Accession Code 123
Come on we can do it now..
If there is any issues pls do get back..
Thanks