Hi,
This is a sorting by keys' natural ordering (ascending) and I need to have also the descending order, can someone help?
I've looked at comparator and again at:
Map map = new TreeMap(Collections.reverseOrder());
but I haven't managed to make it work?
SortedMap sortedMap = new TreeMap()...
Thanks for your advice, I have my code working the way I want now with SortedMap, just sticked an ID at the end of the elements needed and got all the elements as unique.
So it's fine now with SortedMap and I've got the list in ascending order, do you know about the reversed() method to get the...
...== Stage.DONE)
{
pc = 100.0;
} else {
int done = item.getHistory().size();
int total = item.getItemType().getStages().size();
pc = 100.0 * done / total;
}
list.add(new Double(pc));
String html = "";
html += "<td class=columnwhite>" +item.getItemType().getDescription()+ "</td>";
html +=...
Forget about the previous question it's fine now; thanks a lot for your previous help with SortedMap it effectively works unfortunately that's not what I wanted as now
it displays only the table in that sorted order and the other columns don't sort anymore, what I wanted it to collect the order...
Hi,
I would need to add this in the html just before the ht.put:
<td class=columnwhite width="75">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:1px solid #000000;">
<tr>
<% if (pc > 0.00001) {%>
<td width="<%=pc%>%"><img src="images/bargrph_blue.gif"...
sorry Sedj,
but I didn't leave the other columns as I didn't want to confuse you but I need to stay in the same while loop for the other results like item.get......
<td class=columnwhite><%=item.getItemType().getDescription()%></td>
<td class=columnwhite><%=item.getSystem().getName()%></td>...
Ok, I've tried your method and it effectively works so I guess
I am not using the right method, roundPercentage.format(pc) is inside a while loop and this method doesn't sort all the elements? Am I missing something or should I use another method?
TreeSet ts = new TreeSet ();
ts.add...
Hi,
I am using this class for the first time and I am confused as I thought that SortedSet will sort the content of ts but it doesn't?
If I print out ts or orderComplete the content will be in the same order. Any advice available?
TreeSet ts = new TreeSet ();
ts.add...
Im not surprise, don't think I've explained very well!
We are now using Apache Torque and Im new to it...
I try again
This produce queries like sql:
Criteria cr = new Criteria();
cr.addJoin(ItemPeer.SYSTEMID, SystemPeer.SYSTEMID);
cr.addJoin(ItemPeer.STAGEID, StagePeer.STAGEID)...
Hi
I need to have a new criteria to join two tables in different manner:
table item
==========
stageId
nextStageId
table stage
===========
stageId
the query has to match where stageId from item equals stageId from stage and nextStageId from item equals stageId from stage
can anybody help...
Hi Sedj,
in the jsp file:
TableHeadFormat th = new TableHeadFormat("tableheads", "wlink", urlPrefix, btnDown, btnUp, isAsc, sortOrder);
the class file:
public TableHeadFormat(String thClass, String aClass, String hrefPrefix, String arrowDown,
String arrowUp, boolean...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.