Commit a741e3fc by Nilu

adding occupations in a tree structure for saliya's reference

parent 8c2dd2b1
...@@ -20,25 +20,50 @@ ...@@ -20,25 +20,50 @@
<div> <div>
<ul> <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> <li>
<%= occupation%> <%= firstLevel%>
</li> <ul>
<% <%
} for (Occupation secondLevel : firstLevel.getChildOccupationsSet())
%> {
</ul> %>
</div> <li style="margin-left:30px;">
<div> <%= secondLevel%>
<ul> <ul>
<% <%
for (Occupation occupation : Occupation.SearchByAll().andLevel(new EqualsFilter<>(OccupationLevel.LEVEL_1)).search(transaction)) for (Occupation thirdLevel : secondLevel.getChildOccupationsSet())
{ {
%> %>
<li> <li style="margin-left:30px;">
<%= occupation%> <%= thirdLevel%>
<ul>
<%
for (Occupation fourthLevel : thirdLevel.getChildOccupationsSet())
{
%>
<li style="margin-left:30px;">
<%= fourthLevel%>
</li>
<%
}
%>
</ul>
</li>
<%
}
%>
</ul>
</li>
<%
}
%>
</ul>
</li> </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