-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
b:dataTableColumn sorting BigDecimal #786
Comments
If you're concerned about your English, feel free to write in Spanish. Currently, the entire BootsFaces team speaks Spanish well enough. But judging from this ticket, you're English is better than you think, too :). |
Looks like something we have to investigate. I was sure that it's possible to combine the |
BTW, probably a simple work-around looks like so: <b:dataTableColumn label="Price" value="$#{item.formattedPrice} " data-order="#{item.price}"/> In this case, you'd have to implement a special getter |
Hey! Thanks for the reply. Yes, I thought it. Just I tried to re use the converter tag. But look at it. I made a little change on my code. I deleted the
|
That's really astonishing! Only - I tried your original code with our showcase, and it seems to work, too. Something must be different, but I wonder what? <h:form>
<b:dataTable value="#{carPool.carPool}"
var="car"
onpage="console.log('page');">
<b:dataTableColumn value="#{car.brand}" />
<b:dataTableColumn value="#{car.type}" />
<b:dataTableColumn value="#{car.color}" />
<b:dataTableColumn value="#{car.year}" order="asc" />
<b:dataTableColumn label="precio" data-order="#{car.price}">
<h:outputText value="#{car.price}">
<f:convertNumber type="currency" currencySymbol="$" locale="en_US"/>
</h:outputText>
</b:dataTableColumn>
<b:dataTableColumn value="#{car.enginePower}" label="Engine Power (hp)" />
</b:dataTable>
</h:form> |
Setting the locale to "es" doesn't make any difference. The "$" is displayed before the currency, and the decimal point is a comma. But still, the sort order seems to work. |
Sorry for my delay. I see, it works great. Moreover, I created a simple project with a minimal set of dependencies and I can not reproduce my own case. So, it must be closed. Sorry for waste your time. In other hand, I realized that our prices are printed in a different way: So, I have an issue in other place, maybe when I mapping the database field to my entity. I will check it. Thanks a lot! |
I didn't consider it a waste of time :). |
First of all, sorry for my bad English.
I'm having an issue sorting prices with format in a
b:dataTableColumn
. The price attribute of my item is aBigDecimal
.Here a snippet of the code:
Here I show the result:

Note:
I can sort the items perfectly deleting the
h:outputText
This is the working code:
but I wanna give some format to my prices
I´m using bootsfaces 1.0.1
Thanks and great job. If you need something else please tell me.
Alejandro
The text was updated successfully, but these errors were encountered: