hi everyone, in my jsp i have a table constructed dynamically like the following:
' retour.append("");
try {
s= HibernateUtil.currentSession(); tx=s.beginTransaction(); Query query = s.createQuery(HQL_QUERY);
for(Iterator it=query.iterate();it.hasNext();)
{
if(it.hasNext()){
Dailytimesheet object=(Dailytimesheet)it.next();
retour.append("<td>" +object.getActivity() +"</td>");
retour.append("<td>" +object.getProjectCode() + "</td>");
retour.append("<td>" +object.getWAName() + "</td>");
retour.append("<td>" +object.getTaskCode() +"</td>");
retour.append("<td>" +object.getTimeFrom() +"</td>");
retour.append("<td>" +object.getTimeSpent() + "</td>");
retour.append("<td>" +object.getPercentTaskComplete() + "</td>");
if (droitdaccess)
{
retour.append(""); retour.append(""); retour.append("");
retour.append("<td bordercolor=#FFFFFF>");
retour.append("<input type=\"hidden\" id=\"id_"+nomTab+"_"+compteur+"\" value=\""+object.getIdDailyTimeSheet()+"\"/>");
retour.append("<img src=\"icon_delete.gif\" onClick=\"deletearowById('id_"+nomTab+"_"+compteur+"')\" style=\"cursor:pointer\" name=\"action\" value=\"deleting\" />");
retour.append("</td>");
}
}
compteur++;
retour.append("</tr>");
}
retour.append ("</table>");'
next to the table i want to display a button named send in order to send the table content. I do not really want to dispaly this button where the table is empty.
So at least if the table is populated by only one record i want that button being displayed. How should i deal in this case.
Thanks.