reset password
Author Message
afetiso
Posts: 84
Posted 23:26 Feb 08, 2015 |

<c:forEach items="${plan.cells}" var="cell">
               <c:forEach items = "${cell.checkpoints}" var="checkP">
                        <input type="checkbox" name="checkbox" value="${checkp}" />
                        ${checkp.description} <a href="EditCheckPoint?index=${checkp.id}">[Edit]</a><br />
               </c:forEach>
 </c:forEach>    

And I have in user controller:

models.put( "plan", userDao.getPlan(id) );

In UserDaoImpl:

    @Override
    public Plan getPlan (Integer id) {
        Department dep = entityManager.find( Department.class, id ); 
        return dep.getCurrentPlan();
    }

I think problem in UserDaoImpl, because I need to create query to get correct plan with runways and stages from database, or is it any easiest way to get full Plan class with all information in it?

Output look like this:

 

Attachments:
Last edited by afetiso at 23:28 Feb 08, 2015.
afetiso
Posts: 84
Posted 23:27 Feb 08, 2015 |

The output look like this now

cysun
Posts: 2935
Posted 08:00 Feb 09, 2015 |

There are several problems in your code, but DAO doesn't seem to be one of them:

. You are displaying objects (e.g. ${stage}) when you should display object properties (e.g. ${stage.name}).

. You are displaying all the checkpoints in a plan in each cell.

. Your Checkpoint probably doesn't have a description property.