Tom
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/qZH1l0tKImkJ.
@for((property, value) <- SortedMap.empty[String, String] ++ properties) { ... }
(properties is a java.util.TreeMap<String, String>. Don't forget to import scala.collection.SortedMap)I guess it is related to the Java->Scala conversion. Can you try to with:stuff.asScala(to convert is explicitely)
On 7 avr. 2012, at 17:13, Pascal Voitot Dev wrote:
I'm not sure to understand your problem.
Do you have an example of code of entering values from java treemap and then seeing different order in Scala?
Pascal
On Thu, Mar 29, 2012 at 4:42 PM, y b wrote:
Hello,
I'm new to PlayFramework. I'm currently trying to do something very simple.
I have a treemap with elements sorted by values.
When I get this treemap in my scala html page, the order is not preserved.
How could I force Scala to work with the exact same order than java ?
Or maybe I'm doing something wrong ?
The java code is ... well nothing special about it.
main.scala.html
@(title: String)(stuff: TreeMap[String, Integer])
...
@for((key, value) <- stuff) {
<tr>
<td>@key</td>
<td>@value</td>
</tr>
}
...
Any idea ?
Thanks ahead,
yb
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/qZH1l0tKImkJ.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
I guess it is related to the Java->Scala conversion. Can you try to with:stuff.asScala(to convert is explicitely)
On 7 avr. 2012, at 17:13, Pascal Voitot Dev wrote:
I'm not sure to understand your problem.
Do you have an example of code of entering values from java treemap and then seeing different order in Scala?
Pascal
On Thu, Mar 29, 2012 at 4:42 PM, y b wrote:
Hello,
I'm new to PlayFramework. I'm currently trying to do something very simple.
I have a treemap with elements sorted by values.
When I get this treemap in my scala html page, the order is not preserved.
How could I force Scala to work with the exact same order than java ?
Or maybe I'm doing something wrong ?
The java code is ... well nothing special about it.
main.scala.html
@(title: String)(stuff: TreeMap[String, Integer])
...
@for((key, value) <- stuff) {
<tr>
<td>@key</td>
<td>@value</td>
</tr>
}
...
Any idea ?
Thanks ahead,
yb
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/qZH1l0tKImkJ.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
I guess it is related to the Java->Scala conversion. Can you try to with:stuff.asScala(to convert is explicitely)
On 7 avr. 2012, at 17:13, Pascal Voitot Dev wrote:
I'm not sure to understand your problem.
Do you have an example of code of entering values from java treemap and then seeing different order in Scala?
Pascal
On Thu, Mar 29, 2012 at 4:42 PM, y b wrote:
Hello,
I'm new to PlayFramework. I'm currently trying to do something very simple.
I have a treemap with elements sorted by values.
When I get this treemap in my scala html page, the order is not preserved.
How could I force Scala to work with the exact same order than java ?
Or maybe I'm doing something wrong ?
The java code is ... well nothing special about it.
main.scala.html
@(title: String)(stuff: TreeMap[String, Integer])
...
@for((key, value) <- stuff) {
<tr>
<td>@key</td>
<td>@value</td>
</tr>
}
...
Any idea ?
Thanks ahead,
yb
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/qZH1l0tKImkJ.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
I guess it is related to the Java->Scala conversion. Can you try to with:stuff.asScala(to convert is explicitely)
On 7 avr. 2012, at 17:13, Pascal Voitot Dev wrote:
I'm not sure to understand your problem.
Do you have an example of code of entering values from java treemap and then seeing different order in Scala?
Pascal
On Thu, Mar 29, 2012 at 4:42 PM, y b wrote:
Hello,
I'm new to PlayFramework. I'm currently trying to do something very simple.
I have a treemap with elements sorted by values.
When I get this treemap in my scala html page, the order is not preserved.
How could I force Scala to work with the exact same order than java ?
Or maybe I'm doing something wrong ?
The java code is ... well nothing special about it.
main.scala.html
@(title: String)(stuff: TreeMap[String, Integer])
...
@for((key, value) <- stuff) {
<tr>
<td>@key</td>
<td>@value</td>
</tr>
}
...
Any idea ?
Thanks ahead,
yb
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/qZH1l0tKImkJ.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.