Reputation: 3636
I am trying to display a numeric value in a link in a view column with correct numeric converters.
In the picture below you can see two columns, the first column (red) show the link with a numeric value and the second column(green) just show the column value.
Both columns are using converters to convert the values to numeric and to format using two decimals.
The first column is my problem, I need this to also show two decimals and also display as a numeric value with comma (comma is set because I have swedish language set in my browser)
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:viewPanel rows="30" id="viewPanel1" var="entry">
<xp:this.data>
<xp:dominoView var="v" viewName="Data"></xp:dominoView>
</xp:this.data>
<xp:viewColumn columnName="Price" id="Price" displayAs="hidden">
<xp:this.facets><xp:viewColumnHeader xp:key="header" id="viewColumnHeader2"></xp:viewColumnHeader></xp:this.facets>
<xp:link escape="true" text="#{entry.Price}" id="link8">
<xp:this.converter>
<xp:convertNumber pattern="0.00"></xp:convertNumber>
</xp:this.converter>
</xp:link>
</xp:viewColumn>
<xp:viewColumn columnName="Price" id="viewColumn1">
<xp:this.facets>
<xp:viewColumnHeader xp:key="header" id="viewColumnHeader1"></xp:viewColumnHeader>
</xp:this.facets>
<xp:this.converter>
<xp:convertNumber pattern="0.00"></xp:convertNumber>
</xp:this.converter>
</xp:viewColumn>
</xp:viewPanel>
The view in Notes contain only one column that display the value from a numeric field
How can I get the value in the link column to show the same value as in the correct view column
Upvotes: 1
Views: 88
Reputation: 3395
What about leaving the text property of the link alone and create a xp:text node inside the xp:link and do the conversation there? Not tested it but that would workaround the fact Paul pointed to.
Upvotes: 5
Reputation: 15739
It looks like a known problem http://www.fdehedin.ch/168/format-a-number-in-xplink. Because it's just the converter property of the component, I suspect it's trying to convert the value
property of the xp:link
, which is the property the converter runs on for other components.
Upvotes: 3