Commit a741e3fc by Nilu

adding occupations in a tree structure for saliya's reference

parent 8c2dd2b1
......@@ -20,25 +20,50 @@
<div>
<ul>
<%
for (Occupation occupation : Occupation.SearchByAll().andLevel(new EqualsFilter<>(OccupationLevel.LEVEL_1)).search(transaction))
Occupation[] firstLevelOccupations = Occupation.SearchByAll()
.andLevel(new EqualsFilter<>(OccupationLevel.LEVEL_1))
.search(transaction);
for (Occupation firstLevel : firstLevelOccupations)
{
%>
<li>
<%= occupation%>
</li>
<%
}
%>
</ul>
</div>
<div>
<ul>
<%
for (Occupation occupation : Occupation.SearchByAll().andLevel(new EqualsFilter<>(OccupationLevel.LEVEL_1)).search(transaction))
{
%>
<li>
<%= occupation%>
<%= firstLevel%>
<ul>
<%
for (Occupation secondLevel : firstLevel.getChildOccupationsSet())
{
%>
<li style="margin-left:30px;">
<%= secondLevel%>
<ul>
<%
for (Occupation thirdLevel : secondLevel.getChildOccupationsSet())
{
%>
<li style="margin-left:30px;">
<%= thirdLevel%>
<ul>
<%
for (Occupation fourthLevel : thirdLevel.getChildOccupationsSet())
{
%>
<li style="margin-left:30px;">
<%= fourthLevel%>
</li>
<%
}
%>
</ul>
</li>
<%
}
%>
</ul>
</li>
<%
}
%>
</ul>
</li>
<%
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment